systemcontract

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AddrListInteractiveABI = `` /* 1628-byte string literal not displayed */
View Source
const DevMappingPosition = 2

DevMappingPosition is the position of the state variable `devs`. Since the state variables are as follow:

bool public initialized;
bool public enabled;
address public admin;
address public pendingAdmin;
mapping(address => bool) private devs;

according to [Layout of State Variables in Storage](https://docs.soliditylang.org/en/v0.8.4/internals/layout_in_storage.html), and after optimizer enabled, the `initialized`, `enabled` and `admin` will be packed, and stores at slot 0, `pendingAdmin` stores at slot 1, so the position for `devs` is 2.

View Source
const PunishInteractiveABI = `` /* 549-byte string literal not displayed */
View Source
const PunishV1InteractiveABI = `` /* 141-byte string literal not displayed */
View Source
const ValidatorFactoryABI = `` /* 22640-byte string literal not displayed */

Variables

View Source
var (
	/*
		FactoryAdminAddr        = common.HexToAddress("0x7a0BbA5EEbD9B84F46A39A9ffd488b8afB88979d")
		SysGovContractName      = "governance"
		AddressListContractName = "address_list"
		DposFactoryContractName = "dpos_factory"
		PunishV1ContractName    = "punish_v1"
		SysGovContractAddr      = common.HexToAddress("0x000000000000000000000000000000000000c000")
		AddressListContractAddr = common.HexToAddress("0x000000000000000000000000000000000000c001")
		DposFactoryContractAddr = common.HexToAddress("0x000000000000000000000000000000000000c002")
		PunishV1ContractAddr    = common.HexToAddress("0x000000000000000000000000000000000000c003")
		// SysGovToAddr is the To address for the system governance transaction, NOT contract address
		SysGovToAddr = common.HexToAddress("0x000000000000000000000000000000000000cccc")
	*/
	ValidatorFactoryAdminAddr     = common.HexToAddress("0x2b9ac060e7d20cf91bbb6719178d957f9c441235")
	ValidatorFactoryTestAdminAddr = common.HexToAddress("0x2b9ac060e7d20cf91bbb6719178d957f9c441235")
	ValidatorFactoryDevAdminAddr  = common.HexToAddress("0x2b9ac060e7d20cf91bbb6719178d957f9c441235")

	AddressListContractName = "address_list"
	AddressListContractAddr = common.HexToAddress("0x000000000000000000000000000000000000c001")

	AddressListContractAdminAddr     = common.HexToAddress("0x2b9ac060e7d20cf91bbb6719178d957f9c441235")
	AddressListTestContractAdminAddr = common.HexToAddress("0x2b9ac060e7d20cf91bbb6719178d957f9c441235")
	AddressListDevContractAdminAddr  = common.HexToAddress("0x2b9ac060e7d20cf91bbb6719178d957f9c441235")

	ValidatorFactoryContractName   = "validator_factory"
	ValidatorFactoryContractAddr   = common.HexToAddress("0x000000000000000000000000000000000000c002")
	ProviderFactoryContractName    = "provider_factory"
	ProviderFactoryContractAddr    = common.HexToAddress("0x000000000000000000000000000000000000C003")
	ValidatorFactoryPunishItemAddr = common.HexToAddress("0x000000000000000000000000000000000000c004")
	ProviderFactoryPunishItemAddr  = common.HexToAddress("0x000000000000000000000000000000000000C005")
)
View Source
var ProviderFactoryABI = `` /* 32677-byte string literal not displayed */

Functions

func ApplySystemContractUpgrade

func ApplySystemContractUpgrade(state *state.StateDB, header *types.Header, chainContext core.ChainContext, config *params.ChainConfig) (err error)

func GetAddressListAdmin

func GetAddressListAdmin(chainId *big.Int) common.Address

func GetInteractiveABI

func GetInteractiveABI() map[string]abi.ABI

func GetPunishAddr

func GetPunishAddr(blockNum *big.Int, config *params.ChainConfig) *common.Address

func GetValidatorAddr

func GetValidatorAddr(blockNum *big.Int, config *params.ChainConfig) *common.Address

func GetValidatorAdmin

func GetValidatorAdmin(chainId *big.Int) common.Address

Types

type IUpgradeAction

type IUpgradeAction interface {
	GetName() string
	Update(config *params.ChainConfig, height *big.Int, state *state.StateDB) error
	Execute(state *state.StateDB, header *types.Header, chainContext core.ChainContext, config *params.ChainConfig) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL