File tree Expand file tree Collapse file tree 8 files changed +9679
-7061
lines changed
Expand file tree Collapse file tree 8 files changed +9679
-7061
lines changed Original file line number Diff line number Diff line change @@ -126,3 +126,7 @@ yarn-error.log*
126126# subgraph
127127packages /subgraph /build /
128128packages /subgraph /src /types /
129+
130+
131+ # yarn
132+ .yarn
Original file line number Diff line number Diff line change 1+ nmHoistingLimits : workspaces
2+
3+ nodeLinker : node-modules
4+
5+ plugins :
6+ - path : .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
7+ spec : " @yarnpkg/plugin-workspace-tools"
8+
9+ yarnPath : .yarn/releases/yarn-3.2.1.cjs
Original file line number Diff line number Diff line change 88 " workspaces" ,
99 " yarn"
1010 ],
11- "scripts" : {
12- "sdk" : " yarn workspace @ampleforthorg/sdk" ,
13- "subgraph" : " yarn workspace @ampleforthorg/subgraph"
14- },
15- "private" : true ,
16- "workspaces" : {
17- "packages" : [
18- " *"
19- ]
20- }
11+ "packageManager" : " yarn@3.2.1" ,
12+ "workspaces" : [
13+ " sdk" ,
14+ " subgraph"
15+ ]
2116}
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ docker-compose up
2121
2222Setup project:
2323```
24- yarn global add mustache
2524yarn
2625```
2726
@@ -32,9 +31,9 @@ To build and deploy the subgraph to the graph hosted service:
3231./scripts/deploy.sh mainnet ampleforth/staging
3332
3433# testnet deployment
35- ./scripts/deploy.sh goerli ampleforth/ampleforth -core-goerli
34+ ./scripts/deploy.sh goerli ampleforth-core-goerli
3635
3736# production deployment
38- ./scripts/deploy.sh mainnet ampleforth/ampleforth -core
39- ./scripts/deploy.sh avalanche ampleforth/ampleforth -core-avalanche
37+ ./scripts/deploy.sh mainnet ampleforth-core
38+ ./scripts/deploy.sh avalanche ampleforth-core-avalanche
4039```
Original file line number Diff line number Diff line change 1818 "@typescript-eslint/parser" : " ^2.0.0" ,
1919 "eslint" : " ^6.2.2" ,
2020 "eslint-config-prettier" : " ^6.1.0" ,
21+ "mustache" : " ^4.2.0" ,
2122 "prettier" : " ^1.18.2" ,
2223 "typescript" : " ^3.5.2"
2324 },
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4- mustache ./configs/$1 .json subgraph.template.yaml > ./subgraph.yaml
5-
6- yarn auth $GRAPH_AUTH
4+ yarn mustache ./configs/$1 .json subgraph.template.yaml > ./subgraph.yaml
75
86yarn codegen
97
108yarn build
119
12- yarn graph deploy \
13- --product hosted-service \
14- --access-token $GRAPH_AUTH $2
10+ yarn graph deploy $2 \
11+ --node https://subgraphs.alchemy.com/api/subgraphs/deploy \
12+ --deploy-key $GRAPH_AUTH \
13+ --ipfs https://ipfs.satsuma.xyz
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export function handleTransfer(event: Transfer): void {
4040 let scaledRecepientBalance = fetchTokenBalance ( token , event . params . to )
4141 let scaledAmountExact = token . balanceScalar . times ( event . params . value )
4242
43- if ( event . params . from . toHexString ( ) != constants . ADDRESS_ZERO ) {
43+ if ( event . params . from != constants . ADDRESS_ZERO ) {
4444 scaledSenderBalance . valueExact =
4545 scaledSenderBalance . valueExact . minus ( scaledAmountExact )
4646 scaledSenderBalance . value = formatAMPL ( scaledSenderBalance . valueExact )
You can’t perform that action at this time.
0 commit comments