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

Contract sizes #37

Closed
dave opened this issue Aug 31, 2022 · 2 comments
Closed

Contract sizes #37

dave opened this issue Aug 31, 2022 · 2 comments
Labels
revisit in future We should have another look at this in the future

Comments

@dave
Copy link
Contributor

dave commented Aug 31, 2022

The pool contracts are above 24kb, so need a special allowUnlimitedContractSize: true override in hardhat.config.js. Here's the contract sizes:

 ·------------------------------------|--------------|----------------·
 |  Contract Name                     ·  Size (KiB)  ·  Change (KiB)  │
 ·····································|··············|·················
 |  Address                           ·       0.084  ·                │
 ·····································|··············|·················
 |  AddressUpgradeable                ·       0.084  ·                │
 ·····································|··············|·················
 |  BaseCarbonTonne                   ·      24.216  ·                │
 ·····································|··············|·················
 |  BeaconProxy                       ·       0.829  ·                │
 ·····································|··············|·················
 |  CarbonBurnTest                    ·       1.893  ·                │
 ·····································|··············|·················
 |  CarbonOffsetBatches               ·      20.921  ·                │
 ·····································|··············|·················
 |  CarbonOffsetBatchesStorage        ·       1.400  ·                │
 ·····································|··············|·················
 |  CarbonProjects                    ·      19.218  ·                │
 ·····································|··············|·················
 |  CarbonProjectsStorage             ·       2.516  ·                │
 ·····································|··············|·················
 |  CarbonProjectVintages             ·      17.171  ·                │
 ·····································|··············|·················
 |  CarbonProjectVintagesStorage      ·       1.793  ·                │
 ·····································|··············|·················
 |  console                           ·       0.084  ·                │
 ·····································|··············|·················
 |  ERC1967Proxy                      ·       0.682  ·                │
 ·····································|··············|·················
 |  ERC20                             ·       2.124  ·                │
 ·····································|··············|·················
 |  ERC20Upgradeable                  ·       2.124  ·                │
 ·····································|··············|·················
 |  ERC721Upgradeable                 ·       4.579  ·                │
 ·····································|··············|·················
 |  Modifiers                         ·       0.062  ·                │
 ·····································|··············|·················
 |  NatureCarbonTonne                 ·      24.169  ·                │
 ·····································|··············|·················
 |  ProjectUtils                      ·       0.062  ·                │
 ·····································|··············|·················
 |  ProjectVintageUtils               ·       0.062  ·                │
 ·····································|··············|·················
 |  RetirementCertificates            ·      15.299  ·                │
 ·····································|··············|·················
 |  SafeERC20Upgradeable              ·       0.084  ·                │
 ·····································|··············|·················
 |  StorageSlot                       ·       0.084  ·                │
 ·····································|··············|·················
 |  StorageSlotUpgradeable            ·       0.084  ·                │
 ·····································|··············|·················
 |  Strings                           ·       0.084  ·                │
 ·····································|··············|·················
 |  StringsUpgradeable                ·       0.084  ·                │
 ·····································|··············|·················
 |  TestToken                         ·       3.685  ·                │
 ·····································|··············|·················
 |  ToucanCarbonOffsets               ·      14.669  ·                │
 ·····································|··············|·················
 |  ToucanCarbonOffsetsFactory        ·      11.205  ·                │
 ·····································|··············|·················
 |  ToucanCarbonOffsetsStorage        ·       0.292  ·                │
 ·····································|··············|·················
 |  ToucanContractRegistry            ·       8.604  ·                │
 ·····································|··············|·················
 |  ToucanContractRegistryStorage     ·       0.190  ·                │
 ·····································|··············|·················
 |  ToucanCrosschainMessenger         ·       9.367  ·                │
 ·····································|··············|·················
 |  ToucanCrosschainMessengerStorage  ·       0.521  ·                │
 ·····································|··············|·················
 |  ToucanRegenBridge                 ·       4.302  ·                │
 ·····································|··············|·················
 |  UpgradeableBeacon                 ·       0.897  ·                │
 ·------------------------------------|--------------|----------------·

This override means that perhaps we won't notice if the bridge contract goes over that limit. We should monitor this.

@pheuberger pheuberger added the revisit in future We should have another look at this in the future label Aug 31, 2022
@aspiers
Copy link
Collaborator

aspiers commented Sep 14, 2022

Worth mentioning that we have a project planned within Toucan specifically for addressing this contract size issue.

@pheuberger
Copy link
Collaborator

please report back here once this is addressed within toucan, so we can turn the flag off again 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
revisit in future We should have another look at this in the future
Projects
None yet
Development

No branches or pull requests

4 participants