
Plug · Acts onchain
Surfaces a value as an output of this plug. The value is echoed into a dedicated slot and declared as the program's return: what a caller composing this plug through Use reads back. It is the inverse of Take. Reach for it to return a computed amount, a position id, or a boolean from a reusable plug, so the plug that uses it can coil the result into its own next step.
Get Chainlink Token Value (USD)


1·Take
Step one declares a parameter named token, whose value the caller supplies when the plug runs.
2·Take
Next comes a second parameter named amount, also filled in by the caller at execution time.
3·Use
This step composes another plug, Get Chainlink Price (USD), pulling its price result into this transaction.
4·Calculate
Multiplying the composed price from slot 3 by the caller supplied amount from slot 2 produces the total value.
5·Bubble
Finally the product from slot 3 of the math step is surfaced as this plug's output.