Documentation ¶
Index ¶
- Variables
- func GetPairIDBytes(id uint64) []byte
- func GetPairIDFromBytes(bz []byte) uint64
- func VerificationBurnDenomCoins(coins sdk.Coins, pair types.Pair) error
- func VerificationMintDenomCoins(coins sdk.Coins, pair types.Pair) error
- type Keeper
- func (k Keeper) AddressEmptyCheck(ctx sdk.Context) bool
- func (k Keeper) AllPairs(goCtx context.Context, req *types.AllPairsRequest) (*types.AllPairsResponse, error)
- func (k Keeper) AppendPair(ctx sdk.Context, pair types.Pair) uint64
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) BindPort(ctx sdk.Context, portID string) error
- func (k Keeper) Burn(goCtx context.Context, msg *types.MsgBurn) (*types.MsgBurnResponse, error)
- func (k Keeper) CalculateAmountToMint(ibcBaseTokenDenomAmount sdk.Int, atomPrice sdk.Int, mintingFee sdk.Int) sdk.Int
- func (k Keeper) CalculateAmountToSend(qAssetTokenAmount sdk.Int, atomPrice sdk.Int, burningFee sdk.Int) sdk.Int
- func (k Keeper) CalculateBackingRatio(qm sdk.Int, ar sdk.Int, atomPrice sdk.Int) (sdk.Int, error)
- func (k Keeper) CalculateBurningFeeForBurningFund(qAssetTokenAmount sdk.Int, atomPrice sdk.Int, burningFee sdk.Int) sdk.Int
- func (k Keeper) CalculateMintingFeeForBurningFund(ibcBaseTokenDenomAmount sdk.Int, atomPrice sdk.Int, mintingFee sdk.Int) sdk.Int
- func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) ChangeBurningFundAddress(ctx sdk.Context, address sdk.AccAddress) error
- func (k Keeper) ChangeReserveFundAddress(ctx sdk.Context, address sdk.AccAddress) error
- func (k Keeper) CheckBurnAmount(msgAmountIn string, pair types.Pair) error
- func (k Keeper) CheckMinAmount(msgAmountIn string, pair types.Pair) error
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k Keeper) GMB_ExecuteBurn(ctx sdk.Context, msg *types.MsgBurn, pair types.Pair) (error, sdk.Coin)
- func (k Keeper) GMB_ExecuteMint(ctx sdk.Context, msg *types.MsgMint, pair types.Pair) (error, sdk.Coin)
- func (k Keeper) GeneratePairIdHash(denom1 string, denom2 string) string
- func (k Keeper) GetAllPair(ctx sdk.Context) (list []types.Pair)
- func (k Keeper) GetAmountOutByAmountIn(goCtx context.Context, req *types.GetAmountOutByAmountInRequest) (*types.GetAmountOutByAmountInResponse, error)
- func (k Keeper) GetAtomPrice(ctx sdk.Context, pair types.Pair) (sdk.Int, error)
- func (k Keeper) GetBurningFundAddress(ctx sdk.Context) sdk.AccAddress
- func (k Keeper) GetPairByID(ctx sdk.Context, id uint64) (val types.Pair, found bool)
- func (k Keeper) GetPairByPairID(ctx sdk.Context, pairId string) (val types.Pair, found bool)
- func (k Keeper) GetPairCount(ctx sdk.Context) uint64
- func (k Keeper) GetPairIdBurn(amountInt string, denom2 string) (string, error)
- func (k Keeper) GetPairIdMint(amountInt string, denom2 string) (string, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPort(ctx sdk.Context) string
- func (k Keeper) GetReserveFundAddress(ctx sdk.Context) sdk.AccAddress
- func (k Keeper) IncreaseReserve(ctx sdk.Context, amount1 sdk.Int, amount2 sdk.Int, pair types.Pair) types.Pair
- func (k Keeper) IsBound(ctx sdk.Context, portID string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Mint(goCtx context.Context, msg *types.MsgMint) (*types.MsgMintResponse, error)
- func (k Keeper) PairById(goCtx context.Context, req *types.PairByIdRequest) (*types.PairRequestResponse, error)
- func (k Keeper) PairByPairId(goCtx context.Context, req *types.PairByPairIdRequest) (*types.PairRequestResponse, error)
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ReduceReserve(ctx sdk.Context, amount1 sdk.Int, amount2 sdk.Int, pair types.Pair) types.Pair
- func (k Keeper) RegisterPair(ctx sdk.Context, p types.Pair) error
- func (k Keeper) RemovePair(ctx sdk.Context, id uint64)
- func (k Keeper) SetBurningFundAddress(ctx sdk.Context, newBurningFundAddress sdk.AccAddress)
- func (k Keeper) SetPair(ctx sdk.Context, Pair types.Pair)
- func (k Keeper) SetPairCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPort(ctx sdk.Context, portID string)
- func (k Keeper) SetReserveFundAddress(ctx sdk.Context, newReserveFundAddress sdk.AccAddress)
- func (k Keeper) SetTestingMode(value bool)
- func (k Keeper) UpdateAtomPrice(ctx sdk.Context, pair types.Pair) error
- func (k Keeper) UpdateAtomPriceTesting(ctx sdk.Context, price sdk.Int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AtomPrice sdk.Int TestingMode bool = false )
Functions ¶
func GetPairIDBytes ¶
func GetPairIDFromBytes ¶
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, bankKeeper types.BankKeeper, oracleKeeper types.OracleKeeper, ) *Keeper
func (Keeper) AddressEmptyCheck ¶ added in v0.1.2
func (Keeper) AllPairs ¶ added in v0.1.2
func (k Keeper) AllPairs(goCtx context.Context, req *types.AllPairsRequest) (*types.AllPairsResponse, error)
func (Keeper) AuthenticateCapability ¶
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function
func (Keeper) BindPort ¶
BindPort defines a wrapper function for the port Keeper's function in order to expose it to module's InitGenesis function
func (Keeper) CalculateAmountToMint ¶
func (Keeper) CalculateAmountToSend ¶
func (Keeper) CalculateBackingRatio ¶ added in v0.1.3
func (Keeper) CalculateBurningFeeForBurningFund ¶
func (Keeper) CalculateMintingFeeForBurningFund ¶
func (Keeper) ChanCloseInit ¶
ChanCloseInit defines a wrapper function for the channel Keeper's function.
func (Keeper) ChangeBurningFundAddress ¶
func (Keeper) ChangeReserveFundAddress ¶ added in v0.1.1
func (Keeper) CheckBurnAmount ¶ added in v0.0.2
func (Keeper) CheckMinAmount ¶
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability allows the IBC app module to claim a capability that core IBC passes to it
func (Keeper) GMB_ExecuteBurn ¶ added in v0.2.1
func (Keeper) GMB_ExecuteMint ¶ added in v0.2.1
func (Keeper) GeneratePairIdHash ¶
func (Keeper) GetAmountOutByAmountIn ¶ added in v0.0.2
func (k Keeper) GetAmountOutByAmountIn(goCtx context.Context, req *types.GetAmountOutByAmountInRequest) (*types.GetAmountOutByAmountInResponse, error)
func (Keeper) GetAtomPrice ¶
func (Keeper) GetBurningFundAddress ¶
func (k Keeper) GetBurningFundAddress(ctx sdk.Context) sdk.AccAddress
func (Keeper) GetPairByID ¶
func (Keeper) GetPairByPairID ¶
func (Keeper) GetPairIdBurn ¶
func (Keeper) GetPairIdMint ¶
func (Keeper) GetReserveFundAddress ¶ added in v0.1.1
func (k Keeper) GetReserveFundAddress(ctx sdk.Context) sdk.AccAddress
func (Keeper) IncreaseReserve ¶
func (Keeper) PairById ¶
func (k Keeper) PairById(goCtx context.Context, req *types.PairByIdRequest) (*types.PairRequestResponse, error)
func (Keeper) PairByPairId ¶
func (k Keeper) PairByPairId(goCtx context.Context, req *types.PairByPairIdRequest) (*types.PairRequestResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ReduceReserve ¶
func (Keeper) SetBurningFundAddress ¶
func (k Keeper) SetBurningFundAddress(ctx sdk.Context, newBurningFundAddress sdk.AccAddress)
func (Keeper) SetReserveFundAddress ¶ added in v0.1.1
func (k Keeper) SetReserveFundAddress(ctx sdk.Context, newReserveFundAddress sdk.AccAddress)
func (Keeper) SetTestingMode ¶
func (Keeper) UpdateAtomPrice ¶
Click to show internal directories.
Click to hide internal directories.