Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

try switching to structs #6

Merged
merged 2 commits into from
Aug 2, 2023
Merged

try switching to structs #6

merged 2 commits into from
Aug 2, 2023

Conversation

iainnash
Copy link
Contributor

@iainnash iainnash commented Aug 2, 2023

  1. Removes stack too deep error with coverage
  2. Saves contract size
  3. Makes return types in ABI easier to read (less confusing since they can be named).
Compiler run successful!
| Contract                | Size (kB) | Margin (kB) |
|-------------------------|-----------|-------------|
| Address                 | 0.058     | 24.518      |
| ECDSA                   | 0.058     | 24.518      |
| ERC1155                 | 5.423     | 19.153      |
| ERC1155RewardsStorageV1 | 0.184     | 24.392      |
| ERC721                  | 5.011     | 19.565      |
| Math                    | 0.058     | 24.518      |
| MockERC1155             | 8.239     | 16.337      |
| MockERC721              | 8.478     | 16.098      |
| ProtocolRewards         | 4.511     | 20.065      |
| ShortStrings            | 0.058     | 24.518      |
| SignedMath              | 0.058     | 24.518      |
| StdInvariant            | 3.679     | 20.897      |
| StdStyle                | 0.058     | 24.518      |
| StorageSlot             | 0.058     | 24.518      |
| Strings                 | 0.058     | 24.518      |
| console                 | 0.058     | 24.518      |
| console2                | 0.058     | 24.518      |
| stdError                | 1.348     | 23.228      |
| stdJson                 | 0.058     | 24.518      |
| stdMath                 | 0.058     | 24.518      |
| stdStorage              | 0.058     | 24.518      |
| stdStorageSafe          | 0.058     | 24.518      |

=== AFTER DIFF ====


> forge build --sizes
[⠆] Compiling...
[⠒] Compiling 7 files with 0.8.17
[⠑] Solc 0.8.17 finished in 16.90s
Compiler run successful!
| Contract                | Size (kB) | Margin (kB) |
|-------------------------|-----------|-------------|
| Address                 | 0.058     | 24.518      |
| ECDSA                   | 0.058     | 24.518      |
| ERC1155                 | 5.423     | 19.153      |
| ERC1155RewardsStorageV1 | 0.184     | 24.392      |
| ERC721                  | 5.011     | 19.565      |
| Math                    | 0.058     | 24.518      |
| MockERC1155             | 8.041     | 16.535      |
| MockERC721              | 8.283     | 16.293      |
| ProtocolRewards         | 4.511     | 20.065      |
| ShortStrings            | 0.058     | 24.518      |
| SignedMath              | 0.058     | 24.518      |
| StdInvariant            | 3.679     | 20.897      |
| StdStyle                | 0.058     | 24.518      |
| StorageSlot             | 0.058     | 24.518      |
| Strings                 | 0.058     | 24.518      |
| console                 | 0.058     | 24.518      |
| console2                | 0.058     | 24.518      |
| stdError                | 1.348     | 23.228      |
| stdJson                 | 0.058     | 24.518      |
| stdMath                 | 0.058     | 24.518      |
| stdStorage              | 0.058     | 24.518      |
| stdStorageSafe          | 0.058     | 24.518      |

@kulkarohan kulkarohan merged commit 2080ba5 into main Aug 2, 2023
2 checks passed
@kulkarohan kulkarohan deleted the switch_to_structs_test branch August 2, 2023 15:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants