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

Add deploy script projects to templates #324

Merged
merged 23 commits into from
Oct 18, 2023
Merged

Conversation

DOBEN
Copy link
Member

@DOBEN DOBEN commented Aug 3, 2023

Purpose

Addresses Concordium/concordium-smart-contract-tools#117

This PR addresses the first part: Automated flow

When creating a new smart contract project with the cargo-generate command using the default template, we provide now a deploy-scripts folder that contains some boilerplate code to deploy/initialize/update the contracts on chain. The scripts can be run with e.g. this command.

cargo run -- --node http://node.testnet.concordium.com:20000 --account ./3PXwJYYPf6fyVb4GJquxSZU8puxrHfzc4XogdMVot8MUQK53tW.export --modules ./default.wasm.v1 --modules ./default2.wasm.v1

Changes

  • Adding deploy script projects to the default templates

Copy link
Contributor

@Bargsteen Bargsteen left a comment

Choose a reason for hiding this comment

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

Nice work @DOBEN! I have some suggestions and found a few smaller issues, but nothing blocking ;)

templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Show resolved Hide resolved
templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
@DOBEN DOBEN requested a review from limemloh October 13, 2023 13:36
templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
templates/default/deploy-scripts/README.md Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
@DOBEN DOBEN requested a review from abizjak October 17, 2023 11:24
@DOBEN DOBEN force-pushed the add-deploy-scripts-to-templates branch from dcc9422 to 19434a2 Compare October 17, 2023 12:52
Copy link
Contributor

@abizjak abizjak 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, but before merging can you please make sure that the generated code from the template has no clippy lint issues, and is formatted correctly using our usual formatter.

templates/default/deploy-scripts/Cargo.toml Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/main.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
templates/default/deploy-scripts/src/deployer.rs Outdated Show resolved Hide resolved
@DOBEN DOBEN merged commit 870502c into main Oct 18, 2023
133 checks passed
@DOBEN DOBEN deleted the add-deploy-scripts-to-templates branch October 18, 2023 14:52
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.

4 participants