Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bancor Adapter and Substream #112

Open
wants to merge 77 commits into
base: main
Choose a base branch
from

Conversation

domenicodev
Copy link
Collaborator

@domenicodev domenicodev commented Nov 18, 2024

@zizou0x @kayibal
I can't spot what the problem is with the creation, as it gives this error with tycho:
Cannot find account with id: "..." where the ID is indeed the master vault address

Do you have any suggestions regarding this and, please, could you have a look?

I have tried with many different approaches, including the check by tx hash, but unfortunately it didn't help.

While testing via substreams gui, I am able to find the created component at that block and that tx with the given address, so I am sure the component is created.

--- EDIT:
The problem seems to be in extractor instance;
If component ID would not be found, runner.py would have failed with:
if comp_id not in components_by_id:
return TestResult.Failed(
f"'{comp_id}' not found in protocol components. "
f"Available components: {set(components_by_id.keys())}"
)

--- EDIT 2:
I also enabled skip_simulation flag to make sure the error was not related to a swap, feel free to re-enable it if necessary

mp-web3 and others added 30 commits March 4, 2024 12:00
Copy link
Collaborator

@zizou0x zizou0x left a comment

Choose a reason for hiding this comment

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

Looks good so far, I think we can simplify a lot by using the tycho-substreams SDK crate

substreams/ethereum-bancor/proto/contract.proto Outdated Show resolved Hide resolved
substreams/ethereum-bancor/src/erc20_transfer.rs Outdated Show resolved Hide resolved
substreams/ethereum-bancor/src/modules.rs Outdated Show resolved Hide resolved
substreams/ethereum-bancor/src/modules.rs Outdated Show resolved Hide resolved
substreams/ethereum-bancor/src/modules.rs Outdated Show resolved Hide resolved
substreams/ethereum-bancor/src/pb/mod.rs Outdated Show resolved Hide resolved
@domenicodev
Copy link
Collaborator Author

@zizou0x I would like to suggest you also to use my logic to track ETH transfers in some global tycho file, along with extract_balance_deltas_from_tx (after applying the eventObject.at(index) logic instead of eventObject.field)

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