delvtech / agent0

Analysis & simulation repo for Delv
https://agent0.readthedocs.io/en/latest/
Apache License 2.0
52 stars 21 forks source link

Transformers: (py) trade_details --> abi_call #397

Closed dpaiton closed 1 year ago

wakamex commented 1 year ago

atomic level functions that anyone can call for arbitrary use.

here we use trade details tailored to evm_bots, which could be generalized for this purpose: https://github.com/delvtech/elf-simulations/blob/9b7c228b00a604f8abc4310d0fc7c9915d4902c7/elfpy/utils/apeworx_integrations.py#LL614C9-L614C9

next steps:

  1. seprate out logic in a general form
  2. write tests
  3. put it in a specific ape_transformers library
wakamex commented 1 year ago

committed example here, but tests not passing yet (ran out of time) https://github.com/delvtech/elf-simulations/commit/f15a96258ab208f8c53c5b2135d29f8a62ab468d

dpaiton commented 1 year ago

https://github.com/delvtech/elf-simulations/blob/7ae64e72dce71a9155b02530c31fcb17e158d4ab/examples/eth_bots/execute_agent_trades.py#L194