This project is honored to be funded by Web3 Foundation grant program. You can find more info here.
This is ink! implementation of SubsCrypt. For more information please visit online docs.
Please make sure that you have these prerequisites installed on your computer:
rustup component add rust-src --toolchain nightly
rustup target add wasm32-unknown-unknown --toolchain stable
Then you have to install ink! command line utility which will make setting up Substrate smart contract projects easier:
cargo install cargo-contract --vers 0.10.0 --force --locked
You also need the binaryen package installed on your computer which is used to optimize the WebAssembly bytecode of the contract, you can use npm to install it:
npm install -g binaryen
First of all you need to clone the repository, run:
git clone https://github.com/oxydev/SubsCrypt-ink
cd SubsCrypt-ink
Then, you can run the tests with this line of code:
cargo +nightly test
To build the WASM of your contract and metadata, you can clone and change directory to the ink project of SubsCrypt and then you have to run this line:
cargo +nightly contract build
This command will take some minutes and the output will be something like this:
Original wasm size: 99.1K, Optimized: 68.0K
Your contract artifacts are ready. You can find them in:
/yourDirectory/target/ink
- SubsCrypt.contract (code + metadata)
- SubsCrypt.wasm (the contract's code)
- metadata.json (the contract's metadata)
You can also use the pre-built version of our code and access to the WASM and metadata files, here and here.