Contract deploys (#112)

* Contract deploys

* save
This commit is contained in:
Joe Howarth 2023-02-28 14:42:53 -07:00 committed by GitHub
parent 6fee6ba1e4
commit a0484dead1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 19 deletions

View File

@ -4,67 +4,67 @@
"relayProviders": [
{
"chainId": 6,
"address": "0x7903B8CE0FF4480e1c2496123b6623858be738e0"
"address": "0x61CAE64b05Cb1fBfc9e810683c5C52F2C886640C"
},
{
"chainId": 14,
"address": "0x26dBc4eC46b03410a8B64bc962b83FAf1B84DA5d"
"address": "0xc5156B6635DC04b692e4298332eab136e1B2055C"
},
{
"chainId": 4,
"address": "0xEf06AE191B42ac59883815c4cFaCC9164f1d50eE"
"address": "0xFAEd45351a0ddC272dc89c29c17e228278d2A24F"
},
{
"chainId": 5,
"address": "0x0a7F4f38a60f48688D9aa99b240b15ddb66e45e8"
"address": "0x27196D91bD67C437a806Be3d824794C0260e7f4c"
},
{
"chainId": 16,
"address": "0x55e1411d2d5AF8d9378460b486A9D84619149B5b"
"address": "0x8b5315217858B2feD71fcD7677DcC2a546C28C1B"
}
],
"coreRelayers": [
{
"chainId": 6,
"address": "0x9Dfd308e2450b26290d926Beea2Bb4F0B8553729"
"address": "0xDDe6b89B7d0AD383FafDe6477f0d300eC4d4033e"
},
{
"chainId": 14,
"address": "0x49181C4fE76E0F28DB04084935d81DaBb26ac26d"
"address": "0xA92aa4f8CBE1c2d7321F1575ad85bE396e2bbE0D"
},
{
"chainId": 4,
"address": "0xaC9EF19ab4F9a3a265809df0C4eB1E821f43391A"
"address": "0xda2592C43f2e10cBBA101464326fb132eFD8cB09"
},
{
"chainId": 5,
"address": "0xEf06AE191B42ac59883815c4cFaCC9164f1d50eE"
"address": "0xFAd28FcD3B05B73bBf52A3c4d8b638dFf1c5605c"
},
{
"chainId": 16,
"address": "0x414De856795ecA8F0207D83d69C372Df799Ee377"
"address": "0x57523648FB5345CF510c1F12D346A18e55Aec5f5"
}
],
"mockIntegrations": [
{
"chainId": 6,
"address": "0xFE0058B9e4df432Cc3DBf7bA4f97369FF1731002"
"address": "0x0819CaB27473e585DD28c0D908DCc218dE4cB05C"
},
{
"chainId": 14,
"address": "0xc00DBff2c041AeF61b92C115d175593ed8C3ED2F"
"address": "0xB7c205B9E147e4371E28fAe3F9530566de374Dcc"
},
{
"chainId": 4,
"address": "0x0Bc36d19a88341795D69535D3F977Db773ECD5F4"
"address": "0xD1d6Ae0149A460204967F91Cb358C3581D4F1692"
},
{
"chainId": 5,
"address": "0x46724E4d7fe534f70ACd7f16fcEBe428B88b47C1"
"address": "0xE8cfD947Eb14b0F08DEE7bf0E352480164ED2e6e"
},
{
"chainId": 16,
"address": "0xf3245687961ccED8c4b59c8D50E36CD9a1544A6d"
"address": "0x87c26Ad201cfC0A969911143985B39855C9CB704"
}
]
}
}

View File

@ -3,6 +3,7 @@ import { deployMockIntegration } from "../helpers/deployments"
import { BigNumber } from "ethers"
import { tryNativeToHexString } from "@certusone/wormhole-sdk"
import { MockRelayerIntegration__factory } from "../../../sdk/src"
import { wait } from "../helpers/utils"
const processName = "deployMockIntegration"
init()
@ -23,10 +24,18 @@ async function run() {
writeOutputFiles(output, processName)
for (let i = 0; i < chains.length; i++) {
const mockIntegration = getMockIntegration(chains[i]);
console.log(`Registering emitters for chainId ${chains[i].chainId}`)
const mockIntegration = getMockIntegration(chains[i])
for (let j = 0; j < chains.length; j++) {
const secondMockIntegration = output.mockIntegrations[j];
await mockIntegration.registerEmitter(secondMockIntegration.chainId, "0x"+tryNativeToHexString(secondMockIntegration.address, "ethereum"), {gasLimit: 500000}).then((tx) => tx.wait);
console.log(`Registering emitter ${chains[j].chainId}`)
const secondMockIntegration = output.mockIntegrations[j]
await mockIntegration
.registerEmitter(
secondMockIntegration.chainId,
"0x" + tryNativeToHexString(secondMockIntegration.address, "ethereum"),
{ gasLimit: 500000 }
)
.then(wait)
}
}
}