|
|
|
|
@@ -20,6 +20,9 @@ func NewMsgServerImpl(k types.ContractOpsKeeper) types.MsgServer {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m msgServer) StoreCode(goCtx context.Context, msg *types.MsgStoreCode) (*types.MsgStoreCodeResponse, error) {
|
|
|
|
|
if err := msg.ValidateBasic(); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
|
|
|
senderAddr, err := sdk.AccAddressFromBech32(msg.Sender)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@@ -45,6 +48,9 @@ func (m msgServer) StoreCode(goCtx context.Context, msg *types.MsgStoreCode) (*t
|
|
|
|
|
|
|
|
|
|
// InstantiateContract instantiate a new contract with classic sequence based address generation
|
|
|
|
|
func (m msgServer) InstantiateContract(goCtx context.Context, msg *types.MsgInstantiateContract) (*types.MsgInstantiateContractResponse, error) {
|
|
|
|
|
if err := msg.ValidateBasic(); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
|
|
|
|
|
|
|
|
senderAddr, err := sdk.AccAddressFromBech32(msg.Sender)
|
|
|
|
|
@@ -77,6 +83,9 @@ func (m msgServer) InstantiateContract(goCtx context.Context, msg *types.MsgInst
|
|
|
|
|
|
|
|
|
|
// InstantiateContract2 instantiate a new contract with predicatable address generated
|
|
|
|
|
func (m msgServer) InstantiateContract2(goCtx context.Context, msg *types.MsgInstantiateContract2) (*types.MsgInstantiateContract2Response, error) {
|
|
|
|
|
if err := msg.ValidateBasic(); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
|
|
|
|
|
|
|
|
senderAddr, err := sdk.AccAddressFromBech32(msg.Sender)
|
|
|
|
|
@@ -107,6 +116,10 @@ func (m msgServer) InstantiateContract2(goCtx context.Context, msg *types.MsgIns
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m msgServer) ExecuteContract(goCtx context.Context, msg *types.MsgExecuteContract) (*types.MsgExecuteContractResponse, error) {
|
|
|
|
|
if err := msg.ValidateBasic(); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
|
|
|
senderAddr, err := sdk.AccAddressFromBech32(msg.Sender)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@@ -134,6 +147,10 @@ func (m msgServer) ExecuteContract(goCtx context.Context, msg *types.MsgExecuteC
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m msgServer) MigrateContract(goCtx context.Context, msg *types.MsgMigrateContract) (*types.MsgMigrateContractResponse, error) {
|
|
|
|
|
if err := msg.ValidateBasic(); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
|
|
|
senderAddr, err := sdk.AccAddressFromBech32(msg.Sender)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@@ -161,6 +178,10 @@ func (m msgServer) MigrateContract(goCtx context.Context, msg *types.MsgMigrateC
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m msgServer) UpdateAdmin(goCtx context.Context, msg *types.MsgUpdateAdmin) (*types.MsgUpdateAdminResponse, error) {
|
|
|
|
|
if err := msg.ValidateBasic(); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
|
|
|
senderAddr, err := sdk.AccAddressFromBech32(msg.Sender)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@@ -189,6 +210,10 @@ func (m msgServer) UpdateAdmin(goCtx context.Context, msg *types.MsgUpdateAdmin)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m msgServer) ClearAdmin(goCtx context.Context, msg *types.MsgClearAdmin) (*types.MsgClearAdminResponse, error) {
|
|
|
|
|
if err := msg.ValidateBasic(); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
|
|
|
senderAddr, err := sdk.AccAddressFromBech32(msg.Sender)
|
|
|
|
|
if err != nil {
|
|
|
|
|
|