/getGasLimitSuggestedForTransactionToEvmContractWithContractInfo
1 min
POST
http://1.1.1.1/getGasLimitSuggestedForTransactionToEvmContractWithContractInfo
account_idintegerthe account used in this operation
contract_addressstringthe contract address used in this operation
amountstring<p>Amount that was transferred in the crypto's smallest units (satoshi, wei, drops,...)</p>
gas_priceinteger<p>the gas_price we want to transfer with, in Wei</p>
function_namestring<p>representing the function name to call, e.g. "foo" (with no params).</p>
parameters_fields_types_and_valuesobjectlist of pairs of "type" and value for each parameter in the function
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>
evm_coin_symbolstringThe EVM coin symbol to use in this operation
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 to send an Ethereum (ETH) transaction.
200success
curl --request POST \
--url 'http://1.1.1.1/getGasLimitSuggestedForTransactionToEvmContractWithContractInfo?account_id=1&contract_address=0xa1fcfa3f6d99c8bbdc9d5b321d229767213c1a68&amount=1000000000&gas_price=13762495&function_name=transfer¶meters_fields_types_and_values=%22{%5Cn%20%20%5C%22exampleArray%5C%22%3A%20[%5Cn%20%20%20%20[%5C%22address%5C%22%2C%20%5C%220x862842A56B5D5F30B7d519cCe683983F57499cE6%5C%22]%2C%5Cn%20%20%20%20[%5C%22uint%5C%22%2C%20%5C%22100000000000000000%5C%22]%5Cn%20%20]%5Cn}%5Cn%22&validate_transaction=False&evm_coin_symbol=ETH&specificFromAddress=0x862842A56B5D5F30B7d519cCe683983F57499cE6' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"FunctionData": {
"AccountId": 1,
"CoinType": "ETH",
"Fee": {
"GasPrice": "10000000000",
"MaxPriorityFee": "1000000000"
},
"SpecificFromAddress": 7.6590259879851e+47,
"Transactions": [
{
"AmountToTransfer": "10000000000",
"DestinationAddress": "0xYourDestinationAddress"
}
]
},
"Meta": {
"FunctionName": "getGasLimitSuggestedForTransactionToEvmContractWithContractInfo",
"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: getGasLimitSuggestedForTransactionToEvmContractWithContractInfo(1, "0xa1fcfa3f6d99c8bbdc9d5b321d229767213c1a68", "1000000000", 13762495, "transfer", [["uint256", "92950976885381738973480656401344479949841893918034446855553800139296100844961"], ["uint256", "2"]]) "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.