Skip to content

Transfer to Beneficiary ​

A leaf action that pays a beneficiary, the recipient selected by the caller through node data. It sends the whole allocation and declares zero output.

  • Check: the beneficiary's balance rose by at least the amount. This catches tokens that return false instead of reverting. As with Transfer, tokens that reduce the amount received can fail this receipt check.
  • Who picks the address: the caller. Use it only where the caller may direct the funds: under a MerkleClaimBudget (only the claiming account can trigger) or on a flow whose trigger is restricted. On a flow anyone can trigger with a stream or balance budget, anyone could pay themselves.

Trigger data ​

The recipient is encoded at the action's node index in the trigger data. Here plugin is the installed CapitalTreePlugin, nodeCount is its node-array length, and budgetData is the selected budget's input:

solidity
bytes[] memory nodeData = new bytes[](nodeCount);
nodeData[beneficiaryNodeIndex] = abi.encode(beneficiary);
plugin.trigger(budgetData, nodeData);

Here beneficiary is a nonzero address and the array has one entry per node. Call from the entitled account for a Merkle flow; changing the recipient does not change which account must prove entitlement. The action rejects missing or malformed recipient data.

See also ​