Skip to content

Conversation

@mp-web3
Copy link
Collaborator

@mp-web3 mp-web3 commented Oct 24, 2024

Integration tests fails due to the distance between the deployments and first deposit and wrap transactions.

  • etherfi_liquidity_pool deployment at block start_block: 17664317, first deposit of ETH and mint of eETH at stop_block: 19796002
  • "etherfi_weeth_pool" deployment at block start_block: 17664336, first wrap of eETH to weETH at stop_block: 19978024

@zizou0x zizou0x force-pushed the etherfi-adapter-and-substream branch from 816d018 to 16762a0 Compare February 11, 2025 15:47
@zizou0x zizou0x changed the title Etherfi adapter and substream Etherfi integration Feb 11, 2025
Comment on lines +412 to +418
// This test is currently broken due to a bug in runPoolBehaviour
// with constant price pools.
// function testPoolBehaviourEtherfi() public {
// bytes32[] memory poolIds = new bytes32[](1);
// poolIds[0] = bytes32(0);
// runPoolBehaviourTest(adapter, poolIds);
// }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fix this please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you updated AdapterTest.sol runPoolBehaviourTest function so that it can manage constant prices?

@@ -0,0 +1,322 @@
syntax = "proto3";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used?

expected_components:
- id: "0x308861A430be4cce5502d0A12724771Fc6DaF216" # Liquidity Pool Address
tokens:
- "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" # ETH
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use address(0) for native eth

let weeth_hex = format!("0x{}", hex::encode(WEETH_ADDRESS));
let balance_deltas = block
.logs()
// .filter(|log| log.address()) // filter out logs that are not from the pool contract
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this? do we need it or not?

.get_last(format!("pool:{}", liquidity_pool_hex))
.is_some()
{
substreams::log::info!("Liquidity Pool Deposit: +ETH {}", ev.amount);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove substreams logs, we had issues with them in prod in the past. You can use them to debug but don't commit them

- "etherfi_weeth_pool"

# A list of tests.
tests:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't run these tests, I think it's due to an archive node issue on my side. Can you confirm that they pass for you please? I'll try to fix my env and run them ASAP

- tycho/evm/v1/utils.proto
importPaths:
- ../../proto
- ./proto
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we use this?

@dobertRowneySr dobertRowneySr force-pushed the etherfi-adapter-and-substream branch from ed5e71f to 7925cd6 Compare February 19, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants