HUB
Sign inSign up
contracts-verifiable logo

paritytech/contracts-verifiable

By paritytech

•Updated over 2 years ago

Deterministic environment for the verifiable builds of ink! smart contracts

Image
1

100K+

paritytech/contracts-verifiable repository overview

⁠Verifiable builds for cargo-contract⁠

Docker image based on the minimalistic Debian image bitnami/minideb:bullseye-amd64.

Used for reproducible builds in cargo contract build --verifiable

Tag:

  • master and latest always track the recent changes from the master branch
  • major.minor.patch tags track corresponding published crates on crates.io, but they are built from the published tags on github

Rust versions:

We are tracking the latest Rust stable toolchain. The current version is 1.71.0

Rust tools & toolchains:

We use stable releases from crates.io

  • cargo-contract
  • wasm32-unknown-unknown: The toolchain to compile Rust codebases for Wasm.

Click here⁠ for the registry.

⁠Usage

The default entry point is ENTRYPOINT [ "cargo", "contract"] and work directory is set to /contract. You need to mount the folder with the contract to the container.

docker run -d \
    --name ink-container \
    --mount type=bind,source="$(pwd)",target="/contract" \
    paritytech/contracts-verified

For multi-contract projects, like in the example below:

my-app/
├─ ink-project-a/
│  ├─ Cargo.toml
│  ├─ lib.rs
├─ ink-project-b/
│  ├─ Cargo.toml
│  ├─ lib.rs
├─ rust-toolchain

Make sure to run the command inside my-app directory and specify a relative manifest path to the root contract: cargo contract build --verifiable --release --manifest-path ink-project-a/Cargo.toml

Apple Silicon performance

It is a known issue that running AMD64 image on the ARM host architecture significantly impacts the performance and build times. To solve this issues, enable Use Rosetta for x86/amd64 emulation on Apple Silicon in Settings -> Features in development tab in Docker Desktop App.

⁠License

The entire code within this repository is licensed under the GPLv3⁠.

Please contact us⁠ if you have questions about the licensing of our products.

Tag summary

Content type

Image

Digest

sha256:45c829150…

Size

467.2 MB

Last updated

over 2 years ago

docker pull paritytech/contracts-verifiable