Configuration
gasPriceAt
Returns the unit price of gas in peb that was effective at the given block height.
Parameters
Name | Type | Description |
---|---|---|
defaultBlock | Number | String | (optional) If you don't pass this parameter, the default block set by caver.klay.defaultBlock will be used. |
callback | Function | (optional) Optional callback, returns an error object as the first parameter and the result as the second. |
Return Value
Promise
returns String
- A numeric string of the gas price in peb.
Example
getChainId
Returns the chain ID of the chain.
Parameters
Name | Type | Description |
---|---|---|
callback | Function | (optional) Optional callback, returns an error object as the first parameter and the result as the second. |
Return Value
Promise
returns Number
- Integer of the chain ID of the chain.
Example
getGasPrice
Returns the unit price defined in the Klaytn network.
Parameters
Name | Type | Description |
---|---|---|
callback | Function | (optional) Optional callback, returns an error object as the first parameter and the result as the second. |
Return Value
Promise
returns String
- Number string of the current unit price in peb.
Example
getNodeInfo
Returns the current client version of a Klaytn node.
Parameters
Name | Type | Description |
---|---|---|
callback | Function | (optional) Optional callback, returns an error object as the first parameter and the result as the second. |
Return Value
Promise
returns String
- The current client version of a Klaytn node.
Example
getProtocolVersion
Returns the Klaytn protocol version of the node. The current version (as of v1.9.0) of Cypress/Baobab is istanbul/65
.
Parameters
Name | Type | Description |
---|---|---|
callback | Function | (optional) Optional callback, returns an error object as the first parameter and the result as the second. |
Return Value
Promise
returns String
- The Klaytn protocol version of the node.
Example
isSenderTxHashIndexingEnabled
Returns true
if the node is indexing sender transaction hash to transaction hash mapping information.
Parameters
Name | Type | Description |
---|---|---|
callback | Function | (optional) Optional callback function. The callback is fired with an error object as the first parameter and the result as the second. |
Return Value
Promise
returns Boolean
- true
means the node is indexing the sender transaction hash to find the fee-payer-signed transaction. For detailed information, please see Klaytn Platform API - klay_getTransactionBySenderTxHash and Klaytn Transactions - Fee Delegation and SenderTxHash.
Example
isParallelDBWrite
Returns true
if the node is writing blockchain data in parallel manner. It is enabled by default.
Parameters
Name | Type | Description |
---|---|---|
callback | Function | (optional) Optional callback, returns an error object as the first parameter and the result as the second. |
Return Value
Promise
returns Boolean
- true
means the node is writing blockchain data in a parallel manner. Returns false
if the node is writing the data in a serial manner.
Example
rewardbase
Returns the rewardbase of the current node. Rewardbase is the address of the account where the block reward goes to. Only the Klaytn Consensus Nodes (CN) have the rewardbase in their configuration. See Configuration File.
Parameters
Name | Type | Description |
---|---|---|
callback | Function | (optional) Optional callback, returns an error object as the first parameter and the result as the second. |
Return Value
Promise
returns String
- The rewardbase of the current node.
Example
Last updated