-
Notifications
You must be signed in to change notification settings - Fork 1
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
Decode execution code #57
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
tplocic20
approved these changes
Feb 27, 2024
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.
Looking good
tplocic20
requested review from
bowd,
bayological,
denviljclarke and
AnnaJ-P11
February 27, 2024 15:55
baroooo
reviewed
Feb 28, 2024
baroooo
approved these changes
Feb 28, 2024
celo explorer only has a graphql api so we need to add an additional endpoint to our graphql setup that is separate from our mento subgraph on the graph
if a calldata target is verified on celo explorer, pull name + abi and decode the calldata. if not, show raw calldata
we need it in the codegen config where nextjs auto-loading of .env files is not available
i feel obligated to say that i was very surprised to read that nextjs explicitly says to check .env in to version control which i find highly unusual but that's the way they want it: https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#default-environment-variables
this will dynamically load the righ celo explorer api url depending on the current chain id
chapati23
force-pushed
the
feat/decode-execution-code
branch
from
February 28, 2024 16:39
a51d055
to
29768ec
Compare
AnnaJ-P11
approved these changes
Feb 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before
After
Description
I added an integration with the Celo Explorer GraphQL API to fetch contract names & abis on the Execution Code component to show users in more human-readable form what a proposal will actually do.
Unfortunately Apollo makes it a bit difficult to have more than 1 GraphQL endpoint so I needed to change the project set up a bit to allow querying different GraphQL endpoints.
Basically, there's a new context parameter
apiName
that can be passed touseQuery
oruseSuspenseQuery
that can decided which GraphQL endpoint a query will be executed against. For example:How to test