Skip to content

Commit

Permalink
feat: use latest contract store version (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
VGLoic authored Jul 30, 2022
1 parent 5c08aa8 commit 13d26f7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 18 deletions.
31 changes: 21 additions & 10 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MultiNetworkContractStore } from "contract-store";
import { ContractStore } from "contract-store";
import semaphoreDemoGoerli from "./deployments/goerli/SemaphoreDemo.json";
import semaphore from './artifacts/@semaphore-protocol/contracts/interfaces/ISemaphore.sol/ISemaphore.json';

Expand All @@ -10,13 +10,24 @@ enum Network {

const SEMAPHORE_GOERLI_ADDRESS = "0x99aAb52e60f40AAC0BFE53e003De847bBDbC9611";

export const contractStore = new MultiNetworkContractStore([Network.goerli]);

contractStore.registerContract(Network.goerli, "SEMAPHORE_DEMO", {
abi: semaphoreDemoGoerli.abi,
address: semaphoreDemoGoerli.address
});
contractStore.registerContract(Network.goerli, "SEMAPHORE", {
abi: semaphore.abi,
address: SEMAPHORE_GOERLI_ADDRESS
export const contractStore = new ContractStore({
networks: {
[Network.goerli]: {
abis: {
SEMAPHORE_DEMO: semaphoreDemoGoerli.abi,
SEMAPHORE: semaphore.abi
},
deployments: {
SEMAPHORE_DEMO: {
address: semaphoreDemoGoerli.address,
abiKey: "SEMAPHORE_DEMO"
},
SEMAPHORE: {
address: SEMAPHORE_GOERLI_ADDRESS,
abiKey: "SEMAPHORE"
},
}
}
},
globalAbis: {}
});
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@
"test/**/*.{ts,tsx,js,jsx}": "eslint test --max-warnings=0"
},
"dependencies": {
"contract-store": "^1.0.0-alpha.2"
"contract-store": "^1.0.0-alpha.6"
}
}

0 comments on commit 13d26f7

Please sign in to comment.