approve

Documentation for eth_defi.one_delta.position.approve function.

approve(one_delta_deployment, *, collateral_token, borrow_token, atoken, vtoken, aave_v3_deployment, collateral_amount=115792089237316195423570985008687907853269984665640564039457584007913129639935, borrow_amount=115792089237316195423570985008687907853269984665640564039457584007913129639935, atoken_amount=115792089237316195423570985008687907853269984665640564039457584007913129639935, vtoken_amount=115792089237316195423570985008687907853269984665640564039457584007913129639935)[source]

Approve all the tokens needed for the position.

Parameters
  • one_delta_deployment (eth_defi.one_delta.deployment.OneDeltaDeployment) – 1delta deployment

  • collateral_token (web3.contract.contract.Contract) – collateral token contract proxy

  • borrow_token (web3.contract.contract.Contract) – borrow token contract proxy

  • atoken (web3.contract.contract.Contract) – aToken contract proxy

  • vtoken (web3.contract.contract.Contract) – vToken contract proxy

  • collateral_amount (int) – amount of collateral to be approved

  • borrow_amount (int) – amount of borrow token to be approved

  • atoken_amount (int) – amount of aToken to be approved

  • vtoken_amount (int) – amount of vToken to be approved

  • aave_v3_deployment (eth_defi.aave_v3.deployment.AaveV3Deployment) – Aave V3 deployment

Returns

list of approval functions

Return type

list[web3.contract.contract.ContractFunction]