-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: implementation of MsgBuyDataAccessNFT
Tx
#306
Merged
Merged
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
0ea3fb5
remove contract related tx and query
b59d61a
change README
c515c01
fix test
6122bb4
fix lint and add validation of params
0fe743b
feat: add query params
49b64b5
fix
29d53bf
Merge branch 'ft/275/wasm-gov-contract' into ft/275/get-params-query
c5f91ca
fix
f33b0fd
Merge branch 'ft/275/wasm-gov-contract' into ft/275/get-params-query
764956f
feat: add MsgBuyDataAccessNFT Tx
5fb79e6
add genesis of white list
2aa1321
add test of BuyDataAccessNFT Tx
5320c91
merge
6d48801
Merge branch 'master' into ft/279/buy-data-access-nft
1bed8eb
merge
e5d8c20
review applied
4820796
Merge remote-tracking branch 'origin/master' into ft/279/buy-data-acc…
e9918c6
change name
b6c7d7a
Merge remote-tracking branch 'origin/master' into ft/279/buy-data-acc…
7e3e2ca
add TODO: pagination
0f1c2b8
apply changed design
b988841
refactor errors
fcab598
rename tx
77df372
fix
61db854
Merge remote-tracking branch 'origin/master' into ft/279/buy-data-acc…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"title": "parameter change of datapool module", | ||
"description": "register code ID and address of NFT contract", | ||
"changes": [ | ||
{ | ||
"subspace": "datapool", | ||
"key": "datapoolcodeid", | ||
"value": "1" | ||
}, | ||
{ | ||
"subspace": "datapool", | ||
"key": "datapoolnftcontractaddress", | ||
"value": "panacea14hj2tavq8fpesdwxxcu44rty3hh90vhu4mda6e" | ||
} | ||
], | ||
"deposit": "1000000umed" | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also add
[ (gogoproto.nullable) = false ]
to some fields.When I export
genesis.json
with multiple values of those fields, all the same values (I guess the last one) are stored and exported. I referred to other projects and they all used the gogoproto extension. I'm not sure of the reason, it was a workaround for now. If you have any idea, please leave some comments.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you saying this?
expected:
acutally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your example,
The last one was duplicated..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's interesting...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are also differences of types in
GenesisState
. Without gogoproto extension, pointer is added to each type.Without
[(gogoproto.nullable) = false]
,With
[(gogoproto.nullable) = false]
,There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior is intended. But still, it's weird that the list contains all the same value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
�> Is this issue still being raised? Then, I will take a look at it.
This issue is resolved now, but I don't know what's going on.
Oh I see. I'm curious this part as well. I'll look at gogoproto extension more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed
[(gogoproto.nullable) = false]
and checked that the exported list in the genesis contains two different elements. As I know,[(gogoproto.nullable) = false]
shouldn't violate the fundamental behavior of protobuf marshalling/unmarhalling.In protobuf, the nullability is a bit tricky to handle because everything is optional by default in protobuf 3. That's why all fields are defined with pointer such as
[]*DataValidator
or*Params
. Previously, the protobuf 2 had therequired
keyword which sets some field not nullable, but that feature was deleted in protobuf 3: protocolbuffers/protobuf#2497.That's why the gogoproto, which is an extension of protobuf, introduced a new feature
nullable
. If you really want to make each list element not nullable, then you can use[(gogoproto.nullable) = false]
so that gogoproto defines the list as[]Element
, not[]*Element
. I also agree with using it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess some Go code wasn't implemented correctly at that time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. I'm very thankful to you for your �detailed explanation.
I think it could be, because as I remember It was exported correctly when I implement
ExportGenesis()
of module params in #294.