-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transfer-contract: add
transfer_to_contract
function
The `transfer_to_contract` function can be called by a sender contract to transfer Dusk to a receiver contract. Once called, a function specified by the sender is called on the receiver contract to inform it of the sender's ID and the amount of Dusk sent. The receiver can choose to accept the transfer, by successfully concluding the execution of the function called to inform it, or it can panic and effectively reject the transfer. The `TransferToContract` is used as an argument to the `transfer_to_contract`, and is constructed by the contract calling it. `ReceiveFromContract` is the ata the receiver contract *must* accept for a function to be able to successfully receive funds from another contract. If a contract wished to expose one or more of these functions, it is heavily recommended that they panic if called by anyone else apart from the transfer contract.
- Loading branch information
Eduardo Leegwater Simões
committed
Sep 4, 2024
1 parent
ea0ada5
commit 452c019
Showing
3 changed files
with
208 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters