V2 InternalContracts
Conflux v2 hardfork has introduced three new internal contracts: ConfluxContext
, PoSRegister
, CrossSpaceCall
#
ConfluxContextThis contract can be used to query Conflux network info including:
epochNumber
- Current epoch numberposHeight
- Current block height of PoS chainfinalizedEpochNumber
- The latest finalized (by PoS chain) PoW epoch number
ConfluxContext
's hex40 contract address is 0x0888000000000000000000000000000000000004
#
PoSRegisterThis contract is used let user participate in PoS chain. If anyone want to become a PoS node, he need to interact with this contract. This contract provide serveral methods to increase or decrease PoS votes:
register
- Regist in PoS chain to become a PoS nodeincreaseStake
- Increase PoS stakeretire
- Decrease PoS stake
Also several methods to query one account's PoS info:
getVotes
- Query one account's votes info, will returntotalStakedVotes
andtotalUnlockedVotes
identifierToAddress
- Query one PoS account's binded PoW addressaddressToIdentifier
- Query one PoW account's binded PoS address
PoSRegister
's hex40 contract address is 0x0888000000000000000000000000000000000005
#
CrossSpaceCallA new internal contract called the CrossSpaceCall
contract will be deployed at the address 0x0888000000000000000000000000000000000006
with the following interfaces. The Core space user/contract can interact with the accounts in the eSpace and process the return value in the same transaction. So the cross-space operations can be atomic.