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

Clean up string handling (and drop openzeppelin dependency) #40

Merged
merged 5 commits into from
Oct 21, 2022

Conversation

axic
Copy link
Member

@axic axic commented Oct 9, 2022

No description provided.

@axic axic force-pushed the strings branch 2 times, most recently from de11ec2 to c9a0bee Compare October 9, 2022 23:05
@leonardoalt
Copy link
Collaborator

GAS BEFORE

[PASS] testAddChallengeNonAdmin() (gas: 16978)
[PASS] testAddExistingChallengeNonAdmin() (gas: 44299)
[PASS] testAddSumChallenge() (gas: 36976)
[PASS] testDupAddSumChallenge() (gas: 45203)
[PASS] testNonExistentChallenge() (gas: 49412)
Test result: ok. 5 passed; 0 failed; finished in 2.52ms

Running 6 tests for test/OptimizorNFT.t.sol:OptimizorTest
[PASS] testCheapExpensiveSqrt() (gas: 1322967)
[PASS] testCheapExpensiveSum() (gas: 408192)
[PASS] testCheapSqrt() (gas: 344651)
[PASS] testCheapSum() (gas: 201418)
[PASS] testExpensiveSqrt() (gas: 605499)
[PASS] testExpensiveSum() (gas: 219794)

@leonardoalt
Copy link
Collaborator

NEW GAS

[PASS] testAddChallengeNonAdmin() (gas: 16978)
[PASS] testAddExistingChallengeNonAdmin() (gas: 44299)
[PASS] testAddSumChallenge() (gas: 36976)
[PASS] testDupAddSumChallenge() (gas: 45203)
[PASS] testNonExistentChallenge() (gas: 49412)
Test result: ok. 5 passed; 0 failed; finished in 3.26ms

Running 6 tests for test/OptimizorNFT.t.sol:OptimizorTest
[PASS] testCheapExpensiveSqrt() (gas: 1322967)
[PASS] testCheapExpensiveSum() (gas: 408192)
[PASS] testCheapSqrt() (gas: 344651)
[PASS] testCheapSum() (gas: 201418)
[PASS] testExpensiveSqrt() (gas: 605499)
[PASS] testExpensiveSum() (gas: 219794)

[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
url = https://github.com/axic/solmate
Copy link
Collaborator

Choose a reason for hiding this comment

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

wut? you maintain a solmate as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Solmate's toString() had some bugs related to memory management. Showed up in art-gobblers. So you should probably update this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

He made the fork today just to test this, and it looks like solmate already fixed it I think

Copy link
Member Author

Choose a reason for hiding this comment

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

@axic
Copy link
Member Author

axic commented Oct 10, 2022

Do not merge yet.

@leonardoalt
Copy link
Collaborator

Do not merge yet.

😱 😱 😱 😱 😱 😱

@leonardoalt leonardoalt merged commit 90869be into main Oct 21, 2022
@leonardoalt leonardoalt deleted the strings branch October 21, 2022 18:39
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