Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network.ts - script hangs when reassigning w/ ContractFactory::deploy #113

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

robriks
Copy link
Contributor

@robriks robriks commented Aug 6, 2024

Local bridging script hangs indefinitely while waiting for the InterchainTokenFactoryContract deployment.

This is likely due to the fact that the ethersJS::Contract::deployed() method is invoked twice for the same variable, implementation. EthersJS seems to get confused when using let implementation = await deployContract(<InterchainTokenServiceContract>) and then reassigning like so:
implementation = await deployContract(<InterchainTokenFactoryContract>) since deployContract() calls await contract.deployed()

Using a single const variable for each contract returned by deployContract() resolved the issue, as made in this PR

Local bridging script hangs indefinitely while waiting for the `InterchainTokenFactoryContract` deployment. 

This is likely due to the fact that the `ethersJS::Contract::deployed()` method is invoked twice for the same variable, `implementation`.  EthersJS seems to get confused when using 
`let implementation = await deployContract(<InterchainTokenServiceContract>)`
and then reassigning like so:
`implementation = await deployContract(<InterchainTokenFactoryContract>)`
since `deployContract()` calls `await contract.deployed()`

Using a single const variable for each contract returned by `deployContract()` resolved the issue, as made in this PR
@npty
Copy link
Member

npty commented Aug 7, 2024

I don't think the variable reassigning causes the script to hang because we didn't pass that variable into the deployContract function. However, this looks cleaner for the codebase. Thanks for the PR!

@npty npty self-requested a review August 7, 2024 08:45
@npty npty merged commit ed0d136 into axelarnetwork:main Aug 7, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants