Skip to content

Commit 13d26f7

Browse files
authored
feat: use latest contract store version (#2)
1 parent 5c08aa8 commit 13d26f7

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

index.ts

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MultiNetworkContractStore } from "contract-store";
1+
import { ContractStore } from "contract-store";
22
import semaphoreDemoGoerli from "./deployments/goerli/SemaphoreDemo.json";
33
import semaphore from './artifacts/@semaphore-protocol/contracts/interfaces/ISemaphore.sol/ISemaphore.json';
44

@@ -10,13 +10,24 @@ enum Network {
1010

1111
const SEMAPHORE_GOERLI_ADDRESS = "0x99aAb52e60f40AAC0BFE53e003De847bBDbC9611";
1212

13-
export const contractStore = new MultiNetworkContractStore([Network.goerli]);
14-
15-
contractStore.registerContract(Network.goerli, "SEMAPHORE_DEMO", {
16-
abi: semaphoreDemoGoerli.abi,
17-
address: semaphoreDemoGoerli.address
18-
});
19-
contractStore.registerContract(Network.goerli, "SEMAPHORE", {
20-
abi: semaphore.abi,
21-
address: SEMAPHORE_GOERLI_ADDRESS
13+
export const contractStore = new ContractStore({
14+
networks: {
15+
[Network.goerli]: {
16+
abis: {
17+
SEMAPHORE_DEMO: semaphoreDemoGoerli.abi,
18+
SEMAPHORE: semaphore.abi
19+
},
20+
deployments: {
21+
SEMAPHORE_DEMO: {
22+
address: semaphoreDemoGoerli.address,
23+
abiKey: "SEMAPHORE_DEMO"
24+
},
25+
SEMAPHORE: {
26+
address: SEMAPHORE_GOERLI_ADDRESS,
27+
abiKey: "SEMAPHORE"
28+
},
29+
}
30+
}
31+
},
32+
globalAbis: {}
2233
});

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@
8383
"test/**/*.{ts,tsx,js,jsx}": "eslint test --max-warnings=0"
8484
},
8585
"dependencies": {
86-
"contract-store": "^1.0.0-alpha.2"
86+
"contract-store": "^1.0.0-alpha.6"
8787
}
8888
}

0 commit comments

Comments
 (0)