bep3

package
v0.11.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EventTypeCreateAtomicSwap      = types.EventTypeCreateAtomicSwap
	EventTypeClaimAtomicSwap       = types.EventTypeClaimAtomicSwap
	EventTypeRefundAtomicSwap      = types.EventTypeRefundAtomicSwap
	EventTypeSwapsExpired          = types.EventTypeSwapsExpired
	AttributeValueCategory         = types.AttributeValueCategory
	AttributeKeySender             = types.AttributeKeySender
	AttributeKeyRecipient          = types.AttributeKeyRecipient
	AttributeKeyAtomicSwapID       = types.AttributeKeyAtomicSwapID
	AttributeKeyRandomNumberHash   = types.AttributeKeyRandomNumberHash
	AttributeKeyTimestamp          = types.AttributeKeyTimestamp
	AttributeKeySenderOtherChain   = types.AttributeKeySenderOtherChain
	AttributeKeyExpireHeight       = types.AttributeKeyExpireHeight
	AttributeKeyAmount             = types.AttributeKeyAmount
	AttributeKeyDirection          = types.AttributeKeyDirection
	AttributeKeyClaimSender        = types.AttributeKeyClaimSender
	AttributeKeyRandomNumber       = types.AttributeKeyRandomNumber
	AttributeKeyRefundSender       = types.AttributeKeyRefundSender
	AttributeKeyAtomicSwapIDs      = types.AttributeKeyAtomicSwapIDs
	AttributeExpirationBlock       = types.AttributeExpirationBlock
	ModuleName                     = types.ModuleName
	StoreKey                       = types.StoreKey
	RouterKey                      = types.RouterKey
	QuerierRoute                   = types.QuerierRoute
	DefaultParamspace              = types.DefaultParamspace
	DefaultLongtermStorageDuration = types.DefaultLongtermStorageDuration
	CreateAtomicSwap               = types.CreateAtomicSwap
	ClaimAtomicSwap                = types.ClaimAtomicSwap
	RefundAtomicSwap               = types.RefundAtomicSwap
	CalcSwapID                     = types.CalcSwapID
	Int64Size                      = types.Int64Size
	RandomNumberHashLength         = types.RandomNumberHashLength
	RandomNumberLength             = types.RandomNumberLength
	AddrByteCount                  = types.AddrByteCount
	MaxOtherChainAddrLength        = types.MaxOtherChainAddrLength
	SwapIDLength                   = types.SwapIDLength
	MaxExpectedIncomeLength        = types.MaxExpectedIncomeLength
	QueryGetAssetSupply            = types.QueryGetAssetSupply
	QueryGetAssetSupplies          = types.QueryGetAssetSupplies
	QueryGetAtomicSwap             = types.QueryGetAtomicSwap
	QueryGetAtomicSwaps            = types.QueryGetAtomicSwaps
	QueryGetParams                 = types.QueryGetParams
	NULL                           = types.NULL
	Open                           = types.Open
	Completed                      = types.Completed
	Expired                        = types.Expired
	INVALID                        = types.INVALID
	Incoming                       = types.Incoming
	Outgoing                       = types.Outgoing
)

Variables

View Source
var (
	// functions aliases
	NewKeeper                  = keeper.NewKeeper
	NewQuerier                 = keeper.NewQuerier
	NewAssetSupply             = types.NewAssetSupply
	RegisterCodec              = types.RegisterCodec
	NewGenesisState            = types.NewGenesisState
	DefaultGenesisState        = types.DefaultGenesisState
	GenerateSecureRandomNumber = types.GenerateSecureRandomNumber
	CalculateRandomHash        = types.CalculateRandomHash
	CalculateSwapID            = types.CalculateSwapID
	GetAtomicSwapByHeightKey   = types.GetAtomicSwapByHeightKey
	NewMsgCreateAtomicSwap     = types.NewMsgCreateAtomicSwap
	NewMsgClaimAtomicSwap      = types.NewMsgClaimAtomicSwap
	NewMsgRefundAtomicSwap     = types.NewMsgRefundAtomicSwap
	NewParams                  = types.NewParams
	DefaultParams              = types.DefaultParams
	NewAssetParam              = types.NewAssetParam
	ParamKeyTable              = types.ParamKeyTable
	NewQueryAssetSupply        = types.NewQueryAssetSupply
	NewQueryAssetSupplies      = types.NewQueryAssetSupplies
	NewQueryAtomicSwapByID     = types.NewQueryAtomicSwapByID
	NewQueryAtomicSwaps        = types.NewQueryAtomicSwaps
	NewAtomicSwap              = types.NewAtomicSwap
	NewSwapStatusFromString    = types.NewSwapStatusFromString
	NewSwapDirectionFromString = types.NewSwapDirectionFromString
	NewAugmentedAtomicSwap     = types.NewAugmentedAtomicSwap

	// variable aliases
	ModuleCdc                       = types.ModuleCdc
	ErrInvalidTimestamp             = types.ErrInvalidTimestamp
	ErrInvalidHeightSpan            = types.ErrInvalidHeightSpan
	ErrInsufficientAmount           = types.ErrInsufficientAmount
	ErrAssetNotSupported            = types.ErrAssetNotSupported
	ErrAssetNotActive               = types.ErrAssetNotActive
	ErrAssetSupplyNotFound          = types.ErrAssetSupplyNotFound
	ErrExceedsSupplyLimit           = types.ErrExceedsSupplyLimit
	ErrExceedsAvailableSupply       = types.ErrExceedsAvailableSupply
	ErrInvalidCurrentSupply         = types.ErrInvalidCurrentSupply
	ErrInvalidIncomingSupply        = types.ErrInvalidIncomingSupply
	ErrInvalidOutgoingSupply        = types.ErrInvalidOutgoingSupply
	ErrInvalidClaimSecret           = types.ErrInvalidClaimSecret
	ErrAtomicSwapAlreadyExists      = types.ErrAtomicSwapAlreadyExists
	ErrAtomicSwapNotFound           = types.ErrAtomicSwapNotFound
	ErrSwapNotRefundable            = types.ErrSwapNotRefundable
	ErrSwapNotClaimable             = types.ErrSwapNotClaimable
	ErrInvalidAmount                = types.ErrInvalidAmount
	ErrInvalidSwapAccount           = types.ErrInvalidSwapAccount
	AtomicSwapKeyPrefix             = types.AtomicSwapKeyPrefix
	AtomicSwapByBlockPrefix         = types.AtomicSwapByBlockPrefix
	AtomicSwapLongtermStoragePrefix = types.AtomicSwapLongtermStoragePrefix
	AtomicSwapCoinsAccAddr          = types.AtomicSwapCoinsAccAddr
	KeyAssetParams                  = types.KeyAssetParams
	DefaultBnbDeputyFixedFee        = types.DefaultBnbDeputyFixedFee
	DefaultMinAmount                = types.DefaultMinAmount
	DefaultMaxAmount                = types.DefaultMaxAmount
	DefaultMinBlockLock             = types.DefaultMinBlockLock
	DefaultMaxBlockLock             = types.DefaultMaxBlockLock
	DefaultPreviousBlockTime        = types.DefaultPreviousBlockTime
)

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, k Keeper)

BeginBlocker on every block expires outdated atomic swaps and removes closed swap from long term storage (default storage time of 1 week)

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, supplyKeeper types.SupplyKeeper, gs GenesisState)

InitGenesis initializes the store state from a genesis state.

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler creates an sdk.Handler for all the bep3 type messages

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule implements the sdk.AppModule interface.

func NewAppModule

func NewAppModule(keeper Keeper, accountKeeper types.AccountKeeper, supplyKeeper types.SupplyKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)

BeginBlock returns the begin blocker for the bep3 module.

func (AppModule) EndBlock

EndBlock returns the end blocker for the bep3 module. It returns no validator updates.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the bep3 module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis performs genesis initialization for the bep3 module. It returns no validator updates.

func (AppModule) Name

func (AppModule) Name() string

Name returns the bep3 module's name.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler returns an sdk.Handler for the bep3 module.

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns the bep3 module sdk.Querier.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute returns the bep3 module's querier route name.

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

RegisterInvariants registers the bep3 module invariants.

func (AppModule) Route

func (AppModule) Route() string

Route returns the message routing key for the bep3 module.

func (AppModule) WeightedOperations added in v0.8.0

func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation

WeightedOperations returns the all the bep3 module operations with their respective weights.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic defines the basic application module used by the bep3 module.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the bep3 module.

func (AppModuleBasic) GenerateGenesisState added in v0.8.0

func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the bep3 module

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd returns no root query command for the bep3 module.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

GetTxCmd returns the root tx command for the bep3 module.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the bep3 module's name.

func (AppModuleBasic) ProposalContents added in v0.8.0

ProposalContents doesn't return any content functions for governance proposals.

func (AppModuleBasic) RandomizedParams added in v0.8.0

func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange

RandomizedParams returns nil because bep3 has no params.

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the bep3 module's types for the given codec.

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

RegisterRESTRoutes registers the REST routes for the bep3 module.

func (AppModuleBasic) RegisterStoreDecoder added in v0.8.0

func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for bep3 module's types

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis performs genesis state validation for the bep3 module.

type AssetParam

type AssetParam = types.AssetParam

type AssetParams

type AssetParams = types.AssetParams

type AssetSupplies

type AssetSupplies = types.AssetSupplies

type AssetSupply

type AssetSupply = types.AssetSupply

type AtomicSwap

type AtomicSwap = types.AtomicSwap

type AtomicSwaps

type AtomicSwaps = types.AtomicSwaps

type AugmentedAtomicSwap added in v0.11.0

type AugmentedAtomicSwap = types.AugmentedAtomicSwap

type AugmentedAtomicSwaps added in v0.11.0

type AugmentedAtomicSwaps = types.AugmentedAtomicSwaps

type GenesisState

type GenesisState = types.GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) (data GenesisState)

ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis

type Keeper

type Keeper = keeper.Keeper

type MsgClaimAtomicSwap

type MsgClaimAtomicSwap = types.MsgClaimAtomicSwap

type MsgCreateAtomicSwap

type MsgCreateAtomicSwap = types.MsgCreateAtomicSwap

type MsgRefundAtomicSwap

type MsgRefundAtomicSwap = types.MsgRefundAtomicSwap

type Params

type Params = types.Params

type QueryAssetSupplies added in v0.11.0

type QueryAssetSupplies = types.QueryAssetSupplies

type QueryAssetSupply

type QueryAssetSupply = types.QueryAssetSupply

type QueryAtomicSwapByID

type QueryAtomicSwapByID = types.QueryAtomicSwapByID

type QueryAtomicSwaps

type QueryAtomicSwaps = types.QueryAtomicSwaps

type SupplyLimit added in v0.11.0

type SupplyLimit = types.SupplyLimit

type SwapDirection

type SwapDirection = types.SwapDirection

type SwapStatus

type SwapStatus = types.SwapStatus

Directories

Path Synopsis
client
cli
legacy

Jump to

Keyboard shortcuts

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