Skip to content

Commit

Permalink
feat: use sdk for subgraph commands
Browse files Browse the repository at this point in the history
  • Loading branch information
snigdha920 committed Jan 3, 2025
1 parent 40df4a1 commit 6218686
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@
{
"label": "The Graph - Codegen the subgraph types",
"type": "shell",
"command": "btp-scs subgraph codegen",
"command": "bunx settlemint scs subgraph codegen",
"problemMatcher": []
},
{
"label": "The Graph - Build the subgraph",
"type": "shell",
"command": "btp-scs subgraph build",
"command": "bunx settlemint scs subgraph build",
"problemMatcher": [],
"group": {
"kind": "build",
Expand All @@ -112,7 +112,7 @@
{
"label": "The Graph - Deploy or update the subgraph",
"type": "shell",
"command": "btp-scs subgraph deploy",
"command": "bunx settlemint scs subgraph deploy",
"problemMatcher": []
}
],
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:22.12.0 AS build

COPY --from=oven/bun:1.1.41-debian --chmod=0777 /usr/local/bin/bun /bin/bun
COPY --from=oven/bun:1.1.42-debian --chmod=0777 /usr/local/bin/bun /bin/bun
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
ENV BUN_INSTALL_BIN=/bin

Expand Down
20 changes: 18 additions & 2 deletions docs/subgraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,21 @@ To index your smart contract events, use The Graph middleware.
First, edit `subgraph.config.json` to set the addresses of your smart contracts. You can find them in the deployment folder created under `ignation`. Then, run:

```shell
btp-scs subgraph deploy
```
bunx settlemint login
```

This logs you in to the platform. This command only needs to be run once, so you can skip it if you've already logged in.

Then, run:

```shell
bunx settlemint scs subgraph deploy
```

## Help

To get info about the tasks, run:

```shell
bunx settlemint scs subgraph --help
```
2 changes: 1 addition & 1 deletion lib/forge-std/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract TestContract is Test {
contract ErrorsTest {
function arithmeticError(uint256 a) public {
uint256 a = a - 100;
a = a - 100;
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion lib/forge-std/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "forge-std",
"version": "1.9.4",
"version": "1.9.5",
"description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.",
"homepage": "https://book.getfoundry.sh/forge/forge-std",
"bugs": "https://github.com/foundry-rs/forge-std/issues",
Expand Down
26 changes: 16 additions & 10 deletions lib/forge-std/src/Vm.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/forge-std/test/Vm.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ contract VmTest is Test {
}

function test_VmSafeInterfaceId() public pure {
assertEq(type(VmSafe).interfaceId, bytes4(0x92fe99ad), "VmSafe");
assertEq(type(VmSafe).interfaceId, bytes4(0xe76e7868), "VmSafe");
}
}

0 comments on commit 6218686

Please sign in to comment.