A simple template used to start developing your own smart contracts for ISCP (IOTA Smart Contract Protocol) in Rust and write unit tests in Go. In order to develop using the environment set up by this template, you need to have good understanding of the Rust and Go languages.
This is a repository for myself but I welcome anyone interested in playing around with the current state of development of the IOTA Smart Contract Protocol (ISCP). Feel free to contact me on IOTA Foundation's discord server under Th3B0Y#8380.
This is how the templated file structure looks like:
- Go - Why Go?
- Gcc (or equivalent for Windows (TDM-GCC)) - Why Gcc?
- Rust
- Wasm-pack
- Visual Studio Code (VSCode)
- Go Extension
- Rust Analyzer
- Better TOML *Optional nice to have
- Use this template repository to create your own.
- Open VSCode and a terminal in it (In the menu : Terminal > New Terminal)
- In the terminal, clone your git repository:
git clone <your_git_repository> && cd <your_git_repositories_name>
- In the terminal, open your git repository on VSCode
code -r .
- For Windows only, open file ".vscode/settings.json" and uncomment the setting "go.testFlags" entry "-buildmode=exe":
- On VSCode, open the replace functionality (Edit > Replace in files)
- Replace
brunoamancio/IOTA-SmartContracts
for<your_username>/<your_project_name>
[How to]
- Replace
Done! Now you can write your smart contract in smartcontract/rust
, compile it, run and debug unit tests in tests/smartcontract/my_iota_smart_contract_test.go
!