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

added decimal handling for airdrop #446

Merged
merged 9 commits into from
Nov 11, 2024
Merged

Conversation

joel-medicala-yral
Copy link
Contributor

To check the status of the deployment

  • check if the platform orchestrator performed the step to upgrade subnet canister with appropriate version: Platform Orchestrator function
  • check the status of upgrade for individual canisters in subnet orchestrators and verify the version. Example for one of the subnet orchesrator: Subnet Orchestrator function

To test the platform orchestrator, you can use the following command:

dfx canister call --query 74zq4-iqaaa-aaaam-ab53a-cai get_subnet_last_upgrade_status --network=ic
the canister id (74zq4-iqaaa-aaaam-ab53a-cai) is taken from the canister_ids.json file

@rupansh-sekar-yral
Copy link
Contributor

cant we do this on the frontend?

@rupansh-sekar-yral
Copy link
Contributor

rupansh-sekar-yral commented Nov 5, 2024

i'd prefer backend takes e8s from the frontend, its uniform and you dont need to handle the decimals, just update the max amount. SNS canisters have 8 decimals so the max amount can be constant

@joel-medicala-yral
Copy link
Contributor Author

joel-medicala-yral commented Nov 5, 2024

i'd prefer backend takes e8s from the frontend, its uniform and you dont need to handle the decimals, just update the max amount. SNS canisters have 8 decimals so the max amount can be constant

I dont think we can because if someone tends to call this function not via our frontend we won't be able to impose the 100 to 1000 token request limit

@rupansh-sekar-yral
Copy link
Contributor

i'd prefer backend takes e8s from the frontend, its uniform and you dont need to handle the decimals, just update the max amount. SNS canisters have 8 decimals so the max amount can be constant

I dont think we can because if someone tends to call this function not via our frontend we won't be able to impose the 100 and 1000 token request limit

the max amount in the function can just be in e8s instead of looking up the decimals

@joel-medicala-yral
Copy link
Contributor Author

Accha so you want me to hardcode the limits to 10_000_000_000 basically 10010^8 which was previously 100 10^decimals

@ravi-sawlani-yral
Copy link
Collaborator

What is this solving?

@joel-medicala-yral
Copy link
Contributor Author

What is this solving?

Basically earlier we were sending 100 e8s in the request airdrop while integrating it in the frontend we decided to to not use 100e8s but 100*10^8 e8s (100 tokens) so to facilitate that a change was needed to update the limits ie multiplying all the limits by 10^8...

@joel-medicala-yral joel-medicala-yral merged commit d552ccd into main Nov 11, 2024
1 check passed
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.

3 participants