This plug sells sellToken through a solver and requires the buyToken balance held by account to reach the pre-routing balance plus minReceive before settling. It asks the caller for account, sellAmount, sellToken, buyToken, and minReceive. It fires whenever the caller runs it, transferring sellAmount to the solver and reverting if routing returns less than the floor. Running this by hand or against a stale quote risks accepting an output below the minReceive floor and losing the difference.
Actions · 11
Getbalanceofheldby
Reads a token balance held by an address, native or ERC-20.
Get
Holds an address as a named value that later steps reference.
Transferto
Sends a token from the socket to another address, native or ERC-20.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Getsolution
Hands tokens already transferred to the solver over for routing, then verifies the outcome.
Getbalanceofheldby
Reads a token balance held by an address, native or ERC-20.
Is
Compares two values with a chosen operator and returns a boolean.
Steers control flow by comparing two values: branch, loop, or require the condition holds.
Endblock
Closes the innermost open block, whether a conditional branch or a loop.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Bubble
Surfaces a value as an output of this plug.
Related plugs · 8
Not ready to run as it stands: it waits on values or a position of your own.