Documentation ¶
Index ¶
- Constants
- func EVMDenom(token common.Address) string
- func NewBankContract(bankKeeper types.BankKeeper, cdc codec.Codec, kvGasConfig storetypes.GasConfig) vm.PrecompiledContract
- func NewIcaContract(ctx sdk.Context, icaauthKeeper types.Icaauthkeeper, ...) vm.PrecompiledContract
- func NewRelayerContract(ibcKeeper types.IbcKeeper, cdc codec.Codec, rules params.Rules, ...) vm.PrecompiledContract
- func OnPacketResultCallback(args ...interface{}) ([]byte, error)
- type BankContract
- type BaseContract
- type Executor
- type ExtStateDB
- type IcaContract
- type NativeMessage
- type Registrable
- type RelayerContract
Constants ¶
View Source
const ( EVMDenomPrefix = "evm/" MintMethodName = "mint" BurnMethodName = "burn" BalanceOfMethodName = "balanceOf" TransferMethodName = "transfer" )
View Source
const ( RegisterAccountMethodName = "registerAccount" QueryAccountMethodName = "queryAccount" SubmitMsgsMethodName = "submitMsgs" )
View Source
const ( CreateClient = "createClient" UpdateClient = "updateClient" UpgradeClient = "upgradeClient" SubmitMisbehaviour = "submitMisbehaviour" ConnectionOpenInit = "connectionOpenInit" ConnectionOpenTry = "connectionOpenTry" ConnectionOpenAck = "connectionOpenAck" ConnectionOpenConfirm = "connectionOpenConfirm" ChannelOpenInit = "channelOpenInit" ChannelOpenTry = "channelOpenTry" ChannelOpenAck = "channelOpenAck" ChannelOpenConfirm = "channelOpenConfirm" ChannelCloseInit = "channelCloseInit" ChannelCloseConfirm = "channelCloseConfirm" RecvPacket = "recvPacket" Acknowledgement = "acknowledgement" Timeout = "timeout" TimeoutOnClose = "timeoutOnClose" UpdateClientAndConnectionOpenInit = "updateClientAndConnectionOpenInit" UpdateClientAndConnectionOpenTry = "updateClientAndConnectionOpenTry" UpdateClientAndConnectionOpenAck = "updateClientAndConnectionOpenAck" UpdateClientAndConnectionOpenConfirm = "updateClientAndConnectionOpenConfirm" UpdateClientAndChannelOpenInit = "updateClientAndChannelOpenInit" UpdateClientAndChannelOpenTry = "updateClientAndChannelOpenTry" UpdateClientAndChannelOpenAck = "updateClientAndChannelOpenAck" UpdateClientAndChannelCloseInit = "updateClientAndChannelCloseInit" UpdateClientAndChannelCloseConfirm = "updateClientAndChannelCloseConfirm" UpdateClientAndChannelOpenConfirm = "updateClientAndChannelOpenConfirm" UpdateClientAndRecvPacket = "updateClientAndRecvPacket" UpdateClientAndAcknowledgement = "updateClientAndAcknowledgement" UpdateClientAndTimeout = "updateClientAndTimeout" UpdateClientAndTimeoutOnClose = "updateClientAndTimeoutOnClose" )
Variables ¶
This section is empty.
Functions ¶
func NewBankContract ¶
func NewBankContract(bankKeeper types.BankKeeper, cdc codec.Codec, kvGasConfig storetypes.GasConfig) vm.PrecompiledContract
NewBankContract creates the precompiled contract to manage native tokens
func NewIcaContract ¶
func NewIcaContract(ctx sdk.Context, icaauthKeeper types.Icaauthkeeper, cronosKeeper types.CronosKeeper, cdc codec.Codec, kvGasConfig storetypes.GasConfig) vm.PrecompiledContract
func NewRelayerContract ¶
func OnPacketResultCallback ¶
Types ¶
type BankContract ¶
type BankContract struct {
// contains filtered or unexported fields
}
func (*BankContract) Address ¶
func (bc *BankContract) Address() common.Address
func (*BankContract) RequiredGas ¶
func (bc *BankContract) RequiredGas(input []byte) uint64
RequiredGas calculates the contract gas use
type BaseContract ¶
type BaseContract interface { Registrable }
func NewBaseContract ¶
func NewBaseContract(address common.Address) BaseContract
type ExtStateDB ¶
type ExtStateDB interface { vm.StateDB ExecuteNativeAction(contract common.Address, converter statedb.EventConverter, action func(ctx sdk.Context) error) error Context() sdk.Context }
ExtStateDB defines extra methods of statedb to support stateful precompiled contracts
type IcaContract ¶
type IcaContract struct { BaseContract // contains filtered or unexported fields }
func (*IcaContract) Address ¶
func (ic *IcaContract) Address() common.Address
func (*IcaContract) RequiredGas ¶
func (ic *IcaContract) RequiredGas(input []byte) uint64
RequiredGas calculates the contract gas use
type NativeMessage ¶
type NativeMessage interface { proto.Message GetSigners() []sdk.AccAddress }
type Registrable ¶
type RelayerContract ¶
type RelayerContract struct { BaseContract // contains filtered or unexported fields }
func (*RelayerContract) Address ¶
func (bc *RelayerContract) Address() common.Address
func (*RelayerContract) RequiredGas ¶
func (bc *RelayerContract) RequiredGas(input []byte) (gas uint64)
RequiredGas calculates the contract gas use `max(0, len(input) * DefaultTxSizeCostPerByte + requiredGasTable[methodPrefix] - intrinsicGas)`
Click to show internal directories.
Click to hide internal directories.