-
Notifications
You must be signed in to change notification settings - Fork 4
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
Acre subgraph #280
Acre subgraph #280
Conversation
Added subgraph initialization for AcreBitcoinDepositor on Sepolia Testnet. This is the initial configuration generated from the command: `graph init --studio <SUBGRAPH_SLUG>` .
Add docker-compose file to run the graph node locally and update the readme file- describe how to deploy the subgraph locally.
273aabd
to
b5f26bb
Compare
Let's rename the main directory from |
In order to index a network, Graph Node needs access to a network client via an EVM-compatible JSON-RPC API. Let's use RPC from alchemy to do this so that everyone can use their API key. Updated extra parameters to avoid the error of too many requests.
✅ Deploy Preview for acre-dapp-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for acre-solidity-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Dependency to @keep-network/tbtc-v2 was wrongly resolved (merge commit). It should be version: 1.6.0-dev.24(@keep-network/[email protected])
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.
Overall LGTM. Left minor comments. Let's just update the pre-commit-config
to run linting before git commit
.
subgraph/package.json
Outdated
"lint:eslint": "eslint .", | ||
"lint:eslint:fix": "eslint . --fix", |
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.
To keep consistency with other modules in monorepo.
"lint:eslint": "eslint .", | |
"lint:eslint:fix": "eslint . --fix", | |
"lint:js": "eslint .", | |
"lint:js:fix": "eslint . --fix", |
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.
subgraph/package.json
Outdated
"format": "pnpm lint:eslint && pnpm lint:config", | ||
"format:fix": "pnpm lint:eslint:fix && pnpm lint:config:fix" |
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.
"format": "pnpm lint:eslint && pnpm lint:config", | |
"format:fix": "pnpm lint:eslint:fix && pnpm lint:config:fix" | |
"format": "npm lint:js && npm lint:config", | |
"format:fix": "npm lint:js:fix && npm lint:config:fix" |
Not sure if we should call pnpm
or npm
but to keep consistency with other modules maybe let's use npm
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.
subgraph/package.json
Outdated
@@ -0,0 +1,31 @@ | |||
{ | |||
"name": "acre-subgraph", |
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.
"name": "acre-subgraph", | |
"name": "@acre-btc/subgraph", |
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.
subgraph/package.json
Outdated
@@ -0,0 +1,31 @@ | |||
{ | |||
"name": "acre-subgraph", | |||
"license": "UNLICENSED", |
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.
"license": "UNLICENSED", | |
"license": "GPL-3.0-only", |
cc @nkuba
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.
subgraph/package.json
Outdated
@@ -0,0 +1,31 @@ | |||
{ | |||
"name": "acre-subgraph", |
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.
Maybe let's add "version": "0.0.1"
as well.
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.
970b216
to
0b45658
Compare
This is an initial implementation of the CI process to check the formatting and building in `subgraph` workspace.
0b45658
to
c624dac
Compare
There was an error during run tests about missing `assemblyscript` package. This problem occurs with pnpm. Matchstick does not play well with pnpm because of how pnpm handles dependencies. To avoid this problem, let's install this package separately. More info: LimeChain/matchstick#324 (comment)
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.
Left few minor comments.
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.
LGTM! 🚀 @nkuba could you please take a final look at GH workflow?
Closes #263
This PR adds a basic subgraph configuration for the AcreBitcoinDepositor contract. The code was generated automatically by using graph init command. The project also includes eslint and prettier configurations. Docker was used to run the subgraph locally. Currently,
AcreBitcoinDepositor
is deployed on the Sepolia Testnet network but it will eventually be on the Ethereum Mainnet.During the work there were a lot of problems over setting up the RPC correctly. Using the RPC from Alchemy there was a problem with the error 429 too many requests. Therefore, for this reason, it was decided to set some extra parameters to reduce requests. However, if you have any suggestions on which RPC we should use or see another solution let me know. Currently, this solution seems the simplest to unblock the next work on data fetching with subgraph.