From 6df9b1f0157c95a7506a3a89244d605b96e67c0f Mon Sep 17 00:00:00 2001 From: Dzmitry Hil Date: Wed, 25 Oct 2023 15:50:53 +0300 Subject: [PATCH 1/2] Add URI and URIHash to the asset FT. --- app/app.go | 5 +- docs/api.md | 8 + docs/static/openapi.json | 6 + integration-tests/modules/assetft_test.go | 10 +- .../upgrade/ft_new_attributes_test.go | 114 ++++++++ integration-tests/upgrade/upgrade_test.go | 1 + proto/coreum/asset/ft/v1/event.proto | 2 + proto/coreum/asset/ft/v1/token.proto | 4 + proto/coreum/asset/ft/v1/tx.proto | 4 +- x/asset/ft/genesis.go | 2 + x/asset/ft/genesis_test.go | 28 +- x/asset/ft/keeper/keeper.go | 33 ++- x/asset/ft/keeper/keeper_test.go | 6 + x/asset/ft/keeper/msg_server.go | 2 + x/asset/ft/types/event.pb.go | 171 +++++++++--- x/asset/ft/types/msgs.go | 23 +- x/asset/ft/types/msgs_test.go | 19 ++ x/asset/ft/types/token.go | 2 + x/asset/ft/types/token.pb.go | 263 +++++++++++++++--- x/asset/ft/types/tx.pb.go | 211 ++++++++++---- x/asset/nft/types/expected_keepers.go | 2 +- x/wnft/types/exptected_keepers.go | 2 +- 22 files changed, 755 insertions(+), 163 deletions(-) create mode 100644 integration-tests/upgrade/ft_new_attributes_test.go diff --git a/app/app.go b/app/app.go index 941db77de..2701bde0d 100644 --- a/app/app.go +++ b/app/app.go @@ -76,6 +76,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/mint" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + "github.com/cosmos/cosmos-sdk/x/nft" + nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper" "github.com/cosmos/cosmos-sdk/x/params" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" @@ -104,9 +106,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cast" - "github.com/cosmos/cosmos-sdk/x/nft" - nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper" - "github.com/CoreumFoundation/coreum/v3/app/openapi" appupgrade "github.com/CoreumFoundation/coreum/v3/app/upgrade" appupgradev1 "github.com/CoreumFoundation/coreum/v3/app/upgrade/v1" diff --git a/docs/api.md b/docs/api.md index 2a9aa0884..c023991db 100644 --- a/docs/api.md +++ b/docs/api.md @@ -422,6 +422,8 @@ EventIssued is emitted on MsgIssue. | `features` | [Feature](#coreum.asset.ft.v1.Feature) | repeated | | | `burn_rate` | [string](#string) | | | | `send_commission_rate` | [string](#string) | | | +| `uri` | [string](#string) | | | +| `uri_hash` | [string](#string) | | | @@ -887,6 +889,8 @@ Definition defines the fungible token settings to store. | `burn_rate` | [string](#string) | | burn_rate is a number between 0 and 1 which will be multiplied by send amount to determine burn_amount. This value will be burnt on top of the send amount. | | `send_commission_rate` | [string](#string) | | send_commission_rate is a number between 0 and 1 which will be multiplied by send amount to determine amount sent to the token issuer account. | | `version` | [uint32](#uint32) | | | +| `uri` | [string](#string) | | | +| `uri_hash` | [string](#string) | | | @@ -927,6 +931,8 @@ Token is a full representation of the fungible token. | `burn_rate` | [string](#string) | | burn_rate is a number between 0 and 1 which will be multiplied by send amount to determine burn_amount. This value will be burnt on top of the send amount. | | `send_commission_rate` | [string](#string) | | send_commission_rate is a number between 0 and 1 which will be multiplied by send amount to determine amount sent to the token issuer account. | | `version` | [uint32](#uint32) | | | +| `uri` | [string](#string) | | | +| `uri_hash` | [string](#string) | | | @@ -1088,6 +1094,8 @@ MsgIssue defines message to issue new fungible token. | `features` | [Feature](#coreum.asset.ft.v1.Feature) | repeated | | | `burn_rate` | [string](#string) | | burn_rate is a number between 0 and 1 which will be multiplied by send amount to determine burn_amount. This value will be burnt on top of the send amount. | | `send_commission_rate` | [string](#string) | | send_commission_rate is a number between 0 and 1 which will be multiplied by send amount to determine amount sent to the token issuer account. | +| `uri` | [string](#string) | | | +| `uri_hash` | [string](#string) | | | diff --git a/docs/static/openapi.json b/docs/static/openapi.json index 325065c25..53f53d871 100644 --- a/docs/static/openapi.json +++ b/docs/static/openapi.json @@ -7099,6 +7099,12 @@ "version": { "type": "integer", "format": "int64" + }, + "uri": { + "type": "string" + }, + "uri_hash": { + "type": "string" } }, "description": "Token is a full representation of the fungible token." diff --git a/integration-tests/modules/assetft_test.go b/integration-tests/modules/assetft_test.go index 1215f6d77..7be385abd 100644 --- a/integration-tests/modules/assetft_test.go +++ b/integration-tests/modules/assetft_test.go @@ -65,6 +65,8 @@ func TestAssetFTIssue(t *testing.T) { Description: "ABC Description", InitialAmount: sdkmath.NewInt(1000), Features: []assetfttypes.Feature{}, + URI: "https://my-class-meta.invalid/1", + URIHash: "content-hash", } res, err := client.BroadcastTx( @@ -250,6 +252,8 @@ func TestAssetIssueAndQueryTokens(t *testing.T) { InitialAmount: sdkmath.NewInt(777), BurnRate: sdk.NewDec(0), SendCommissionRate: sdk.NewDec(0), + URI: "https://my-class-meta.invalid/1", + URIHash: "content-hash", } _, err := client.BroadcastTx( @@ -284,12 +288,14 @@ func TestAssetIssueAndQueryTokens(t *testing.T) { Denom: denom, Issuer: issuer1.String(), Symbol: msg1.Symbol, - Subunit: "wsatoshi", - Precision: 8, + Subunit: msg1.Subunit, + Precision: msg1.Precision, Description: msg1.Description, BurnRate: msg1.BurnRate, SendCommissionRate: msg1.SendCommissionRate, Version: gotToken.Tokens[0].Version, // test should work with all versions + URI: msg1.URI, + URIHash: msg1.URIHash, }, gotToken.Tokens[0]) } diff --git a/integration-tests/upgrade/ft_new_attributes_test.go b/integration-tests/upgrade/ft_new_attributes_test.go new file mode 100644 index 000000000..6eefc1f6b --- /dev/null +++ b/integration-tests/upgrade/ft_new_attributes_test.go @@ -0,0 +1,114 @@ +//go:build integrationtests + +package upgrade + +import ( + "testing" + + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + integrationtests "github.com/CoreumFoundation/coreum/v3/integration-tests" + "github.com/CoreumFoundation/coreum/v3/pkg/client" + "github.com/CoreumFoundation/coreum/v3/testutil/integration" + assetfttypes "github.com/CoreumFoundation/coreum/v3/x/asset/ft/types" +) + +type ftURIAttributesTest struct { + token assetfttypes.Token +} + +func (ftt *ftURIAttributesTest) Before(t *testing.T) { + ctx, chain := integrationtests.NewCoreumTestingContext(t) + requireT := require.New(t) + assetftClient := assetfttypes.NewQueryClient(chain.ClientContext) + + issuer := chain.GenAccount() + chain.FundAccountWithOptions(ctx, t, issuer, integration.BalancesOptions{ + Messages: []sdk.Msg{ + &assetfttypes.MsgIssue{}, + }, + Amount: chain.QueryAssetFTParams(ctx, t).IssueFee.Amount, + }) + + issueMsg := &assetfttypes.MsgIssue{ + Issuer: issuer.String(), + Symbol: "ABC", + Subunit: "uabc", + Precision: 6, + Description: "ABC Description", + InitialAmount: sdkmath.NewInt(1000), + Features: []assetfttypes.Feature{}, + } + _, err := client.BroadcastTx( + ctx, + chain.ClientContext.WithFromAddress(issuer), + chain.TxFactory().WithGas(chain.GasLimitByMsgs(issueMsg)), + issueMsg, + ) + requireT.NoError(err) + tokenRes, err := assetftClient.Token(ctx, &assetfttypes.QueryTokenRequest{ + Denom: assetfttypes.BuildDenom(issueMsg.Subunit, issuer), + }) + requireT.NoError(err) + ftt.token = tokenRes.Token +} + +func (ftt *ftURIAttributesTest) After(t *testing.T) { + ctx, chain := integrationtests.NewCoreumTestingContext(t) + requireT := require.New(t) + assetftClient := assetfttypes.NewQueryClient(chain.ClientContext) + + // check that prev token is available we can query it + tokenRes, err := assetftClient.Token(ctx, &assetfttypes.QueryTokenRequest{ + Denom: ftt.token.Denom, + }) + requireT.NoError(err) + require.Equal(t, ftt.token, tokenRes.Token) + + // create a token with URI and URIHash + issuer := chain.GenAccount() + chain.FundAccountWithOptions(ctx, t, issuer, integration.BalancesOptions{ + Messages: []sdk.Msg{ + &assetfttypes.MsgIssue{}, + }, + Amount: chain.QueryAssetFTParams(ctx, t).IssueFee.Amount, + }) + issueMsg := &assetfttypes.MsgIssue{ + Issuer: issuer.String(), + Symbol: "ABC", + Subunit: "uabc", + Precision: 6, + Description: "ABC Description", + InitialAmount: sdkmath.NewInt(1000), + Features: []assetfttypes.Feature{}, + URI: "https://my-class-meta.invalid/1", + URIHash: "content-hash", + } + _, err = client.BroadcastTx( + ctx, + chain.ClientContext.WithFromAddress(issuer), + chain.TxFactory().WithGas(chain.GasLimitByMsgs(issueMsg)), + issueMsg, + ) + requireT.NoError(err) + + tokenRes, err = assetftClient.Token(ctx, &assetfttypes.QueryTokenRequest{ + Denom: assetfttypes.BuildDenom(issueMsg.Subunit, issuer), + }) + requireT.NoError(err) + requireT.Equal(assetfttypes.Token{ + Denom: assetfttypes.BuildDenom(issueMsg.Subunit, issuer), + Issuer: issuer.String(), + Symbol: issueMsg.Symbol, + Subunit: issueMsg.Subunit, + Precision: issueMsg.Precision, + Description: issueMsg.Description, + BurnRate: sdkmath.LegacyZeroDec(), + SendCommissionRate: sdkmath.LegacyZeroDec(), + Version: assetfttypes.CurrentTokenVersion, + URI: issueMsg.URI, + URIHash: issueMsg.URIHash, + }, tokenRes.Token) +} diff --git a/integration-tests/upgrade/upgrade_test.go b/integration-tests/upgrade/upgrade_test.go index 6ef04d74f..bbcff3d5d 100644 --- a/integration-tests/upgrade/upgrade_test.go +++ b/integration-tests/upgrade/upgrade_test.go @@ -49,6 +49,7 @@ func upgradeV3(t *testing.T) { &ibcUpgradeTest{}, &govMigrationTest{}, &nftMigrationTest{}, + &ftURIAttributesTest{}, } for _, test := range tests { diff --git a/proto/coreum/asset/ft/v1/event.proto b/proto/coreum/asset/ft/v1/event.proto index 2d8f4ea0b..e61e276bb 100644 --- a/proto/coreum/asset/ft/v1/event.proto +++ b/proto/coreum/asset/ft/v1/event.proto @@ -28,6 +28,8 @@ message EventIssued { (gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; + string uri = 11 [(gogoproto.customname) = "URI"]; + string uri_hash = 12 [(gogoproto.customname) = "URIHash"]; } message EventFrozenAmountChanged { diff --git a/proto/coreum/asset/ft/v1/token.proto b/proto/coreum/asset/ft/v1/token.proto index 328a8c26f..770579569 100644 --- a/proto/coreum/asset/ft/v1/token.proto +++ b/proto/coreum/asset/ft/v1/token.proto @@ -35,6 +35,8 @@ message Definition { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; uint32 version = 6; + string uri = 7 [(gogoproto.customname) = "URI"]; + string uri_hash = 8 [(gogoproto.customname) = "URIHash"]; } // Token is a full representation of the fungible token. @@ -62,6 +64,8 @@ message Token { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; uint32 version = 11; + string uri = 12 [(gogoproto.customname) = "URI"]; + string uri_hash = 13 [(gogoproto.customname) = "URIHash"]; } // DelayedTokenUpgradeV1 is executed by the delay module when it's time to enable IBC. diff --git a/proto/coreum/asset/ft/v1/tx.proto b/proto/coreum/asset/ft/v1/tx.proto index 37f343c5c..f2cd43e94 100644 --- a/proto/coreum/asset/ft/v1/tx.proto +++ b/proto/coreum/asset/ft/v1/tx.proto @@ -74,6 +74,8 @@ message MsgIssue { (gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; + string uri = 10 [(gogoproto.customname) = "URI"]; + string uri_hash = 11 [(gogoproto.customname) = "URIHash"]; } message MsgMint { @@ -130,7 +132,7 @@ message MsgUpgradeTokenV1 { message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/MsgUpdateParams"; + option (amino.name) = "cosmos-sdk/MsgUpdateParams"; string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; diff --git a/x/asset/ft/genesis.go b/x/asset/ft/genesis.go index 817be1d76..7230df13a 100644 --- a/x/asset/ft/genesis.go +++ b/x/asset/ft/genesis.go @@ -32,6 +32,8 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) BurnRate: token.BurnRate, SendCommissionRate: token.SendCommissionRate, Version: token.Version, + URI: token.URI, + URIHash: token.URIHash, } k.SetDefinition(ctx, issuer, subunit, definition) diff --git a/x/asset/ft/genesis_test.go b/x/asset/ft/genesis_test.go index b434b2c24..a2ddde784 100644 --- a/x/asset/ft/genesis_test.go +++ b/x/asset/ft/genesis_test.go @@ -34,25 +34,35 @@ func TestInitAndExportGenesis(t *testing.T) { var pendingTokenUpgrades []types.PendingTokenUpgrade for i := uint32(0); i < 5; i++ { token := types.Token{ - Denom: types.BuildDenom(fmt.Sprintf("abc%d", i), issuer), - Issuer: issuer.String(), - Symbol: fmt.Sprintf("ABC%d", i), - Subunit: fmt.Sprintf("abc%d", i), - Precision: uint32(rand.Int31n(19) + 1), - BurnRate: sdk.MustNewDecFromStr(fmt.Sprintf("0.%d", i)), - SendCommissionRate: sdk.MustNewDecFromStr(fmt.Sprintf("0.%d", i+1)), + Denom: types.BuildDenom(fmt.Sprintf("abc%d", i), issuer), + Issuer: issuer.String(), + Symbol: fmt.Sprintf("ABC%d", i), + Subunit: fmt.Sprintf("abc%d", i), + Precision: uint32(rand.Int31n(19) + 1), + Description: fmt.Sprintf("DESC%d", i), Features: []types.Feature{ types.Feature_freezing, types.Feature_whitelisting, }, - Version: i, + BurnRate: sdk.MustNewDecFromStr(fmt.Sprintf("0.%d", i)), + SendCommissionRate: sdk.MustNewDecFromStr(fmt.Sprintf("0.%d", i+1)), + Version: i, + URI: fmt.Sprintf("https://my-class-meta.invalid/%d", i), + URIHash: fmt.Sprintf("content-hash%d", i), } // Globally freeze some Tokens. if i%2 == 0 { token.GloballyFrozen = true } tokens = append(tokens, token) - requireT.NoError(ftKeeper.SetDenomMetadata(ctx, token.Denom, token.Symbol, token.Description, token.Precision)) + requireT.NoError(ftKeeper.SetDenomMetadata( + ctx, + token.Denom, + token.Symbol, + token.Description, + token.URI, + token.URIHash, + token.Precision)) if i == 0 { pendingTokenUpgrades = append(pendingTokenUpgrades, types.PendingTokenUpgrade{ Denom: token.Denom, diff --git a/x/asset/ft/keeper/keeper.go b/x/asset/ft/keeper/keeper.go index 2e8634412..2e6b0d273 100644 --- a/x/asset/ft/keeper/keeper.go +++ b/x/asset/ft/keeper/keeper.go @@ -215,9 +215,19 @@ func (k Keeper) IssueVersioned(ctx sdk.Context, settings types.IssueSettings, ve BurnRate: settings.BurnRate, SendCommissionRate: settings.SendCommissionRate, Version: version, - } - - if err := k.SetDenomMetadata(ctx, denom, settings.Symbol, settings.Description, settings.Precision); err != nil { + URI: settings.URI, + URIHash: settings.URIHash, + } + + if err := k.SetDenomMetadata( + ctx, + denom, + settings.Symbol, + settings.Description, + settings.URI, + settings.URIHash, + settings.Precision, + ); err != nil { return "", err } @@ -238,6 +248,8 @@ func (k Keeper) IssueVersioned(ctx sdk.Context, settings types.IssueSettings, ve Features: settings.Features, BurnRate: settings.BurnRate, SendCommissionRate: settings.SendCommissionRate, + URI: settings.URI, + URIHash: settings.URIHash, }); err != nil { return "", sdkerrors.Wrapf(types.ErrInvalidState, "failed to emit EventIssued event: %s", err) } @@ -264,12 +276,13 @@ func (k Keeper) SetDefinition(ctx sdk.Context, issuer sdk.AccAddress, subunit st } // SetDenomMetadata registers denom metadata on the bank keeper. -func (k Keeper) SetDenomMetadata(ctx sdk.Context, denom, symbol, description string, precision uint32) error { +func (k Keeper) SetDenomMetadata( + ctx sdk.Context, + denom, symbol, description, uri, uriHash string, + precision uint32, +) error { denomMetadata := banktypes.Metadata{ - Name: symbol, - Symbol: symbol, Description: description, - // This is a cosmos sdk requirement that the first denomination unit MUST be the base DenomUnits: []*banktypes.DenomUnit{ { @@ -285,6 +298,10 @@ func (k Keeper) SetDenomMetadata(ctx sdk.Context, denom, symbol, description str // and we take the symbol provided by the user and use it as symbol Base: denom, Display: symbol, + Name: symbol, + Symbol: symbol, + URI: uri, + URIHash: uriHash, } if err := denomMetadata.Validate(); err != nil { @@ -739,6 +756,8 @@ func (k Keeper) getTokenFullInfo(ctx sdk.Context, definition types.Definition) ( SendCommissionRate: definition.SendCommissionRate, GloballyFrozen: k.isGloballyFrozen(ctx, definition.Denom), Version: definition.Version, + URI: definition.URI, + URIHash: definition.URIHash, }, nil } diff --git a/x/asset/ft/keeper/keeper_test.go b/x/asset/ft/keeper/keeper_test.go index 0f62a02c0..636f56341 100644 --- a/x/asset/ft/keeper/keeper_test.go +++ b/x/asset/ft/keeper/keeper_test.go @@ -50,6 +50,8 @@ func TestKeeper_Issue(t *testing.T) { Precision: 8, InitialAmount: sdkmath.NewInt(777), Features: []types.Feature{types.Feature_freezing}, + URI: "https://my-class-meta.invalid/1", + URIHash: "content-hash", } denom, err := ftKeeper.Issue(ctx, settings) @@ -81,6 +83,8 @@ func TestKeeper_Issue(t *testing.T) { BurnRate: sdk.NewDec(0), SendCommissionRate: sdk.NewDec(0), Version: types.CurrentTokenVersion, + URI: settings.URI, + URIHash: settings.URIHash, }, gotToken) // check the metadata @@ -102,6 +106,8 @@ func TestKeeper_Issue(t *testing.T) { }, Base: denom, Display: settings.Symbol, + URI: settings.URI, + URIHash: settings.URIHash, }, storedMetadata) // check the account state diff --git a/x/asset/ft/keeper/msg_server.go b/x/asset/ft/keeper/msg_server.go index 07671b1c9..0873b340d 100644 --- a/x/asset/ft/keeper/msg_server.go +++ b/x/asset/ft/keeper/msg_server.go @@ -57,6 +57,8 @@ func (ms MsgServer) Issue(ctx context.Context, req *types.MsgIssue) (*types.Empt Features: req.Features, BurnRate: req.BurnRate, SendCommissionRate: req.SendCommissionRate, + URI: req.URI, + URIHash: req.URIHash, }) if err != nil { return nil, err diff --git a/x/asset/ft/types/event.pb.go b/x/asset/ft/types/event.pb.go index 94e25029c..f38b1d832 100644 --- a/x/asset/ft/types/event.pb.go +++ b/x/asset/ft/types/event.pb.go @@ -36,6 +36,8 @@ type EventIssued struct { Features []Feature `protobuf:"varint,8,rep,packed,name=features,proto3,enum=coreum.asset.ft.v1.Feature" json:"features,omitempty"` BurnRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=burn_rate,json=burnRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"burn_rate"` SendCommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,10,opt,name=send_commission_rate,json=sendCommissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"send_commission_rate"` + URI string `protobuf:"bytes,11,opt,name=uri,proto3" json:"uri,omitempty"` + URIHash string `protobuf:"bytes,12,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` } func (m *EventIssued) Reset() { *m = EventIssued{} } @@ -120,6 +122,20 @@ func (m *EventIssued) GetFeatures() []Feature { return nil } +func (m *EventIssued) GetURI() string { + if m != nil { + return m.URI + } + return "" +} + +func (m *EventIssued) GetURIHash() string { + if m != nil { + return m.URIHash + } + return "" +} + type EventFrozenAmountChanged struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` @@ -237,39 +253,42 @@ func init() { func init() { proto.RegisterFile("coreum/asset/ft/v1/event.proto", fileDescriptor_bdf87682d70b967f) } var fileDescriptor_bdf87682d70b967f = []byte{ - // 505 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x94, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0xb3, 0x4d, 0x9b, 0x26, 0x53, 0x1a, 0x61, 0x08, 0x32, 0x54, 0xdd, 0x86, 0x1c, 0x24, - 0x17, 0x77, 0xa9, 0x05, 0x3d, 0xdb, 0x68, 0xa0, 0x78, 0x91, 0x85, 0x52, 0xf0, 0x12, 0x37, 0xb3, - 0x2f, 0xc9, 0xd0, 0xec, 0x4c, 0x98, 0x1f, 0x8b, 0xf5, 0xaf, 0xf0, 0xcf, 0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xcb, 0x5f, 0xce, 0x98, 0x86, 0x39, - 0x53, 0x1a, 0xb2, 0x07, 0xd5, 0x81, 0xb3, 0x0f, 0x37, 0xcb, 0x30, 0xb8, 0x5d, 0x86, 0xc1, 0x8f, - 0x65, 0x18, 0x7c, 0x5d, 0x85, 0xb5, 0xdb, 0x55, 0x58, 0xfb, 0xb6, 0x0a, 0x6b, 0x1f, 0x5f, 0x6d, - 0x00, 0x07, 0x6e, 0xf0, 0x87, 0xc2, 0xf0, 0x2c, 0xb5, 0x5f, 0x47, 0x5c, 0xee, 0x90, 0xe2, 0x34, - 0xfe, 0xbc, 0x5e, 0x24, 0xae, 0xc8, 0xb8, 0xe1, 0xd6, 0xc8, 0xe9, 0x9f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x7f, 0x15, 0x02, 0x8e, 0xb2, 0x04, 0x00, 0x00, + // 552 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x94, 0x4f, 0x6f, 0x12, 0x4f, + 0x18, 0xc7, 0xd9, 0xd2, 0x16, 0x18, 0x7e, 0xe5, 0x97, 0x4c, 0x88, 0x19, 0xab, 0x2e, 0x84, 0x43, + 0xc3, 0xc5, 0xdd, 0xd4, 0x26, 0x7a, 0xb6, 0x28, 0x91, 0x78, 0x31, 0x9b, 0x90, 0x26, 0x5e, 0x70, + 0xd9, 0x7d, 0x60, 0x27, 0x65, 0x67, 0xc8, 0xfc, 0x21, 0xd6, 0x57, 0xe1, 0x3b, 0xf1, 0x6d, 0xf4, + 0xd8, 0xa3, 0xf1, 0x40, 0x0c, 0xbc, 0x0b, 0x2f, 0x9a, 0x99, 0x59, 0x0a, 0x89, 0x5e, 0xe4, 0xea, + 0x89, 0x79, 0xbe, 0xdf, 0xe1, 0x33, 0xb3, 0xcf, 0xf3, 0xcc, 0x83, 0xfc, 0x84, 0x0b, 0xd0, 0x79, + 0x18, 0x4b, 0x09, 0x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0x8a, 0xc3, 0x76, 0x7e, 0x7a, 0xe8, 0x89, 0xfd, 0xf8, 0xab, 0x8c, 0x2a, 0x98, 0x51, 0xa9, + 0x20, 0xfd, 0xa7, 0x32, 0x70, 0xf9, 0xee, 0x76, 0xe5, 0x7b, 0x77, 0x2b, 0xdf, 0xfb, 0xbe, 0xf2, + 0xbd, 0xcf, 0x6b, 0xbf, 0x74, 0xb7, 0xf6, 0x4b, 0x5f, 0xd7, 0x7e, 0xe9, 0xfd, 0xf3, 0x1d, 0x60, + 0xcf, 0xbe, 0x9d, 0x3e, 0xd7, 0x2c, 0x8d, 0xcd, 0x03, 0x0b, 0x8b, 0x31, 0xb4, 0xb8, 0x08, 0x3f, + 0x6e, 0x67, 0x91, 0x3d, 0x64, 0x7c, 0x6c, 0x27, 0xd1, 0xc5, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x10, 0x81, 0xea, 0x4a, 0xf5, 0x04, 0x00, 0x00, } func (m *EventIssued) Marshal() (dAtA []byte, err error) { @@ -292,6 +311,20 @@ func (m *EventIssued) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.URIHash) > 0 { + i -= len(m.URIHash) + copy(dAtA[i:], m.URIHash) + i = encodeVarintEvent(dAtA, i, uint64(len(m.URIHash))) + i-- + dAtA[i] = 0x62 + } + if len(m.URI) > 0 { + i -= len(m.URI) + copy(dAtA[i:], m.URI) + i = encodeVarintEvent(dAtA, i, uint64(len(m.URI))) + i-- + dAtA[i] = 0x5a + } { size := m.SendCommissionRate.Size() i -= size @@ -550,6 +583,14 @@ func (m *EventIssued) Size() (n int) { n += 1 + l + sovEvent(uint64(l)) l = m.SendCommissionRate.Size() n += 1 + l + sovEvent(uint64(l)) + l = len(m.URI) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.URIHash) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } return n } @@ -980,6 +1021,70 @@ func (m *EventIssued) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URIHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URIHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvent(dAtA[iNdEx:]) diff --git a/x/asset/ft/types/msgs.go b/x/asset/ft/types/msgs.go index bf8433797..ce5986d6e 100644 --- a/x/asset/ft/types/msgs.go +++ b/x/asset/ft/types/msgs.go @@ -26,6 +26,15 @@ const ( TypeMsgUpdateParams = "update-params" ) +const ( + // MaxDescriptionLength is max description length. + MaxDescriptionLength = 200 + // MaxURILength is max URI length. + MaxURILength = 256 + // MaxURIHashLength is max URIHash length. + MaxURIHashLength = 128 +) + var ( _ sdk.Msg = &MsgIssue{} _ legacytx.LegacyMsg = &MsgIssue{} @@ -68,8 +77,6 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // ValidateBasic validates the message. func (m MsgIssue) ValidateBasic() error { - const maxDescriptionLength = 200 - if _, err := sdk.AccAddressFromBech32(m.Issuer); err != nil { return sdkerrors.Wrapf(cosmoserrors.ErrInvalidAddress, "invalid issuer %s", m.Issuer) } @@ -99,8 +106,8 @@ func (m MsgIssue) ValidateBasic() error { return sdkerrors.Wrapf(ErrInvalidInput, "invalid initial amount %s, can't be negative", m.InitialAmount.String()) } - if len(m.Description) > maxDescriptionLength { - return sdkerrors.Wrapf(ErrInvalidInput, "invalid description %q, the length must be less than %d", m.Description, maxDescriptionLength) + if len(m.Description) > MaxDescriptionLength { + return sdkerrors.Wrapf(ErrInvalidInput, "invalid description %q, the length must be less than %d", m.Description, MaxDescriptionLength) } duplicates := lo.FindDuplicates(m.Features) @@ -108,6 +115,14 @@ func (m MsgIssue) ValidateBasic() error { return sdkerrors.Wrapf(ErrInvalidInput, "duplicated features in the features list, duplicates: %v", duplicates) } + if len(m.URI) > MaxURILength { + return sdkerrors.Wrapf(ErrInvalidInput, "invalid URI %q, the length must be less than or equal %d", len(m.URI), MaxURILength) + } + + if len(m.URIHash) > MaxURIHashLength { + return sdkerrors.Wrapf(ErrInvalidInput, "invalid URI hash %q, the length must be less than or equal %d", len(m.URIHash), MaxURIHashLength) + } + return nil } diff --git a/x/asset/ft/types/msgs_test.go b/x/asset/ft/types/msgs_test.go index c8a367f6e..3e587b342 100644 --- a/x/asset/ft/types/msgs_test.go +++ b/x/asset/ft/types/msgs_test.go @@ -1,6 +1,7 @@ package types_test import ( + "strings" "testing" sdkerrors "cosmossdk.io/errors" @@ -35,6 +36,8 @@ func TestMsgIssue_ValidateBasic(t *testing.T) { Precision: 1, Description: "BTC Description", InitialAmount: sdkmath.NewInt(777), + URI: "https://my.invalid", + URIHash: "sha-hash", } testCases := []struct { @@ -148,6 +151,22 @@ func TestMsgIssue_ValidateBasic(t *testing.T) { }, expectedError: types.ErrInvalidInput, }, + { + name: "invalid uri", + messageFunc: func(msg types.MsgIssue) types.MsgIssue { + msg.URI = string(make([]byte, 257)) + return msg + }, + expectedError: types.ErrInvalidInput, + }, + { + name: "invalid uri hash", + messageFunc: func(msg types.MsgIssue) types.MsgIssue { + msg.URIHash = strings.Repeat("x", 129) + return msg + }, + expectedError: types.ErrInvalidInput, + }, } for _, testCase := range testCases { tc := testCase diff --git a/x/asset/ft/types/token.go b/x/asset/ft/types/token.go index e48d3dff7..5c2c34511 100644 --- a/x/asset/ft/types/token.go +++ b/x/asset/ft/types/token.go @@ -50,6 +50,8 @@ type IssueSettings struct { Subunit string Precision uint32 Description string + URI string + URIHash string InitialAmount sdkmath.Int Features []Feature BurnRate sdk.Dec diff --git a/x/asset/ft/types/token.pb.go b/x/asset/ft/types/token.pb.go index 283c6a148..85e02a6c3 100644 --- a/x/asset/ft/types/token.pb.go +++ b/x/asset/ft/types/token.pb.go @@ -75,6 +75,8 @@ type Definition struct { // amount sent to the token issuer account. SendCommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=send_commission_rate,json=sendCommissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"send_commission_rate"` Version uint32 `protobuf:"varint,6,opt,name=version,proto3" json:"version,omitempty"` + URI string `protobuf:"bytes,7,opt,name=uri,proto3" json:"uri,omitempty"` + URIHash string `protobuf:"bytes,8,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` } func (m *Definition) Reset() { *m = Definition{} } @@ -127,6 +129,8 @@ type Token struct { // amount sent to the token issuer account. SendCommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,10,opt,name=send_commission_rate,json=sendCommissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"send_commission_rate"` Version uint32 `protobuf:"varint,11,opt,name=version,proto3" json:"version,omitempty"` + URI string `protobuf:"bytes,12,opt,name=uri,proto3" json:"uri,omitempty"` + URIHash string `protobuf:"bytes,13,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` } func (m *Token) Reset() { *m = Token{} } @@ -325,49 +329,52 @@ func init() { func init() { proto.RegisterFile("coreum/asset/ft/v1/token.proto", fileDescriptor_fe80c7a2c55589e7) } var fileDescriptor_fe80c7a2c55589e7 = []byte{ - // 659 bytes of a gzipped FileDescriptorProto + // 714 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0x8d, 0x93, 0x26, 0x71, 0x6e, 0xfa, 0xf5, 0xab, 0x46, 0xa1, 0xb2, 0x0a, 0xb2, 0xa3, 0x2c, - 0x20, 0x42, 0xaa, 0xad, 0xb4, 0x12, 0x20, 0x36, 0x48, 0x6d, 0xe9, 0x06, 0x16, 0x95, 0x29, 0x2c, - 0xd8, 0x04, 0xff, 0x5c, 0xbb, 0xa3, 0xda, 0x9e, 0xc8, 0x33, 0x0e, 0xa4, 0x4f, 0xc0, 0xb2, 0x8f, - 0xd0, 0x17, 0x61, 0x8b, 0xba, 0xec, 0x12, 0x21, 0x54, 0x50, 0xbb, 0xe1, 0x31, 0xd0, 0x8c, 0x93, - 0xfe, 0x88, 0xb2, 0x68, 0xa5, 0xae, 0x92, 0x73, 0xe6, 0xfa, 0xf8, 0xf8, 0x9e, 0x7b, 0x07, 0xcc, - 0x80, 0xe5, 0x58, 0xa4, 0x8e, 0xc7, 0x39, 0x0a, 0x27, 0x12, 0xce, 0x78, 0xe0, 0x08, 0xb6, 0x87, - 0x99, 0x3d, 0xca, 0x99, 0x60, 0x84, 0x94, 0xe7, 0xb6, 0x3a, 0xb7, 0x23, 0x61, 0x8f, 0x07, 0xcb, - 0x9d, 0x98, 0xc5, 0x4c, 0x1d, 0x3b, 0xf2, 0x5f, 0x59, 0xb9, 0x6c, 0xc5, 0x8c, 0xc5, 0x09, 0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 0x80, 0x2e, 0x5b, 0xa6, 0x24, 0x6a, 0x37, - 0x90, 0x68, 0x62, 0x16, 0x4a, 0xbe, 0xb7, 0x7d, 0xd5, 0x7e, 0x69, 0x1e, 0x39, 0x79, 0x06, 0xd5, - 0xf1, 0x40, 0xb9, 0x6e, 0xaf, 0xf6, 0xaf, 0x1b, 0x86, 0xeb, 0x3e, 0xda, 0xad, 0x8e, 0x07, 0x8f, - 0x5f, 0x43, 0x73, 0x3a, 0x28, 0xa4, 0x0d, 0xcd, 0x94, 0x66, 0x82, 0x66, 0xf1, 0x62, 0x45, 0x02, - 0x19, 0xb5, 0x04, 0x1a, 0x99, 0x07, 0x3d, 0xca, 0x11, 0xf7, 0x25, 0xaa, 0x92, 0x45, 0x98, 0xff, - 0xb8, 0x4b, 0x05, 0x26, 0x94, 0xab, 0xe2, 0x1a, 0x69, 0x42, 0x8d, 0xfa, 0xc1, 0xe2, 0xdc, 0xfa, - 0xf6, 0xd1, 0xa9, 0xa9, 0x1d, 0x9f, 0x9a, 0xda, 0xaf, 0x53, 0x53, 0x3b, 0x38, 0x33, 0x2b, 0xc7, - 0x67, 0x66, 0xe5, 0xdb, 0x99, 0x59, 0x79, 0xff, 0xe4, 0xd2, 0x20, 0x6c, 0x28, 0x7f, 0x5b, 0xac, - 0xc8, 0x42, 0x4f, 0x8e, 0xbe, 0x33, 0xbd, 0x57, 0xc7, 0x6b, 0xce, 0xa7, 0x8b, 0xcb, 0x55, 0x0d, - 0x87, 0xdf, 0x50, 0x8d, 0x59, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0x12, 0xaf, 0xc1, 0x5a, 0x7c, - 0x05, 0x00, 0x00, + 0x14, 0x8d, 0xe3, 0x26, 0x76, 0x26, 0x6d, 0xbf, 0x6a, 0x94, 0xaf, 0x32, 0x05, 0xc5, 0x51, 0x16, + 0x25, 0x42, 0xaa, 0xad, 0xb4, 0x12, 0x20, 0x36, 0x48, 0x6d, 0xa9, 0xa8, 0x60, 0x51, 0x0d, 0x2d, + 0x0b, 0x36, 0xc1, 0x3f, 0x13, 0x67, 0x54, 0xdb, 0x13, 0xcd, 0x8c, 0x03, 0xe9, 0x13, 0xc0, 0xae, + 0x6f, 0x40, 0x5f, 0x84, 0x7d, 0x97, 0x5d, 0x22, 0x16, 0x01, 0xa5, 0x1b, 0x1e, 0x03, 0xcd, 0x38, + 0xe9, 0x8f, 0x88, 0x04, 0xad, 0xd4, 0x55, 0x7c, 0xce, 0xbd, 0x73, 0xe6, 0xde, 0x3b, 0x27, 0x17, + 0xd4, 0x03, 0xca, 0x70, 0x96, 0xb8, 0x1e, 0xe7, 0x58, 0xb8, 0x5d, 0xe1, 0x0e, 0xda, 0xae, 0xa0, + 0x87, 0x38, 0x75, 0xfa, 0x8c, 0x0a, 0x0a, 0x61, 0x1e, 0x77, 0x54, 0xdc, 0xe9, 0x0a, 0x67, 0xd0, + 0x5e, 0xa9, 0x45, 0x34, 0xa2, 0x2a, 0xec, 0xca, 0xaf, 0x3c, 0x73, 0xc5, 0x8e, 0x28, 0x8d, 0x62, + 0xec, 0x2a, 0xe4, 0x67, 0x5d, 0x57, 0x90, 0x04, 0x73, 0xe1, 0x25, 0xfd, 0x3c, 0xa1, 0xf9, 0x59, + 0x07, 0x60, 0x1b, 0x77, 0x49, 0x4a, 0x04, 0xa1, 0x29, 0xac, 0x81, 0x52, 0x88, 0x53, 0x9a, 0x58, + 0x5a, 0x43, 0x6b, 0x55, 0x50, 0x0e, 0xe0, 0x32, 0x28, 0x13, 0xce, 0x33, 0xcc, 0xac, 0xa2, 0xa2, + 0x27, 0x08, 0x3e, 0x01, 0x66, 0x17, 0x7b, 0x22, 0x63, 0x98, 0x5b, 0x7a, 0x43, 0x6f, 0x2d, 0xae, + 0xdf, 0x77, 0xfe, 0x2c, 0xcd, 0xd9, 0xc9, 0x73, 0xd0, 0x45, 0x32, 0x7c, 0x05, 0x2a, 0x7e, 0xc6, + 0xd2, 0x0e, 0xf3, 0x04, 0xb6, 0xe6, 0xa4, 0xe6, 0xa6, 0x73, 0x3a, 0xb2, 0x0b, 0xdf, 0x47, 0xf6, + 0x6a, 0x44, 0x44, 0x2f, 0xf3, 0x9d, 0x80, 0x26, 0x6e, 0x40, 0x79, 0x42, 0xf9, 0xe4, 0x67, 0x8d, + 0x87, 0x87, 0xae, 0x18, 0xf6, 0x31, 0x77, 0xb6, 0x71, 0x80, 0x4c, 0x29, 0x80, 0x3c, 0x81, 0xe1, + 0x7b, 0x50, 0xe3, 0x38, 0x0d, 0x3b, 0x01, 0x4d, 0x12, 0xc2, 0x39, 0xa1, 0x13, 0xdd, 0xd2, 0xad, + 0x74, 0xa1, 0xd4, 0xda, 0xba, 0x90, 0x52, 0x37, 0x58, 0xc0, 0x18, 0x60, 0x26, 0xa1, 0x55, 0x6e, + 0x68, 0xad, 0x05, 0x34, 0x85, 0xf0, 0x1e, 0xd0, 0x33, 0x46, 0x2c, 0x43, 0x5d, 0x65, 0x8c, 0x47, + 0xb6, 0x7e, 0x80, 0x76, 0x91, 0xe4, 0xe0, 0x2a, 0x30, 0x33, 0x46, 0x3a, 0x3d, 0x8f, 0xf7, 0x2c, + 0x53, 0xc5, 0xab, 0xe3, 0x91, 0x6d, 0x1c, 0xa0, 0xdd, 0x97, 0x1e, 0xef, 0x21, 0x23, 0x63, 0x44, + 0x7e, 0x3c, 0x33, 0x3f, 0x9d, 0xd8, 0x85, 0x5f, 0x27, 0x76, 0xa1, 0xf9, 0x65, 0x0e, 0x94, 0xf6, + 0xe5, 0x33, 0xdf, 0xf0, 0x19, 0x96, 0x41, 0x99, 0x0f, 0x13, 0x9f, 0xc6, 0x96, 0x9e, 0xf3, 0x39, + 0x92, 0x65, 0xf3, 0xcc, 0xcf, 0x52, 0x22, 0xf2, 0x19, 0xa3, 0x29, 0x84, 0x0f, 0x40, 0xa5, 0xcf, + 0x70, 0x40, 0x54, 0x4b, 0x25, 0xd5, 0xd2, 0x25, 0x01, 0x1b, 0xa0, 0x1a, 0x62, 0x1e, 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6, 0xa3, 0xd7, 0xc0, 0x98, 0x78, 0x0d, 0x56, 0x81, 0x91, 0x90, 0x54, + 0x90, 0x34, 0x5a, 0x2a, 0x48, 0x20, 0xdd, 0x22, 0x81, 0x06, 0xe7, 0x81, 0xd9, 0x65, 0x18, 0x1f, + 0x49, 0x54, 0x84, 0x4b, 0x60, 0xfe, 0x43, 0x8f, 0x08, 0x1c, 0x13, 0xae, 0x92, 0x75, 0x68, 0x00, + 0x9d, 0xf8, 0xc1, 0xd2, 0xdc, 0xe6, 0xde, 0xe9, 0xb8, 0xae, 0x9d, 0x8d, 0xeb, 0xda, 0xcf, 0x71, + 0x5d, 0x3b, 0x3e, 0xaf, 0x17, 0xce, 0xce, 0xeb, 0x85, 0x6f, 0xe7, 0xf5, 0xc2, 0xbb, 0xc7, 0x57, + 0xbc, 0xb4, 0xa5, 0xea, 0xdb, 0xa1, 0x59, 0x1a, 0x7a, 0xf2, 0xdf, 0xe3, 0x4e, 0xb6, 0xfb, 0x60, + 0xc3, 0xfd, 0x78, 0xb9, 0xe2, 0x95, 0xbf, 0xfc, 0xb2, 0x1a, 0xcc, 0xc6, 0xef, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x8b, 0x2c, 0x1f, 0x7f, 0x02, 0x06, 0x00, 0x00, } func (m *Definition) Marshal() (dAtA []byte, err error) { @@ -390,6 +397,20 @@ func (m *Definition) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.URIHash) > 0 { + i -= len(m.URIHash) + copy(dAtA[i:], m.URIHash) + i = encodeVarintToken(dAtA, i, uint64(len(m.URIHash))) + i-- + dAtA[i] = 0x42 + } + if len(m.URI) > 0 { + i -= len(m.URI) + copy(dAtA[i:], m.URI) + i = encodeVarintToken(dAtA, i, uint64(len(m.URI))) + i-- + dAtA[i] = 0x3a + } if m.Version != 0 { i = encodeVarintToken(dAtA, i, uint64(m.Version)) i-- @@ -470,6 +491,20 @@ func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.URIHash) > 0 { + i -= len(m.URIHash) + copy(dAtA[i:], m.URIHash) + i = encodeVarintToken(dAtA, i, uint64(len(m.URIHash))) + i-- + dAtA[i] = 0x6a + } + if len(m.URI) > 0 { + i -= len(m.URI) + copy(dAtA[i:], m.URI) + i = encodeVarintToken(dAtA, i, uint64(len(m.URI))) + i-- + dAtA[i] = 0x62 + } if m.Version != 0 { i = encodeVarintToken(dAtA, i, uint64(m.Version)) i-- @@ -719,6 +754,14 @@ func (m *Definition) Size() (n int) { if m.Version != 0 { n += 1 + sovToken(uint64(m.Version)) } + l = len(m.URI) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } + l = len(m.URIHash) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } return n } @@ -768,6 +811,14 @@ func (m *Token) Size() (n int) { if m.Version != 0 { n += 1 + sovToken(uint64(m.Version)) } + l = len(m.URI) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } + l = len(m.URIHash) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } return n } @@ -1068,6 +1119,70 @@ func (m *Definition) Unmarshal(dAtA []byte) error { break } } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URIHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URIHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipToken(dAtA[iNdEx:]) @@ -1473,6 +1588,70 @@ func (m *Token) Unmarshal(dAtA []byte) error { break } } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URIHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URIHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipToken(dAtA[iNdEx:]) diff --git a/x/asset/ft/types/tx.pb.go b/x/asset/ft/types/tx.pb.go index 290a3c985..c8ba7b2d0 100644 --- a/x/asset/ft/types/tx.pb.go +++ b/x/asset/ft/types/tx.pb.go @@ -48,6 +48,8 @@ type MsgIssue struct { // send_commission_rate is a number between 0 and 1 which will be multiplied by send amount to determine // amount sent to the token issuer account. SendCommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=send_commission_rate,json=sendCommissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"send_commission_rate"` + URI string `protobuf:"bytes,10,opt,name=uri,proto3" json:"uri,omitempty"` + URIHash string `protobuf:"bytes,11,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` } func (m *MsgIssue) Reset() { *m = MsgIssue{} } @@ -524,66 +526,69 @@ func init() { func init() { proto.RegisterFile("coreum/asset/ft/v1/tx.proto", fileDescriptor_e54b0962ccfc4ca0) } var fileDescriptor_e54b0962ccfc4ca0 = []byte{ - // 937 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xc7, 0x6d, 0x9c, 0xf8, 0xe5, 0x49, 0x93, 0xd2, 0x6d, 0x54, 0xb6, 0x4e, 0xb1, 0x8d, 0x11, - 0x10, 0x45, 0xca, 0xae, 0x9c, 0x48, 0x45, 0x42, 0xe2, 0x10, 0x87, 0x1a, 0x0a, 0x18, 0x55, 0xdb, - 0x26, 0x48, 0x3d, 0x60, 0x66, 0x77, 0x27, 0x9b, 0x51, 0xbd, 0x33, 0xd6, 0xce, 0x6c, 0x54, 0xf7, - 0x82, 0xc4, 0x91, 0x13, 0xdf, 0x81, 0x0b, 0xc7, 0x1c, 0x90, 0xf8, 0x0a, 0x39, 0x56, 0x70, 0x41, - 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0xa3, 0x0c, 0xec, 0xd9, 0xb4, 0x69, 0xd8, 0x3f, - 0xc0, 0xbb, 0x17, 0xa6, 0xc3, 0x27, 0x97, 0xd0, 0xaf, 0xd2, 0x8d, 0x10, 0xee, 0x4e, 0x1a, 0x1c, - 0x2b, 0xd9, 0x7d, 0x39, 0x9f, 0x3b, 0x65, 0x87, 0xce, 0x4d, 0x87, 0xac, 0x0e, 0x9d, 0x4d, 0x9b, - 0x86, 0xbd, 0x0d, 0xb7, 0xce, 0x0c, 0x85, 0x0f, 0x33, 0xc9, 0xe3, 0xa4, 0x29, 0xb8, 0xed, 0x67, - 0x07, 0xff, 0xd7, 0x72, 0x07, 0x87, 0xb5, 0xfc, 0xeb, 0xc3, 0x5a, 0xfe, 0xbf, 0xc3, 0x5a, 0xfe, - 0xd7, 0xa3, 0x5a, 0xee, 0xf5, 0x51, 0x2d, 0xf7, 0xcf, 0x51, 0x2d, 0xf7, 0xfc, 0xe1, 0xa9, 0x6b, - 0xc6, 0xa6, 0x42, 0x75, 0x58, 0x4a, 0x43, 0x24, 0xef, 0x4b, 0xae, 0xb9, 0x3c, 0xee, 0xad, 0xbb, - 0x2f, 0xc7, 0x37, 0x48, 0x75, 0xf5, 0xf0, 0x8b, 0xea, 0xfe, 0xb8, 0xfe, 0x36, 0x00, 0x00, 0xff, - 0xff, 0xae, 0x3c, 0xf9, 0xf8, 0x30, 0x0b, 0x00, 0x00, + // 986 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcb, 0x6e, 0xdb, 0x46, + 0x17, 0xc7, 0xad, 0x4f, 0xb6, 0x2e, 0x47, 0xb1, 0xf3, 0x85, 0x31, 0x52, 0x5a, 0x4e, 0x25, 0x55, + 0x45, 0x53, 0xc3, 0x80, 0x49, 0xc8, 0x06, 0x52, 0xa0, 0x40, 0x17, 0x96, 0x1b, 0x35, 0x6e, 0xab, + 0x22, 0x60, 0x22, 0x17, 0xc8, 0xa2, 0xea, 0x90, 0x1c, 0x53, 0x83, 0x88, 0x33, 0xc2, 0xcc, 0xd0, + 0x88, 0xb2, 0x29, 0xd0, 0x65, 0x57, 0x5d, 0xf5, 0x05, 0xba, 0xe9, 0xd2, 0x8b, 0x02, 0x7d, 0x05, + 0x2f, 0x83, 0xae, 0x8a, 0x2e, 0x8c, 0x56, 0x5e, 0xf8, 0x35, 0x8a, 0x19, 0x52, 0x96, 0x2f, 0x22, + 0x2c, 0x67, 0xe1, 0x8d, 0xc4, 0x73, 0xe1, 0xef, 0x3f, 0x73, 0x78, 0x78, 0x38, 0xb0, 0xea, 0x31, + 0x8e, 0xa3, 0xd0, 0x46, 0x42, 0x60, 0x69, 0xef, 0x4b, 0xfb, 0xa0, 0x61, 0xcb, 0xd7, 0xd6, 0x80, + 0x33, 0xc9, 0x0c, 0x23, 0x0e, 0x5a, 0x3a, 0x68, 0xed, 0x4b, 0xeb, 0xa0, 0x51, 0xbe, 0x87, 0x42, + 0x42, 0x99, 0xad, 0x7f, 0xe3, 0xb4, 0x72, 0xc5, 0x63, 0x22, 0x64, 0xc2, 0x76, 0x91, 0xc0, 0xf6, + 0x41, 0xc3, 0xc5, 0x12, 0x35, 0x6c, 0x8f, 0x11, 0x9a, 0xc4, 0xdf, 0x4b, 0xe2, 0xa1, 0x08, 0x14, + 0x3e, 0x14, 0x41, 0x12, 0x58, 0x89, 0x03, 0x5d, 0x6d, 0xd9, 0xb1, 0x91, 0x84, 0x96, 0x03, 0x16, + 0xb0, 0xd8, 0xaf, 0xae, 0x12, 0x6f, 0x75, 0xca, 0x6a, 0x07, 0x88, 0xa3, 0x50, 0x4c, 0x96, 0x72, + 0x75, 0x3b, 0xec, 0x15, 0x4e, 0x96, 0x52, 0xff, 0x65, 0x1e, 0x0a, 0x6d, 0x11, 0xec, 0x0a, 0x11, + 0x61, 0xe3, 0x01, 0xe4, 0x88, 0xba, 0xe0, 0x66, 0xa6, 0x96, 0x59, 0x2b, 0x3a, 0x89, 0xa5, 0xfc, + 0x62, 0x18, 0xba, 0xac, 0x6f, 0xfe, 0x2f, 0xf6, 0xc7, 0x96, 0x61, 0x42, 0x5e, 0x44, 0x6e, 0x44, + 0x89, 0x34, 0xb3, 0x3a, 0x30, 0x36, 0x8d, 0x87, 0x50, 0x1c, 0x70, 0xec, 0x11, 0x41, 0x18, 0x35, + 0xe7, 0x6b, 0x99, 0xb5, 0x45, 0x67, 0xe2, 0x30, 0x3a, 0xb0, 0x44, 0x28, 0x91, 0x04, 0xf5, 0xbb, + 0x28, 0x64, 0x11, 0x95, 0xe6, 0x82, 0xba, 0xbd, 0x69, 0x1d, 0x1d, 0x57, 0xe7, 0xfe, 0x3e, 0xae, + 0x3e, 0x0a, 0x88, 0xec, 0x45, 0xae, 0xe5, 0xb1, 0x30, 0x29, 0x42, 0xf2, 0xb7, 0x21, 0xfc, 0x57, + 0xb6, 0x1c, 0x0e, 0xb0, 0xb0, 0x76, 0xa9, 0x74, 0x16, 0x13, 0xca, 0xb6, 0x86, 0x18, 0x35, 0x28, + 0xf9, 0x58, 0x78, 0x9c, 0x0c, 0xa4, 0x92, 0xcd, 0xe9, 0x25, 0x9d, 0x77, 0x19, 0x9f, 0x40, 0x61, + 0x1f, 0x23, 0x19, 0x71, 0x2c, 0xcc, 0x7c, 0x2d, 0xbb, 0xb6, 0xb4, 0xb9, 0x6a, 0x5d, 0x7d, 0xa4, + 0x56, 0x2b, 0xce, 0x71, 0xce, 0x92, 0x8d, 0xaf, 0xa0, 0xe8, 0x46, 0x9c, 0x76, 0x39, 0x92, 0xd8, + 0x2c, 0xdc, 0x78, 0xb1, 0x9f, 0x63, 0xcf, 0x29, 0x28, 0x80, 0x83, 0x24, 0x36, 0xbe, 0x87, 0x65, + 0x81, 0xa9, 0xdf, 0xf5, 0x58, 0x18, 0x12, 0xa1, 0x2a, 0x12, 0x73, 0x8b, 0xef, 0xc4, 0x35, 0x14, + 0x6b, 0xe7, 0x0c, 0x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+ 0xf6, 0xeb, 0xc9, 0x21, 0x54, 0x9f, 0x5e, 0xdc, 0x9c, 0x3e, 0x82, 0x6e, 0xfd, 0x17, 0x00, 0x00, + 0xff, 0xff, 0x16, 0xe8, 0xad, 0xaf, 0x73, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1078,6 +1083,20 @@ func (m *MsgIssue) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.URIHash) > 0 { + i -= len(m.URIHash) + copy(dAtA[i:], m.URIHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.URIHash))) + i-- + dAtA[i] = 0x5a + } + if len(m.URI) > 0 { + i -= len(m.URI) + copy(dAtA[i:], m.URI) + i = encodeVarintTx(dAtA, i, uint64(len(m.URI))) + i-- + dAtA[i] = 0x52 + } { size := m.SendCommissionRate.Size() i -= size @@ -1670,6 +1689,14 @@ func (m *MsgIssue) Size() (n int) { n += 1 + l + sovTx(uint64(l)) l = m.SendCommissionRate.Size() n += 1 + l + sovTx(uint64(l)) + l = len(m.URI) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.URIHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2214,6 +2241,70 @@ func (m *MsgIssue) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URIHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URIHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/asset/nft/types/expected_keepers.go b/x/asset/nft/types/expected_keepers.go index 89f857e4f..7674335f4 100644 --- a/x/asset/nft/types/expected_keepers.go +++ b/x/asset/nft/types/expected_keepers.go @@ -20,7 +20,7 @@ type NFTKeeper interface { Burn(ctx sdk.Context, classID, nftID string) error Update(ctx sdk.Context, n nft.NFT) error GetOwner(ctx sdk.Context, classID, nftID string) sdk.AccAddress - Transfer(ctx sdk.Context, classID string, nftID string, receiver sdk.AccAddress) error + Transfer(ctx sdk.Context, classID, nftID string, receiver sdk.AccAddress) error } // BankKeeper defines the expected bank interface. diff --git a/x/wnft/types/exptected_keepers.go b/x/wnft/types/exptected_keepers.go index f2de79d3f..304acd96a 100644 --- a/x/wnft/types/exptected_keepers.go +++ b/x/wnft/types/exptected_keepers.go @@ -4,5 +4,5 @@ import sdk "github.com/cosmos/cosmos-sdk/types" // NonFungibleTokenProvider defines the interface to intercept within nft method calls. type NonFungibleTokenProvider interface { - Transfer(ctx sdk.Context, classID string, nftID string, receiver sdk.AccAddress) error + Transfer(ctx sdk.Context, classID, nftID string, receiver sdk.AccAddress) error } From 39d4a0ea9686a6c59706af9a605d66eac4734d80 Mon Sep 17 00:00:00 2001 From: Dzmitry Hil Date: Thu, 26 Oct 2023 12:28:08 +0300 Subject: [PATCH 2/2] Remove duplicated upgrade test --- .../upgrade/ft_new_attributes_test.go | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/integration-tests/upgrade/ft_new_attributes_test.go b/integration-tests/upgrade/ft_new_attributes_test.go index 6eefc1f6b..a138eb2ab 100644 --- a/integration-tests/upgrade/ft_new_attributes_test.go +++ b/integration-tests/upgrade/ft_new_attributes_test.go @@ -66,49 +66,4 @@ func (ftt *ftURIAttributesTest) After(t *testing.T) { }) requireT.NoError(err) require.Equal(t, ftt.token, tokenRes.Token) - - // create a token with URI and URIHash - issuer := chain.GenAccount() - chain.FundAccountWithOptions(ctx, t, issuer, integration.BalancesOptions{ - Messages: []sdk.Msg{ - &assetfttypes.MsgIssue{}, - }, - Amount: chain.QueryAssetFTParams(ctx, t).IssueFee.Amount, - }) - issueMsg := &assetfttypes.MsgIssue{ - Issuer: issuer.String(), - Symbol: "ABC", - Subunit: "uabc", - Precision: 6, - Description: "ABC Description", - InitialAmount: sdkmath.NewInt(1000), - Features: []assetfttypes.Feature{}, - URI: "https://my-class-meta.invalid/1", - URIHash: "content-hash", - } - _, err = client.BroadcastTx( - ctx, - chain.ClientContext.WithFromAddress(issuer), - chain.TxFactory().WithGas(chain.GasLimitByMsgs(issueMsg)), - issueMsg, - ) - requireT.NoError(err) - - tokenRes, err = assetftClient.Token(ctx, &assetfttypes.QueryTokenRequest{ - Denom: assetfttypes.BuildDenom(issueMsg.Subunit, issuer), - }) - requireT.NoError(err) - requireT.Equal(assetfttypes.Token{ - Denom: assetfttypes.BuildDenom(issueMsg.Subunit, issuer), - Issuer: issuer.String(), - Symbol: issueMsg.Symbol, - Subunit: issueMsg.Subunit, - Precision: issueMsg.Precision, - Description: issueMsg.Description, - BurnRate: sdkmath.LegacyZeroDec(), - SendCommissionRate: sdkmath.LegacyZeroDec(), - Version: assetfttypes.CurrentTokenVersion, - URI: issueMsg.URI, - URIHash: issueMsg.URIHash, - }, tokenRes.Token) }