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

Doing price conversions on the SQL-level #84

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tifrel
Copy link
Member

@tifrel tifrel commented Jun 29, 2023

DO NOT MERGE

This PR will break the FE. We should apply it manually to sandbox, and then the FE can be developed being pointed to that.

This PR

  • does a DB schema change
    • hasura permissions are updated
    • the indexer is halted
    • the corresponding minterop-producer PR is ready
    • the corresponding minterop-consumer PR is ready
  • changes pubsub payloads
    • the indexer is halted
    • the corresponding minterop-producer PR is ready
    • the corresponding minterop-consumer PR is ready
  • deprecates hasura permissions
    • frontend won't break
  • creates hasura triggers/actions/events etc.
    • postgres DB user has been granted appropriate permissions

Copy link

@bh2smith bh2smith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright to me although its too much to comment on the actual logic. I left a few nits.

Comment on lines +229 to +234
count(*),
tx_sender,
timestamp,
a_.nft_contract_id,
kind,
action_sender,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (indentation):

Suggested change
count(*),
tx_sender,
timestamp,
a_.nft_contract_id,
kind,
action_sender,
count(*),
tx_sender,
timestamp,
a_.nft_contract_id,
kind,
action_sender,

amount
from nft_earnings
where is_affiliate = TRUE
and nft_contract_id <> 'deadmau5.mintbase1.near'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hard coded address seems very specific... was this intended?

Comment on lines +6 to +13
-- run manually, depending on mainnet or testnet:
-- insert into currency_conversions values
-- ('ft::usdc.fakes.testnet', 1000000),
-- ('ft::usdt.fakes.testnet', 1000000),
-- ('ft::dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near', 1000000),
-- ('ft::a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near', 1000000),
-- ('near', 1000000000000000000000000);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you wanna just leave this out.

Suggested change
-- run manually, depending on mainnet or testnet:
-- insert into currency_conversions values
-- ('ft::usdc.fakes.testnet', 1000000),
-- ('ft::usdt.fakes.testnet', 1000000),
-- ('ft::dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near', 1000000),
-- ('ft::a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near', 1000000),
-- ('near', 1000000000000000000000000);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants