Transfer
Use Transfer for a fixed recipient, such as a fee destination. The DAO.sol contract sends this branch's full allocation to that address, completing the leaf. For a caller-selected recipient, use Transfer to Beneficiary.
- Check: the recipient's balance rose by at least the amount. This catches tokens that return
falseinstead of reverting. Tokens that deduct a transfer fee or reduce balances during the transfer can fail this receipt check. - Recipient: set at initialization, with no setter. Changing it means a new flow (
setFlow).
Configuration
Encode the recipient in the action declaration. This is a recipe-building excerpt; node is a Setup.RecipeNode:
solidity
node.action.id = bytes32("TransferAction@1");
node.action.settings = abi.encode(recipient); // recipient is an addressThe action builds the transfer using the node's allocated token and amount, and checks the recipient's balance afterward. See the action lifecycle.