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 APIs #514

Merged
merged 10 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 4 additions & 0 deletions storage/migrations/21_evm_nfts.up.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
BEGIN;

CREATE TABLE chain.evm_nfts (
runtime runtime NOT NULL,
token_address oasis_addr NOT NULL,
Expand All @@ -14,3 +16,5 @@ CREATE TABLE chain.evm_nfts (
image TEXT
);
CREATE INDEX ix_evm_nfts_stale ON chain.evm_nfts (runtime, token_address, nft_id) WHERE last_download_round IS NULL OR last_want_download_round > last_download_round;

COMMIT;
7 changes: 7 additions & 0 deletions storage/migrations/22_evm_nfts_grant.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
BEGIN;

-- 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;
Copy link
Collaborator

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.

Copy link
Collaborator Author

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 😬


COMMIT;