-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: main
Are you sure you want to change the base?
Conversation
…, sell function, and buy function
…iceAt, and optimizations
…tions and minor fixes
…cor-adapter-and-substream
There was a problem hiding this 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
@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) |
Use the erc20 transfer utility in bancor to parse balance deltas from txs
@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