Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@wjmelements
Copy link

@wjmelements wjmelements commented Jun 4, 2020

Changes

This saves 1 gas each time by using callvalue().
This saves hundreds of gas for mint and burn in the profiling done by the tests.

Testing

I ran the tests
Reviewers @k06a

@wjmelements wjmelements changed the title returndatasize CALLVALUE is 0 Jun 4, 2020
@wjmelements wjmelements mentioned this pull request Jun 4, 2020
pop(create2(0, 0, 30, add(offset, 26))) pop(create2(0, 0, 30, add(offset, 27)))
pop(create2(0, 0, 30, add(offset, 28))) pop(create2(0, 0, 30, add(offset, 29)))
pop(create2(0, 0, 30, add(offset, 30))) pop(create2(0, 0, 30, add(offset, 31)))
pop(create2(callvalue(), callvalue(), 30, add(offset, callvalue()))) pop(create2(callvalue(), callvalue(), 30, add(offset, 1)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding zero is not necessary 😁

Copy link
Author

Choose a reason for hiding this comment

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

done

@k06a k06a changed the title CALLVALUE is 0 CALLVALUE is a better 0 than just 0 Jun 5, 2020
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