Documentation ¶
Index ¶
- func GetWhiteInfo() (wList, wFunc []common.Hash)
- func GetWhiteListCommonHash(callerAddress common.Address) common.Hash
- func IsInWhiteList(evm *vm.EVM, callerAddress common.Address) bool
- func IsSystemCaller(caller vm.ContractRef) (ret bool)
- func IsWhiteListCall(addr common.Address, data []byte) bool
- func PrintWhiteList(evm *vm.EVM, callerAddress common.Address)
- type PrecompiledContract
- type PrecompiledContracts
- func (pc *PrecompiledContracts) IsSystemCaller(caller vm.ContractRef) (ret bool)
- func (pc *PrecompiledContracts) PrecompiledContractsByBlock(blockNumber *big.Int, chainConfig *params.ChainConfig) map[common.Address]vm.PrecompiledContract
- func (pc *PrecompiledContracts) PrecompiledContractsByzantium() map[common.Address]vm.PrecompiledContract
- func (pc *PrecompiledContracts) PrecompiledContractsFuxi() map[common.Address]vm.PrecompiledContract
- func (pc *PrecompiledContracts) PrecompiledContractsPangu() map[common.Address]vm.PrecompiledContract
- func (pc *PrecompiledContracts) RunPrecompiledContract(evm *vm.EVM, snapshot int, p vm.PrecompiledContract, input []byte, ...) (ret []byte, err error)
- func (pc *PrecompiledContracts) SystemCntEntry() int
- func (pc *PrecompiledContracts) SystemContractCallAddr() common.Address
- func (pc *PrecompiledContracts) SystemContractEntryAddr(num *big.Int) common.Address
- func (pc *PrecompiledContracts) WhiteListCallAddr() common.Address
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWhiteInfo ¶
GetWhiteInfo return White Functions
func GetWhiteListCommonHash ¶
GetWhiteListCommonHash returns white list contract code hash
func IsSystemCaller ¶
func IsSystemCaller(caller vm.ContractRef) (ret bool)
Types ¶
type PrecompiledContract ¶
type PrecompiledContract interface { RequiredGas(input []byte) uint64 // RequiredPrice calculates the contract gas use Run(evm *vm.EVM, snapshot int, contract *vm.Contract, input []byte) ([]byte, error) // Run runs the precompiled contract }
PrecompiledContract is the basic interface for native Go contracts. The implementation requires a deterministic gas count based on the input size of the Run method of the contract.
type PrecompiledContracts ¶
type PrecompiledContracts struct { }
func (*PrecompiledContracts) IsSystemCaller ¶
func (pc *PrecompiledContracts) IsSystemCaller(caller vm.ContractRef) (ret bool)
func (*PrecompiledContracts) PrecompiledContractsByBlock ¶
func (pc *PrecompiledContracts) PrecompiledContractsByBlock(blockNumber *big.Int, chainConfig *params.ChainConfig) map[common.Address]vm.PrecompiledContract
func (*PrecompiledContracts) PrecompiledContractsByzantium ¶
func (pc *PrecompiledContracts) PrecompiledContractsByzantium() map[common.Address]vm.PrecompiledContract
func (*PrecompiledContracts) PrecompiledContractsFuxi ¶
func (pc *PrecompiledContracts) PrecompiledContractsFuxi() map[common.Address]vm.PrecompiledContract
func (*PrecompiledContracts) PrecompiledContractsPangu ¶
func (pc *PrecompiledContracts) PrecompiledContractsPangu() map[common.Address]vm.PrecompiledContract
func (*PrecompiledContracts) RunPrecompiledContract ¶
func (pc *PrecompiledContracts) RunPrecompiledContract(evm *vm.EVM, snapshot int, p vm.PrecompiledContract, input []byte, contract *vm.Contract, hash *common.Hash) (ret []byte, err error)
RunPrecompiledContract runs and evaluates the output of a precompiled contract.
func (*PrecompiledContracts) SystemCntEntry ¶
func (pc *PrecompiledContracts) SystemCntEntry() int
func (*PrecompiledContracts) SystemContractCallAddr ¶
func (pc *PrecompiledContracts) SystemContractCallAddr() common.Address
func (*PrecompiledContracts) SystemContractEntryAddr ¶
func (pc *PrecompiledContracts) SystemContractEntryAddr(num *big.Int) common.Address
func (*PrecompiledContracts) WhiteListCallAddr ¶
func (pc *PrecompiledContracts) WhiteListCallAddr() common.Address
Click to show internal directories.
Click to hide internal directories.