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

test(e2e): add a test to deploy contracts #2299

Merged
merged 6 commits into from
Jun 3, 2024
Merged

Conversation

lumtis
Copy link
Member

@lumtis lumtis commented Jun 3, 2024

Description

Add a entry in zetae2e allowing to deploy smart contracts used in some tests in the E2E tests (right now test_dapp on zevm and evm)

Decided to add it as a "test" with the run command, so we can use it without any changes in our current CI.

Usage:

zetae2e run deploy:[contract_name] --config [config]

Example:

zetae2e run deploy:testdapp_zevm --config bsc_config.yml

e2e        | starting tests
e2e        | ⚙️ setting up TSS address
e2e        | ⏳running - deploy a contract
e2e        | testdapp_zevm deployed at 0x0eEcd709B767bd54CF5Ec5266672dE96F12Ad7D3
e2e        | ✅ completed in 2.725003792s - deploy a contract
e2e        | tests finished successfully in 11.498876042s
e2e        |  ---💰 Total gas spent ---
e2e        | * ZETA spent:  5866042
e2e        |  ---📈 E2E Test Report ---
Name      Success    Time            Spent
deploy    ✅          8.591339833s    ZETA:5866042

Closes: #2227

Copy link
Contributor

@skosito skosito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just in PR description, contract name and success message seems to mention testdapp_evm in command and testdapp_zevm in message:

zetae2e run deploy:testdapp_evm --config bsc_config.yml

e2e        | starting tests
e2e        | ⚙️ setting up TSS address
e2e        | ⏳running - deploy a contract
e2e        | testdapp_zevm deployed at 0x0eEcd709B767bd54CF5Ec5266672dE96F12Ad7D3

i think its ok to be part of run command, but probably would be cleaner to have separate deploy command like zetae2e deploy, i think some commands like balances are already run in CI?

@lumtis
Copy link
Member Author

lumtis commented Jun 3, 2024

looks good, just in PR description, contract name and success message seems to mention testdapp_evm in command and testdapp_zevm in message:

zetae2e run deploy:testdapp_evm --config bsc_config.yml

e2e        | starting tests
e2e        | ⚙️ setting up TSS address
e2e        | ⏳running - deploy a contract
e2e        | testdapp_zevm deployed at 0x0eEcd709B767bd54CF5Ec5266672dE96F12Ad7D3

Copypaste mistake

i think its ok to be part of run command, but probably would be cleaner to have separate deploy command like zetae2e deploy, i think some commands like balances are already run in CI?

Can be change if everyone think this makes sense. For the codebase simplicity, this also makes sense to me to use run as you just need to add a new function in the e2e array.
A new command namespace would need some new logic to execute network interactions that is already available with the current design

@skosito
Copy link
Contributor

skosito commented Jun 3, 2024

looks good, just in PR description, contract name and success message seems to mention testdapp_evm in command and testdapp_zevm in message:

zetae2e run deploy:testdapp_evm --config bsc_config.yml

e2e        | starting tests
e2e        | ⚙️ setting up TSS address
e2e        | ⏳running - deploy a contract
e2e        | testdapp_zevm deployed at 0x0eEcd709B767bd54CF5Ec5266672dE96F12Ad7D3

Copypaste mistake

i think its ok to be part of run command, but probably would be cleaner to have separate deploy command like zetae2e deploy, i think some commands like balances are already run in CI?

Can be change if everyone think this makes sense. For the codebase simplicity, this also makes sense to me to use run as you just need to add a new function in the e2e array. A new command namespace would need some new logic to execute network interactions that is already available with the current design

ah ok i didnt think about that, leaving it in run makes sense then

@lumtis lumtis merged commit f4366ad into develop Jun 3, 2024
19 checks passed
@lumtis lumtis deleted the test/deploy-test-contracts branch June 3, 2024 16:54
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.

Introduce a deploy command in zetae2e
3 participants