Documentation ¶
Index ¶
- func EmitEvent(evm *vm.EVM, data []byte, topics []common.Hash)
- type AccountKeeper
- type AddPendingPoolRewardsMethod
- func (m *AddPendingPoolRewardsMethod) GetMethodId() []byte
- func (m *AddPendingPoolRewardsMethod) IsReadonly() bool
- func (m *AddPendingPoolRewardsMethod) NewAddPendingPoolRewardsEvent(args *crosschaintypes.AddPendingPoolRewardArgs, sender common.Address) (data []byte, topic []common.Hash, err error)
- func (m *AddPendingPoolRewardsMethod) PackInput(args crosschaintypes.AddPendingPoolRewardArgs) ([]byte, error)
- func (m *AddPendingPoolRewardsMethod) PackOutput(success bool) ([]byte, error)
- func (m *AddPendingPoolRewardsMethod) RequiredGas() uint64
- func (m *AddPendingPoolRewardsMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *AddPendingPoolRewardsMethod) UnpackInput(data []byte) (*crosschaintypes.AddPendingPoolRewardArgs, error)
- type BankKeeper
- type BridgeCallMethod
- func (m *BridgeCallMethod) GetMethodId() []byte
- func (m *BridgeCallMethod) IsReadonly() bool
- func (m *BridgeCallMethod) NewBridgeCallEvent(args *crosschaintypes.BridgeCallArgs, sender, origin common.Address, ...) (data []byte, topic []common.Hash, err error)
- func (m *BridgeCallMethod) PackInput(args crosschaintypes.BridgeCallArgs) ([]byte, error)
- func (m *BridgeCallMethod) PackOutput(nonceNonce *big.Int) ([]byte, error)
- func (m *BridgeCallMethod) RequiredGas() uint64
- func (m *BridgeCallMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *BridgeCallMethod) UnpackInput(data []byte) (*crosschaintypes.BridgeCallArgs, error)
- type BridgeCoinAmountMethod
- func (m *BridgeCoinAmountMethod) GetMethodId() []byte
- func (m *BridgeCoinAmountMethod) IsReadonly() bool
- func (m *BridgeCoinAmountMethod) PackInput(args crosschaintypes.BridgeCoinAmountArgs) ([]byte, error)
- func (m *BridgeCoinAmountMethod) PackOutput(amount *big.Int) ([]byte, error)
- func (m *BridgeCoinAmountMethod) RequiredGas() uint64
- func (m *BridgeCoinAmountMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *BridgeCoinAmountMethod) UnpackInput(data []byte) (*crosschaintypes.BridgeCoinAmountArgs, error)
- func (m *BridgeCoinAmountMethod) UnpackOutput(data []byte) (*big.Int, error)
- type CancelPendingBridgeCallMethod
- func (m *CancelPendingBridgeCallMethod) GetMethodId() []byte
- func (m *CancelPendingBridgeCallMethod) IsReadonly() bool
- func (m *CancelPendingBridgeCallMethod) NewCancelPendingBridgeCallEvent(sender common.Address, chainName string, txId *big.Int) (data []byte, topic []common.Hash, err error)
- func (m *CancelPendingBridgeCallMethod) PackInput(args crosschaintypes.CancelPendingBridgeCallArgs) ([]byte, error)
- func (m *CancelPendingBridgeCallMethod) PackOutput(success bool) ([]byte, error)
- func (m *CancelPendingBridgeCallMethod) RequiredGas() uint64
- func (m *CancelPendingBridgeCallMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *CancelPendingBridgeCallMethod) UnpackInput(data []byte) (*crosschaintypes.CancelPendingBridgeCallArgs, error)
- type CancelSendToExternalMethod
- func (m *CancelSendToExternalMethod) GetMethodId() []byte
- func (m *CancelSendToExternalMethod) IsReadonly() bool
- func (m *CancelSendToExternalMethod) NewCancelSendToExternalEvent(sender common.Address, chainName string, txId *big.Int) (data []byte, topic []common.Hash, err error)
- func (m *CancelSendToExternalMethod) PackInput(chainName string, txId *big.Int) ([]byte, error)
- func (m *CancelSendToExternalMethod) PackOutput(success bool) ([]byte, error)
- func (m *CancelSendToExternalMethod) RequiredGas() uint64
- func (m *CancelSendToExternalMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *CancelSendToExternalMethod) UnpackInput(data []byte) (*crosschaintypes.CancelSendToExternalArgs, error)
- type Contract
- type CrossChainMethod
- func (m *CrossChainMethod) GetMethodId() []byte
- func (m *CrossChainMethod) IsReadonly() bool
- func (m *CrossChainMethod) NewCrossChainEvent(sender common.Address, token common.Address, denom, receipt string, ...) (data []byte, topic []common.Hash, err error)
- func (m *CrossChainMethod) PackInput(args crosschaintypes.CrossChainArgs) ([]byte, error)
- func (m *CrossChainMethod) PackOutput(success bool) ([]byte, error)
- func (m *CrossChainMethod) RequiredGas() uint64
- func (m *CrossChainMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *CrossChainMethod) UnpackInput(data []byte) (*crosschaintypes.CrossChainArgs, error)
- type CrosschainKeeper
- type Erc20Keeper
- type ExecuteClaimMethod
- func (m *ExecuteClaimMethod) GetMethodId() []byte
- func (m *ExecuteClaimMethod) IsReadonly() bool
- func (m *ExecuteClaimMethod) NewExecuteClaimEvent(sender common.Address, eventNonce *big.Int, dstChain string) (data []byte, topic []common.Hash, err error)
- func (m *ExecuteClaimMethod) PackInput(args crosschaintypes.ExecuteClaimArgs) ([]byte, error)
- func (m *ExecuteClaimMethod) PackOutput(success bool) ([]byte, error)
- func (m *ExecuteClaimMethod) RequiredGas() uint64
- func (m *ExecuteClaimMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *ExecuteClaimMethod) UnpackInput(data []byte) (*crosschaintypes.ExecuteClaimArgs, error)
- func (m *ExecuteClaimMethod) UnpackOutput(data []byte) (bool, error)
- type FIP20CrossChainMethod
- func (m *FIP20CrossChainMethod) GetMethodId() []byte
- func (m *FIP20CrossChainMethod) IsReadonly() bool
- func (m *FIP20CrossChainMethod) PackOutput(success bool) ([]byte, error)
- func (m *FIP20CrossChainMethod) RequiredGas() uint64
- func (m *FIP20CrossChainMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *FIP20CrossChainMethod) UnpackInput(data []byte) (*crosschaintypes.FIP20CrossChainArgs, error)
- type GovKeeper
- type IBCTransferKeeper
- type IncreaseBridgeFeeMethod
- func (m *IncreaseBridgeFeeMethod) GetMethodId() []byte
- func (m *IncreaseBridgeFeeMethod) IsReadonly() bool
- func (m *IncreaseBridgeFeeMethod) NewIncreaseBridgeFeeEvent(args *crosschaintypes.IncreaseBridgeFeeArgs, sender common.Address) (data []byte, topic []common.Hash, err error)
- func (m *IncreaseBridgeFeeMethod) PackInput(chainName string, txId *big.Int, token common.Address, fee *big.Int) ([]byte, error)
- func (m *IncreaseBridgeFeeMethod) PackOutput(success bool) ([]byte, error)
- func (m *IncreaseBridgeFeeMethod) RequiredGas() uint64
- func (m *IncreaseBridgeFeeMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *IncreaseBridgeFeeMethod) UnpackInput(data []byte) (*crosschaintypes.IncreaseBridgeFeeArgs, error)
- type Keeper
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetModuleAddress(moduleName string) sdk.AccAddress
}
type AddPendingPoolRewardsMethod ¶
func NewAddPendingPoolRewardsMethod ¶
func NewAddPendingPoolRewardsMethod(keeper *Keeper) *AddPendingPoolRewardsMethod
func (*AddPendingPoolRewardsMethod) GetMethodId ¶
func (m *AddPendingPoolRewardsMethod) GetMethodId() []byte
func (*AddPendingPoolRewardsMethod) IsReadonly ¶
func (m *AddPendingPoolRewardsMethod) IsReadonly() bool
func (*AddPendingPoolRewardsMethod) NewAddPendingPoolRewardsEvent ¶
func (m *AddPendingPoolRewardsMethod) NewAddPendingPoolRewardsEvent(args *crosschaintypes.AddPendingPoolRewardArgs, sender common.Address) (data []byte, topic []common.Hash, err error)
func (*AddPendingPoolRewardsMethod) PackInput ¶
func (m *AddPendingPoolRewardsMethod) PackInput(args crosschaintypes.AddPendingPoolRewardArgs) ([]byte, error)
func (*AddPendingPoolRewardsMethod) PackOutput ¶
func (m *AddPendingPoolRewardsMethod) PackOutput(success bool) ([]byte, error)
func (*AddPendingPoolRewardsMethod) RequiredGas ¶
func (m *AddPendingPoolRewardsMethod) RequiredGas() uint64
func (*AddPendingPoolRewardsMethod) UnpackInput ¶
func (m *AddPendingPoolRewardsMethod) UnpackInput(data []byte) (*crosschaintypes.AddPendingPoolRewardArgs, error)
type BankKeeper ¶
type BankKeeper interface { GetSupply(ctx sdk.Context, denom string) sdk.Coin GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin MintCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool) }
type BridgeCallMethod ¶
func NewBridgeCallMethod ¶
func NewBridgeCallMethod(keeper *Keeper) *BridgeCallMethod
func (*BridgeCallMethod) GetMethodId ¶
func (m *BridgeCallMethod) GetMethodId() []byte
func (*BridgeCallMethod) IsReadonly ¶
func (m *BridgeCallMethod) IsReadonly() bool
func (*BridgeCallMethod) NewBridgeCallEvent ¶
func (m *BridgeCallMethod) NewBridgeCallEvent(args *crosschaintypes.BridgeCallArgs, sender, origin common.Address, eventNonce *big.Int) (data []byte, topic []common.Hash, err error)
func (*BridgeCallMethod) PackInput ¶
func (m *BridgeCallMethod) PackInput(args crosschaintypes.BridgeCallArgs) ([]byte, error)
func (*BridgeCallMethod) PackOutput ¶
func (m *BridgeCallMethod) PackOutput(nonceNonce *big.Int) ([]byte, error)
func (*BridgeCallMethod) RequiredGas ¶
func (m *BridgeCallMethod) RequiredGas() uint64
func (*BridgeCallMethod) UnpackInput ¶
func (m *BridgeCallMethod) UnpackInput(data []byte) (*crosschaintypes.BridgeCallArgs, error)
type BridgeCoinAmountMethod ¶
func NewBridgeCoinAmountMethod ¶
func NewBridgeCoinAmountMethod(keeper *Keeper) *BridgeCoinAmountMethod
func (*BridgeCoinAmountMethod) GetMethodId ¶
func (m *BridgeCoinAmountMethod) GetMethodId() []byte
func (*BridgeCoinAmountMethod) IsReadonly ¶
func (m *BridgeCoinAmountMethod) IsReadonly() bool
func (*BridgeCoinAmountMethod) PackInput ¶
func (m *BridgeCoinAmountMethod) PackInput(args crosschaintypes.BridgeCoinAmountArgs) ([]byte, error)
func (*BridgeCoinAmountMethod) PackOutput ¶
func (m *BridgeCoinAmountMethod) PackOutput(amount *big.Int) ([]byte, error)
func (*BridgeCoinAmountMethod) RequiredGas ¶
func (m *BridgeCoinAmountMethod) RequiredGas() uint64
func (*BridgeCoinAmountMethod) UnpackInput ¶
func (m *BridgeCoinAmountMethod) UnpackInput(data []byte) (*crosschaintypes.BridgeCoinAmountArgs, error)
func (*BridgeCoinAmountMethod) UnpackOutput ¶
func (m *BridgeCoinAmountMethod) UnpackOutput(data []byte) (*big.Int, error)
type CancelPendingBridgeCallMethod ¶
func NewCancelPendingBridgeCallMethod ¶
func NewCancelPendingBridgeCallMethod(keeper *Keeper) *CancelPendingBridgeCallMethod
func (*CancelPendingBridgeCallMethod) GetMethodId ¶
func (m *CancelPendingBridgeCallMethod) GetMethodId() []byte
func (*CancelPendingBridgeCallMethod) IsReadonly ¶
func (m *CancelPendingBridgeCallMethod) IsReadonly() bool
func (*CancelPendingBridgeCallMethod) NewCancelPendingBridgeCallEvent ¶
func (*CancelPendingBridgeCallMethod) PackInput ¶
func (m *CancelPendingBridgeCallMethod) PackInput(args crosschaintypes.CancelPendingBridgeCallArgs) ([]byte, error)
func (*CancelPendingBridgeCallMethod) PackOutput ¶
func (m *CancelPendingBridgeCallMethod) PackOutput(success bool) ([]byte, error)
func (*CancelPendingBridgeCallMethod) RequiredGas ¶
func (m *CancelPendingBridgeCallMethod) RequiredGas() uint64
func (*CancelPendingBridgeCallMethod) UnpackInput ¶
func (m *CancelPendingBridgeCallMethod) UnpackInput(data []byte) (*crosschaintypes.CancelPendingBridgeCallArgs, error)
type CancelSendToExternalMethod ¶
func NewCancelSendToExternalMethod ¶
func NewCancelSendToExternalMethod(keeper *Keeper) *CancelSendToExternalMethod
func (*CancelSendToExternalMethod) GetMethodId ¶
func (m *CancelSendToExternalMethod) GetMethodId() []byte
func (*CancelSendToExternalMethod) IsReadonly ¶
func (m *CancelSendToExternalMethod) IsReadonly() bool
func (*CancelSendToExternalMethod) NewCancelSendToExternalEvent ¶
func (*CancelSendToExternalMethod) PackOutput ¶
func (m *CancelSendToExternalMethod) PackOutput(success bool) ([]byte, error)
func (*CancelSendToExternalMethod) RequiredGas ¶
func (m *CancelSendToExternalMethod) RequiredGas() uint64
func (*CancelSendToExternalMethod) UnpackInput ¶
func (m *CancelSendToExternalMethod) UnpackInput(data []byte) (*crosschaintypes.CancelSendToExternalArgs, error)
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
func NewPrecompiledContract ¶
func NewPrecompiledContract( bankKeeper BankKeeper, erc20Keeper Erc20Keeper, ibcTransferKeeper IBCTransferKeeper, accountKeeper AccountKeeper, govKeeper GovKeeper, router *Router, ) *Contract
func (*Contract) IsStateful ¶
func (*Contract) RequiredGas ¶
type CrossChainMethod ¶
func NewCrossChainMethod ¶
func NewCrossChainMethod(keeper *Keeper) *CrossChainMethod
func (*CrossChainMethod) GetMethodId ¶
func (m *CrossChainMethod) GetMethodId() []byte
func (*CrossChainMethod) IsReadonly ¶
func (m *CrossChainMethod) IsReadonly() bool
func (*CrossChainMethod) NewCrossChainEvent ¶
func (*CrossChainMethod) PackInput ¶
func (m *CrossChainMethod) PackInput(args crosschaintypes.CrossChainArgs) ([]byte, error)
func (*CrossChainMethod) PackOutput ¶
func (m *CrossChainMethod) PackOutput(success bool) ([]byte, error)
func (*CrossChainMethod) RequiredGas ¶
func (m *CrossChainMethod) RequiredGas() uint64
func (*CrossChainMethod) UnpackInput ¶
func (m *CrossChainMethod) UnpackInput(data []byte) (*crosschaintypes.CrossChainArgs, error)
type CrosschainKeeper ¶
type CrosschainKeeper interface { TransferAfter(ctx sdk.Context, sender sdk.AccAddress, receive string, coins, fee sdk.Coin, originToken, insufficientLiquidity bool) error PrecompileCancelSendToExternal(ctx sdk.Context, txID uint64, sender sdk.AccAddress) (sdk.Coin, error) PrecompileIncreaseBridgeFee(ctx sdk.Context, txID uint64, sender sdk.AccAddress, addBridgeFee sdk.Coin) error PrecompileBridgeCall(ctx sdk.Context, sender, refund common.Address, coins sdk.Coins, to common.Address, data, memo []byte) (uint64, error) PrecompileCancelPendingBridgeCall(ctx sdk.Context, nonce uint64, sender sdk.AccAddress) (sdk.Coins, error) PrecompileAddPendingPoolRewards(ctx sdk.Context, txID uint64, sender sdk.AccAddress, reward sdk.Coin) error }
type Erc20Keeper ¶
type Erc20Keeper interface { ModuleAddress() common.Address GetTokenPairByAddress(ctx sdk.Context, address common.Address) (erc20types.TokenPair, bool) ConvertDenomToTarget(ctx sdk.Context, from sdk.AccAddress, coin sdk.Coin, fxTarget fxtypes.FxTarget) (sdk.Coin, error) GetIbcTimeout(ctx sdk.Context) time.Duration SetIBCTransferRelation(ctx sdk.Context, channel string, sequence uint64) HasOutgoingTransferRelation(ctx sdk.Context, moduleName string, txID uint64) bool ToTargetDenom(ctx sdk.Context, denom, base string, aliases []string, fxTarget fxtypes.FxTarget) string GetTokenPair(ctx sdk.Context, tokenOrDenom string) (erc20types.TokenPair, bool) IsOriginDenom(ctx sdk.Context, denom string) bool HasDenomAlias(ctx sdk.Context, denom string) (banktypes.Metadata, bool) }
type ExecuteClaimMethod ¶
func NewExecuteClaimMethod ¶
func NewExecuteClaimMethod(keeper *Keeper) *ExecuteClaimMethod
func (*ExecuteClaimMethod) GetMethodId ¶
func (m *ExecuteClaimMethod) GetMethodId() []byte
func (*ExecuteClaimMethod) IsReadonly ¶
func (m *ExecuteClaimMethod) IsReadonly() bool
func (*ExecuteClaimMethod) NewExecuteClaimEvent ¶
func (*ExecuteClaimMethod) PackInput ¶
func (m *ExecuteClaimMethod) PackInput(args crosschaintypes.ExecuteClaimArgs) ([]byte, error)
func (*ExecuteClaimMethod) PackOutput ¶
func (m *ExecuteClaimMethod) PackOutput(success bool) ([]byte, error)
func (*ExecuteClaimMethod) RequiredGas ¶
func (m *ExecuteClaimMethod) RequiredGas() uint64
func (*ExecuteClaimMethod) UnpackInput ¶
func (m *ExecuteClaimMethod) UnpackInput(data []byte) (*crosschaintypes.ExecuteClaimArgs, error)
func (*ExecuteClaimMethod) UnpackOutput ¶
func (m *ExecuteClaimMethod) UnpackOutput(data []byte) (bool, error)
type FIP20CrossChainMethod ¶
type FIP20CrossChainMethod struct { *CrossChainMethod abi.Method }
func NewFIP20CrossChainMethod ¶
func NewFIP20CrossChainMethod(keeper *Keeper) *FIP20CrossChainMethod
func (*FIP20CrossChainMethod) GetMethodId ¶
func (m *FIP20CrossChainMethod) GetMethodId() []byte
func (*FIP20CrossChainMethod) IsReadonly ¶
func (m *FIP20CrossChainMethod) IsReadonly() bool
func (*FIP20CrossChainMethod) PackOutput ¶
func (m *FIP20CrossChainMethod) PackOutput(success bool) ([]byte, error)
func (*FIP20CrossChainMethod) RequiredGas ¶
func (m *FIP20CrossChainMethod) RequiredGas() uint64
func (*FIP20CrossChainMethod) UnpackInput ¶
func (m *FIP20CrossChainMethod) UnpackInput(data []byte) (*crosschaintypes.FIP20CrossChainArgs, error)
type IBCTransferKeeper ¶
type IBCTransferKeeper interface {
Transfer(goCtx context.Context, msg *ibctransfertypes.MsgTransfer) (*ibctransfertypes.MsgTransferResponse, error)
}
type IncreaseBridgeFeeMethod ¶
func NewIncreaseBridgeFeeMethod ¶
func NewIncreaseBridgeFeeMethod(keeper *Keeper) *IncreaseBridgeFeeMethod
func (*IncreaseBridgeFeeMethod) GetMethodId ¶
func (m *IncreaseBridgeFeeMethod) GetMethodId() []byte
func (*IncreaseBridgeFeeMethod) IsReadonly ¶
func (m *IncreaseBridgeFeeMethod) IsReadonly() bool
func (*IncreaseBridgeFeeMethod) NewIncreaseBridgeFeeEvent ¶
func (m *IncreaseBridgeFeeMethod) NewIncreaseBridgeFeeEvent(args *crosschaintypes.IncreaseBridgeFeeArgs, sender common.Address) (data []byte, topic []common.Hash, err error)
func (*IncreaseBridgeFeeMethod) PackOutput ¶
func (m *IncreaseBridgeFeeMethod) PackOutput(success bool) ([]byte, error)
func (*IncreaseBridgeFeeMethod) RequiredGas ¶
func (m *IncreaseBridgeFeeMethod) RequiredGas() uint64
func (*IncreaseBridgeFeeMethod) UnpackInput ¶
func (m *IncreaseBridgeFeeMethod) UnpackInput(data []byte) (*crosschaintypes.IncreaseBridgeFeeArgs, error)
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) AddRoute ¶
func (rtr *Router) AddRoute(module string, hook crosschainkeeper.Keeper) *Router
func (*Router) GetRoute ¶
func (rtr *Router) GetRoute(module string) (crosschainkeeper.Keeper, bool)
Click to show internal directories.
Click to hide internal directories.