Saltar al contenido principal

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: 0x0888000000000000000000000000000000000000
    • cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaawby2s44d
    • cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2mhjju8k
  • SponsorWhitelistControl: 0x0888000000000000000000000000000000000001
    • cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaeprn7v0eh
    • cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaegg2r16ar
  • Staking: 0x0888000000000000000000000000000000000002
    • cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaajh3dw3ctn
    • cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaajrwuc9jnb
  • ConfluxContext: 0x0888000000000000000000000000000000000004
    • cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaauv2xpkd3x
    • cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaau5xa6tk73
  • PoSRegister: 0x0888000000000000000000000000000000000005
    • cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaytypk0th1
    • cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaayf993ufd7
  • CrossSpaceCall: 0x0888000000000000000000000000000000000006
    • cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa2eaeg85p5
    • cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa2sn102vjv
  • ParamsControl: 0x0888000000000000000000000000000000000007
    • cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa64p5db1w9
    • cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa6uhjxh70z

All the example code in this document will use js-conflux-sdk.