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

Adding deployment/initialization features via scripts #117

Open
1 of 2 tasks
DOBEN opened this issue Aug 1, 2023 · 0 comments
Open
1 of 2 tasks

Adding deployment/initialization features via scripts #117

DOBEN opened this issue Aug 1, 2023 · 0 comments
Assignees
Labels
[Type] Task An additional feature or improvement.

Comments

@DOBEN
Copy link
Member

DOBEN commented Aug 1, 2023

Task description

Adding deplyment/initialization template scripts with some boilerplate code which can be created using cargo-generate command. It would reduce the number of tools a smart contract developer has to interact with (no concordium-client or our hosted frontend needed anymore) to get their protocol deployed on chain.

A new deploy/migrate template folder will be added to Concordium smart contract default template. This folder includes scripts and boilerplate code written in Rust which can be executed to deploy/initialize the smart contracts.

There are two distinguished flows supported to deploy the smart contracts with this template project.

  • Automated flow: A given key file and URL to a node allows to run scripts locally and deploy the contracts by signing the transaction with the given key and sending it to the node. The local flow is recommended when developing the protocol actively since it is fully automated and speeds up the testing process on testnet.
  • Frontend flow: A local backend server and a local frontend are spun up. The front end pulls periodically for new transaction requests that the backend creates based on the deployment scripts. This new transaction is not signed yet but in the correct format to be forwarded by the front end to the Concordium browser wallet where the transaction is signed and sent to the node that the Concordium browser wallet is connected to. The frontend flow is recommended to get a protocol live on mainnet using hardware wallets.

Sub-tasks

Automated flow:
e.g.

cargo run -- --node http://node.testnet.concordium.com:20000 --account ./3PXwJYYPf6fyVb4GJquxSZU8puxrHfzc4XogdMVot8MUQK53tW.export --modules ./default.wasm.v1 --modules ./default2.wasm.v1
@DOBEN DOBEN added the [Type] Task An additional feature or improvement. label Aug 1, 2023
@DOBEN DOBEN self-assigned this Aug 2, 2023
@DOBEN DOBEN changed the title Adding deploying/initialization features via scripts to cargo-concordium Adding deploying/initialization features via scripts Oct 9, 2023
@DOBEN DOBEN changed the title Adding deploying/initialization features via scripts Adding deployment/initialization features via scripts Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Task An additional feature or improvement.
Projects
None yet
Development

No branches or pull requests

1 participant