Compare commits

...

3 Commits

Author SHA1 Message Date
Sebastián Claudio Nale f913bc6a28 Simplification in relay provider deploy script. 2023-03-30 17:53:31 -03:00
Sebastián Claudio Nale c5e10dfefc Removes redundant default relay provider configuration. 2023-03-30 13:24:19 -03:00
Sebastián Claudio Nale 06bfe7ac4b Minor cleanup. 2023-03-30 13:23:54 -03:00
4 changed files with 15 additions and 18 deletions

View File

@ -27,8 +27,8 @@ contract CoreRelayerSetters is CoreRelayerState, Context {
_state.provider.governanceContract = governanceContract;
}
function setChainId(uint16 chainId_) internal {
_state.provider.chainId = chainId_;
function setChainId(uint16 chainId) internal {
_state.provider.chainId = chainId;
}
function setWormhole(address wh) internal {

View File

@ -25,20 +25,20 @@ async function run() {
coreRelayerProxies: [],
}
for (let i = 0; i < chains.length; i++) {
console.log(`Deploying for chain ${chains[i].chainId}...`)
const coreRelayerLibrary = await deployCoreRelayerLibrary(chains[i])
for (const chain of chains) {
console.log(`Deploying for chain ${chain.chainId}...`)
const coreRelayerLibrary = await deployCoreRelayerLibrary(chain)
const coreRelayerImplementation = await deployCoreRelayerImplementation(
chains[i],
chain,
coreRelayerLibrary.address
)
const coreRelayerSetup = await deployCoreRelayerSetup(chains[i])
const coreRelayerSetup = await deployCoreRelayerSetup(chain)
const coreRelayerProxy = await deployCoreRelayerProxy(
chains[i],
chain,
coreRelayerSetup.address,
coreRelayerImplementation.address,
chains[i].wormholeAddress,
getRelayProviderAddress(chains[i])
chain.wormholeAddress,
getRelayProviderAddress(chain)
)
output.coreRelayerLibraries.push(coreRelayerLibrary)

View File

@ -26,9 +26,6 @@ async function registerChainsCoreRelayer(chain: ChainInfo) {
console.log("registerChainsCoreRelayer " + chain.chainId)
const coreRelayer = getCoreRelayer(chain)
await coreRelayer
.setDefaultRelayProvider(createDefaultRelayProviderVAA(chain))
.then(wait)
for (let i = 0; i < chains.length; i++) {
await coreRelayer
.registerCoreRelayerContract(createRegisterChainVAA(chains[i]))

View File

@ -24,12 +24,12 @@ async function run() {
relayProviderProxies: [],
}
for (let i = 0; i < chains.length; i++) {
console.log(`Deploying for chain ${chains[i].chainId}...`)
const relayProviderImplementation = await deployRelayProviderImplementation(chains[i])
const relayProviderSetup = await deployRelayProviderSetup(chains[i])
for (const chain of chains) {
console.log(`Deploying for chain ${chain.chainId}...`)
const relayProviderImplementation = await deployRelayProviderImplementation(chain)
const relayProviderSetup = await deployRelayProviderSetup(chain)
const relayProviderProxy = await deployRelayProviderProxy(
chains[i],
chain,
relayProviderSetup.address,
relayProviderImplementation.address
)