bep3

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

View Source
var (
	NewKeeper                  = keeper.NewKeeper
	NewQuerier                 = keeper.NewQuerier
	RegisterRoutes             = rest.RegisterRoutes
	CalculateRandomHash        = types.CalculateRandomHash
	CalculateSwapID            = types.CalculateSwapID
	DefaultGenesisState        = types.DefaultGenesisState
	DefaultParams              = types.DefaultParams
	ErrAssetNotActive          = types.ErrAssetNotActive
	ErrAssetNotSupported       = types.ErrAssetNotSupported
	ErrAssetSupplyNotFound     = types.ErrAssetSupplyNotFound
	ErrAtomicSwapAlreadyExists = types.ErrAtomicSwapAlreadyExists
	ErrAtomicSwapNotFound      = types.ErrAtomicSwapNotFound
	ErrExceedsAvailableSupply  = types.ErrExceedsAvailableSupply
	ErrExceedsSupplyLimit      = types.ErrExceedsSupplyLimit
	ErrInvalidClaimSecret      = types.ErrInvalidClaimSecret
	ErrInvalidCurrentSupply    = types.ErrInvalidCurrentSupply
	ErrInvalidHeightSpan       = types.ErrInvalidHeightSpan
	ErrInvalidAmount           = types.ErrInvalidAmount
	ErrInvalidIncomingSupply   = types.ErrInvalidIncomingSupply
	ErrInvalidOutgoingSupply   = types.ErrInvalidOutgoingSupply
	ErrInvalidTimestamp        = types.ErrInvalidTimestamp
	ErrSwapNotClaimable        = types.ErrSwapNotClaimable
	ErrSwapNotRefundable       = types.ErrSwapNotRefundable
	GenerateSecureRandomNumber = types.GenerateSecureRandomNumber
	GetAtomicSwapByHeightKey   = types.GetAtomicSwapByHeightKey
	NewAssetSupply             = types.NewAssetSupply
	NewAtomicSwap              = types.NewAtomicSwap
	NewGenesisState            = types.NewGenesisState
	NewMsgClaimAtomicSwap      = types.NewMsgClaimAtomicSwap
	NewMsgCreateAtomicSwap     = types.NewMsgCreateAtomicSwap
	NewMsgRefundAtomicSwap     = types.NewMsgRefundAtomicSwap
	NewParams                  = types.NewParams
	NewQueryAssetSupply        = types.NewQueryAssetSupply
	NewQueryAtomicSwapByID     = types.NewQueryAtomicSwapByID
	NewQueryAtomicSwaps        = types.NewQueryAtomicSwaps
	NewSwapDirectionFromString = types.NewSwapDirectionFromString
	NewSwapStatusFromString    = types.NewSwapStatusFromString
	ParamKeyTable              = types.ParamKeyTable
	RegisterCodec              = types.RegisterCodec

	// variable aliases
	AssetSupplyKeyPrefix            = types.AssetSupplyKeyPrefix
	AtomicSwapByBlockPrefix         = types.AtomicSwapByBlockPrefix
	AtomicSwapCoinsAccAddr          = types.AtomicSwapCoinsAccAddr
	AtomicSwapKeyPrefix             = types.AtomicSwapKeyPrefix
	AtomicSwapLongtermStoragePrefix = types.AtomicSwapLongtermStoragePrefix
	DefaultBnbDeputyFixedFee        = types.DefaultBnbDeputyFixedFee
	DefaultMinAmount                = types.DefaultMinAmount
	DefaultMaxAmount                = types.DefaultMaxAmount
	DefaultMaxBlockLock             = types.DefaultMaxBlockLock
	DefaultMinBlockLock             = types.DefaultMinBlockLock
	DefaultSupportedAssets          = types.DefaultSupportedAssets
	KeyBnbDeputyAddress             = types.KeyBnbDeputyAddress
	KeyBnbDeputyFixedFee            = types.KeyBnbDeputyFixedFee
	KeyMinAmount                    = types.KeyMinAmount
	KeyMaxAmount                    = types.KeyMaxAmount
	KeyMaxBlockLock                 = types.KeyMaxBlockLock
	KeyMinBlockLock                 = types.KeyMinBlockLock
	KeySupportedAssets              = types.KeySupportedAssets
	ModuleCdc                       = types.ModuleCdc
	SupplyLimitUpgradeTime          = types.SupplyLimitUpgradeTime
)

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 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 QueryAssetSupply

type QueryAssetSupply = types.QueryAssetSupply

type QueryAtomicSwapByID

type QueryAtomicSwapByID = types.QueryAtomicSwapByID

type QueryAtomicSwaps

type QueryAtomicSwaps = types.QueryAtomicSwaps

type SwapDirection

type SwapDirection = types.SwapDirection

type SwapStatus

type SwapStatus = types.SwapStatus

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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