In this integration you can find the traffic light contract as well as its frontend to be able to use it.
You will find a "template" where you communicate with the contract through the use of SailsCalls, where you can find examples of sending commands and queries to the traffic light contract. This is located in traffic_light_fronted
.
You will find the traffic light contract where you can see the functionality of a contract, as well as the specification of its services, methods and queries. This is located in traffic_light_contract
.
You can work with the contract and frontend on gitpod!
- Contract compilation:
- Rust: You need to have rust 1.83 or newer to be able to compile your contract, and the component rust-src:
rustup install 1.83
rustup default 1.83
rustup target add wasm32-unknown-unknown
rustup component add rust-src --toolchain 1.83-x86_64-unknown-linux-gnu
- Next, you need to install the wasm-opt (to optimize WebAssembly files):
sudo apt install binaryen
Now, you can compile and use the frontend!
- The contract is located in
traffic_light_contract
directory, it contrains extra instructios to compile it. - Frontend is located in the
traffic_light_frontend
directory, it contains extra instructions to run the frontend!