These smart contracts orchestrate the DDC network around clusters and buckets.
Note: The ink! version specidied in the Cargo.toml must be compatible with the pallet_contracts
version, which in its turn depends on the underlying substrate version. Currently, the Devnet, the QAnet and EDC environments support ink! 3.4.0
# Configure the compatible rust toolchain
rustup toolchain install nightly-2023-02-07
rustup component add rust-src --toolchain nightly-2023-02-07
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-02-07
# Install cargo-contract with its dependencies
cargo install cargo-dylint
cargo install dylint-link
cargo install cargo-contract --version 1.5.0 --force --locked
# Install binaryen in a version >= 99
brew install binaryen
# For Debian\Ubuntu:
# apt-get install binaryen
# Build DDC Bucket contract
cargo +nightly-2023-02-07 test &&
cargo +nightly-2023-02-07 contract build --release --manifest-path bucket/Cargo.toml
Note: if you are encountering errors during build process, they may be related to your specific processor's architecture. If this is the case, try out the Instalation using Docker image option, described in the official docs
Generated artifacts will be located in the ./target/ink
folder. Go to Devnet, select the Developer -> Contracts
tab, and click the Upload & deploy code button
. Use the .contract
file for deployment.
Additionally, there are scripts that allow you to deploy contracts from your local environment to remote network. Check the guide for more details.
Environment tested with deploy: