eth_signTransaction-polygon

Signs a transaction that can be submitted to the network at a later time using with eth_sendRawTransaction.

โ—๏ธ

Not Supported

All That Node does not support the eth_signTransaction method as we doesn't store the user's private key needed to sign the transaction.

Parameters

  • Object - The transaction object
    • from: DATA, 20 Bytes - The address the transaction is sent from.
    • to: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.
    • gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
    • gasPrice: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas.
    • value: QUANTITY - (optional) Integer of the value sent with this transaction.
    • data: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.
    • nonce: QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
curl https://polygon-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"eth_signTransaction",
    "params":[
      {
    "from": "0x17c0f36f80A6ed37F09650C52f24C76a396eDf18",
    "to": "0x7C4CBc1C8CB34e3AE021E66EfDa4C69D759fF499",
    "gas": "0x15F90",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0x",
    "nonce": "0x7"
  }
    ]
}'

Returns

  • DATA, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}

Try Yourself

Language
Click Try It! to start a request and see the response here!