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

feat(tokens-received-whitelisting): <- adds logic for that #68

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

gskapka
Copy link
Collaborator

@gskapka gskapka commented Dec 16, 2022

NOTE: A smart-contract which is registered as an ERC777 token recipient but is not whitelisted in this pToken contract will have not have its tokensReceivedHook called, however mints & transfers will succeed.

NOTE: A smart-contract that is whitelisted for having it's tokensReceived hook called in this pToken contract, but which is not registered as an ERC777 recipient, will not have the hook called, whether present or not, however transfers & mints will succeed.

NOTE: A smart-contract that is whitelisted for having its tokensReceived hook called and is registered as an ERC777 token recipient, but which does not implement the tokensReceived function will not be able to receive the pTokens, either by mints or transfers, because the hook function calls will revert since it doesn't exist.

The various permutations of the above cases are tested in ./test/tokens-received-whitelist.test.js.

Copy link
Collaborator

@allemanfredi allemanfredi left a comment

Choose a reason for hiding this comment

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

LGTM! Just one mini question!

contracts/pToken.sol Outdated Show resolved Hide resolved
contracts/pToken.sol Outdated Show resolved Hide resolved
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.

2 participants