post https://polygon-mainnet-archive.allthatnode.com:8545/
Creates new message call transaction or a contract creation, if the data field contains code.
Not Supported
All That Node does not support the
eth_sendTransaction
method as we doesn't store the user's private key needed to sign the transaction. Instead, you should use theeth_sendRawTransaction
method for transaction submission.
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-rpc.allthatnode.com:8545/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
"jsonrpc":"2.0",
"id":1,
"method":"eth_sendTransaction",
"params":[
{
"from": "0xac344a148a2d30d69984f4d387e9bfdbc04e2abf",
"to": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
"gas": "0x15F90",
"gasPrice": "0x9184e72a000",
"value": "0x0",
"data": "0x095ea7b30000000000000000000000009b11bc9fac17c058cab6286b0c785be6a65492ef00000000000000000000000000000000000000000000000000000000002932e0"
}
]
}'
Returns
DATA
, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.- Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.
{
"id":1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}