-
Notifications
You must be signed in to change notification settings - Fork 0
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
Reproduce Jesse's original subgraph #1
Conversation
Source: Jesse-Sawa#1 I'm applying all changes made in this PR "v3-subgraph for celo changes #1" (Jesse-Sawa#1).
Source: Jesse-Sawa#1 I'm applying all changes made in this PR "v3-subgraph for celo changes Uniswap#1" (Jesse-Sawa#1).
Source: Jesse-Sawa#1 I'm applying all changes made in this PR "v3-subgraph for celo changes #1".
Source: Jesse-Sawa#1 I'm applying all changes made in this PR "v3-subgraph for celo changes Uniswap#1" (Jesse-Sawa#1).
Source: Jesse-Sawa#1 I'm applying all changes made in this PR "v3-subgraph for celo changes Uniswap#1" (Jesse-Sawa#1). In this commit, I had to modify the original diff from Jesse a little, because the source code has changed slightly since he made the change.
Source: Jesse-Sawa#1 I'm applying all changes made in this PR "v3-subgraph for celo changes
f46ba64
to
f298136
Compare
I'd like to test this subgraph in a local deployment before it gets merged. |
Asked if @Data-Nexus could give this PR a quick look since he worked on various Uniswap v3 related PRs in the upstream repo. For example: That PR changes code that is touched upon in this PR like |
To test the subgraph, I'll use these commands: Install dependencies: $ yarn install Generate types for GraphQL schema: $ yarn run codegen Build the subgraph: $ yarn run build Set the access token secret:
Deploy the subgraph: $ yarn run deploy-celo I'm waiting for @jcortejoso to look into key and account setup to deploy a test subgraph. |
I'm following these instructions to generate an |
Installing graph CLI: $ yarn global add @graphprotocol/graph-cli Authenticating: $ graph auth --product hosted-service <ACCESS_TOKEN>
|
@jcortejoso Looks like it should be possible to create the subgraph we'll use in production as
|
@jcortejoso has been testing automatic subgraph deployment to the hosted service from GitHub Actions: https://github.com/celo-org/v3-subgraph/actions/runs/8537277015/job/23387505490 🥳 |
Registered a test subgraph to which I'll deploy from this branch: |
Test deployment to $ cd v3-subgraph
$ yarn
$ yarn run codegen
$ yarn run build
$ graph auth --product hosted-service <ACCESS_TOKEN> # replace with your token
$ graph deploy --product hosted-service arthurgousset/uniswap
# ...
Build completed: QmXKPZVYLCZ24HP5cXS1KuPECCJP9jmddtk1g174bJCGZU
Deployed to https://thegraph.com/explorer/subgraph/arthurgousset/uniswap
Subgraph endpoints:
Queries (HTTP): https://api.thegraph.com/subgraphs/name/arthurgousset/uniswap |
Now thinking about how we can test our subgraphs work with local builds of Uniswap. |
Re updating subgraphs while testing:
Source: Redeploying a Subgraph |
Looks like we can test smart order routing with:
Source: Uniswap/smart-order-router |
Original bugTrying to test the interface works with the new subgraph. For that I'm trying to build and serve the interface from celo-org/uniswap-interface. I'm running into an error when installing dependencies: ## I'm in the root directory of the repo
$ pwd
/Users/arthur/Documents/celo-org/uniswap-interface
$ yarn
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 362ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 712ms
➤ YN0000: ┌ Link step
➤ YN0007: │ universe@workspace:. must be built because it never has been before or the last one failed
➤ YN0007: │ postinstall-postinstall@npm:2.1.0 must be built because it never has been before or the last one failed
➤ YN0009: │ universe@workspace:. couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/9r/vpr7vg4j72s81zzgxxdwtszc0000gp/T/xfs-5c2adfc7/build.log)
➤ YN0009: │ postinstall-postinstall@npm:2.1.0 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/9r/vpr7vg4j72s81zzgxxdwtszc0000gp/T/xfs-9676c2ef/build.log)
➤ YN0000: └ Completed in 16s 898ms
➤ YN0000: Failed with errors in 18s 105ms The
Looks like somehow a file is missing:
Reproducing the bug: $ yarn web ajv
node:internal/fs/utils:347
throw err;
^
Error: ENOENT: no such file or directory, open '/Users/arthur/Documents/celo-org/uniswap-interface/apps/web/src/utils/__generated__/validateTokenList.js'
at Object.openSync (node:fs:601:3)
at Object.writeFileSync (node:fs:2249:35)
at Object.<anonymous> (/Users/arthur/Documents/celo-org/uniswap-interface/apps/web/scripts/compile-ajv-validators.js:14:4)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/Users/arthur/Documents/celo-org/uniswap-interface/apps/web/src/utils/__generated__/validateTokenList.js'
}
Node.js v18.16.1 Edit: Fixed bug ✅This is a known issue: Workaround:
$ mkdir apps/web/src/utils/__generated__
A fix in the upstream repo is proposed in this PR: Context for fix:
Source: Uniswap/interface#7631 (comment) |
Asked for help (on Slack) from the Uniswap team to test the subgraph. |
@nicolasbrugneaux confirmed he has the same build issue when trying to serve the uniswap interface locally in this PR: |
Putting this on hold until I get an owner on the Uniswap side that can help me test this. |
Looks like part of the changes reproduced here are covered by this draft PR by @mzywang: |
Source: celo-org/uniswap-v3-info#1 (comment) On that basis, I'll close this PRs, since all work streams here are and will be owned by Uniswap. |
Description
This is step 1 of 2:
I'll open a separate PR to add new tokens to the whitelist.
Changes
I'm applying all changes made in this PR:
to this repo.
Other changes
None
Testing
I haven't tested the subgraph configured in this PR yet. I'll do that and document how I tested it before this PR gets merged.
Docs
None