Documentation ¶
Index ¶
- Constants
- type Precompile
- func (p Precompile) Address() common.Address
- func (p Precompile) ExtractAsUint256(_ sdk.Context, _ *abi.Method, args []interface{}, value *big.Int) (*big.Int, error)
- func (p Precompile) GetName() string
- func (Precompile) IsTransaction(string) bool
- func (p Precompile) RequiredGas(input []byte) uint64
- func (p Precompile) Run(evm *vm.EVM, _ common.Address, _ common.Address, input []byte, value *big.Int, ...) (bz []byte, err error)
Constants ¶
View Source
const ( ExtractAsBytesMethod = "extractAsBytes" ExtractAsBytesListMethod = "extractAsBytesList" ExtractAsUint256Method = "extractAsUint256" )
View Source
const GasCostPerByte = 100 // TODO: parameterize
View Source
const JSONAddress = "0x0000000000000000000000000000000000001003"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Precompile ¶
type Precompile struct { pcommon.Precompile ExtractAsBytesID []byte ExtractAsBytesListID []byte ExtractAsUint256ID []byte // contains filtered or unexported fields }
func NewPrecompile ¶
func NewPrecompile() (*Precompile, error)
func (Precompile) Address ¶
func (p Precompile) Address() common.Address
func (Precompile) ExtractAsUint256 ¶
func (Precompile) GetName ¶
func (p Precompile) GetName() string
func (Precompile) IsTransaction ¶
func (Precompile) IsTransaction(string) bool
func (Precompile) RequiredGas ¶
func (p Precompile) RequiredGas(input []byte) uint64
RequiredGas returns the required bare minimum gas to execute the precompile.
Click to show internal directories.
Click to hide internal directories.