Skip to content

Commit fd6fe76

Browse files
fix: configure script
1 parent a7ccbd5 commit fd6fe76

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

scripts/configure.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ async function configNotary(notaryAddr: string, socketSigner: SignerWithAddress)
4646
try {
4747
const localChainId = await getChainId();
4848
const notary: Contract = await getInstance("AdminNotary", notaryAddr);
49-
await notary.connect(socketSigner).grantAttesterRole(remoteChainId, attesterAddress[localChainId]);
49+
const tx = await notary.connect(socketSigner).grantAttesterRole(remoteChainId, attesterAddress[localChainId]);
50+
await tx.wait();
5051
console.log(`Added ${attesterAddress[localChainId]} as an attester for ${remoteChainId} chain id!`)
5152
} catch (error) {
5253
console.log("Error while configuring Notary", error);
@@ -63,22 +64,26 @@ async function getSigners() {
6364

6465
async function configSocket(socket: Contract, socketSigner: SignerWithAddress, remoteChainId: number, localConfig: JSON) {
6566
try {
66-
await socket.connect(socketSigner).addConfig(
67+
let tx = await socket.connect(socketSigner).addConfig(
6768
remoteChainId,
6869
localConfig[`fastAccum-${remoteChainId}`],
69-
localConfig[`deaccum-${remoteChainId}`],
70+
localConfig[`deaccum`],
7071
localConfig["verifier"],
7172
fastIntegration
7273
);
7374

74-
await socket.connect(socketSigner).addConfig(
75+
await tx.wait();
76+
77+
tx = await socket.connect(socketSigner).addConfig(
7578
remoteChainId,
7679
localConfig[`slowAccum-${remoteChainId}`],
77-
localConfig[`deaccum-${remoteChainId}`],
80+
localConfig[`deaccum`],
7881
localConfig["verifier"],
7982
slowIntegration
8083
);
8184

85+
await tx.wait();
86+
8287
console.log(`Added slow and fast config for ${remoteChainId} chain id!`)
8388

8489
} catch (error) {

0 commit comments

Comments
 (0)