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

Document contract callback technique #152

Merged
merged 6 commits into from
Dec 8, 2020
Merged

Conversation

ethanfrey
Copy link
Member

@ethanfrey ethanfrey commented Dec 4, 2020

Closes #98

Documents some other patterns as well.

Wait until #156 is merged (based on that). TODO:

@ethanfrey ethanfrey added this to the v0.4.0 milestone Dec 4, 2020
@ethanfrey ethanfrey marked this pull request as ready for review December 4, 2020 12:02
Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

Important and good pattern list. Well done 👍

protected function on our own contract `_BondAllTokens`.
At the beginning of `_BondAllTokens`, we ensure this is
[called by our own contract](https://github.com/CosmWasm/cosmwasm-plus/blob/master/contracts/cw20-staking/src/contract.rs#L408-L410)
to keep this a private callback and not a public entry point.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 very important

PATTERNS.md Outdated Show resolved Hide resolved
PATTERNS.md Outdated Show resolved Hide resolved
PATTERNS.md Outdated Show resolved Hide resolved
PATTERNS.md Outdated Show resolved Hide resolved
@ethanfrey ethanfrey force-pushed the document-contract-callbacks branch from 7bc7e9f to c959cdc Compare December 4, 2020 21:53
@ethanfrey ethanfrey changed the base branch from master to add-cw4-hooks December 4, 2020 21:57
Base automatically changed from add-cw4-hooks to master December 6, 2020 21:07
@ethanfrey ethanfrey force-pushed the document-contract-callbacks branch from c959cdc to af4fa8d Compare December 8, 2020 17:52
@ethanfrey ethanfrey merged commit 1322adb into master Dec 8, 2020
@ethanfrey ethanfrey deleted the document-contract-callbacks branch December 8, 2020 17:58
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.

Define message callback as cw spec
2 participants