approve_tokens#

API documentation for tradeexecutor.ethereum.execution.approve_tokens Python function.

approve_tokens(web3, deployment, hot_wallet, instructions)[source]#

Approve multiple ERC-20 token allowances for the trades needed.

Each token is approved only once. E.g. if you have 4 trades using USDC, you will get 1 USDC approval.

Parameters:
  • web3 (Web3) –

  • deployment (UniswapV2Deployment) –

  • hot_wallet (HotWallet) –

  • instructions (List[TradeExecution]) –

Return type:

List[SignedTransaction]