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

Implement could-be-standard token receiver hook in account and multisig #555

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

anorth
Copy link
Member

@anorth anorth commented Aug 17, 2022

Implements a token receiver hook that always succeeds. The receivers don't deserialise parameters because they don't inspect them.

I've avoided adding a dependency on the fungible token library from runtime/shared by copying the method number, and avoiding the hook parameter type. I don't think it would be a big deal to add the dep, but it's painful while we depend on a github hash[*].

Even if the calling convention or receiver hook is not standardised, this is a reasonable way for the data cap token specifically to interact with account-type actors, and opens it up to user contracts. But hopefully this standard will be adopted.

*: We depend on a hash because no crates yet, because name will depend on FIP number, which we have't allocated yet).

Closes #538

@anorth anorth requested a review from ZenGround0 August 17, 2022 00:14
@anorth anorth force-pushed the anorth/receiverhook branch from 88a2e61 to f39374c Compare August 17, 2022 00:26
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