prepare_approve

Documentation for eth_defi.enzyme.erc20.prepare_approve function.

prepare_approve(enzyme, vault, generic_adapter, token, receiver, amount)[source]

Prepare an ERC-20 approve() out from the Enzyme vault.

  • Tells the Enzyme vault to move away some tokes

  • Should be blocked by GuardV0, only useable by governance

Parameters
  • enzyme (eth_defi.enzyme.deployment.EnzymeDeployment) – Enzyme deploymeent

  • vault (eth_defi.enzyme.vault.Vault) – Vault that needs to perform the swap

  • generic_adapter (web3.contract.contract.Contract) – GenericAdapter contract we use for swaps

  • token (web3.contract.contract.Contract) – ERC-20 token we send

  • receiver (Union[eth_typing.evm.HexAddress, str]) – The receiver of tokens

  • amount (int) – Token amount, raw

Returns

Transaction object that can be signed and executed

Return type

web3.contract.contract.ContractFunction