Skip to content

Commit

Permalink
Migrate token/class feature to collection
Browse files Browse the repository at this point in the history
  • Loading branch information
tkxkd0159 committed Feb 8, 2024
1 parent 625d459 commit db8226d
Show file tree
Hide file tree
Showing 44 changed files with 1,641 additions and 5,067 deletions.
782 changes: 742 additions & 40 deletions api/lbm/collection/v1/genesis.pulsar.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ module github.com/Finschia/finschia-sdk

require (
cosmossdk.io/math v1.2.0
github.com/cosmos/cosmos-proto v1.0.0-beta.3
github.com/cosmos/cosmos-sdk v0.50.2
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/gogoproto v1.4.11
github.com/stretchr/testify v1.8.4
github.com/tendermint/go-amino v0.16.0
)
Expand Down Expand Up @@ -36,8 +38,6 @@ require (
github.com/cometbft/cometbft-db v0.9.1 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.0 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect
github.com/cosmos/gogoproto v1.4.11 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand Down
16 changes: 16 additions & 0 deletions proto/lbm/collection/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ message GenesisState {

// burnts represents the total amount of burnt tokens.
repeated ContractStatistics burnts = 12 [(gogoproto.nullable) = false];

// class_state defines the classes state. It was class keeper's genesis state in legacy x/token.
ClassState class_state = 13;
}

// ContractBalances defines balances belong to a contract.
Expand Down Expand Up @@ -168,4 +171,17 @@ message TokenRelation {
string self = 1;
// other
string other = 2;
}

// ClassState defines the classes state.
message ClassState {
// nonce is the next class nonce to issue.
string nonce = 1 [
(cosmos_proto.scalar) = "cosmos.Uint",
(gogoproto.customtype) = "cosmossdk.io/math.Uint",
(gogoproto.nullable) = false
];

// ids represents the issued ids.
repeated string ids = 2;
}
1 change: 0 additions & 1 deletion scripts/mockgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ $mockgen_cmd -source=x/genutil/types/expected_keepers.go -package testutil -dest
$mockgen_cmd -source=x/gov/testutil/expected_keepers.go -package testutil -destination x/gov/testutil/expected_keepers_mocks.go
$mockgen_cmd -source=x/staking/types/expected_keepers.go -package testutil -destination x/staking/testutil/expected_keepers_mocks.go
$mockgen_cmd -source=x/auth/vesting/types/expected_keepers.go -package testutil -destination x/auth/vesting/testutil/expected_keepers_mocks.go
$mockgen_cmd -source=x/collection/expected_keepers.go -package testutil -destination x/collection/testutil/expected_keepers_mocks.go
$mockgen_cmd -source=x/foundation/expected_keepers.go -package testutil -destination x/foundation/testutil/expected_keepers_mocks.go
12 changes: 0 additions & 12 deletions x/collection-token/class/errors.go

This file was deleted.

25 changes: 0 additions & 25 deletions x/collection-token/class/keeper/alias.go

This file was deleted.

24 changes: 0 additions & 24 deletions x/collection-token/class/keeper/genesis.go

This file was deleted.

24 changes: 0 additions & 24 deletions x/collection-token/class/keeper/keeper.go

This file was deleted.

17 changes: 0 additions & 17 deletions x/collection-token/class/keeper/keys.go

This file was deleted.

9 changes: 0 additions & 9 deletions x/collection-token/class/keys.go

This file was deleted.

20 changes: 0 additions & 20 deletions x/collection-token/class/validation.go

This file was deleted.

13 changes: 0 additions & 13 deletions x/collection-token/errors/link.go

This file was deleted.

156 changes: 0 additions & 156 deletions x/collection-token/go.mod

This file was deleted.

Loading

0 comments on commit db8226d

Please sign in to comment.