Documentation ¶
Index ¶
- Variables
- func AllocKip113Logic() map[common.Hash]common.Hash
- func AllocKip113Proxy(init AllocKip113Init) map[common.Hash]common.Hash
- func AllocProxy(impl common.Address) map[common.Hash]common.Hash
- func AllocRegistry(init *params.RegistryConfig) map[common.Hash]common.Hash
- func InstallRegistry(state *state.StateDB, init *params.RegistryConfig) error
- func MergeGenesisAlloc(aa ...blockchain.GenesisAlloc) blockchain.GenesisAlloc
- func MergeStorage(ss ...map[common.Hash]common.Hash) map[common.Hash]common.Hash
- func ReadActiveAddressFromRegistry(backend bind.ContractCaller, name string, num *big.Int) (common.Address, error)
- type AllocKip113Init
- type BlsPublicKeyInfo
- type BlsPublicKeyInfos
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Canonical system contract names registered in Registry. AddressBookName = "AddressBook" GovParamName = "GovParam" Kip103Name = "TreasuryRebalance" Kip113Name = "KIP113" AllContractNames = []string{ AddressBookName, GovParamName, Kip103Name, Kip113Name, } // This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1 used in the // EIP-1967 proxy contract. See https://eips.ethereum.org/EIPS/eip-1967#implementation-slot ImplementationSlot = common.Hex2Bytes("360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc") // Some system contracts are allocated at special addresses. AddressBookAddr = common.HexToAddress("0x0000000000000000000000000000000000000400") // TODO: replace contracts/reward/contract/utils.go RegistryAddr = common.HexToAddress("0x0000000000000000000000000000000000000401") // The following addresses are only used for testing. Kip113ProxyAddrMock = common.HexToAddress("0x0000000000000000000000000000000000000402") Kip113LogicAddrMock = common.HexToAddress("0x0000000000000000000000000000000000000403") // System contract binaries to be injected at hardfork or used in testing. RegistryCode = hexutil.MustDecode("0x" + contracts.RegistryBinRuntime) RegistryMockCode = hexutil.MustDecode("0x" + contracts.RegistryMockBinRuntime) Kip113Code = hexutil.MustDecode("0x" + contracts.KIP113BinRuntime) Kip113MockCode = hexutil.MustDecode("0x" + contracts.KIP113MockBinRuntime) ERC1967ProxyCode = hexutil.MustDecode("0x" + contracts.ERC1967ProxyBinRuntime) // Errors ErrRegistryNotInstalled = errors.New("Registry contract not installed") ErrKip113BadResult = errors.New("KIP113 call returned bad data") ErrKip113BadPop = errors.New("KIP113 PoP verification failed") )
Functions ¶
func AllocKip113Proxy ¶
func AllocKip113Proxy(init AllocKip113Init) map[common.Hash]common.Hash
func AllocRegistry ¶
Create storage state from the given initial values. The storage slots are calculated according to the solidity layout rule. https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html
func InstallRegistry ¶
func InstallRegistry(state *state.StateDB, init *params.RegistryConfig) error
func MergeGenesisAlloc ¶
func MergeGenesisAlloc(aa ...blockchain.GenesisAlloc) blockchain.GenesisAlloc
func MergeStorage ¶
MergeStorage merges multiple storage maps into one.
Types ¶
type AllocKip113Init ¶
type AllocKip113Init struct { Infos BlsPublicKeyInfos Owner common.Address }
type BlsPublicKeyInfo ¶
type BlsPublicKeyInfos ¶
type BlsPublicKeyInfos map[common.Address]BlsPublicKeyInfo
func ReadKip113All ¶
func ReadKip113All(backend bind.ContractCaller, contractAddr common.Address, num *big.Int) (BlsPublicKeyInfos, error)
func (BlsPublicKeyInfos) String ¶
func (infos BlsPublicKeyInfos) String() string
Click to show internal directories.
Click to hide internal directories.