-
Notifications
You must be signed in to change notification settings - Fork 4
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 APIs #514
NFT APIs #514
Conversation
When this gets closer to stable, let's loop in the FE folks, and possibly Matevz as effectively our developer advocate. |
875ad7f
to
dd4a8ce
Compare
a51ab0d
to
4f758ee
Compare
dd4a8ce
to
3f942e0
Compare
05d394c
to
702e128
Compare
3f942e0
to
124515c
Compare
702e128
to
e3f91ab
Compare
125c921
to
5f23c39
Compare
e3f91ab
to
29d0b96
Compare
5f23c39
to
899298f
Compare
29d0b96
to
6d92ff0
Compare
899298f
to
58fe181
Compare
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.
👍
Just trying to figure out how the relationship between individual NFTs and ERC721 contracts should be reflected in our API.
I am getting SWAGGER OpenAPI validation errors.
These all seem to be related to the new additions; the version on the master branch passes without any issues. |
58fe181
to
3f13626
Compare
16c110a
to
dfb27d7
Compare
3f13626
to
47de98b
Compare
yeah these look like they're related to the additions. I'll check on these tomorrow |
If there will be an update, it would be very nice to sneak it the |
gonna add the owner field in #529 |
0e11a4c
to
d71a277
Compare
"token" info moved to subobject, matching evm tokens json schema. however, note that that api was designed earlier, where more fields are required. those fields will have the Go default value when the data is not available. e.g. the zero ethereum address if we somehow don't know the preimage or token type unknown instead of null if we haven't checked the contract yet |
d71a277
to
359b90f
Compare
moved to /{runtime}/evm_tokens/{address}/nfts |
359b90f
to
501af66
Compare
501af66
to
2bc527f
Compare
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.
Thank you for the additional changes!
A reply to your comment:
"token" info moved to subobject, matching evm tokens json schema.
note that that api was designed earlier, where more fields are required.
Now is the "best" time to change that in a backwards-incompatible way -- best compared to any future time. I'm sure @csillag can accommodate optionality on the FE, and we don't have other clients for now.
OTOH if the only two potentially-defaulted fields are eth_address and token_type, I wouldn't worry. token_type has to be 721 for us to even list the NFT, presumably? And not knowing the preimage would pretty much imply a bug in nexus, because all events via which we observe NFTs are encoded with eth addresses, so we observe preimages all the time. So I'm not worried about that corner case either.
ffa167b
to
6f6547e
Compare
metadata_accessed lmao |
22a1a2a
to
8ef9a7e
Compare
Co-authored-by: mitjat <[email protected]>
4ddab26
to
c8e416e
Compare
changes worth looking at:
|
|
||
-- Grant others read-only use. | ||
GRANT SELECT ON ALL TABLES IN SCHEMA chain TO PUBLIC; | ||
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA chain TO PUBLIC; |
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.
nit: If 21_evm_nfts.up.sql
hasn't been applied yet to prod, I'd also be fine with merging this with that migration. This way is also completely fine too.
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.
it was in 0.1.16 😬
this first part has a way to list NFTs by contract address