


Acts onchain
Sends a token from the socket to another address, native or ERC-20. The native token address sends ETH by value; any other address calls the token's transfer. To send the full balance, read the socket's balance of the token earlier in the plug and coil it in as the amount. Reach for it to pay out proceeds after a swap or withdrawal, to fund another account from a scheduled plug, or to move a balance read earlier in the transaction by coiling that exact amount.
Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.
Send Token



1·Take
Take opens by declaring token as a caller parameter, naming the asset this run reads and sends at execution time.
2·Get token balance
Using that token, the balance held by Your Wallet is read, capturing the holding on hand before any transfer.
3·Bubble
Surfacing that measured balance as an output of this plug hands the pre-transfer holding back to the caller.
4·Get token balance
Reading the token balance held by Your Wallet a second time captures the holding at this point in the flow.
5·Bubble
That second balance reading is surfaced as an output of this plug, returning the figure to the caller.
6·Take
Next, amount is declared as a caller parameter, sizing how much of the token the transfer moves.
7·Take
Following that, recipient is declared as a caller parameter, naming the address that receives the token.
8·Take
Also taken is frequency, a caller parameter supplying the interval the rate limit below uses.
9·Repeat
Capping cadence, this rate limit permits at most one run every frequency, so the schedule advances no more than once per that interval.
10·Transfer tokens
On each run, amount of the token is transferred to recipient, sending the asset from the socket to that address.
Posts · 4
More on Ethereum Virtual Machine · 11