Skip to content

bocha19/archway-templates

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archway Templates

Archway Smart Contract template projects used by the Archway Developer CLI.

List of templates

  • Default: a blank slate project
  • Increment: a simple smart contract that increments and resets a counter

Creating a new project from a template

Recommended way

Follow the instructions in the Archway Setup tutorial.

Using cargo-generate

Assuming you have a recent version of rust and cargo (v1.51.0+) installed (via rustup), then the following should get you a new repo to start a contract:

Install cargo-generate and cargo-run-script. If you didn't install them already, run the following commands:

cargo install cargo-generate --features vendored-openssl
cargo install cargo-run-script

Now, use it to create your new contract. Go to the folder in which you want to place it and run:

cargo generate --git archway-network/archway-templates.git --name PROJECT_NAME default

You will now have a new folder called PROJECT_NAME (I hope you changed that to something else) containing a simple working contract and build system that you can customize.

About

Template projects used by archway-cli

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 97.1%
  • Shell 2.9%