Documentation ¶
Index ¶
- type MockProvider
- func (p *MockProvider) ChainName() string
- func (p *MockProvider) ClaimFee(ctx context.Context) error
- func (p *MockProvider) Config() provider.Config
- func (p *MockProvider) DeleteMessage(msg *types.Message)
- func (ip *MockProvider) FetchTxMessages(ctx context.Context, txHash string) ([]*types.Message, error)
- func (p *MockProvider) FinalityBlock(ctx context.Context) uint64
- func (p *MockProvider) FindMessages() []*types.Message
- func (ip *MockProvider) GenerateMessages(ctx context.Context, fromHeight, toHeight uint64) ([]*types.Message, error)
- func (ip *MockProvider) GenerateTxMessages(ctx context.Context, txHash string) ([]*types.Message, error)
- func (p *MockProvider) GetFee(context.Context, string, bool) (uint64, error)
- func (p *MockProvider) GetLastProcessedBlockHeight(ctx context.Context) (uint64, error)
- func (p *MockProvider) ImportKeystore(context.Context, string, string) (string, error)
- func (p *MockProvider) Init(context.Context, string, kms.KMS) error
- func (p *MockProvider) Listener(ctx context.Context, lastProcessedTx relayertypes.LastProcessedTx, ...) error
- func (p *MockProvider) MessageReceived(ctx context.Context, key *types.MessageKey) (bool, error)
- func (p *MockProvider) NID() string
- func (p *MockProvider) Name() string
- func (p *MockProvider) NewKeystore(string) (string, error)
- func (p *MockProvider) QueryBalance(ctx context.Context, addr string) (*types.Coin, error)
- func (p *MockProvider) QueryBlockMessages(ctx context.Context, fromHeight, toHeight uint64) ([]*types.Message, error)
- func (p *MockProvider) QueryLatestHeight(ctx context.Context) (uint64, error)
- func (p *MockProvider) QueryTransactionReceipt(ctx context.Context, txHash string) (*types.Receipt, error)
- func (p *MockProvider) RestoreKeystore(context.Context) error
- func (p *MockProvider) RevertMessage(context.Context, *big.Int) error
- func (p *MockProvider) Route(ctx context.Context, message *types.Message, callback types.TxResponseFunc) error
- func (p *MockProvider) SetAdmin(context.Context, string) error
- func (p *MockProvider) SetFee(context.Context, string, *big.Int, *big.Int) error
- func (p *MockProvider) SetLastSavedHeightFunc(func() uint64)
- func (p *MockProvider) ShouldReceiveMessage(ctx context.Context, message *types.Message) (bool, error)
- func (p *MockProvider) ShouldSendMessage(ctx context.Context, message *types.Message) (bool, error)
- func (p *MockProvider) Type() string
- type MockProviderConfig
- func (pp *MockProviderConfig) ContractsAddress() types.ContractConfigMap
- func (pp *MockProviderConfig) Enabled() bool
- func (pp *MockProviderConfig) GetWallet() string
- func (pp *MockProviderConfig) NewProvider(ctx context.Context, log *zap.Logger, homepath string, debug bool, ...) (provider.ChainProvider, error)
- func (pp *MockProviderConfig) SetWallet(string)
- func (pp *MockProviderConfig) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockProvider ¶
type MockProvider struct { PCfg *MockProviderConfig Height uint64 // contains filtered or unexported fields }
func (*MockProvider) ChainName ¶
func (p *MockProvider) ChainName() string
func (*MockProvider) ClaimFee ¶ added in v1.3.4
func (p *MockProvider) ClaimFee(ctx context.Context) error
func (*MockProvider) Config ¶ added in v1.3.4
func (p *MockProvider) Config() provider.Config
func (*MockProvider) DeleteMessage ¶
func (p *MockProvider) DeleteMessage(msg *types.Message)
func (*MockProvider) FetchTxMessages ¶ added in v1.9.0
func (*MockProvider) FinalityBlock ¶
func (p *MockProvider) FinalityBlock(ctx context.Context) uint64
func (*MockProvider) FindMessages ¶
func (p *MockProvider) FindMessages() []*types.Message
func (*MockProvider) GenerateMessages ¶ added in v1.3.4
func (*MockProvider) GenerateTxMessages ¶ added in v1.9.0
func (*MockProvider) GetLastProcessedBlockHeight ¶ added in v1.9.0
func (p *MockProvider) GetLastProcessedBlockHeight(ctx context.Context) (uint64, error)
func (*MockProvider) ImportKeystore ¶ added in v1.3.4
func (*MockProvider) Listener ¶
func (p *MockProvider) Listener(ctx context.Context, lastProcessedTx relayertypes.LastProcessedTx, blockInfo chan *types.BlockInfo) error
func (*MockProvider) MessageReceived ¶
func (p *MockProvider) MessageReceived(ctx context.Context, key *types.MessageKey) (bool, error)
func (*MockProvider) NID ¶
func (p *MockProvider) NID() string
func (*MockProvider) Name ¶ added in v1.3.4
func (p *MockProvider) Name() string
func (*MockProvider) NewKeystore ¶ added in v1.3.4
func (p *MockProvider) NewKeystore(string) (string, error)
func (*MockProvider) QueryBalance ¶
func (*MockProvider) QueryBlockMessages ¶ added in v1.9.0
func (*MockProvider) QueryLatestHeight ¶
func (p *MockProvider) QueryLatestHeight(ctx context.Context) (uint64, error)
func (*MockProvider) QueryTransactionReceipt ¶
func (*MockProvider) RestoreKeystore ¶ added in v1.3.4
func (p *MockProvider) RestoreKeystore(context.Context) error
func (*MockProvider) RevertMessage ¶ added in v1.3.4
func (*MockProvider) Route ¶
func (p *MockProvider) Route(ctx context.Context, message *types.Message, callback types.TxResponseFunc) error
func (*MockProvider) SetAdmin ¶ added in v1.3.4
func (p *MockProvider) SetAdmin(context.Context, string) error
func (*MockProvider) SetLastSavedHeightFunc ¶ added in v1.3.4
func (p *MockProvider) SetLastSavedHeightFunc(func() uint64)
func (*MockProvider) ShouldReceiveMessage ¶
func (*MockProvider) ShouldSendMessage ¶
func (*MockProvider) Type ¶
func (p *MockProvider) Type() string
type MockProviderConfig ¶
type MockProviderConfig struct { NId string BlockDuration time.Duration SendMessages map[types.MessageKey]*types.Message ReceiveMessages map[types.MessageKey]*types.Message StartHeight uint64 // contains filtered or unexported fields }
func (*MockProviderConfig) ContractsAddress ¶ added in v1.9.0
func (pp *MockProviderConfig) ContractsAddress() types.ContractConfigMap
func (*MockProviderConfig) Enabled ¶ added in v1.3.4
func (pp *MockProviderConfig) Enabled() bool
func (*MockProviderConfig) GetWallet ¶ added in v1.3.4
func (pp *MockProviderConfig) GetWallet() string
func (*MockProviderConfig) NewProvider ¶
func (pp *MockProviderConfig) NewProvider(ctx context.Context, log *zap.Logger, homepath string, debug bool, chainName string) (provider.ChainProvider, error)
NewProvider should provide a new Mock provider
func (*MockProviderConfig) SetWallet ¶ added in v1.3.4
func (pp *MockProviderConfig) SetWallet(string)
func (*MockProviderConfig) Validate ¶
func (pp *MockProviderConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.