Internal Contracts
Conflux introduces several built-in internal contracts for better system maintenance and on-chain governance. Now Conflux has seven internal contracts: AdminControl contract, SponsorWhitelistControl contract and Staking contract are introduced from the beginning, ConfluxContext, PoSRegister, ConfluxContext are introduced at v2 hard-fork, ParamsControl is introduced at v2.1 hard-fork. These contracts provide solidity function apis defined here. These function can only be called via CALL or STATICCALL operation. Using operation CALLCODE or DELEGATECALL to interact with internal contracts will trigger an error.
The addresses of these 7 internal contracts are list as follows:
- AdminControl:
0x0888000000000000000000000000000000000000cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaawby2s44dcfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2mhjju8k
- SponsorWhitelistControl:
0x0888000000000000000000000000000000000001cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaeprn7v0ehcfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaegg2r16ar
- Staking:
0x0888000000000000000000000000000000000002cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaajh3dw3ctncfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaajrwuc9jnb
- ConfluxContext:
0x0888000000000000000000000000000000000004cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaauv2xpkd3xcfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaau5xa6tk73
- PoSRegister:
0x0888000000000000000000000000000000000005cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaytypk0th1cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaayf993ufd7
- CrossSpaceCall:
0x0888000000000000000000000000000000000006cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa2eaeg85p5cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa2sn102vjv
- ParamsControl:
0x0888000000000000000000000000000000000007cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa64p5db1w9cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa6uhjxh70z
All the example code in this document will use js-conflux-sdk.
📄️ AdminControl
Overview
📄️ SponsorWhitelistControl
Conflux implements a sponsorship mechanism to subsidize the usage of smart contracts. This allows a new account with a zero balance to call smart contracts, provided the execution is sponsored (usually by the operator of Dapps). The internal SponsorWhitelistControl contract records the sponsorship information for smart contracts.
📄️ Staking
Overview
📄️ ConfluxContext
This contract can be used to query Conflux network info including:
📄️ PoSRegister
This 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:
📄️ CrossSpaceCall
CrossSpaceCall Interface
📄️ ParamsControl
ParamsControl at address 0x0888000000000000000000000000000000000007 with the following interfaces. Which can be used to participate chain parameter DAO vote.