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

refactor(protocol): change TaikoToken's decimals from 18 to 8 #13443

Merged
merged 9 commits into from
Mar 25, 2023

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Mar 24, 2023

The main objective for such a change is to make sure the current and future max supply can fit in to a uint64 so the protocol code can use one single uint64 to hold any taiko token amount.

type(uint64).max/ (10**18) = 184,467,440,737 which is 184 billion. I don't think our max supply will ever be 10 billion.

test2/TaikoL1.t.sol:TaikoL1WithConfig contract
proposeBlock 18589 28621 18609 85536 309
proveBlock 56012 66066 56012 132412 309
verifyBlocks 14484 15675 15409 76980 301

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #13443 (244be54) into major_protocol_upgrade_rebase (0b8f7fe) will increase coverage by 1.00%.
The diff coverage is 0.00%.

❗ Current head 244be54 differs from pull request most recent head ddf02b4. Consider uploading reports for the commit ddf02b4 to get more accurate results

@@                        Coverage Diff                        @@
##           major_protocol_upgrade_rebase   #13443      +/-   ##
=================================================================
+ Coverage                          39.18%   40.18%   +1.00%     
=================================================================
  Files                                111      112       +1     
  Lines                               3366     3394      +28     
  Branches                             382      411      +29     
=================================================================
+ Hits                                1319     1364      +45     
+ Misses                              1959     1942      -17     
  Partials                              88       88              
Flag Coverage Δ *Carryforward flag
bridge-ui 94.66% <ø> (+0.65%) ⬆️ Carriedforward from 2e8b0d3
protocol 0.00% <0.00%> (ø)
relayer 62.45% <ø> (-0.14%) ⬇️ Carriedforward from 2e8b0d3
ui 100.00% <ø> (ø) Carriedforward from 2e8b0d3

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
packages/protocol/contracts/L1/TaikoL1.sol 0.00% <ø> (ø)
packages/protocol/contracts/L1/TaikoToken.sol 0.00% <0.00%> (ø)
...ckages/protocol/contracts/L1/libs/LibProposing.sol 0.00% <0.00%> (ø)
...kages/protocol/contracts/L1/libs/LibTokenomics.sol 0.00% <0.00%> (ø)
packages/protocol/contracts/L1/libs/LibUtils.sol 0.00% <ø> (ø)
...ckages/protocol/contracts/L1/libs/LibVerifying.sol 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants