ConfluxContext
This contract can be used in Solidity contract
to query Conflux Core network info including:
epochNumber
- Current epoch numberposHeight
- Current block height of PoS chainfinalizedEpochNumber
- The latest finalized (by PoS chain) PoW epoch number
Interface
ConfluxContext
's hex40 contract address is 0x0888000000000000000000000000000000000004
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.15;
interface ConfluxContext {
/*** Query Functions ***/
/**
* @dev get the current epoch number
* @return the current epoch number
*/
function epochNumber() external view returns (uint256);
/**
* @dev get the height of the referred PoS block in the last epoch
` * @return the current PoS block height
*/
function posHeight() external view returns (uint256);
/**
* @dev get the epoch number of the finalized pivot block.
* @return the finalized epoch number
*/
function finalizedEpochNumber() external view returns (uint256);
}