Skip to content

Commit

Permalink
Merge pull request casper-network#1356 from ipopescu/transfer_clarifi…
Browse files Browse the repository at this point in the history
…cation

1357 - Clarification regarding token transfers
  • Loading branch information
ipopescu authored Jan 26, 2024
2 parents d636afc + 76bd4e3 commit f98eaba
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ slug: /resources/tutorials/advanced/transfer-token-to-contract

This tutorial covers two methods to handle tokens via a contract. This is not a native process to a Casper network and will require the use of custom code. The following two scenarios provide a framework for developers and the pros and cons of each example. Developers should choose the option that best suits their individual needs.

For increased security, token transfers from a main purse must be handled via session code (WASM), as shown [here](../../developers/writing-onchain-code/writing-session-code.md#example-3-transfers-using-session-code-transfers-using-session-code). Therefore, `transfer-*` methods are unavailable in stored WASM for tokens originating from an account's main purse, even when the stored WASM runs in the account context.

## Scenario 1 - Creating a Throw-Away Purse {#scenario1}

The first scenario involves the use of a single-use, throw-away purse. The caller creates and funds a purse independent of their main purse, before passing the URef to the callee.
Expand Down

0 comments on commit f98eaba

Please sign in to comment.