types

package
v12.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "swap"
	StoreKey   = ModuleName
)
View Source
const (
	EthereumHashLength int = 32
)

Variables

View Source
var (
	ErrorInvalidField    = sdkerrors.Register(ModuleName, 101, "invalid field")
	ErrorInvalidFrom     = sdkerrors.Register(ModuleName, 102, "invalid from")
	ErrorInvalidReceiver = sdkerrors.Register(ModuleName, 103, "invalid receiver")
	ErrorInvalidTxHash   = sdkerrors.Register(ModuleName, 104, "invalid tx_hash")
	ErrorInvalidAmount   = sdkerrors.Register(ModuleName, 105, "invalid amount")
)
View Source
var (
	ErrorSwapIsDisabled = sdkerrors.Register(ModuleName, 201, "swap is disabled")
	ErrorUnauthorized   = sdkerrors.Register(ModuleName, 202, "unauthorized")
	ErrorDuplicateSwap  = sdkerrors.Register(ModuleName, 203, "duplicate swap")
)
View Source
var (
	PrecisionLoss = sdkmath.NewInt(100)
)
View Source
var (
	SwapKeyPrefix = []byte{0x10}
)

Functions

func SwapKey

func SwapKey(hash EthereumHash) []byte

Types

type EthereumHash

type EthereumHash [EthereumHashLength]byte

func BytesToHash

func BytesToHash(b []byte) EthereumHash

func (EthereumHash) Bytes

func (e EthereumHash) Bytes() []byte

func (EthereumHash) Hex

func (e EthereumHash) Hex() string

func (EthereumHash) Marshal

func (e EthereumHash) Marshal() ([]byte, error)

func (EthereumHash) MarshalJSON

func (e EthereumHash) MarshalJSON() ([]byte, error)

func (*EthereumHash) SetBytes

func (e *EthereumHash) SetBytes(b []byte)

func (EthereumHash) String

func (e EthereumHash) String() string

func (*EthereumHash) Unmarshal

func (e *EthereumHash) Unmarshal(data []byte) error

func (*EthereumHash) UnmarshalJSON

func (e *EthereumHash) UnmarshalJSON(data []byte) error

Directories

Path Synopsis
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.

Jump to

Keyboard shortcuts

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