Get token allowance
Get token allowance

Ethereum Virtual Machine · Reads onchain state

Reads how much of an ERC-20 token a spender may still pull from a user. The token's allowance is called for the user and spender. The result carries the token's decimals and is whatever remains of the last approval after every transfer the spender has already made against it. Reach for it to approve only when the standing allowance falls short of what a step needs, to confirm a revoke left nothing behind, or to gate a plug on a counterparty having granted the socket enough to pull.

Revoke Spending Budget

plug
evm
5actions
  1. 1·Take

    Take declares a caller-supplied parameter named token, whose value fills slot 0.0 at execution.

  2. 2·Take

    Next, a second parameter, spender_address, is collected from the caller and lands in slot 1.0.

  3. 3·Get token allowance

    Using the token from slot 0.0 and the spender from slot 1.0, this step sets that spender's ERC-20 allowance from the socket back to zero.

  4. 4·Bubble

  5. 5·Revoke approval

Take
Take
Get allowance to for
Bubble
Revoke approval to spend from
  • Revoke Spending Budget

    plug
    evm
  • Set Budget for Spender

    plug
    evm