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
- Create an account.
2. On the dashboard select "CREATE NEW PROJECT".
3. Select your node and project name.
4. Copy your link for the Infura projectĀ
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.