types

package
v0.0.0-...-64405af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the ethereum bridge module
	ModuleName = "ethbridge"

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the ethereum bridge module
	QuerierRoute = ModuleName

	// RouterKey is the msg router key for the ethereum bridge module
	RouterKey = ModuleName
)
View Source
const (
	DefaultCodespace = "ethbridge"
)

Variables

View Source
var (
	ErrInternal          = sdkerrors.Register(ModuleName, 0, "internal")
	ErrInvalidEthNonce   = sdkerrors.Register(ModuleName, 1, "invalid ethereum nonce provided, must be >= 0")
	ErrInvalidEthAddress = sdkerrors.Register(ModuleName, 2, "invalid ethereum address provided, must be a valid hex-encoded Ethereum address")
)

Functions

func CreateOracleClaimFromEthClaim

func CreateOracleClaimFromEthClaim(cdc *codec.LegacyAmino, ethClaim EthBridgeClaim) (string, sdk.ValAddress, string)

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers concrete types on the Amino codec

Types

type EthBridgeClaim

type EthBridgeClaim struct {
	Nonce          int            `json:"nonce"`
	EthereumSender string         `json:"ethereum_sender"`
	CosmosReceiver sdk.AccAddress `json:"cosmos_receiver"`
	Validator      sdk.AccAddress `json:"validator"`
	Amount         sdk.Coins      `json:"amount"`
}

func CreateEthClaimFromOracleString

func CreateEthClaimFromOracleString(nonce int, ethereumSender string, validator sdk.ValAddress, oracleClaimString string) (EthBridgeClaim, error)

func NewEthBridgeClaim

func NewEthBridgeClaim(nonce int, ethereumSender string, cosmosReceiver sdk.AccAddress, validator sdk.AccAddress, amount sdk.Coins) EthBridgeClaim

NewEthBridgeClaim is a constructor function for NewEthBridgeClaim

type MsgMakeEthBridgeClaim

type MsgMakeEthBridgeClaim struct {
	EthBridgeClaim `json:"eth_bridge_claim"`
}

MsgMakeEthBridgeClaim defines a message for creating claims on the ethereum bridge

func NewMsgMakeEthBridgeClaim

func NewMsgMakeEthBridgeClaim(ethBridgeClaim EthBridgeClaim) MsgMakeEthBridgeClaim

NewMsgMakeEthBridgeClaim is a constructor function for MsgMakeBridgeClaim

func (MsgMakeEthBridgeClaim) GetSignBytes

func (msg MsgMakeEthBridgeClaim) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgMakeEthBridgeClaim) GetSigners

func (msg MsgMakeEthBridgeClaim) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgMakeEthBridgeClaim) Route

func (msg MsgMakeEthBridgeClaim) Route() string

Route should return the name of the module

func (MsgMakeEthBridgeClaim) Type

func (msg MsgMakeEthBridgeClaim) Type() string

Type should return the action

func (MsgMakeEthBridgeClaim) ValidateBasic

func (msg MsgMakeEthBridgeClaim) ValidateBasic() error

ValidateBasic runs stateless checks on the message

type OracleClaim

type OracleClaim struct {
	CosmosReceiver sdk.AccAddress `json:"cosmos_receiver"`
	Amount         sdk.Coins      `json:"amount"`
}

OracleClaim is the details of how the claim for each validator will be stored in the oracle

func CreateOracleClaimFromOracleString

func CreateOracleClaimFromOracleString(oracleClaimString string) (OracleClaim, error)

func NewOracleClaim

func NewOracleClaim(cosmosReceiver sdk.AccAddress, amount sdk.Coins) OracleClaim

NewOracleClaim is a constructor function for OracleClaim

type QueryEthProphecyParams

type QueryEthProphecyParams struct {
	Nonce          int
	EthereumSender string
}

defines the params for the following queries: - 'custom/ethbridge/prophecies/'

func NewQueryEthProphecyParams

func NewQueryEthProphecyParams(nonce int, ethereumSender string) QueryEthProphecyParams

type QueryEthProphecyResponse

type QueryEthProphecyResponse struct {
	ID              string           `json:"id"`
	Status          oracle.Status    `json:"status"`
	EthBridgeClaims []EthBridgeClaim `json:"claims"`
}

Query Result Payload for an eth prophecy query

func NewQueryEthProphecyResponse

func NewQueryEthProphecyResponse(id string, status oracle.Status, claims []EthBridgeClaim) QueryEthProphecyResponse

func (QueryEthProphecyResponse) String

func (response QueryEthProphecyResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL