-
Notifications
You must be signed in to change notification settings - Fork 931
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
[Feature] Declarative Calls Feedback #5445
Comments
I've been playing a bit with declarative eth_calls too, and while doing so I also got into a similar situation, not entirely the same, but close. Due to the limitations on what you can declare (only event.address or event.params.), I couldn't get my refactor to work, since the value I want to use for the contract address part isn't in the event.address or the params, but rather as either a field in a particular entity at that moment in time, or (by doing some workarounds) as a hardcoded value). I'm thinking it's virtually the same issue described here in the first bullet point, even if the value to be used isn't really a response from a previous contract, but rather a hardcoded value/value from an already existing entity. |
Thanks both this is great feedback. |
It's already possible to have multiple calls on the same event handler. Just give it different labels, and that works; something like calls:
totalsBasicLiquidator: Comet[event.address].totalsBasic(event.params.liquidator)
totalsBasicBorrower: Comet[event.address].totalsBasic(event.params.borrower) The things that are not supported yet are:
|
An example of why we would want to have either hardcoded values or dynamic values would be this one Currently, you can't do declarative calls if it happens to have any of those two cases unfortunately (the core network subgraph's most used eth_call is the first example |
Description
I spent some time trying to add declarative calls (#5264) to messari's compound v3 subgraph as it uses a lot of
eth_call
s. I wasn't able to fully test any of this yet due to this blocker (#5444), however I had some feedback or requests for use cases that showed up when I was working to cut over the subgraph to use declarative calls.eth_call
as input for anothereth_call
, here is a real example:Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.
#5444
Some information to help us out
The text was updated successfully, but these errors were encountered: