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*
126
126
# subgraph
127
127
packages /subgraph /build /
128
128
packages /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 8
8
" workspaces" ,
9
9
" yarn"
10
10
],
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" :
" [email protected] " ,
12
+ "workspaces" : [
13
+ " sdk" ,
14
+ " subgraph"
15
+ ]
21
16
}
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ docker-compose up
21
21
22
22
Setup project:
23
23
```
24
- yarn global add mustache
25
24
yarn
26
25
```
27
26
@@ -32,9 +31,9 @@ To build and deploy the subgraph to the graph hosted service:
32
31
./scripts/deploy.sh mainnet ampleforth/staging
33
32
34
33
# testnet deployment
35
- ./scripts/deploy.sh goerli ampleforth/ampleforth -core-goerli
34
+ ./scripts/deploy.sh goerli ampleforth-core-goerli
36
35
37
36
# 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
40
39
```
Original file line number Diff line number Diff line change 18
18
"@typescript-eslint/parser" : " ^2.0.0" ,
19
19
"eslint" : " ^6.2.2" ,
20
20
"eslint-config-prettier" : " ^6.1.0" ,
21
+ "mustache" : " ^4.2.0" ,
21
22
"prettier" : " ^1.18.2" ,
22
23
"typescript" : " ^3.5.2"
23
24
},
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
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
7
5
8
6
yarn codegen
9
7
10
8
yarn build
11
9
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 {
40
40
let scaledRecepientBalance = fetchTokenBalance ( token , event . params . to )
41
41
let scaledAmountExact = token . balanceScalar . times ( event . params . value )
42
42
43
- if ( event . params . from . toHexString ( ) != constants . ADDRESS_ZERO ) {
43
+ if ( event . params . from != constants . ADDRESS_ZERO ) {
44
44
scaledSenderBalance . valueExact =
45
45
scaledSenderBalance . valueExact . minus ( scaledAmountExact )
46
46
scaledSenderBalance . value = formatAMPL ( scaledSenderBalance . valueExact )
You can’t perform that action at this time.
0 commit comments