Documentation ¶
Index ¶
- Constants
- func IsPrecompiledContract(address types.Address) bool
- func IsWithStoragePrecompiled(addr types.Address) bool
- func PrecompiledContractCount() uint64
- func RegisterContractWithStorage(addr types.Address, c IWithStoragePrecompiledContract) error
- func RegisterContracts(addr types.Address, c PrecompiledContract) error
- type IWithStoragePrecompiledContract
- type PrecompiledContract
Constants ¶
View Source
const ( CustomPrecompiledStart uint64 = 0x10000 CustomPrecompiledEnd uint64 = 0x1FFFF )
View Source
const ( WithStoragePrecompiledStart uint64 = 0x20000 WithStoragePrecompiledEnd uint64 = 0x2FFFF )
Variables ¶
This section is empty.
Functions ¶
func IsPrecompiledContract ¶
func IsWithStoragePrecompiled ¶ added in v0.5.7
func PrecompiledContractCount ¶
func PrecompiledContractCount() uint64
func RegisterContractWithStorage ¶ added in v0.5.7
func RegisterContractWithStorage(addr types.Address, c IWithStoragePrecompiledContract) error
func RegisterContracts ¶
func RegisterContracts(addr types.Address, c PrecompiledContract) error
Types ¶
type IWithStoragePrecompiledContract ¶ added in v0.5.7
type IWithStoragePrecompiledContract interface { GasCost(addr types.Address, input []byte, dataBlock storage.IDataBlockStorage) uint64 Execute(addr types.Address, input []byte, dataBlock storage.IDataBlockStorage) ([]byte, error) }
func GetWithStoragePrecompiledContract ¶ added in v0.5.7
func GetWithStoragePrecompiledContract(addr types.Address) IWithStoragePrecompiledContract
type PrecompiledContract ¶
type PrecompiledContract interface { GasCost(input []byte) uint64 Execute(input []byte) ([]byte, error) }
func GetContract ¶
func GetContract(addr uint64) PrecompiledContract
Click to show internal directories.
Click to hide internal directories.