Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.Codec)
- type AccStake
- type AccStruct
- type Holding
- type MsgSetAccData
- type MsgSetPoolData
- type MsgSetStakeData
- type MsgStake
- type MsgSwap
- type PoolStruct
- type QueryResAccDatas
- type QueryResPoolDatas
- type QueryResResolve
- type QueryResStakeDatas
- type StakeStruct
Constants ¶
const ( // module pooldata ModuleName = "swapservice" // StoreKey to be used when creating the KVStore StoreKey = ModuleName )
const RouterKey = ModuleName // this was defined in your key.go file
Variables ¶
var ModuleCdc = codec.New()
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type AccStruct ¶
AccStruct is a struct that contains balances of an account
func NewAccStruct ¶
func NewAccStruct() AccStruct
type MsgSetAccData ¶
type MsgSetAccData struct { AccID string `json:"acc_id"` Name string `json:"name"` Ticker string `json:"atom"` Amount string `json:"token"` Owner sdk.AccAddress `json:"owner"` }
MsgSetAccData defines a SetAccData message
func NewMsgSetAccData ¶
func NewMsgSetAccData(name, ticker, amount string, owner sdk.AccAddress) MsgSetAccData
NewMsgSetPoolData is a constructor function for MsgSetPoolData
func (MsgSetAccData) GetSignBytes ¶
func (msg MsgSetAccData) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgSetAccData) GetSigners ¶
func (msg MsgSetAccData) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgSetAccData) Route ¶
func (msg MsgSetAccData) Route() string
Route should return the pooldata of the module
func (MsgSetAccData) ValidateBasic ¶
func (msg MsgSetAccData) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgSetPoolData ¶
type MsgSetPoolData struct { PoolID string `json:"pool_id"` BalanceAtom string `json:"balance_atom"` BalanceToken string `json:"balance_token"` Ticker string `json:"ticker"` TokenName string `json:"token_name"` Owner sdk.AccAddress `json:"owner"` }
MsgSetPoolData defines a SetPoolData message
func NewMsgSetPoolData ¶
func NewMsgSetPoolData(tokenName, ticker string, owner sdk.AccAddress) MsgSetPoolData
NewMsgSetPoolData is a constructor function for MsgSetPoolData
func (MsgSetPoolData) GetSignBytes ¶
func (msg MsgSetPoolData) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgSetPoolData) GetSigners ¶
func (msg MsgSetPoolData) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgSetPoolData) Route ¶
func (msg MsgSetPoolData) Route() string
Route should return the pooldata of the module
func (MsgSetPoolData) ValidateBasic ¶
func (msg MsgSetPoolData) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgSetStakeData ¶
type MsgSetStakeData struct { StakeID string `json:"acc_id"` Name string `json:"name"` Ticker string `json:"ticker"` Atom string `json:"atom"` Token string `json:"token"` Owner sdk.AccAddress `json:"owner"` }
MsgSetStakeData defines a SetStakeData message
func NewMsgSetStakeData ¶
func NewMsgSetStakeData(name, ticker, atom, token string, owner sdk.AccAddress) MsgSetStakeData
NewMsgSetPoolData is a constructor function for MsgSetPoolData
func (MsgSetStakeData) GetSignBytes ¶
func (msg MsgSetStakeData) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgSetStakeData) GetSigners ¶
func (msg MsgSetStakeData) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgSetStakeData) Route ¶
func (msg MsgSetStakeData) Route() string
Route should return the pooldata of the module
func (MsgSetStakeData) Type ¶
func (msg MsgSetStakeData) Type() string
Type should return the action
func (MsgSetStakeData) ValidateBasic ¶
func (msg MsgSetStakeData) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgStake ¶
type MsgStake struct { Name string `json:"name"` Ticker string `json:"ticker"` AtomAmount string `json:"atom_amount"` TokenAmount string `json:"token_amount"` Owner sdk.AccAddress `json:"owner"` }
MsgStake defines a MsgStake message
type MsgSwap ¶
type MsgSwap struct { PoolID string `json:"pool_id"` SourceTicker string `json:"source_ticker"` TargetTicker string `json:"target_ticker"` Requester string `json:"requester"` Destination string `json:"destination"` Amount string `json:"amount"` Owner sdk.AccAddress `json:"owner"` }
MsgSwap defines a MsgSwap message
func NewMsgSwap ¶
func NewMsgSwap(source, target, amount, requester, destination string, owner sdk.AccAddress) MsgSwap
NewMsgSwap is a constructor function for MsgSwap
func (MsgSwap) GetSignBytes ¶
GetSignBytes encodes the message for signing
func (MsgSwap) GetSigners ¶
func (msg MsgSwap) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgSwap) ValidateBasic ¶
ValidateBasic runs stateless checks on the message
type PoolStruct ¶
type PoolStruct struct { BalanceAtom string `json:"balance_atom"` BalanceToken string `json:"balance_token"` Ticker string `json:"ticker"` TokenName string `json:"token_name"` }
PoolStruct is a struct that contains all the metadata of a pooldata
type QueryResPoolDatas ¶
type QueryResPoolDatas []PoolStruct
Query Result Payload for a pooldatas query
type QueryResResolve ¶
type QueryResResolve struct {
Value string `json:"value"`
}
Query Result Payload for a resolve query
type QueryResStakeDatas ¶
type QueryResStakeDatas []string
Query Result Payload for a pooldatas query
func (QueryResStakeDatas) String ¶
func (n QueryResStakeDatas) String() string
implement fmt.Stringer
type StakeStruct ¶
Stake Struct is a struct that contain amount of coins stake towards a specific pool
func NewStakeStruct ¶
func NewStakeStruct() StakeStruct
func (StakeStruct) String ¶
func (w StakeStruct) String() string