EVM API Reference
Last updated
Last updated
Returns the current Fractal protocol version.
Parameters
none
Returns
String
- The current ethereum protocol version
Example
Request
Response
Returns the current Fractal chain ID
none
String
- The current Fractal chain ID
Request
Response
Returns a list of addresses owned by client.
none
Array
- 20 Bytes - addresses owned by the client.
Request
Response
Returns a list of addresses owned by client.
Address
- 20 Bytes - address to check for balance.
Quantity or Tag
- (optional) Integer block number, or the string 'latest', 'earliest' or 'pending'.
Quantity
- integer of the current balance in wei.
Request
Response
Creates new message call transaction or a contract creation, if the data field contains code.
Object
- The transaction object
from
: Address
- 20 Bytes - The address the transaction is sent from.
to
: Address
- (optional) 20 Bytes - The address the transaction is directed to.
gas
: Quantity
- (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
gasPrice
: Quantity
- (optional) Integer of the gas price used for each paid gas.
value
: Quantity
- (optional) Integer of the value sent with this transaction.
data
: Data
- (optional) 4 byte hash of the method signature followed by encoded parameters. For details, see Ethereum Contract ABI.
nonce
: Quantity
- (optional) Integer of a nonce. This allows you to overwrite your own pending transactions that use the same nonce.
condition
: Object
- (optional) Conditional submission of the transaction. It can be either an integer block number { block: 1 } or UTC timestamp (in seconds) { time: 1491290692 } or null.
Hash
- 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.
Request
Response
Creates new message call transaction or a contract creation if the data field contains code.
Object
- The transaction call object
from
: Address
- 20 Bytes - The address the transaction is sent from.
to
: Address
- (optional) 20 Bytes - The address the transaction is directed to.
gas
: Quantity
- (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
gasPrice
: Quantity
- (optional) Integer of the gas price used for each paid gas.
value
: Quantity
- (optional) Integer of the value sent with this transaction.
data
: Data
- (optional) 4 byte hash of the method signature followed by encoded parameters. For details see Ethereum Contract ABI.
Quantity
or Tag
- (optional) Integer block number, or the string 'latest', 'earliest' or 'pending'.
Data
- the return value of the executed contract.
Request
Response
Returns the client's coinbase address.
none
Data
- 20 bytes - the current coinbase address.
Request
Response
Returns the current price per gas in wei.
none
Quantity
- integer of the current gas price in wei.
Request
Response
Returns the number of the most recent block.
none
Quantity
- integer of the current block number the client is on.
Request
Response
Returns the value from a storage position at a given address.
Address
- 20 Bytes - address of the storage.
Quantity
- integer of the position in the storage.
Quantity
or Tag
- (optional) integer block number, or the string 'latest', 'earliest' or 'pending'.
Data
- the value at this storage position.
Request
Response
Returns information about a block by hash.
Data
- 32 Bytes - Hash of a block
Boolean
- If true it returns the full transaction objects, if false only the hashes of the transactions.
Object
- A block object, or null
when no block was found:
number
: QUANTITY
- the block number. Null when it's a pending block.
hash
: DATA
, 32 Bytes - hash of the block. Null when it is a pending block.
parentHash
: DATA
, 32 Bytes - hash of the parent block.
nonce
: DATA
, 8 Bytes - hash of the generated proof-of-work. Null when it is a pending block.
sha3Uncles
: DATA
, 32 Bytes - SHA3 of the uncles data in the block.
logsBloom
: DATA
, 256 Bytes - the bloom filter for the logs of the block. Null when it is a pending block.
transactionsRoot
: DATA
, 32 Bytes - the root of the transaction trie of the block.
stateRoot
: DATA
, 32 Bytes - the root of the final state trie of the block.
receiptsRoot
: DATA
, 32 Bytes - the root of the receipts trie of the block.
miner
: DATA
, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
difficulty
: QUANTITY
- integer of the difficulty for this block.
totalDifficulty
: QUANTITY
- integer of the total difficulty of the chain until this block.
extraData
: DATA
- the “extra data” field of this block.
size
: QUANTITY
- integer the size of this block in bytes.
gasLimit
: QUANTITY
- the maximum gas allowed in this block.
gasUsed
: QUANTITY
- the total used gas by all transactions in this block.
timestamp
: QUANTITY
- the unix timestamp for when the block was collated.
transactions
: Array
- Array of transaction objects, or 32-byte transaction hashes, depending on the last given parameter.
uncles
: Array
- Array of uncle hashes.
Request
Response
Returns information about a block by hash.
Quantity
or Tag
- integer of a block number, or the string 'earliest', 'latest' or 'pending'.
Boolean
- If true it returns the full transaction objects, if false only the hashes of the transactions.
Object
- A block object, or null
when no block was found:
number
: QUANTITY
- the block number. Null when it is a pending block.
hash
: DATA
, 32 Bytes - hash of the block. Null when it is a pending block.
parentHash
: DATA
, 32 Bytes - hash of the parent block.
author
: Address
- 20 Bytes - alias of 'author'
miner
: DATA
, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
gasLimit
: QUANTITY
- the maximum gas allowed in this block.
gasUsed
: QUANTITY
- the total used gas by all transactions in this block.
timestamp
: QUANTITY
- the unix timestamp for when the block was collated.
transactions
: Array
- Array of transaction objects, or 32-byte transaction hashes, depending on the last given parameter.
Request
Response
Returns the number of transactions sent from an address.
Address
- 20 Bytes - address
Quantity
or Tag
- (optional) integer block number, or the string 'latest', 'earliest' or 'pending'.
Quantity
- integer of the number of transactions sent from this address.
Request
Response
Returns the number of transactions in a block from a block matching the given block hash.
Hash
- 32 Bytes - hash of a block
Quantity
- integer of the number of transactions in this block.
Request
Response
Returns the number of transactions in a block matching the given block number.
Quantity
or Tag
- (optional) integer block number, or the string 'latest', 'earliest' or 'pending'.
Quantity
- integer of the number of transactions in this block.
Request
Response
Returns code at a given address
Address
- 20 bytes - address
Quantity
or Tag
- (optional) integer block number, or the string 'latest', 'earliest' or 'pending'.
Data
- the code from the given address.
Request
Response
Creates new message call transactions or a contract creation for signed transactions.
Data
- The signed transaction data.
Hash
- 32 bytes - the transaction hash or the zero hash if the transaction is not yet available.
Request
Response
Makes a call or transaction, which won't be added to the blockchain, and returns the used gas, which can be used for estimating the used gas.
Object
- Same as eth_call parameters, except that all properties are optional.
from
: Address
- (optional) 20 Bytes - The address the transaction is sent from.
to
: Address
- (optional when creating new contract) 20 Bytes - The address the transaction is directed to.
gas
: Quantity
- (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
gasPrice
: Quantity
- (optional) Integer of the gas price used for each paid gas.
value
: Quantity
- (optional) Integer of the value sent with this transaction.
data
: Data
- (optional) 4 byte hash of the method signature followed by encoded parameters. For details,` see Ethereum Contract ABI.
Quantity
or Tag
- (optional) Integer block number, or the string 'latest', 'earliest' or 'pending', see the default block parameter.
Quantity
- The amount of gas used.
Request
Response
Returns the information about a transaction requested by transaction hash.
Hash
- 32 Bytes - hash of a transaction.
Object
- A transaction object, or null when no transaction was found:
hash
: Hash - 32 Bytes - hash of the transaction.
nonce
: Quantity
- the number of transactions made by the sender prior to this one.
blockHash
: Hash
- 32 Bytes - hash of the block where this transaction was in. null when its pending.
blockNumber
: Quantity
or Tag - block number where this transaction was in. null when its pending.
transactionIndex
: Quantity
- integer of the transactions index position in the block. null when its pending.
from
: Address
- 20 Bytes - address of the sender.
to
: Address
- 20 Bytes - address of the receiver. null when its a contract creation transaction.
value
: Quantity
- value transferred in Wei.
gasPrice
: Quantity
- gas price provided by the sender in Wei.
gas
: Quantity
- gas provided by the sender.
input
: Data
- the data send along with the transaction.
v
: Quantity
- the standardised V field of the signature.
standardV
: Quantity
- the standardised V field of the signature (0 or 1).
r
: Quantity
- the R field of the signature.
raw
: Data
- raw transaction data
publicKey
: Hash
- public key of the signer.
chainId
: Quantity
- the chain id of the transaction, if any.
creates
: Hash
- creates contract hash
condition
: Object
- (optional) conditional submission, Block number in block or timestamp in time or null.
Request
Response
Returns information about a transaction by block hash and transaction index position.
Data
- 32 bytes - hash of a block
Quantity
- integer of the transaction index position
Request
Returns information about a transaction by block number and transaction index position.
Quantity
or Tag
- a block number, or the string "earliest", "latest" or "pending".
Quantity
- integer of the transaction index position
Request
Returns the receipt of a transaction by transaction hash.
Hash
- hash of a transaction.
Object
- A transaction receipt object, or null
when no receipt was found:
blockHash
: Hash
- 32 Bytes - hash of the block where this transaction was in.
blockNumber
: Quantity
or Tag - block number where this transaction was in.
contractAddress
: Address
- 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
cumulativeGasUsed
: Quantity
- The total amount of gas used when this transaction was executed in the block.
from
: Address
- 20 Bytes - The address of the sender.
to
: Address
- 20 Bytes - The address of the receiver. null when it’s a contract creation transaction.
gasUsed
: Quantity
- The amount of gas used by this specific transaction alone.
logs
: Array
- Array of log objects, which this transaction generated.
logsBloom
: Hash
- 256 Bytes - A bloom filter of logs/events generated by contracts during transaction execution. Used to efficiently rule out transactions without expected logs.
root
: Hash
- 32 Bytes - Merkle root of the state trie after the transaction has been executed (optional after Byzantium hard fork EIP609)
status
: Quantity
- 0x0 indicates transaction failure , 0x1 indicates transaction success. Set for blocks mined after Byzantium hard fork EIP609, null before.
transactionHash
: Hash
- 32 Bytes - hash of the transaction.
transactionIndex
: Quantity
- Integer of the transactions index position in the block.
Request
Response
Returns an array of all logs matching a given filter object.
Object
- The filter options:
fromBlock
: QUANTITY
|TAG
- (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
toBlock
: QUANTITY
|TAG
- (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
address
: DATA
|Array
, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.
topics
: Array
of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options.
blockhash
: DATA
, 32 Bytes - (optional, future) With the addition of EIP-234, blockHash will be a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in in the filter criteria, then neither fromBlock nor toBlock are allowed.
Array
- Array of log objects, or an empty array if nothing has changed since last poll.
For filters created with eth_newBlockFilter
the return are block hashes (DATA
, 32 Bytes), e.g. ["0x3454645634534..."].
For filters created with eth_newPendingTransactionFilter
the return are transaction hashes (DATA
, 32 Bytes), e.g. ["0x6345343454645..."].
For filters created with eth_newFilter
logs are objects with following params:
removed
: TAG
- true when the log was removed, due to a chain reorganization. false if its a valid log.
logIndex
: QUANTITY
- integer of the log index position in the block. null when its pending log.
transactionIndex
: QUANTITY
- integer of the transactions index position log was created from. null when its pending log.
transactionHash
: DATA
, 32 Bytes - hash of the transactions this log was created from. null when its pending log.
blockHash
: DATA
, 32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log.
blockNumber
: QUANTITY
- the block number where this log was in. null when its pending. null when its pending log.
address
: DATA
, 20 Bytes - address from which this log originated.
data
: DATA
- contains one or more 32 Bytes non-indexed arguments of the log.
topics
: Array
of DATA
- Array of 0 to 4 32 Bytes DATA of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.)
Request
Response
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
Example
Parameters
Returns
See
Example
Response See
Parameters
Returns
See
Example
Response See
Parameters
Returns
Example
Parameters
Returns
Example