Documentation ¶
Index ¶
- func NewMessagePlugin(leverageKeeper lvkeeper.Keeper) func(wasmkeeper.Messenger) wasmkeeper.Messenger
- type Plugin
- type UmeeMsg
- func (m UmeeMsg) HandleBorrow(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleCollateralize(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleDecollateralize(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleLiquidate(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleMaxBorrow(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleMaxWithdraw(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleRepay(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleSupply(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleSupplyCollateral(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
- func (m UmeeMsg) HandleWithdraw(ctx context.Context, sender string, s lvtypes.MsgServer) (proto.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMessagePlugin ¶
func NewMessagePlugin(leverageKeeper lvkeeper.Keeper) func(wasmkeeper.Messenger) wasmkeeper.Messenger
CustomMessageDecorator returns decorator for custom CosmWasm bindings messages
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin wraps the msg plugin with Messengers.
func (*Plugin) DispatchCustomMsg ¶
func (plugin *Plugin) DispatchCustomMsg(ctx sdk.Context, contractAddr sdk.AccAddress, rawMsg json.RawMessage) error
DispatchCustomMsg responsible for handling custom messages (umee native messages).
func (*Plugin) DispatchMsg ¶
func (plugin *Plugin) DispatchMsg( ctx sdk.Context, contractAddr sdk.AccAddress, contractIBCPortID string, msg wasmvmtypes.CosmosMsg, ) (events []sdk.Event, data [][]byte, err error)
DispatchMsg encodes the wasmVM message and dispatches it.
type UmeeMsg ¶
type UmeeMsg struct { // Used to supply coins to the capital facility. Supply *lvtypes.MsgSupply `json:"supply,omitempty"` // Used to withdraw previously loaned coins from the capital facility. Withdraw *lvtypes.MsgWithdraw `json:"withdraw,omitempty"` // Used to do withdraw maximum assets by supplier. MaxWithdraw *lvtypes.MsgMaxWithdraw `json:"max_withdraw,omitempty"` // Used to enable an amount of selected uTokens as collateral. Collateralize *lvtypes.MsgCollateralize `json:"collateralize,omitempty"` // Used to disable amount of an selected uTokens as collateral. Decollateralize *lvtypes.MsgDecollateralize `json:"decollateralize,omitempty"` // Used to borrowing coins from the capital facility. Borrow *lvtypes.MsgBorrow `json:"borrow,omitempty"` // Used to borrowing coins from the capital facility. MaxBorrow *lvtypes.MsgMaxBorrow `json:"max_borrow,omitempty"` // Used to repaying borrowed coins to the capital facility. Repay *lvtypes.MsgRepay `json:"repay,omitempty"` // Used to repaying a different user's borrowed coins // to the capital facility in exchange for some of their collateral. Liquidate *lvtypes.MsgLiquidate `json:"liquidate,omitempty"` // Used to do supply and collateralize their assets. SupplyCollateral *lvtypes.MsgSupplyCollateral `json:"supply_collateral,omitempty"` }
UmeeMsg wraps all the messages availables for cosmwasm smartcontracts.
func (UmeeMsg) HandleBorrow ¶
func (m UmeeMsg) HandleBorrow( ctx context.Context, sender string, s lvtypes.MsgServer, ) (proto.Message, error)
HandleBorrow handles the borrowing coins from the capital facility.
func (UmeeMsg) HandleCollateralize ¶
func (m UmeeMsg) HandleCollateralize( ctx context.Context, sender string, s lvtypes.MsgServer, ) (proto.Message, error)
HandleCollateralize handles the enable selected uTokens as collateral.
func (UmeeMsg) HandleDecollateralize ¶
func (m UmeeMsg) HandleDecollateralize( ctx context.Context, sender string, s lvtypes.MsgServer, ) (proto.Message, error)
HandleDecollateralize handles the disable amount of an selected uTokens as collateral.
func (UmeeMsg) HandleLiquidate ¶
func (m UmeeMsg) HandleLiquidate( ctx context.Context, sender string, s lvtypes.MsgServer, ) (proto.Message, error)
HandleLiquidate handles the repaying a different user's borrowed coins to the capital facility in exchange for some of their collateral.
func (UmeeMsg) HandleMaxBorrow ¶
func (m UmeeMsg) HandleMaxBorrow( ctx context.Context, sender string, s lvtypes.MsgServer, ) (proto.Message, error)
HandleMaxBorrow handles the borrowing maximum coins from the capital facility.
func (UmeeMsg) HandleMaxWithdraw ¶
func (m UmeeMsg) HandleMaxWithdraw( ctx context.Context, sender string, s lvtypes.MsgServer, ) (proto.Message, error)
HandleMaxWithdraw handles the maximum withdraw value of an address.
func (UmeeMsg) HandleRepay ¶
func (m UmeeMsg) HandleRepay( ctx context.Context, sender string, s lvtypes.MsgServer, ) (proto.Message, error)
HandleRepay handles repaying borrowed coins to the capital facility.
func (UmeeMsg) HandleSupply ¶
func (m UmeeMsg) HandleSupply( ctx context.Context, sender string, s lvtypes.MsgServer, ) (proto.Message, error)
HandleSupply handles the Supply value of an address.