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

Cheaper MintableERC1155 Exit #81

Merged
merged 4 commits into from
Sep 17, 2021
Merged

Conversation

itzmeanjan
Copy link
Contributor

What's in ?

When exiting mintable ERC1155 ( for both single & batch ),

  • Directly mint to withdrawer & transfer unlocked ✅
  • Rather than mint to predicate & transfer all to withdrawer ❌

Following aforementioned,


For single token exit :: 62.43 % less gas consumed

Before

image

After

image


For batch token exit :: 61.24 % less gas consumed

Before

image

After

image


}

return toBeMintedAmounts;
return (toBeMintedAmounts, needTransferStep);

Choose a reason for hiding this comment

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

Return another bool flag, that indicates that there are tokens to be minted to avoid unnecessary tranferFrom

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done c956aae

@itzmeanjan itzmeanjan merged commit 3b395dc into master Sep 17, 2021
@itzmeanjan itzmeanjan deleted the cheaper-mintable-erc1155-exit branch September 17, 2021 08:10
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.

None yet

3 participants