-
Notifications
You must be signed in to change notification settings - Fork 263
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
Custom ERC1155Predicate with generic ChainExit event #77
Conversation
73b8a7e
to
966451e
Compare
966451e
to
728dd21
Compare
Hello. I think a small change which makes this new event even more useful & generic would be to modify the types of 2 of the |
This is WIP. Thanks. |
This is attached in PR. |
a108732
to
b722eb6
Compare
IMintableERC1155 token = IMintableERC1155(rootToken); | ||
|
||
uint256[] memory balances = token.balanceOfBatch(makeArrayWithAddress(address(this), ids.length), ids); | ||
uint256[] memory toBeMinted = calculateAmountsToBeMinted(balances, amounts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return bool flag if there is any token that should be minted, to avoid the unnecessary call to external contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can return a second bool flag, that indicates that tokens are only minted to avoid unnecessary transferFrom
entirely in some cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done : 404745e
There are other artifacts that are committed, like MintableERC115Predicate, let's files only for the ChainExit predicate. |
Done : 16b832a |
Hi there, What's the state of this PR ? It is still required for Sandbox Thanks! |
Deployment in progress, I'm merging it. |
What's new ?
Custom ERC1155Predicate with ChainExit event based on description : https://github.com/thesandboxgame/sandbox-smart-contracts/blob/doc/matic-predicate/documentation/drafts/matic/chain_exit_erc1155_predicate.md