Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFT Module #4209

Merged
merged 180 commits into from
Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from 120 commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
9d751b4
in sync with @okwme/cosmos-nft
okwme Apr 15, 2019
b7c8c7f
remove tmp tx
okwme Apr 15, 2019
8d57122
structuring and minor changes
fedekunze Apr 15, 2019
29b170d
supply and client files
fedekunze Apr 15, 2019
53ddc52
adding cli client
okwme Apr 16, 2019
bf8864e
complete cli/tx and rest.go
okwme Apr 17, 2019
e018425
cleanup and restructuring
fedekunze Apr 19, 2019
4fc18b0
restructure rest folder
fedekunze Apr 22, 2019
2183f39
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into bi…
fedekunze Apr 28, 2019
a9aa360
minor updates on clients
fedekunze Apr 28, 2019
6018b16
update querier
fedekunze Apr 28, 2019
b438068
encoding for clients and other changes
fedekunze Apr 28, 2019
c904493
genesis, invariants, and keeper updates
fedekunze Apr 29, 2019
8ebfdc9
update types
fedekunze Apr 29, 2019
dcb7e04
make golangcibot happy
fedekunze Apr 29, 2019
65194cf
renamed and removed bank keeper
okwme May 2, 2019
6fe5e40
remove handlers for editmetadata, mint, burn, buy
okwme May 2, 2019
7f18f53
nft interface
fedekunze May 3, 2019
d782701
minor cleanup
fedekunze May 3, 2019
a3a5d27
sort collections and nfts
fedekunze May 3, 2019
0663ae2
balance and find
fedekunze May 3, 2019
c9db8a1
nft query and tx
fedekunze May 7, 2019
2b058a7
touch ups
okwme May 14, 2019
9c9bf23
uint in place of int
sabau May 15, 2019
eea3138
little fixes:
sabau May 15, 2019
8b76ccd
module generalization changes
fedekunze May 15, 2019
a7cb226
fixes
fedekunze May 15, 2019
d681e09
query with data
fedekunze May 15, 2019
29bcf13
minor updates and TODOs
fedekunze May 15, 2019
efbdfaf
fix CLI tx
fedekunze May 15, 2019
612c66e
golang bot fixes
fedekunze May 15, 2019
4fb5b32
handlers and txs done
fedekunze May 16, 2019
a48bf2f
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into bi…
fedekunze May 16, 2019
300bb26
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into bi…
fedekunze May 16, 2019
e95299a
update module generalization
fedekunze May 16, 2019
ac0ec12
Added very basic tests which for some reason do not work
okwme May 20, 2019
cc3b825
fix test
sabau May 21, 2019
3c5252a
fixed test, now we should fix implementation, seems to fail
sabau May 21, 2019
71968ff
fix test, create new struct instead of changing the old one
sabau May 21, 2019
e84f147
fix handler with new logic
sabau May 21, 2019
872f614
let's make it compile
sabau May 21, 2019
e8dea9d
single failing test example, need to be fixed and extended
sabau May 21, 2019
11457a5
single failing test example, need to be fixed and extended
sabau May 22, 2019
c8d3da4
reverting work, still problems unmarshalling inside iterator from test
sabau May 22, 2019
2f46d0a
Setter in nft.go should return NFT instead of BaseNFT
sabau May 23, 2019
fa3d00c
remove TODOS
sabau May 23, 2019
0219084
comment out broken tests, we want at least a green mark here
sabau May 29, 2019
528384a
little fixes
sabau Jun 3, 2019
2f80a52
hopefully no conflict
okwme Jun 3, 2019
6b23fbd
Fixed marshall error
okwme Jun 3, 2019
08c07ae
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into bi…
fedekunze Jun 6, 2019
4efbaa8
minor changes for tests
tac0turtle Jun 6, 2019
789be16
Merge branch 'billy/nft' of https://github.com/cosmos/cosmos-sdk into…
tac0turtle Jun 6, 2019
0a6442d
change nft id to string, refactors
fedekunze Jun 6, 2019
edc4c92
messy pause
okwme Jun 7, 2019
430c581
slowly cleaning up beginning with keeper and keeper_tests
okwme Jun 7, 2019
541f254
Changes Balances to OWners add all necessary functions, updated Keepe…
okwme Jun 10, 2019
64431c4
pause dev to merge sdk master
okwme Jun 10, 2019
ea04c52
go.mod changes
okwme Jun 10, 2019
b916f06
Merge branch 'master' into billy/nft
okwme Jun 10, 2019
5f672ed
getting closer still need module.go
okwme Jun 10, 2019
02bf05b
builds!!!
okwme Jun 11, 2019
b970852
fix lint begin handler tests
okwme Jun 11, 2019
7b080a6
stableish
okwme Jun 11, 2019
a63a79a
re-order nft attributes, add back mint and burn msgs and handlers
okwme Jun 11, 2019
53a5cc0
add errors to minting the same NFT and burning an NFT that doesnt exist
okwme Jun 11, 2019
5e538b8
first querier test
okwme Jun 11, 2019
951fc8f
add simulations for nft msgs
fedekunze Jun 12, 2019
c55bdfe
Merge branch 'billy/nft' of https://github.com/cosmos/cosmos-sdk into…
fedekunze Jun 12, 2019
1235ac4
handler tests check tags now (fixed a bug!)
okwme Jun 12, 2019
71801b6
update simulation
fedekunze Jun 12, 2019
44dc8a6
Merge branch 'billy/nft' of https://github.com/cosmos/cosmos-sdk into…
fedekunze Jun 12, 2019
1c5a238
generic handler
okwme Jun 12, 2019
23a6054
Merge branch 'billy/nft' of github.com:cosmos/cosmos-sdk into billy/nft
okwme Jun 12, 2019
c1d93a6
need to check if it compiles on another machine
okwme Jun 15, 2019
54866ee
fix weird interface error
okwme Jun 15, 2019
3129199
add back cli
okwme Jun 15, 2019
623f3b2
wtfff
okwme Jun 15, 2019
fda61b3
codec error fixed, logs removed. still returning empty arrays of IDs
okwme Jun 15, 2019
80e5bd2
Take empty input as yes answer
alessio Jun 16, 2019
9619b5c
Add pending log entry
alexanderbez Jun 16, 2019
830cf9b
Merge branch 'billy/nft' into billy/merge-alessio
okwme Jun 16, 2019
10a250b
merged in master
okwme Jun 16, 2019
dd8be62
marshall errors
okwme Jun 16, 2019
ef4377a
build commands
okwme Jun 16, 2019
8a35375
working!!!
okwme Jun 16, 2019
ed2e501
merge master
tac0turtle Jun 25, 2019
d1052fa
linting errors
tac0turtle Jun 25, 2019
5b246d4
remove unused func
tac0turtle Jun 25, 2019
eac7eab
pause
okwme Jun 25, 2019
840bc23
Merge branch 'billy/nft' of github.com:cosmos/cosmos-sdk into billy/nft
okwme Jun 25, 2019
5fb86c6
fix burn error
okwme Jun 25, 2019
d667021
fix burn error
okwme Jul 1, 2019
94c6285
merged with maser
okwme Jul 1, 2019
1f75cb2
tests for querier
okwme Jul 1, 2019
5325b8a
typo
okwme Jul 1, 2019
770f0ea
tests for NFT types
okwme Jul 2, 2019
0ce5886
module spec standard
fedekunze Jul 2, 2019
095b497
tests for Collection and Collections types
okwme Jul 2, 2019
7ba4cfa
Merge branch 'billy/nft' of github.com:cosmos/cosmos-sdk into billy/nft
okwme Jul 2, 2019
6a40091
merge w Fede
okwme Jul 2, 2019
a9b5fea
tests for Owner Type
okwme Jul 2, 2019
fba52ed
added genesis tests and beefed up keeper, querier, handler & types tests
okwme Jul 3, 2019
9236347
linting errors deadcode
okwme Jul 3, 2019
c9d7ccc
Merge branch 'master' into billy/nft
okwme Jul 3, 2019
39b134a
DONT COVER test_common.go
okwme Jul 3, 2019
b60c6be
add msg type tests
okwme Jul 3, 2019
a718146
merge master update msg types
okwme Jul 3, 2019
785019a
Update x/nft/internal/keeper/key.go
okwme Jul 8, 2019
e4c0afa
Update x/nft/genesis.go
okwme Jul 8, 2019
1edff5a
Update x/nft/client/cli/query.go
okwme Jul 8, 2019
907be89
Apply suggestions from code review
fedekunze Jul 11, 2019
609f220
cleanup and address comments
fedekunze Jul 16, 2019
e859bc0
typo
fedekunze Jul 16, 2019
4092bc7
cleanup events
fedekunze Jul 16, 2019
b5fd467
split events
fedekunze Jul 16, 2019
97240dd
more cleanup
fedekunze Jul 18, 2019
3d1521f
remove restrictions from default handlers
okwme Jul 21, 2019
547613b
not sure where these go mod changes came from
okwme Jul 21, 2019
66ffc12
performance misspelling
okwme Jul 21, 2019
1918f54
sim generated changes
okwme Jul 23, 2019
a3937ef
merged master
okwme Jul 23, 2019
ebc912c
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into bi…
fedekunze Jul 23, 2019
3c1c0e9
make format
fedekunze Jul 23, 2019
df5e900
add mint and burn sims
fedekunze Jul 23, 2019
887324d
move NFT interface to nft/exported
fedekunze Jul 23, 2019
8e71f2d
make format
fedekunze Jul 23, 2019
72aecc5
NFT spec
fedekunze Jul 23, 2019
6f579e0
Updates
fedekunze Jul 23, 2019
91fede0
more updates
fedekunze Jul 23, 2019
b602b6d
update specs readme
fedekunze Jul 23, 2019
b518f2a
fix sims
fedekunze Jul 23, 2019
ef93ff5
rest additions
okwme Jul 29, 2019
bfea0a7
Merge branch 'master' into billy/nft
okwme Jul 29, 2019
95b037f
rest additions
okwme Jul 29, 2019
dae51c1
fix invariant
okwme Jul 29, 2019
47c9403
minimal nft without name, description or image
okwme Jul 29, 2019
61b3f1d
sim
okwme Jul 29, 2019
6985b53
fix sim
okwme Jul 29, 2019
caf41a2
fix sim
okwme Jul 29, 2019
6a521d8
fix Update methods
okwme Jul 29, 2019
99edbb4
merged nft
okwme Jul 29, 2019
494c36a
nothing
okwme Jul 29, 2019
a05d45e
Merge branch 'master' into billy/nft
sabau Jul 30, 2019
6a3436d
simplify update and remove
sabau Jul 30, 2019
241b6db
remove test on memory location
sabau Jul 30, 2019
7c050b0
TEST to get logs, need to be removed
sabau Jul 30, 2019
f047a59
fix simulator editMetadata Msg type
okwme Jul 30, 2019
ff8807f
owner not found start with empty collection
sabau Jul 30, 2019
e46495f
artifacts on errors in case of failure, else, no artifacts
sabau Jul 30, 2019
6611089
add more invariant checks to handler_tests
okwme Jul 30, 2019
8ef485f
Merge branch 'billy/nft' of github.com:cosmos/cosmos-sdk into billy/nft
okwme Jul 30, 2019
1d62300
never forget to overwrite
okwme Jul 30, 2019
96acd6e
merge min-nft, metadata removed except tokenURI
okwme Jul 30, 2019
f99777f
Merge branch 'billy/nft' into billy-fedekunze/4735-nft-spec
okwme Jul 30, 2019
5366c07
merge and update spec
okwme Jul 30, 2019
2e1fbb6
Merge pull request #4766 from cosmos/billy-fedekunze/4735-nft-spec
okwme Jul 30, 2019
0d99d6f
Merge branch 'master' into billy/nft
okwme Jul 30, 2019
85104ca
colins feedback
okwme Jul 31, 2019
b00a362
Merge branch 'billy/nft' of github.com:cosmos/cosmos-sdk into billy/nft
okwme Jul 31, 2019
da87464
code coverage test
okwme Jul 31, 2019
322a40d
code coverage test
okwme Jul 31, 2019
b7834cc
code coverage test
okwme Jul 31, 2019
c5c33d5
spelling
okwme Jul 31, 2019
733de25
clean up client
okwme Jul 31, 2019
c1fa44e
testing code coverage
okwme Jul 31, 2019
6b5e0ed
testing code coverage
okwme Jul 31, 2019
a859dfd
testing code coverage
okwme Jul 31, 2019
575d991
testing code coverage
okwme Jul 31, 2019
c613491
testing code coverage
okwme Jul 31, 2019
e0e68cd
Update docs/spec/nft/README.md
fedekunze Aug 2, 2019
a0c3799
Apply suggestions from code review
fedekunze Aug 2, 2019
7f79b92
merge master
fedekunze Aug 2, 2019
5e47cc2
minor changes
fedekunze Aug 2, 2019
caec9f3
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into bi…
fedekunze Aug 11, 2019
81dd140
merge master; add sim decoder
fedekunze Aug 24, 2019
151f309
integration tests and fixes
fedekunze Aug 24, 2019
e44c1db
minor golangCI fixes
fedekunze Aug 24, 2019
ccf6a52
Merge branch 'master' into billy/nft
rigelrozanski Aug 26, 2019
832de38
Update simapp/app.go
rigelrozanski Aug 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
github.com/fortytw2/leaktest v1.3.0 // indirect
github.com/gogo/protobuf v1.2.1
github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129
github.com/golang/protobuf v1.3.0
github.com/gorilla/mux v1.7.0
github.com/gorilla/websocket v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.6
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262 h1:qsl9y/CJx34tuA7QCPNp86JNJe4spst6Ff8MjvPUdPg=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
Expand Down
9 changes: 8 additions & 1 deletion simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/genutil"
"github.com/cosmos/cosmos-sdk/x/gov"
"github.com/cosmos/cosmos-sdk/x/mint"
"github.com/cosmos/cosmos-sdk/x/nft"
"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
"github.com/cosmos/cosmos-sdk/x/slashing"
Expand Down Expand Up @@ -54,6 +55,7 @@ var (
params.AppModuleBasic{},
crisis.AppModuleBasic{},
slashing.AppModuleBasic{},
nft.AppModuleBasic{},
supply.AppModuleBasic{},
)
)
Expand Down Expand Up @@ -87,6 +89,7 @@ type SimApp struct {
keyGov *sdk.KVStoreKey
keyParams *sdk.KVStoreKey
tkeyParams *sdk.TransientStoreKey
keyNFT *sdk.KVStoreKey

// keepers
accountKeeper auth.AccountKeeper
Expand All @@ -99,6 +102,7 @@ type SimApp struct {
govKeeper gov.Keeper
crisisKeeper crisis.Keeper
paramsKeeper params.Keeper
nftKeeper nft.Keeper

// the module manager
mm *module.Manager
Expand Down Expand Up @@ -130,6 +134,7 @@ func NewSimApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bo
keyGov: sdk.NewKVStoreKey(gov.StoreKey),
keyParams: sdk.NewKVStoreKey(params.StoreKey),
tkeyParams: sdk.NewTransientStoreKey(params.TStoreKey),
keyNFT: sdk.NewKVStoreKey(nft.StoreKey),
}

// init params keeper and subspaces
Expand Down Expand Up @@ -165,6 +170,7 @@ func NewSimApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bo
app.slashingKeeper = slashing.NewKeeper(app.cdc, app.keySlashing, &stakingKeeper,
slashingSubspace, slashing.DefaultCodespace)
app.crisisKeeper = crisis.NewKeeper(crisisSubspace, invCheckPeriod, app.supplyKeeper, auth.FeeCollectorName)
app.nftKeeper = nft.NewKeeper(app.cdc, app.keyNFT)

// register the proposal types
govRouter := gov.NewRouter()
Expand All @@ -191,6 +197,7 @@ func NewSimApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bo
mint.NewAppModule(app.mintKeeper),
slashing.NewAppModule(app.slashingKeeper, app.stakingKeeper),
staking.NewAppModule(app.stakingKeeper, app.distrKeeper, app.accountKeeper, app.supplyKeeper),
nft.NewAppModule(app.nftKeeper),
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand All @@ -212,7 +219,7 @@ func NewSimApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bo
// initialize stores
app.MountStores(app.keyMain, app.keyAccount, app.keySupply, app.keyStaking,
app.keyMint, app.keyDistr, app.keySlashing, app.keyGov, app.keyParams,
app.tkeyParams, app.tkeyStaking, app.tkeyDistr)
app.tkeyParams, app.tkeyStaking, app.tkeyDistr, app.keyNFT)

// initialize BaseApp
app.SetInitChainer(app.InitChainer)
Expand Down
2 changes: 2 additions & 0 deletions simapp/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ const (
OpWeightMsgUndelegate = "op_weight_msg_undelegate"
OpWeightMsgBeginRedelegate = "op_weight_msg_begin_redelegate"
OpWeightMsgUnjail = "op_weight_msg_unjail"
OpWeightMsgTransferNFT = "op_weight_msg_transfer_nft"
OpWeightMsgEditNFTMetadata = "op_weight_msg_edit_nft_metadata"
)
24 changes: 24 additions & 0 deletions simapp/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/simulation"
slashingsim "github.com/cosmos/cosmos-sdk/x/slashing/simulation"
"github.com/cosmos/cosmos-sdk/x/staking"
"github.com/cosmos/cosmos-sdk/x/nft"
stakingsim "github.com/cosmos/cosmos-sdk/x/staking/simulation"
)

Expand Down Expand Up @@ -126,6 +127,7 @@ func appStateRandomizedFn(
GenDistrGenesisState(cdc, r, appParams, genesisState)
stakingGen := GenStakingGenesisState(cdc, r, accs, amount, numAccs, numInitiallyBonded, appParams, genesisState)
GenSlashingGenesisState(cdc, r, stakingGen, appParams, genesisState)
GenNFTGenesisState(cdc, r, accs, appParams, genesisState)

appState, err := MakeCodec().MarshalJSON(genesisState)
if err != nil {
Expand Down Expand Up @@ -325,6 +327,28 @@ func testAndRunTxs(app *SimApp) []simulation.WeightedOperation {
}(nil),
slashingsim.SimulateMsgUnjail(app.slashingKeeper),
},
{
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(cdc, OpWeightMsgTransferNFT, &v, nil,
func(_ *rand.Rand) {
v = 100
})
return v
}(nil),
nft.SimulateMsgEditNFTMetadata(app.nftKeeper),
},
{
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(cdc, OpWeightMsgTransferNFT, &v, nil,
func(_ *rand.Rand) {
v = 100
})
return v
}(nil),
nft.SimulateMsgTransferNFT(app.nftKeeper),
},
}
}

Expand Down
40 changes: 40 additions & 0 deletions simapp/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/genaccounts"
"github.com/cosmos/cosmos-sdk/x/gov"
"github.com/cosmos/cosmos-sdk/x/mint"
"github.com/cosmos/cosmos-sdk/x/nft"
"github.com/cosmos/cosmos-sdk/x/simulation"
"github.com/cosmos/cosmos-sdk/x/slashing"
"github.com/cosmos/cosmos-sdk/x/staking"
Expand Down Expand Up @@ -494,6 +495,45 @@ func GenStakingGenesisState(
return stakingGenesis
}

func GenNFTGenesisState(cdc *codec.Codec, r *rand.Rand, accs []simulation.Account, ap simulation.AppParams, genesisState map[string]json.RawMessage) {
const (
Kitties = "crypto-kitties"
Doggos = "crypto-doggos"
)

collections := nft.NewCollections(nft.NewCollection(Kitties, nft.NFTs{}), nft.NewCollection(Doggos, nft.NFTs{}))
var ownerships []nft.Owner

for _, acc := range accs {
if r.Intn(100) < 50 {
baseNFT := nft.NewBaseNFT(
simulation.RandStringOfLength(r, 10), // id
acc.Address,
simulation.RandStringOfLength(r, 15), // name
simulation.RandStringOfLength(r, 50), // description
simulation.RandStringOfLength(r, 30), // image
simulation.RandStringOfLength(r, 45), // tokenURI
)

var idCollection nft.IDCollection
if r.Intn(100) < 50 {
collections[0].AddNFT(&baseNFT)
idCollection = nft.NewIDCollection(Kitties, []string{baseNFT.ID})
} else {
collections[1].AddNFT(&baseNFT)
idCollection = nft.NewIDCollection(Doggos, []string{baseNFT.ID})
}
ownership := nft.NewOwner(acc.Address, idCollection)
ownerships = append(ownerships, ownership)
}
}

nftGenesis := nft.NewGenesisState(ownerships, collections)

fmt.Printf("Selected randomly generated NFT parameters:\n%s\n", codec.MustMarshalJSONIndent(cdc, nftGenesis))
genesisState[nft.ModuleName] = cdc.MustMarshalJSON(nftGenesis)
}

// GetSimulationLog unmarshals the KVPair's Value to the corresponding type based on the
// each's module store key and the prefix bytes of the KVPair's key.
func GetSimulationLog(storeName string, cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) (log string) {
Expand Down
2 changes: 1 addition & 1 deletion types/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"strings"

"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
fedekunze marked this conversation as resolved.
Show resolved Hide resolved

"github.com/tendermint/tendermint/crypto"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
Expand Down
2 changes: 1 addition & 1 deletion x/gov/invariants.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func AllInvariants(keeper Keeper) sdk.Invariant {
func ModuleAccountInvariant(keeper Keeper) sdk.Invariant {
return func(ctx sdk.Context) (string, bool) {
var expectedDeposits sdk.Coins

keeper.IterateAllDeposits(ctx, func(deposit types.Deposit) bool {
expectedDeposits = expectedDeposits.Add(deposit.Amount)
return false
Expand Down
54 changes: 54 additions & 0 deletions x/nft/alias.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// nolint
// autogenerated code using github.com/rigelrozanski/multitool
// aliases generated for the following subdirectories:
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/nft/internal/keeper
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/nft/internal/types
package nft

import (
"github.com/cosmos/cosmos-sdk/x/nft/internal/keeper"
"github.com/cosmos/cosmos-sdk/x/nft/internal/types"
)

type (
Keeper = keeper.Keeper
NFT = types.NFT
BaseNFT = types.BaseNFT
NFTs = types.NFTs
Owner = types.Owner
IDCollection = types.IDCollection
Collection = types.Collection
Collections = types.Collections
GenesisState = types.GenesisState
MsgTransferNFT = types.MsgTransferNFT
MsgEditNFTMetadata = types.MsgEditNFTMetadata
MsgMintNFT = types.MsgMintNFT
MsgBurnNFT = types.MsgBurnNFT
)

var (
NewKeeper = keeper.NewKeeper
RegisterInvariants = keeper.RegisterInvariants
NewQuerier = keeper.NewQuerier
NewBaseNFT = types.NewBaseNFT
NewNFTs = types.NewNFTs
NewIDCollection = types.NewIDCollection
NewOwner = types.NewOwner
NewCollection = types.NewCollection
NewCollections = types.NewCollections
EmptyCollection = types.EmptyCollection
NewGenesisState = types.NewGenesisState
NewMsgTransferNFT = types.NewMsgTransferNFT
NewMsgEditNFTMetadata = types.NewMsgEditNFTMetadata
DefaultGenesisState = types.DefaultGenesisState
ValidateGenesis = types.ValidateGenesis
RegisterCodec = types.RegisterCodec
ModuleCdc = types.ModuleCdc
)

const (
StoreKey = types.StoreKey
RouterKey = types.RouterKey
QuerierRoute = types.QuerierRoute
ModuleName = types.ModuleName
)
Loading