Documentation ¶
Index ¶
- Constants
- func GetABI() abi.ABI
- type DenomOracleExchangeRatePair
- type OracleExchangeRate
- type OracleTwap
- type Precompile
- func (p Precompile) Address() common.Address
- 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 ( GetExchangeRatesMethod = "getExchangeRates" GetOracleTwapsMethod = "getOracleTwaps" )
View Source
const (
OracleAddress = "0x0000000000000000000000000000000000001008"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DenomOracleExchangeRatePair ¶
type DenomOracleExchangeRatePair struct { Denom string `json:"denom"` OracleExchangeRateVal OracleExchangeRate `json:"oracleExchangeRateVal"` }
type OracleExchangeRate ¶
type OracleExchangeRate struct { ExchangeRate string `json:"exchangeRate"` LastUpdate string `json:"lastUpdate"` LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"` }
Define types which deviate slightly from cosmos types (ExchangeRate string vs sdk.Dec)
type OracleTwap ¶
type Precompile ¶
type Precompile struct { pcommon.Precompile GetExchangeRatesId []byte GetOracleTwapsId []byte // contains filtered or unexported fields }
func NewPrecompile ¶
func NewPrecompile(oracleKeeper pcommon.OracleKeeper, evmKeeper pcommon.EVMKeeper) (*Precompile, error)
func (Precompile) Address ¶
func (p Precompile) Address() common.Address
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.