-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate onft to use x/nft base structure and keepers (#107)
* add onft proto files * add generated types * add onft types and keys * feat: add onft module as native module (x/onft) * fix issues with onft module integration * lint * update nft builder file * fix event issues * fix lint issues * fix lint & simulation issues * update lint config * lint * update linter verison * update golint config
- Loading branch information
Showing
80 changed files
with
19,261 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
syntax = "proto3"; | ||
package OmniFlix.onft.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "OmniFlix/onft/v1beta1/onft.proto"; | ||
import "OmniFlix/onft/v1beta1/params.proto"; | ||
option go_package = "github.com/OmniFlix/omniflixhub/v2/x/onft/types"; | ||
|
||
// GenesisState defines the nft module's genesis state. | ||
message GenesisState { | ||
repeated Collection collections = 1 [(gogoproto.nullable) = false]; | ||
Params params = 2 [(gogoproto.nullable) = false]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
syntax = "proto3"; | ||
package OmniFlix.onft.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
option go_package = "github.com/OmniFlix/omniflixhub/v2/x/onft/types"; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
// Collection | ||
message Collection { | ||
option (gogoproto.equal) = true; | ||
|
||
Denom denom = 1 [(gogoproto.nullable) = false]; | ||
repeated ONFT onfts = 2 [(gogoproto.customname) = "ONFTs", (gogoproto.nullable) = false]; | ||
} | ||
|
||
message IDCollection { | ||
option (gogoproto.equal) = true; | ||
|
||
string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; | ||
repeated string onft_ids = 2 [(gogoproto.moretags) = "yaml:\"onft_ids\""]; | ||
} | ||
|
||
message Denom { | ||
option (gogoproto.equal) = true; | ||
|
||
string id = 1; | ||
string symbol = 2; | ||
string name = 3; | ||
string schema = 4; | ||
string creator = 5; | ||
string description = 6; | ||
string preview_uri = 7 [ | ||
(gogoproto.moretags) = "yaml:\"preview_uri\"", | ||
(gogoproto.customname) = "PreviewURI" | ||
]; | ||
string uri = 8; | ||
string uri_hash = 9; | ||
string data = 10; | ||
} | ||
|
||
message DenomMetadata { | ||
string creator = 1; | ||
string schema = 2; | ||
string description = 3; | ||
string preview_uri = 4; | ||
string data = 5; | ||
string uri_hash = 6; | ||
} | ||
|
||
//ASSET or ONFT | ||
message ONFT { | ||
option (gogoproto.equal) = true; | ||
|
||
string id = 1; | ||
Metadata metadata = 2 [(gogoproto.nullable) = false]; | ||
string data = 3; | ||
string owner = 4; | ||
bool transferable = 5; | ||
bool extensible = 6; | ||
google.protobuf.Timestamp created_at = 7 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.stdtime) = true, | ||
(gogoproto.moretags) = "yaml:\"created_at\"" | ||
]; | ||
bool nsfw = 8; | ||
string royalty_share = 9 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"royalty_share\"", | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" | ||
]; | ||
} | ||
|
||
message Metadata { | ||
option (gogoproto.equal) = true; | ||
|
||
string name = 1 [(gogoproto.moretags) = "yaml:\"name\""]; | ||
string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; | ||
string media_uri = 3 [ | ||
(gogoproto.moretags) = "yaml:\"media_uri\"", | ||
(gogoproto.customname) = "MediaURI" | ||
]; | ||
string preview_uri = 4 [ | ||
(gogoproto.moretags) = "yaml:\"preview_uri\"", | ||
(gogoproto.customname) = "PreviewURI" | ||
]; | ||
string uri_hash = 5; | ||
} | ||
|
||
message ONFTMetadata { | ||
string name = 1; | ||
string description =2; | ||
string preview_uri = 3 [ | ||
(gogoproto.moretags) = "yaml:\"preview_uri\"", | ||
(gogoproto.customname) = "PreviewURI" | ||
]; | ||
string data = 4; | ||
bool transferable = 5; | ||
bool extensible = 6; | ||
google.protobuf.Timestamp created_at = 7 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.stdtime) = true, | ||
(gogoproto.moretags) = "yaml:\"created_at\"" | ||
]; | ||
bool nsfw = 8; | ||
string royalty_share = 9 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"royalty_share\"", | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" | ||
]; | ||
string uri_hash = 10; | ||
} | ||
|
||
message Owner { | ||
option (gogoproto.equal) = true; | ||
|
||
string address = 1; | ||
repeated IDCollection id_collections = 2 [ | ||
(gogoproto.moretags) = "yaml:\"idcs\"", | ||
(gogoproto.customname) = "IDCollections", | ||
(gogoproto.nullable) = false | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
syntax = "proto3"; | ||
package OmniFlix.onft.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "github.com/OmniFlix/omniflixhub/v2/x/onft/types"; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
|
||
|
||
message Params { | ||
cosmos.base.v1beta1.Coin denom_creation_fee = 1 [ | ||
(gogoproto.moretags) = "yaml:\"denom_creation_fee\"", | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", | ||
(gogoproto.nullable) = false | ||
]; | ||
} |
Oops, something went wrong.