Versions in this module Expand all Collapse all v0 v0.5.3 Dec 13, 2023 Changes in this version + const ReadGasCostPerSlot + const SelectorLen + const WriteGasCostPerSlot + func CalculateFunctionSelector(functionSignature string) []byte + func DeductGas(suppliedGas uint64, requiredGas uint64) (uint64, error) + func PackOrderedHashes(dst []byte, hashes []common.Hash) error + func PackOrderedHashesWithSelector(dst []byte, functionSelector []byte, hashes []common.Hash) error + func PackedHash(packed []byte, index int) []byte + func ParseABI(rawABI string) abi.ABI + type AccessibleState interface + GetBlockContext func() BlockContext + GetChainConfig func() precompileconfig.ChainConfig + GetSnowContext func() *snow.Context + GetStateDB func() StateDB + type ActivationFunc func(AccessibleState) bool + type BlockContext interface + GetPredicateResults func(txHash common.Hash, precompileAddress common.Address) []byte + type ConfigurationBlockContext interface + Number func() *big.Int + Timestamp func() uint64 + type Configurator interface + Configure func(chainConfig precompileconfig.ChainConfig, ...) error + MakeConfig func() precompileconfig.Config + type MockAccessibleState struct + func NewMockAccessibleState(ctrl *gomock.Controller) *MockAccessibleState + func (m *MockAccessibleState) EXPECT() *MockAccessibleStateMockRecorder + func (m *MockAccessibleState) GetBlockContext() BlockContext + func (m *MockAccessibleState) GetChainConfig() precompileconfig.ChainConfig + func (m *MockAccessibleState) GetSnowContext() *snow.Context + func (m *MockAccessibleState) GetStateDB() StateDB + type MockAccessibleStateMockRecorder struct + func (mr *MockAccessibleStateMockRecorder) GetBlockContext() *gomock.Call + func (mr *MockAccessibleStateMockRecorder) GetChainConfig() *gomock.Call + func (mr *MockAccessibleStateMockRecorder) GetSnowContext() *gomock.Call + func (mr *MockAccessibleStateMockRecorder) GetStateDB() *gomock.Call + type MockBlockContext struct + func NewMockBlockContext(ctrl *gomock.Controller) *MockBlockContext + func (m *MockBlockContext) EXPECT() *MockBlockContextMockRecorder + func (m *MockBlockContext) GetPredicateResults(arg0 common.Hash, arg1 common.Address) []byte + func (m *MockBlockContext) Number() *big.Int + func (m *MockBlockContext) Timestamp() uint64 + type MockBlockContextMockRecorder struct + func (mr *MockBlockContextMockRecorder) GetPredicateResults(arg0, arg1 interface{}) *gomock.Call + func (mr *MockBlockContextMockRecorder) Number() *gomock.Call + func (mr *MockBlockContextMockRecorder) Timestamp() *gomock.Call + type RunStatefulPrecompileFunc func(accessibleState AccessibleState, caller common.Address, addr common.Address, ...) (ret []byte, remainingGas uint64, err error) + type StateDB interface + AddBalance func(common.Address, *big.Int) + AddLog func(addr common.Address, topics []common.Hash, data []byte, blockNumber uint64) + CreateAccount func(common.Address) + Exist func(common.Address) bool + Finalise func(deleteEmptyObjects bool) + GetBalance func(common.Address) *big.Int + GetLogData func() [][]byte + GetNonce func(common.Address) uint64 + GetPredicateStorageSlots func(address common.Address, index int) ([]byte, bool) + GetState func(common.Address, common.Hash) common.Hash + GetTxHash func() common.Hash + RevertToSnapshot func(int) + SetNonce func(common.Address, uint64) + SetPredicateStorageSlots func(address common.Address, predicates [][]byte) + SetState func(common.Address, common.Hash, common.Hash) + Snapshot func() int + Suicide func(common.Address) bool + type StatefulPrecompileFunction struct + func NewStatefulPrecompileFunction(selector []byte, execute RunStatefulPrecompileFunc) *StatefulPrecompileFunction + func NewStatefulPrecompileFunctionWithActivator(selector []byte, execute RunStatefulPrecompileFunc, activation ActivationFunc) *StatefulPrecompileFunction + func (f *StatefulPrecompileFunction) IsActivated(accessibleState AccessibleState) bool + type StatefulPrecompiledContract interface + Run func(accessibleState AccessibleState, caller common.Address, addr common.Address, ...) (ret []byte, remainingGas uint64, err error) + func NewStatefulPrecompileContract(fallback RunStatefulPrecompileFunc, functions []*StatefulPrecompileFunction) (StatefulPrecompiledContract, error)