内置合约
Conflux introduces several built-in internal contracts for better system maintenance and on-chain governance. Now Conflux has seven internal contracts. These contracts provide solidity interfaces 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.
AdminControl
contract, SponsorWhitelistControl
contract and Staking
contract are introduced from the beginning.
ConfluxContext
, PoSRegister
, CrossSpaceCall
are introduced at v2 hard-fork,
ParamsControl
is introduced at v2.1 hard-fork.
The addresses of these 7 internal contracts are list as follows:
AdminControl:
- hex40:
0x0888000000000000000000000000000000000000
- Testnet base32:
cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaawby2s44d
- Mainnet base32:
cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2mhjju8k
SponsorWhitelistControl:
- hex40:
0x0888000000000000000000000000000000000001
- Testnet base32:
cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaeprn7v0eh
- Mainnet base32:
cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaegg2r16ar
Staking
- hex40:
0x0888000000000000000000000000000000000002
- Testnet base32:
cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaajh3dw3ctn
- Mainnet base32:
cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaajrwuc9jnb
ConfluxContext:
- hex40:
0x0888000000000000000000000000000000000004
- Testnet base32:
cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaauv2xpkd3x
- Mainnet base32:
cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaau5xa6tk73
PoSRegister:
- hex40:
0x0888000000000000000000000000000000000005
- Testnet base32:
cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaaytypk0th1
- Mainnet base32:
cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaayf993ufd7
CrossSpaceCall
- hex40:
0x0888000000000000000000000000000000000006
- Testnet base32:
cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa2eaeg85p5
- Mainnet base32:
cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa2sn102vjv
ParamsControl
- hex40:
0x0888000000000000000000000000000000000007
- Testnet base32:
cfxtest:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa64p5db1w9
- Mainnet base32:
cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa6uhjxh70z
📄️ AdminControl
概览
📄️ SponsorWhitelistControl
Conflux实现了赞助机制,来补贴智能合约的使用。 这允许余额为零的新账 户调用智能合约,前提是执行操作得到赞助(通常由Dapp运营者提供)。 内部的 SponsorWhitelistControl 合约记录了智能合约的赞助信息。
📄️ Staking
概览
📄️ ConfluxContext
此合约可用于 Solidity合约 中,用以查询 Conflux Core 网络信息,包括:
📄️ PoSRegister
这个合约用于让用户参与PoS链。 需要与这个合约交互才能成为PoS节点。 这个合约提供了几个方法来增加或减少PoS投票:
📄️ CrossSpaceCall
CIP-90 引入了一个新的内置合约:CrossSpaceCall. CrossSpaceCall 允许在两个空间之间转移 CFX 和数据。
📄️ ParamsControl
ParamsControl is a smart contract at address 0x0888000000000000000000000000000000000007 that allows participation in the chain parameter DAO vote on the Conflux network. 以下是该合约在测试网和主网环境中的地址,您可以在这些环境中与该合约进行交互: