change: CreateRedeemClaim consumes entire claim for reduced complexity

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
Lorenz Herzberger 2024-03-19 13:48:09 +01:00
parent 588a21f76e
commit ec4ea0373f
No known key found for this signature in database
GPG Key ID: FA5EE906EB55316A
6 changed files with 79 additions and 142 deletions

View File

@ -108,7 +108,6 @@ message MsgInitPopResponse {}
message MsgCreateRedeemClaim { message MsgCreateRedeemClaim {
string creator = 1; string creator = 1;
string beneficiary = 2; string beneficiary = 2;
uint64 amount = 3;
} }
message MsgCreateRedeemClaimResponse {} message MsgCreateRedeemClaimResponse {}

View File

@ -258,7 +258,7 @@ func (s *SelectionE2ETestSuite) TestTokenRedeemClaim() {
addr, _ := k.GetAddress() addr, _ := k.GetAddress()
// Addr sends CreateRedeemClaim => accepted query redeem claim // Addr sends CreateRedeemClaim => accepted query redeem claim
createClaimMsg := daotypes.NewMsgCreateRedeemClaim(addr.String(), "liquidAddress", 10000) createClaimMsg := daotypes.NewMsgCreateRedeemClaim(addr.String(), "liquidAddress")
out, err := lib.BroadcastTxWithFileLock(addr, createClaimMsg) out, err := lib.BroadcastTxWithFileLock(addr, createClaimMsg)
s.Require().NoError(err) s.Require().NoError(err)
@ -275,7 +275,7 @@ func (s *SelectionE2ETestSuite) TestTokenRedeemClaim() {
fmt.Sprintf(s.errormsg, bank.FlagDenom, s.claimDenom), fmt.Sprintf(s.errormsg, bank.FlagDenom, s.claimDenom),
}) })
s.Require().NoError(err) s.Require().NoError(err)
assert.Equal(s.T(), "amount: \"5993140682\"\ndenom: crddl\n", balanceOut.String()) // 3 * 1997716894 - 10000 = 5993140682 assert.Equal(s.T(), "amount: \"0\"\ndenom: crddl\n", balanceOut.String()) // consumes all claims
// Addr sends ConfirmRedeemClaim => rejected not claim address // Addr sends ConfirmRedeemClaim => rejected not claim address
confirmMsg := daotypes.NewMsgConfirmRedeemClaim(addr.String(), 0, "liquidAddress") confirmMsg := daotypes.NewMsgConfirmRedeemClaim(addr.String(), 0, "liquidAddress")
@ -302,11 +302,11 @@ func (s *SelectionE2ETestSuite) TestTokenRedeemClaim() {
// QueryRedeemClaim // QueryRedeemClaim
qOut, err := clitestutil.ExecTestCLICmd(val.ClientCtx, daocli.CmdShowRedeemClaim(), []string{"liquidAddress", "0"}) qOut, err := clitestutil.ExecTestCLICmd(val.ClientCtx, daocli.CmdShowRedeemClaim(), []string{"liquidAddress", "0"})
s.Require().NoError(err) s.Require().NoError(err)
assert.Equal(s.T(), "redeemClaim:\n amount: \"10000\"\n beneficiary: liquidAddress\n confirmed: true\n creator: plmnt1kp93kns6hs2066d8qw0uz84fw3vlthewt2ck6p\n id: \"0\"\n liquidTxHash: \"0000000000000000000000000000000000000000000000000000000000000000\"\n", qOut.String()) assert.Equal(s.T(), "redeemClaim:\n amount: \"5993150682\"\n beneficiary: liquidAddress\n confirmed: true\n creator: plmnt1kp93kns6hs2066d8qw0uz84fw3vlthewt2ck6p\n id: \"0\"\n liquidTxHash: \"0000000000000000000000000000000000000000000000000000000000000000\"\n", qOut.String())
qOut, err = clitestutil.ExecTestCLICmd(val.ClientCtx, daocli.CmdRedeemClaimByLiquidTxHash(), []string{"0000000000000000000000000000000000000000000000000000000000000000"}) qOut, err = clitestutil.ExecTestCLICmd(val.ClientCtx, daocli.CmdRedeemClaimByLiquidTxHash(), []string{"0000000000000000000000000000000000000000000000000000000000000000"})
s.Require().NoError(err) s.Require().NoError(err)
assert.Equal(s.T(), "redeemClaim:\n amount: \"10000\"\n beneficiary: liquidAddress\n confirmed: true\n creator: plmnt1kp93kns6hs2066d8qw0uz84fw3vlthewt2ck6p\n id: \"0\"\n liquidTxHash: \"0000000000000000000000000000000000000000000000000000000000000000\"\n", qOut.String()) assert.Equal(s.T(), "redeemClaim:\n amount: \"5993150682\"\n beneficiary: liquidAddress\n confirmed: true\n creator: plmnt1kp93kns6hs2066d8qw0uz84fw3vlthewt2ck6p\n id: \"0\"\n liquidTxHash: \"0000000000000000000000000000000000000000000000000000000000000000\"\n", qOut.String())
} }
func (s *SelectionE2ETestSuite) createValAccount(cfg network.Config) (address sdk.AccAddress, err error) { func (s *SelectionE2ETestSuite) createValAccount(cfg network.Config) (address sdk.AccAddress, err error) {

View File

@ -19,12 +19,6 @@ func CmdCreateRedeemClaim() *cobra.Command {
// Get indexes // Get indexes
indexBeneficiary := args[0] indexBeneficiary := args[0]
// Get value arguments
argAmount, err := strconv.ParseUint(args[1], 10, 64)
if err != nil {
return err
}
clientCtx, err := client.GetClientTxContext(cmd) clientCtx, err := client.GetClientTxContext(cmd)
if err != nil { if err != nil {
return err return err
@ -33,7 +27,6 @@ func CmdCreateRedeemClaim() *cobra.Command {
msg := types.NewMsgCreateRedeemClaim( msg := types.NewMsgCreateRedeemClaim(
clientCtx.GetFromAddress().String(), clientCtx.GetFromAddress().String(),
indexBeneficiary, indexBeneficiary,
argAmount,
) )
if err := msg.ValidateBasic(); err != nil { if err := msg.ValidateBasic(); err != nil {
return err return err

View File

@ -20,18 +20,16 @@ func (k msgServer) CreateRedeemClaim(goCtx context.Context, msg *types.MsgCreate
ctx := sdk.UnwrapSDKContext(goCtx) ctx := sdk.UnwrapSDKContext(goCtx)
params := k.GetParams(ctx) params := k.GetParams(ctx)
err := k.validateCreateRedeemClaim(ctx, msg) addr := sdk.MustAccAddressFromBech32(msg.Creator)
if err != nil { burnCoins := k.bankKeeper.GetBalance(ctx, addr, params.ClaimDenom)
return nil, err
}
var redeemClaim = types.RedeemClaim{ var redeemClaim = types.RedeemClaim{
Creator: msg.Creator, Creator: msg.Creator,
Beneficiary: msg.Beneficiary, Beneficiary: msg.Beneficiary,
Amount: msg.Amount, Amount: burnCoins.Amount.Uint64(),
} }
err = k.burnClaimAmount(ctx, sdk.MustAccAddressFromBech32(msg.Creator), msg.Amount) err := k.burnClaimAmount(ctx, sdk.MustAccAddressFromBech32(msg.Creator), sdk.NewCoins(burnCoins))
if err != nil { if err != nil {
util.GetAppLogger().Error(ctx, createRedeemClaimTag+"could not burn claim") util.GetAppLogger().Error(ctx, createRedeemClaimTag+"could not burn claim")
} }
@ -43,7 +41,7 @@ func (k msgServer) CreateRedeemClaim(goCtx context.Context, msg *types.MsgCreate
if util.IsValidatorBlockProposer(ctx, ctx.BlockHeader().ProposerAddress, k.RootDir) { if util.IsValidatorBlockProposer(ctx, ctx.BlockHeader().ProposerAddress, k.RootDir) {
util.GetAppLogger().Info(ctx, fmt.Sprintf("Issuing RDDL claim: %s/%d", msg.Beneficiary, id)) util.GetAppLogger().Info(ctx, fmt.Sprintf("Issuing RDDL claim: %s/%d", msg.Beneficiary, id))
txID, err := util.DistributeAsset(msg.Beneficiary, util.UintValueToRDDLTokenString(msg.Amount), params.ReissuanceAsset) txID, err := util.DistributeAsset(msg.Beneficiary, util.UintValueToRDDLTokenString(burnCoins.Amount.Uint64()), params.ReissuanceAsset)
if err != nil { if err != nil {
util.GetAppLogger().Error(ctx, createRedeemClaimTag+"could not issue claim to beneficiary: "+msg.GetBeneficiary()) util.GetAppLogger().Error(ctx, createRedeemClaimTag+"could not issue claim to beneficiary: "+msg.GetBeneficiary())
} }
@ -53,19 +51,6 @@ func (k msgServer) CreateRedeemClaim(goCtx context.Context, msg *types.MsgCreate
return &types.MsgCreateRedeemClaimResponse{}, nil return &types.MsgCreateRedeemClaimResponse{}, nil
} }
func (k msgServer) validateCreateRedeemClaim(ctx sdk.Context, msg *types.MsgCreateRedeemClaim) (err error) {
addr := sdk.MustAccAddressFromBech32(msg.Creator)
params := k.GetParams(ctx)
balance := k.bankKeeper.GetBalance(ctx, addr, params.ClaimDenom)
if !balance.Amount.GTE(sdk.NewIntFromUint64(msg.Amount)) {
return errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, redeemClaimContext)
}
return nil
}
func (k msgServer) UpdateRedeemClaim(goCtx context.Context, msg *types.MsgUpdateRedeemClaim) (*types.MsgUpdateRedeemClaimResponse, error) { func (k msgServer) UpdateRedeemClaim(goCtx context.Context, msg *types.MsgUpdateRedeemClaim) (*types.MsgUpdateRedeemClaimResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx) ctx := sdk.UnwrapSDKContext(goCtx)
@ -134,9 +119,7 @@ func (k msgServer) validateConfirmRedeemClaim(ctx sdk.Context, msg *types.MsgCon
return nil return nil
} }
func (k msgServer) burnClaimAmount(ctx sdk.Context, addr sdk.AccAddress, amount uint64) (err error) { func (k msgServer) burnClaimAmount(ctx sdk.Context, addr sdk.AccAddress, burnCoins sdk.Coins) (err error) {
params := k.GetParams(ctx)
burnCoins := sdk.NewCoins(sdk.NewCoin(params.ClaimDenom, sdk.NewIntFromUint64(amount)))
err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, addr, types.ModuleName, burnCoins) err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, addr, types.ModuleName, burnCoins)
if err != nil { if err != nil {
return err return err

View File

@ -18,13 +18,11 @@ var _ sdk.Msg = &MsgCreateRedeemClaim{}
func NewMsgCreateRedeemClaim( func NewMsgCreateRedeemClaim(
creator string, creator string,
beneficiary string, beneficiary string,
amount uint64,
) *MsgCreateRedeemClaim { ) *MsgCreateRedeemClaim {
return &MsgCreateRedeemClaim{ return &MsgCreateRedeemClaim{
Creator: creator, Creator: creator,
Beneficiary: beneficiary, Beneficiary: beneficiary,
Amount: amount,
} }
} }

View File

@ -852,7 +852,6 @@ var xxx_messageInfo_MsgInitPopResponse proto.InternalMessageInfo
type MsgCreateRedeemClaim struct { type MsgCreateRedeemClaim struct {
Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
Beneficiary string `protobuf:"bytes,2,opt,name=beneficiary,proto3" json:"beneficiary,omitempty"` Beneficiary string `protobuf:"bytes,2,opt,name=beneficiary,proto3" json:"beneficiary,omitempty"`
Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
} }
func (m *MsgCreateRedeemClaim) Reset() { *m = MsgCreateRedeemClaim{} } func (m *MsgCreateRedeemClaim) Reset() { *m = MsgCreateRedeemClaim{} }
@ -902,13 +901,6 @@ func (m *MsgCreateRedeemClaim) GetBeneficiary() string {
return "" return ""
} }
func (m *MsgCreateRedeemClaim) GetAmount() uint64 {
if m != nil {
return m.Amount
}
return 0
}
type MsgCreateRedeemClaimResponse struct { type MsgCreateRedeemClaimResponse struct {
} }
@ -1173,76 +1165,75 @@ func init() {
func init() { proto.RegisterFile("planetmintgo/dao/tx.proto", fileDescriptor_7117c47dbc1828c7) } func init() { proto.RegisterFile("planetmintgo/dao/tx.proto", fileDescriptor_7117c47dbc1828c7) }
var fileDescriptor_7117c47dbc1828c7 = []byte{ var fileDescriptor_7117c47dbc1828c7 = []byte{
// 1094 bytes of a gzipped FileDescriptorProto // 1080 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x4f, 0xdc, 0xc6, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0xdc, 0x44,
0x17, 0xc7, 0x40, 0x20, 0xfb, 0xe0, 0x1b, 0x82, 0xc3, 0x97, 0x2c, 0x2e, 0x38, 0x5b, 0x07, 0xd1, 0x14, 0x8f, 0x93, 0x34, 0xe9, 0xbe, 0x84, 0xa6, 0x71, 0x43, 0xba, 0x31, 0x89, 0xbb, 0xb8, 0x51,
0x0d, 0x4a, 0xd6, 0x6d, 0x2a, 0x55, 0x6a, 0x7b, 0xa8, 0x0a, 0x48, 0x0d, 0x52, 0x57, 0x45, 0x0e, 0xd8, 0x46, 0xed, 0x1a, 0x8a, 0x84, 0x04, 0x1c, 0x10, 0x49, 0x24, 0x1a, 0x89, 0x15, 0x91, 0x1b,
0xbd, 0x54, 0x95, 0xd0, 0x60, 0x0f, 0xde, 0x29, 0xb6, 0xc7, 0xcc, 0xcc, 0x46, 0xa0, 0xde,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, 0x17, 0x00, 0x00, 0xff, 0xff,
0x8a, 0xf9, 0xe9, 0x82, 0xfc, 0x8d, 0xf1, 0xf1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x81, 0x5c, 0x09, 0x2c, 0x96, 0x95, 0x8d, 0x0d, 0x00, 0x00,
0x0d, 0x9f, 0xa5, 0x0d, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -2289,11 +2280,6 @@ func (m *MsgCreateRedeemClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if m.Amount != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.Amount))
i--
dAtA[i] = 0x18
}
if len(m.Beneficiary) > 0 { if len(m.Beneficiary) > 0 {
i -= len(m.Beneficiary) i -= len(m.Beneficiary)
copy(dAtA[i:], m.Beneficiary) copy(dAtA[i:], m.Beneficiary)
@ -2752,9 +2738,6 @@ func (m *MsgCreateRedeemClaim) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovTx(uint64(l)) n += 1 + l + sovTx(uint64(l))
} }
if m.Amount != 0 {
n += 1 + sovTx(uint64(m.Amount))
}
return n return n
} }
@ -4623,25 +4606,6 @@ func (m *MsgCreateRedeemClaim) Unmarshal(dAtA []byte) error {
} }
m.Beneficiary = string(dAtA[iNdEx:postIndex]) m.Beneficiary = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
}
m.Amount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Amount |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:]) skippy, err := skipTx(dAtA[iNdEx:])