Infura Blockchain & Node Service

Demo to preview the settings

Introduction

This plugin gives access to the Infura platform that connects the user interface (UI) of the dApps to an external smart contract on the Ethereum blockchain. Infura is a cloud infrastructure that lets you connect to Ethereum and other ERC-20 blockchains.

How to setup

To start you need to create a project at: https://infura.io/
  1. Create an account.
Image without caption
2. On the dashboard select "CREATE NEW PROJECT".
Image without caption
3. Select your node and project name.
Image without caption
4. Copy your link for the Infura project 
Image without caption
5. Go to the editor Plugin Tab and paste the HTTP link for the Infura project into the plugin settings.
After that, you can use the plugin’s API calls.
Image without caption

Infura API Call

1. eth_accounts

Returns a list of addresses owned by the client.
Parameters:
  • None
Return values: 
  • ADDRESSES - arrays of hex codes as strings representing the addresses owned by the client
☝
Note! While this JSON-RPC method is supported by Infura, it will not return any accounts. Infura does not support "unlocking" accounts. Instead, users should send already signed raw transactions using eth_sendRawTransaction.

2. eth_blockNumber

Returns the current "latest" block number.
Parameters:
  • None
Return values:
  • BLOCK NUMBER - a hex code of an integer representing the current block number the client is on.

3. eth_call

Executes a new message call immediately without creating a transaction on the block chain.
To prevent API abuse, the gas parameter in eth_estimateGas and eth_call is capped at 10x (1000%) the current block gas limit. You can recreate this behavior in your local test environment (Ganache, Besu, Geth, or another client) via the rpc.gascap command-line option.
Image without caption
Parameters:
  • From - 20 Bytes - The address the transaction is sent from.
  • To - 20 Bytes - The address the transaction is directed to.
  • gas - Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
  • GasPrice - Integer of the gasPrice used for each paid gas.
  • Value - Integer of the value sent with this transaction.
  • Data - Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI
  • Block - an integer block number, or the string "latest", "earliest" or "pending"
Return values:
  • RETURN VALUE - the return value of the executed contract method.

4. eth_chainId

Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by EIP-155.
Parameters:
  • None
Return values:
  • QUANTITY - big integer of the current chain id.

5. eth_estimateGas

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain.
☝
Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
Image without caption
Parameters:
  • From - 20 Bytes - The address the transaction is sent from.
  • To - 20 Bytes - The address the transaction is directed to.
  • gas - Integer of the gas provided for the transaction execution. eth_estimateGas consumes zero gas, but this parameter may be needed by some executions.
  • GasPrice - Integer of the gasPrice used for each paid gas
  • Value - Integer of the value sent with this transaction
  • Data - Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI
Return values:
  • GAS USED - the amount of gas used.

6. eth_gasPrice

Returns the current gas price in wei.
Parameters:
  • None
Return values:
  • GAS PRICE - a hex code of an integer representing the current gas price in wei.

7. eth_getBalance

Returns the balance of the account of the given address.
Image without caption
Parameters:
  • Wallet - a string representing the address (20 bytes) to check for the balance
Return values:
  • BALANCE - integer of the current balance in Wei.

8. eth_getBlockByHash

Returns information about a block by hash.
Image without caption
Parameters:
  • BlockHash - a string representing the hash (32 bytes) of a block.
Return values:
BLOCK - A block object, or null when no block was found
  • number: the block number. Null when the returned block is the pending block.
  • hash: 32 Bytes - hash of the block. Null when the returned block is the pending block.
  • parentHash: 32 Bytes - hash of the parent block.
  • nonce: 8 Bytes - hash of the generated proof-of-work. Null when the returned block is the pending block.
  • sha3Uncles: 32 Bytes - SHA3 of the uncle's data in the block.
  • logsBloom: 256 Bytes - the bloom filter for the logs of the block. Null when the returned block is the pending block.
  • transactionsRoot: 32 Bytes - the root of the transaction trie of the block.
  • stateRoot: 32 Bytes - the root of the final state trie of the block.
  • receiptsRoot: 32 Bytes - the root of the receipts trie of the block.
  • miner: 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
  • difficulty: integer of the difficulty for this block.
  • totalDifficulty: integer of the total difficulty of the chain until this block.
  • extraData: the "extra data" field of this block.
  • size: integer the size of this block in bytes.
  • gasLimit: the maximum gas allowed in this block.
  • gasUsed: the total used gas by all transactions in this block.
  • timestamp: the UNIX timestamp for when the block was collated.
  • transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • uncles: an Array of uncle hashes.

9. eth_getBlockByNumber

Image without caption
Parameters:
  • BlockNumber - an integer block number, or the string "latest", "earliest" or "pending".
Return values:
BLOCK - A block object, or null when no block was found
  • number: the block number. Null when the returned block is the pending block.
  • hash: 32 Bytes - hash of the block. Null when the returned block is the pending block.
  • parentHash: 32 Bytes - hash of the parent block.
  • nonce: 8 Bytes - hash of the generated proof-of-work. Null when the returned block is the pending block.
  • sha3Uncles: 32 Bytes - SHA3 of the uncle's data in the block.
  • logsBloom: 256 Bytes - the bloom filter for the logs of the block. Null when the returned block is the pending block.
  • transactionsRoot: 32 Bytes - the root of the transaction trie of the block.
  • stateRoot: 32 Bytes - the root of the final state trie of the block.
  • receiptsRoot: 32 Bytes - the root of the receipts trie of the block.
  • miner: 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
  • difficulty: integer of the difficulty for this block.
  • totalDifficulty: integer of the total difficulty of the chain until this block.
  • extraData: the "extra data" field of this block.
  • size: integer the size of this block in bytes.
  • gasLimit: the maximum gas allowed in this block.
  • gasUsed: the total used gas by all transactions in this block.
  • timestamp: the UNIX timestamp for when the block was collated.
  • transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • uncles: an Array of uncle hashes.

10. eth_getBlockTransactionCountByHash

Returns the number of transactions in the block with the given block hash.
Image without caption
Parameters:
  • BlockHash - a string representing the hash (32 bytes) of a block.
Return values:
  • BLOCK TRANSACTION COUNT - a hex code of the integer representing the number of transactions in the provided block

11. eth_getBlockTransactionCountByNumber

Returns the number of transactions in the block with the given block number.
Image without caption
Parameters:
  • Block - an integer block number, or the string "latest", "earliest" or "pending".
Return values:
  • BLOCK TRANSACTION COUNT - a hex code of the integer representing the number of transactions in the provided block

12. eth_getCode

Returns the compiled smart contract code, if any, at a given address.
Image without caption
Parameters:
  • Wallet - an integer block number, or the string "latest", "earliest" or "pending".
  • Block - an integer block number, or the string "latest", "earliest" or "pending"
Return values:
  • CODE - a hex of the code at the given address.

13. eth_getLogs

Returns an array of all logs matching a given filter object.
Image without caption
Parameters:
  • BlockHash - With the addition of EIP-234, blockHash 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.
  • Topics - Array of 32 Bytes DATA topics. Topics are order-dependent.
Return values:
LOG OBJECTS - An array of log objects, or an empty array if nothing has changed since last poll.
  • logs are objects with the following params:
  • removed: true when the log was removed, due to a chain reorganization. false if it's a valid log.
  • logIndex: integer of the log index position in the block. null when its pending log.
  • transactionIndex: integer of the transactions index position log was created from. null when its pending log.
  • transactionHash: 32 Bytes - hash of the transactions this log was created from. null when its pending log.
  • blockHash: 32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log.
  • blockNumber: the block number where this log was in. null when its pending. null when its pending log.
  • address: 20 Bytes - address from which this log originated.
  • data: contains one or more 32 Bytes non-indexed arguments of the log.
  • topics: Array of 0 to 4 32 Bytes 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.)

14. eth_getStorageAt

Returns the value from a storage position at a given address.
Image without caption
Parameters:
  • Address - a string representing the address (20 bytes) of the storage
  • Block - an integer block number, or the string "latest", "earliest" or "pending".
  • Position - a hex code of the position in the storage
Return values:
  • STORAGE VALUE - a hex code of the integer indicating the value of the storage position at the provided address

15. eth_getTransactionByBlockHashAndIndex

Returns information about a transaction by block hash and transaction index position.
Image without caption
Parameters:
  • BlockHash - a string representing the hash (32 bytes) of a block
  • Index - a hex of the integer representing the position in the block
Return values:
TRANSACTION - A transaction object, or null when no transaction was found
  • hash: 32 Bytes - hash of the transaction.
  • nonce: the number of transactions made by the sender prior to this one.
  • blockHash: 32 Bytes - hash of the block where this transaction was in. null when its pending.
  • blockNumber: block number where this transaction was in. null when its pending.
  • transactionIndex: integer of the transactions index position in the block. null when its pending.
  • from: 20 Bytes - address of the sender.
  • to: 20 Bytes - address of the receiver. null when its a contract creation transaction.
  • value: value transferred in Wei.
  • gasPrice: gas price provided by the sender in Wei.
  • gas: gas provided by the sender.
  • input: the data send along with the transaction.

16. eth_getTransactionByBlockNumberAndIndex

Returns information about a transaction by block number and transaction index position.
Image without caption
Parameters:
  • Block - an integer block number, or the string "latest", "earliest" or "pending"
  • Index - a hex of the integer representing the position in the block
Return values:
TRANSACTION - A transaction object, or null when no transaction was found
  • hash: 32 Bytes - hash of the transaction.
  • nonce: the number of transactions made by the sender prior to this one.
  • blockHash: 32 Bytes - hash of the block where this transaction was in. null when its pending.
  • blockNumber: block number where this transaction was in. null when its pending.
  • transactionIndex: integer of the transactions index position in the block. null when its pending.
  • from: 20 Bytes - address of the sender.
  • to: 20 Bytes - address of the receiver. null when its a contract creation transaction.
  • value: value transferred in Wei.
  • gasPrice: gas price provided by the sender in Wei.
  • gas: gas provided by the sender.
  • input: the data send along with the transaction.

17. eth_getTransactionByHash

Returns information about a transaction for a given hash.
Image without caption
Parameters:
  • Hash - a string representing the hash (32 bytes) of a transaction.
Return values:
TRANSACTION - A transaction object, or null when no transaction was found
  • hash: 32 Bytes - hash of the transaction.
  • nonce: the number of transactions made by the sender prior to this one.
  • blockHash: 32 Bytes - hash of the block where this transaction was in. null when its pending.
  • blockNumber: block number where this transaction was in. null when its pending.
  • transactionIndex: integer of the transactions index position in the block. null when its pending.
  • from: 20 Bytes - address of the sender.
  • to: 20 Bytes - address of the receiver. null when its a contract creation transaction.
  • value: value transferred in Wei.
  • gasPrice: gas price provided by the sender in Wei.
  • gas: gas provided by the sender.
  • input: the data send along with the transaction.

18. eth_getTransactionCount

Returns the number of transactions sent from an address.
Image without caption
Parameters:
  • Wallet - a string representing the address (20 bytes) to check for transaction count for.
  • Block - an integer block number, or the string "latest", "earliest" or "pending".
Return values:
  • TRANSACTION COUNT - a hex code of the integer representing the number of transactions sent from this address.

19. eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash. Note that the receipt is not available for pending transactions.
Image without caption
Parameters:
  • Hash - a string representing the hash (32 bytes) of a transaction
Return values: 
TRANSACTION RECEIPT - A transaction receipt object, or null when no receipt was found:
  • transactionHash: 32 Bytes - hash of the transaction.
  • transactionIndex: integer of the transactions index position in the block.
  • blockHash: 32 Bytes - hash of the block where this transaction was in.
  • blockNumber: block number where this transaction was in.
  • from: 20 Bytes - address of the sender.
  • to: 20 Bytes - address of the receiver. Null when the transaction is a contract creation transaction.
  • cumulativeGasUsed: the total amount of gas used when this transaction was executed in the block.
  • gasUsed: the amount of gas used by this specific transaction alone.
  • contractAddress: 20 Bytes - the contract address created, if the transaction was a contract creation, otherwise - null.
  • logs: Array - Array of log objects, which this transaction generated.
  • logsBloom: 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.

20. eth_getUncleByBlockHashAndIndex

Returns information about the 'Uncle' of a block by hash and the Uncle index position.
Image without caption
Parameters:
  • BlockHash - a string representing the hash (32 bytes) of a block
  • index - a hex of the integer indicating the uncle's index position.
Return values:
BLOCK - A block object, or null when no block was found
  • number: the block number. Null when the returned block is the pending block.
  • hash: 32 Bytes - hash of the block. null when its pending block.
  • parentHash: 32 Bytes - hash of the parent block.
  • nonce: 8 Bytes - hash of the generated proof-of-work. Null when the returned block is the pending block.
  • sha3Uncles: 32 Bytes - SHA3 of the uncles data in the block.
  • logsBloom: 256 Bytes - the bloom filter for the logs of the block. Null when the returned block is the pending block.
  • transactionsRoot: 32 Bytes - the root of the transaction trie of the block.
  • stateRoot: 32 Bytes - the root of the final state trie of the block.
  • receiptsRoot: 32 Bytes - the root of the receipts trie of the block.
  • miner: 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
  • difficulty: integer of the difficulty for this block.
  • totalDifficulty: integer of the total difficulty of the chain until this block.
  • extraData: the "extra data" field of this block.
  • size: integer the size of this block in bytes.
  • gasLimit: the maximum gas allowed in this block.
  • gasUsed: the total used gas by all transactions in this block.
  • timestamp: the unix timestamp for when the block was collated.
  • uncles: an Array of uncle hashes.

21. eth_getUncleByBlockNumberAndIndex

Returns information about the 'Uncle' of a block by hash and the Uncle index position.
Image without caption
Parameters:
  • Block - an integer block number, or the string "latest", "earliest" or "pending"
  • index - a hex of the integer indicating the uncle's index position.
Return values:
BLOCK - A block object, or null when no block was found
  • number: the block number. null when its pending block.
  • hash: 32 Bytes - hash of the block. null when its pending block.
  • parentHash: 32 Bytes - hash of the parent block.
  • nonce: 8 Bytes - hash of the generated proof-of-work. null when its pending block.
  • sha3Uncles: 32 Bytes - SHA3 of the uncles data in the block.
  • logsBloom: 256 Bytes - the bloom filter for the logs of the block. null when its pending block.
  • transactionsRoot: 32 Bytes - the root of the transaction trie of the block.
  • stateRoot: 32 Bytes - the root of the final state trie of the block.
  • receiptsRoot: 32 Bytes - the root of the receipts trie of the block.
  • miner: 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
  • difficulty: integer of the difficulty for this block.
  • totalDifficulty: integer of the total difficulty of the chain until this block.
  • extraData: the "extra data" field of this block.
  • size: integer the size of this block in bytes.
  • gasLimit: the maximum gas allowed in this block.
  • gasUsed: the total used gas by all transactions in this block.
  • timestamp: the unix timestamp for when the block was collated.
  • uncles: an Array of uncle hashes.

22. eth_getUncleCountByBlockHash

Returns the number of uncles in a block from a block matching the given block hash.
Image without caption
Parameters:
  • BlcokHash - a string representing the hash (32 bytes) of a block.
Return values:
  • BLOCK TRANSACTION COUNT - a hex code of the integer representing the number of uncles in the provided block

23. eth_getUncleCountByBlockNumber

Returns the number of uncles in a block from a block matching the given block number.
Image without caption
Parameters:
  • Blcok - an integer block number, or the string "latest", "earliest" or "pending".
Return values:
  • BLOCK TRANSACTION COUNT - a hex code of the integer representing the number of uncles in the provided block

24. eth_getWork

Returns the hash of the current block, the seedHash, and the boundary condition to be met ("target").
Parameters:
  • none
Return values:
WORK ARRAY
  • 32 Bytes - current block header pow-hash
  • 32 Bytes - the seed hash used for the DAG.
  • 32 Bytes - the boundary condition ("target"), 2^256 / difficulty.

25. eth_hashrate

Returns the number of hashes per second that the node is mining with. Only applicable when the node is mining.
Parameters:
  • none
Return values:
  • HASHRATE - a hex code of an integer representing the number of hashes per second.

26. eth_mining

Returns true if client is actively mining new blocks.
Parameters:
  • none
Return values:
  • IS MINING FLAG - a boolean indicating if the client is mining

27. eth_protocolVersion

Returns the current ethereum protocol version.
Parameters:
  • none
Return values:
  • PROTOCOL VERSION - a string indicating the current ethereum protocol version

28. eth_sendRawTransaction

Submits a pre-signed transaction for broadcast to the Ethereum network.
Image without caption
Parameters:
  • Data - The signed transaction data.
Return values:
  • TRANSACTION HASH - 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available
NOTE - Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.

29. eth_submitWork

Used for submitting a proof-of-work solution.
Image without caption
Parameters:
  • Array - WORK ARRAY
  • 8 Bytes - The nonce found (64 bits)
  • 32 Bytes - The header's pow-hash (256 bits)
  • 32 Bytes - The mix digest (256 bits)
Return values:
  • IS VALID FLAG - returns true if the provided solution is valid, otherwise false.

30. eth_syncing

Returns an object with data about the sync status or false.
Parameters:
  • none
Return values:
  • SYNC STATUS - a boolean as false only when not syncing
  • SYNC BLOCKS i. startingBlock - a hexcode of the integer indicating the block at which the import started (will only be reset, after the sync reached his head) ii. currentBlock - a hexcode of the integer indicating the current block, same as eth_blockNumber iii. highestBlock - a hexcode of the integer indicating the highest block

31. net_listening

Returns true if client is actively listening for network connections.
Parameters:
  • none
Return values:
  • LISTENING FLAG - a boolean indicating whether the client is actively listening for network connections

32. net_peerCount

Returns the number of peers currently connected to the client.
Parameters:
  • none
Return values:
  • PEER COUNT - integer of the number of connected peers.

33. net_version

Returns the current network id.
Parameters:
  • none
Return values:
  • NETWORK ID - a string representing the current network id.

34. web3_clientVersion

Returns the current client version.
Parameters:
  • none
Return values:
  • STRING - The current client version

35. parity_nextNonce

Returns next available nonce for transaction from a given account. Includes pending block and transaction queue.
NOTE: this method is only supported on the kovan network through our HTTPS and WebSocket endpoints.
Image without caption
Parameters:
  • Wallet - a string representing the address (20 bytes) to check for transaction count for.
Return values:
  • TRANSACTION COUNT - a hex code of the integer representing the number of transactions sent from this address.

36. eth_newFilter

Image without caption
Parameters:
  • Topics - Array of 32 Bytes DATA topics. Topics are order-dependent.
A note on specifying topic filters: Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:
  • [] - anything"
  • [A] - A in first position (and anything after)
  • [null, B] - anything in the first position AND B in second position (and anything after)
  • [A, B] - A in first position AND B in second position (and anything after)"
  • [[A, B], [A, B]] - (A OR B) in first position AND (A OR B) in second position (and anything after)
Filter IDs will be valid for up to fifteen minutes and can be polled by any connection using the same v3 project ID.
Return values:
  • FILTER ID - A string denoting the newly created filter id

37. eth_newBlockFilter

Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges.
Filter IDs will be valid for up to fifteen minutes and can be polled by any connection using the same v3 project ID.
Parameters:
  • none
Return values:
  • FILTER ID - A string denoting the newly created filter ID

38. eth_getFilterChanges

Polling method for a filter, which returns an array of logs that occurred since the last poll.
Image without caption
Parameters:
  • FilterID - Filter must be created by calling either eth_newFilter or eth_newBlockFilter.
Return values:
  • LOG OBJECT 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 (32 Bytes), e.g. ["0x3454645634534..."].
  • For filters created with eth_newFilter logs are objects with the following params:
  • removed: true when the log was removed, due to a chain reorganization. false if it's a valid log.
  • logIndex: integer of the log index position in the block. null when its pending log.
  • transactionIndex: integer of the transactions index position log was created from. null when its pending log.
  • transactionHash: 32 Bytes - hash of the transactions this log was created from. null when its pending log.
  • blockHash: 32 Bytes - hash of the block where this log was in. null when it's pending. null when its pending log.
  • blockNumber: the block number where this log was in. null when it's pending. null when its pending log.
  • address: 20 Bytes - address from which this log originated.
  • data: DATA - contains the 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.)

39. eth_uninstallFilter

Uninstalls a filter with the given ID. Should always be called when watching is no longer needed. Additionally filters time out when they aren't requested with eth_getFilterChanges for a period of time.
Image without caption
Parameters:
  • FilterID - Uninstalls a filter with the given ID. Should always be called when watching is no longer needed. Additionally filters time out when they aren't requested with eth_getFilterChanges for a period of time.
Return values :
  • UNINSTALLED FLAG - true if the filter was successfully uninstalled, otherwise false.