/getGasLimitSuggestedForTransactionToEvmContractWithRawHex
1 min
POST
http://1.1.1.1/getGasLimitSuggestedForTransactionToEvmContractWithRawHex
account_idintegerthe account used in this operation
contract_addressstringaddress of the contract to send to
evm_coin_symbolstring<p>the coin symbol of the EVM network on which the smart contract is deployed, for example: ETH, CELO, etc...</p>
raw_data_in_hexstring<p>data parsed and encoded already by the standard, must start with 0x</p>
validate_transactionboolean<p>if this is true, the MPC wallet will access the node to check if this transaction is
likely to fail by running dry-run, and will block the transaction if it is</p>
gas_pricestring<p>the gas_price we want to transfer with, in Wei</p>
amountstring<p>Amount that was transferred in the crypto's smallest units (satoshi, wei, drops,...)</p>
specificFromAddressstring<p>Deposit address to send from - can be used in the following cases:</p>
<ul>
<li>
<ul>
<li>For both UTXO and nonce based transactions if the account is defined as an Endpoint account</li>
</ul>
</li>
<li>
<ul>
<li>For nonce based transactions if the account is defined as an Omnibus account</li>
</ul>
</li>
</ul>
bodyobjectRequest data for a smart contract transaction on the Ethereum (ETH) network.
200success
curl --request POST \
--url 'http://1.1.1.1/getGasLimitSuggestedForTransactionToEvmContractWithRawHex?account_id=1&contract_address=0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe&evm_coin_symbol=ETH&raw_data_in_hex=0xa9059cbb000000000000000000000000963d0aef2a6ba868b38cb032f2a81db145c467fb0000000000000000000000000000000000000000000000056bc75e2d63100000&validate_transaction=true&gas_price=13762495&amount=10000000000&specificFromAddress=0x862842A56B5D5F30B7d519cCe683983F57499cE6' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"FunctionData": {
"AccountId": 1,
"CoinType": "ETH",
"DataForContract": {
"Amount": "10000000000",
"ContractAddress": "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe",
"RawData": "0xa9059cbb000000000000000000000000963d0aef2a6ba868b38cb032f2a81db145c467fb0000000000000000000000000000000000000000000000056bc75e2d63100000",
"validateTransaction": "true"
},
"Fee": {
"GasPrice": "13762495"
},
"SpecificFromAddress": "0x862842A56B5D5F30B7d519cCe683983F57499cE6",
"Transactions": [
{
"AmountToTransfer": "10000000000",
"DestinationAddress": "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe"
}
]
},
"Meta": {
"FunctionName": "getGasLimitSuggestedForTransactionToEvmContractWithRawHex",
"RandomData": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
"Destination": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea",
"Time": "2021-02-07T18:37:46.948Z",
"Source": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99",
"AccessToken": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
}
}'- return - the gas limit suggested for EVM type contract with raw hex.example: getGasLimitSuggestedForTransactionToEvmContractWithRawHex(1, "0xc4aae221f1c62e8cbc657af5b051ea573914cfc7", "10000000000", 13762495, "0xd0f89344000003328c00000200000300000000000000000000000000000000000000000001006390c3cf00007b7c8f000001000000006390c42300007b7c95789c6260e8fcd1de24d9d1d0542237c5890103f0372cd977cf722ba6041cf036b16e3edfa46eb68039b99573bdddb365e25ffcd9759ff87ff2b9a26112342bd1ecd8ae8f3cbeafdad816701e9c5090d923b871a55ac71b6351a96d75ce2cf59aa2f396a9955eb43f7cdd7513200000ffff17ba29c5")
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.