refactor(curve): Update testing suite and remove metapools factories (#109)

* chore(lib): update testing suite with new naming

* refactor(curve): remove metapool

These pools aren't compatible yet due to how they are created (first the lp token and then later the pool). We will need DCI to handle this properly.

* chore(lib): use correct package name for tycho-simulation

---------

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
This commit is contained in:
Zizou
2024-11-07 06:05:37 +01:00
committed by GitHub
parent 723f4678bf
commit aca3bc4f71
6 changed files with 298 additions and 292 deletions

View File

@@ -130,28 +130,28 @@ tests:
base_pool: "0x307861353538386637636466353630383131373130613264383264336339633939373639646231646362" # 0xa5588f7cdf560811710a2d82d3c9c99769db1dcb
factory: "0x307836613863626564373536383034623136653035653734316564616264356362353434616532316266" # 0x6a8cbed756804b16e05e741edabd5cb544ae21bf
creation_tx: "0x3cfeecae1b43086ee5705f89b803e21eb0492d7d5db06c229586db8fc72f5665"
skip_simulation: true # Reason: this pool use a base pool which is also one of its tokens, therefore our token override doesn't work here and it fails on transfers
skip_simulation: false
# Metapool factory 0xB9fC157394Af804a3578134A6585C0dc9cc990d4 - MetaPool
- name: test_metapool_factory_metapool
start_block: 18028604
stop_block: 18029610
initialized_accounts:
- "0xdcef968d416a41cdac0ed8702fac8128a64241a2"
- "0xc4ad29ba4b3c580e6d59105fff484999997675ff" # Needed by another component that is created within this block range
expected_components:
- id: "0x61fA2c947e523F9ABfb8d7e2903A5D5218C119a7"
tokens:
- "0x6c3ea9036406852006290770BEdFcAbA0e23A0e8"
- "0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC"
static_attributes:
name: "0x50415950414c465241584250" # PAYPALFRAXBP
factory_name: "0x6d6574615f706f6f6c5f666163746f7279" # meta_pool_factory
base_pool: "0x307864636566393638643431366134316364616330656438373032666163383132386136343234316132" # 0xdcfe968d416ac0ed8702fac8128a64241a2
factory: "0x307862396663313537333934616638303461333537383133346136353835633064633963633939306434" # 0xb9fc157394af804a3578134a6585c0dcc993099d
pool_type: "0x6d657461706f6f6c" # metapool
creation_tx: "0xc9c6b879cbb19f7f26405335c3879c350592d530956878ff172e9efad786c63f"
skip_simulation: true # Reason: this pool calls `totalSupply()` on the LP token during simulation. But this token is overridden and doesn't have anything for totalSupply
# # Metapool factory 0xB9fC157394Af804a3578134A6585C0dc9cc990d4 - MetaPool
# - name: test_metapool_factory_metapool
# start_block: 18028604
# stop_block: 18029610
# initialized_accounts:
# - "0xdcef968d416a41cdac0ed8702fac8128a64241a2"
# - "0xc4ad29ba4b3c580e6d59105fff484999997675ff" # Needed by another component that is created within this block range
# expected_components:
# - id: "0x61fA2c947e523F9ABfb8d7e2903A5D5218C119a7"
# tokens:
# - "0x6c3ea9036406852006290770BEdFcAbA0e23A0e8"
# - "0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC"
# static_attributes:
# name: "0x50415950414c465241584250" # PAYPALFRAXBP
# factory_name: "0x6d6574615f706f6f6c5f666163746f7279" # meta_pool_factory
# base_pool: "0x307864636566393638643431366134316364616330656438373032666163383132386136343234316132" # 0xdcfe968d416ac0ed8702fac8128a64241a2
# factory: "0x307862396663313537333934616638303461333537383133346136353835633064633963633939306434" # 0xb9fc157394af804a3578134a6585c0dcc993099d
# pool_type: "0x6d657461706f6f6c" # metapool
# creation_tx: "0xc9c6b879cbb19f7f26405335c3879c350592d530956878ff172e9efad786c63f"
# skip_simulation: true # Reason: this pool calls `totalSupply()` on the LP token during simulation. But this token is overridden and doesn't have anything for totalSupply
# Metapool factory 0xB9fC157394Af804a3578134A6585C0dc9cc990d4 - PlainPool
- name: test_metapool_factory_plainpool
@@ -294,23 +294,23 @@ tests:
# - name: test_stableswap_factory_meta_pool
# There was no metapool created from this factory yet.
# https://etherscan.io/address/0x4F8846Ae9380B90d2E71D5e3D042dff3E7ebb40d#events search events with topic 0x01f31cd2abdeb4e5e10ba500f2db0f937d9e8c735ab04681925441b4ea37eda5.
# related event is MetaPoolDeployed(address,address,uint256,uint256,address)
# related event is MetaPoolDeployed(address,address,uint256,uint256,address).
- name: test_metapool_factory_old
start_block: 11968730
stop_block: 12028110
initialized_accounts:
- "0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7" # Linked pool of this metapool
expected_components:
- id: "0xd632f22692FaC7611d2AA1C0D552930D43CAEd3B"
tokens:
- "0x853d955aCEf822Db058eb8505911ED77F175b99e"
- "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490"
static_attributes:
factory_name: "0x6d6574615f706f6f6c5f666163746f72795f6f6c64" # meta_pool_factory_old
base_pool: "0x307862656263343437383263376462306131613630636236666539376430623438333033326666316337" # 0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7
factory: "0x307830393539313538623630343064333264303463333031613732636266643662333965323163396165" # 0x0959158b6040d32d04c301a72cbfd6b39e21c9ae
pool_type: "0x6d657461706f6f6c" # metapool
name: "0x46726178" # Frax
creation_tx: "0x1f2a0d4e1c1eca594bd7f27f9952480ccda422c3453e0c5074a63aa46a2ed628"
skip_simulation: true # Reason: this pool calls `totalSupply()` on the LP token during simulation. But this token is overridden and doesn't have anything for totalSupply
# - name: test_metapool_factory_old
# start_block: 11968730
# stop_block: 12028110
# initialized_accounts:
# - "0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7" # Linked pool of this metapool
# expected_components:
# - id: "0xd632f22692FaC7611d2AA1C0D552930D43CAEd3B"
# tokens:
# - "0x853d955aCEf822Db058eb8505911ED77F175b99e"
# - "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490"
# static_attributes:
# factory_name: "0x6d6574615f706f6f6c5f666163746f72795f6f6c64" # meta_pool_factory_old
# base_pool: "0x307862656263343437383263376462306131613630636236666539376430623438333033326666316337" # 0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7
# factory: "0x307830393539313538623630343064333264303463333031613732636266643662333965323163396165" # 0x0959158b6040d32d04c301a72cbfd6b39e21c9ae
# pool_type: "0x6d657461706f6f6c" # metapool
# name: "0x46726178" # Frax
# creation_tx: "0x1f2a0d4e1c1eca594bd7f27f9952480ccda422c3453e0c5074a63aa46a2ed628"
# skip_simulation: true # Reason: this pool calls `totalSupply()` on the LP token during simulation. But this token is overridden and doesn't have anything for totalSupply