-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
3,984 additions
and
11,434 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
import { HelloWormhole__factory } from "./ethers-contracts" | ||
import { HelloWormhole__factory } from "./ethers-contracts"; | ||
import { | ||
loadConfig, | ||
getWallet, | ||
storeDeployedAddresses, | ||
getChain, | ||
loadDeployedAddresses, | ||
} from "./utils" | ||
} from "./utils"; | ||
|
||
export async function deploy() { | ||
const config = loadConfig() | ||
const config = loadConfig(); | ||
|
||
const deployed = loadDeployedAddresses() | ||
for (const chainId of config.chains.map(c => c.chainId)) { | ||
const chain = getChain(chainId) | ||
const signer = getWallet(chainId) | ||
const deployed = loadDeployedAddresses(); | ||
for (const chainId of config.chains.map((c) => c.chainId)) { | ||
const chain = getChain(chainId); | ||
const signer = getWallet(chainId); | ||
|
||
const helloWormhole = await new HelloWormhole__factory(signer).deploy( | ||
chain.wormholeRelayer | ||
) | ||
await helloWormhole.deployed() | ||
); | ||
await helloWormhole.waitForDeployment(); | ||
const address = await helloWormhole.getAddress(); | ||
|
||
deployed.helloWormhole[chainId] = address; | ||
|
||
deployed.helloWormhole[chainId] = helloWormhole.address | ||
|
||
console.log( | ||
`HelloWormhole deployed to ${helloWormhole.address} on ${chain.description} (chain ${chainId})` | ||
) | ||
`HelloWormhole deployed to ${address} on ${chain.description} (chain ${chainId})` | ||
); | ||
} | ||
|
||
storeDeployedAddresses(deployed) | ||
storeDeployedAddresses(deployed); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.