Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Returns an estimate of how much gas will be needed for the transaction to complete. When estimating gas, the transaction will not be automatically added to the network. This cannot be used as a hard indicator, as fluctuations on gas prices can occur very quickly, making estimates inaccurate after just a few seconds.
Request PayloadTransaction Call Object{from}
- Address from which the transaction is sent.
* Optional
{to}
- Address to which the transaction will be directed. {gas}
- Integer of gas provided for transaction.
* Optional
{gas_price}
- Integer of the gas price used for each paid gas.
* Optional
{value}
- Integer of the value sent with this transaction.
*Optional
{data}
- Hash of the method signature and encoded parameters.
* Optional
Result Fields{gas_used}
- The amount of gas estimated to be necessary for the transaction to complete.
Returns a list of addresses owned by the client.
Result Fields
{addresses}
- Array of hex codes as strings representing the addresses.
Returns the currently configured chain ID.
This value is used in replay-protected transaction signing.
Result Fields{hex}
- hex of the current chain ID.
Returns a base fee per gas and an effective estimate of the priority fee, using the gas history for the requested block range, if available.
{blockCount}
and {newestBlock}
are required parameters.
Result Fields{oldestBlock}
- Oldest block fetched, in hex. {baseFeePerGas}
- Array of block base fees per gas. {gasUsedRatio}
- Array of gas used ratios. {reward}
- Array of effective priority fees per gas data points from a single block.
Returns the balance of the account of a specific address.
Request Payload{address}
- Address to retrieve balance. {blockParameter}
- integer block number, or the string 'latest', 'earliest', or 'pending'.
Result Fields{balance}
- Current balance.
Returns the latest block sealed.
Result Fields{block_number}
- A hex code representing the current block number.
Returns the current gas price in wei.
Result Fields{gasPrice}
- Gas price in wei.
Returns information about a specific block.
Request Payload{blockParameter}
- A integer block number, or the string 'latest', 'earliest', or 'pending'. {showTxnDetailsFlag}
- True for full txn objects, and false for only hashes.
Result Fields{block}
- A block object, or null when no block was found.
{number}
- The block number, or null if the block is pending.
{hash}
- The block hash, or null if the block is pending. {parentHash}
- Hash of the parent block.
{nonce}
- Hash of the generated PoW, or null when the block is pending.
{sha3Uncles}
- SHA3 of uncles' data in the block.
{logsBloom}
- Bloom filter for the logs, or null when the block is pending.
{txnsRoot}
- Root of the txn trie of the block. {stateRoot}
- Root of the final state trie of the block.
{receiptsRoot}
- Root of the receipts trie of the block.
{miner}
- Beneficiary of the mining rewards.
{difficulty}
- Integer of difficulty of the block. {totalDifficulty}
- Integer of the total difficulty of the chain until this block.
{extraData}
- Extra data field of the block. Usually the validator's nickname.
{size}
- Size of the block in bytes.
{gasLimit}
- Maximum gas allowed in this block.
{timestamp}
- The unix timestamp for when the block was collated. {txns}
- Array of transaction objetcs.
{uncles}
- Array of uncle hashes.
Submits a pre-signed transaction for broadcast to the network.
Result Fields{txnHash}
- Transaction hash, or zero if the the hash isn't available yet.
Returns the transaction receipt of a specific transaction hash. Note that this isn't available for any transactions that hasn't been confirmed yet.
Request Payload{txnHash}
- Transaction hash.
Result Fields{txnReceipt}
- Transaction receipt object, or null when no receipt was found.
{txnHash}
- Hash of the transaction.
{txnIndex}
- Integer of the transactions index position in the block. {blockHash}
- Hash of the block where the transaction was placed. {blockNumber}
- Number of the block where the transaction was placed.
{from}
- Address of the sender.
{to}
- Address of the receiver.
{cumulativeGasUsed}
- Total amount of gas used by the block.
{gasUsed}
- Amount of gas used by the specific transaction.
{contractAddress}
- The contract address created, or null if no new contract was created.
{logs}
- Array of log objects.
{logsBloom}
- Bloom filter for light clients.
{status}
- Boolean for success or failure.
Executes a new message call without creating a transaction.
Request PayloadTransaction Call Object{from}
- Address from which the transaction is sent. {to}
- Address to which the transaction will be directed. {gas}
- Integer of gas provided for transaction.
* Optional {gas_price}
- Integer of the gas price used for each paid gas.
* Optional {value}
- Integer of the value sent with this transaction. *Optional {data}
- Hash of the method signature and encoded parameters.
* Optional Block Parameter{block_parameter}
- Integer block number, or the string 'latest', 'earliest', or 'pending'.
Result Fields{returned_value}
- The returned value of the executed contract method.
Returns the compiled smart contract code, if any, of a given address.
Request Payload{address}
- Address used to fetch the information. {blockParameter}
- Integer block number, or the string 'latest', 'earliest', or 'pending'.
Result Fields{code}
- A hex code of the given address.
PHI Network supports a subset of the Ethereum methods.
You can use any public or private RPC endpoints to request using the JSON RPC methods.
You can use our officially supported public RPC endpoint https://connect.phi.network to use the methods below.
PHI Smart Chain API Documentation