This readme is current as of April 2024.
The uploaded file is used by nukotoken.
Below is a simple example of how to build.
ubuntu-22.04.4-desktop-amd64
Installation configuration: Minimal
sudo apt install curl
sudo apt install g++
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
sudo apt install binaryen
cargo install --force --locked cargo-contract
snap install docker
This is a required setting and will not work properly if you do not do it.
sudo groupadd docker
sudo usermod -aG docker $USER
Restart docker and exit from the console once.
sudo /bin/systemctl restart docker.service
exit
OR: Restart to apply settings.
sudo reboot
Set NAME
by yourself.
cargo contract new NAME
cd NAME
Add and modify files if necessary.
cargo contract build --verifiable
By using --verifiable
, the docker image (paritytech/contracts-verifiable) will be downloaded.
And built using the container of that image.
The built file location is NAME/target/ink/
Three files are generated.
NAME.wasm
, NAME.json
, NAME.contract
The file .contract
is used for verification.
Specify the location of the .contract
file you want to verify.
cargo contract verify P/A/T/H/FILENAME.contract
By using verify, you can verify that the code in the working directory, and the specified .contract
are the same code.
In case of successful completion.
Successfully verified contract `/home/user/NAME/target/ink/test.contract` against reference contract `P/A/T/H/FILENAME.contract`!
In cases where validation fails, the cause will be displayed.
Failed to verify the authenticity of `NAME` contract against the workspace
found at "FILENAME.ext".
Meow.
Cardinal-Cryptography / PSP22
https://github.com/Cardinal-Cryptography/PSP22
Installing required tools: docs.alephzero.org
paritytech/cargo-contract: github
https://github.com/paritytech/cargo-contract/tree/master
Contract Verification: use.ink
https://use.ink/basics/verification/contract-verification/
Linux post-installation steps for Docker Engine: docs.docker.com