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; _state.provider.governanceContract = governanceContract;
} }
function setChainId(uint16 chainId_) internal { function setChainId(uint16 chainId) internal {
_state.provider.chainId = chainId_; _state.provider.chainId = chainId;
} }
function setWormhole(address wh) internal { function setWormhole(address wh) internal {

View File

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

View File

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

View File

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