eth_call
to call the totalSupply()
method from the WFTM Token smart contract on Fantom Chain.object
— the transaction call object:
from
— (optional) the address string used to send the transaction.to
— the string of the address to which the transaction is directed, a wallet, or a smart contract.gas
— (optional) the maximum amount of gas that can be used by the transaction.gasprice
— (optional) the amount of gas price the sender is willing to pay for each gas unit in Wei.value
— (optional) the value sent with this transaction, encoded as hexadecimal.data
— (optional) additional data to be sent with the call, usually used to invoke functions from smart contracts as a string of the hash of the method signature and encoded parameters. See the Ethereum Contract ABI.quantity or tag
— the integer of a block encoded as hexadecimal or the string with:latest
— the most recent block in the blockchain and the current state of the blockchain at the most recent block. A chain reorganization is to be expected.safe
—the block that received justification from the beacon chain. Although this block could be involved in a chain reorganization, it would necessitate either a coordinated attack by the majority of validators or severe propagation latency.finalized
—the block accepted as canonical by more than 2/3 of the validators. A chain reorganization is extremely unlikely, requiring burning at least 1/3 of the staked amount.earliest
— the earliest available or genesis block.pending
—the pending state and transactions block. This is the current state of transactions that have been broadcast to the network but have not yet been included in a block.data
— the result of executing the specified call on the Ethereum Virtual Machine (EVM), encoded as a hexadecimal string.eth_call
code exampleseth_call
to simulate a transfer or a smart contract transaction, the sender account must have a sufficient balance to cover the associated gas fee.
0x
, indicating a successful transaction. This implies that the transaction will be executed without errors when the code is used to send the transaction.
eth_call
is calling smart contract functions. For example, interact with an ERC-20 token smart contract deployed on the Fantom network and retrieve the balance of a specific account.The result of the call.
The response is of type object
.