This site requires Javascript to be enabled.

Wasm executables

In order to deploy your contracts to the blockchain you need to build an optomized wasm executable.

For building and optimizing your contracts we use the Rust Optimizer and specifically the Workspace Optimizer which allows for building and optimizing multiple contracts within a project. This is all done via Docker and the reason Docker is a dependency for the Developer CLI.

The workspace-optimizer will make sure that the WASM binary is as small as possible in order to minimize fees and blockchain storage.

Build and optimize your contracts

From within the project folder build your project using the command:

archway contracts build

Example output:

Building optimized wasm file for all contracts in the workspace using Docker...1.71.0-x86_64-unknown-linux-musl (default)cargo 1.71.0 (cfd3bbd8f 2023-06-08)Building artifacts in workspace...Found workspace member entries: ["contracts/*"]Package directories: ["contracts/increment"]Contracts to be built: ["contracts/increment"]Building "contracts/increment" ...warning: profiles for the non root package will be ignored, specify profiles at the workspace root:package:   /code/contracts/increment/Cargo.tomlworkspace: /code/Cargo.toml   Compiling proc-macro2 v1.0.70   Compiling unicode-ident v1.0.12   Compiling syn v1.0.109   Compiling typenum v1.17.0   Compiling version_check v0.9.4   Compiling serde v1.0.193   Compiling generic-array v0.14.7   Compiling zeroize v1.7.0   Compiling serde_json v1.0.108   Compiling quote v1.0.33   Compiling ryu v1.0.15   Compiling syn v2.0.39   Compiling itoa v1.0.9   Compiling schemars v0.8.16   Compiling thiserror v1.0.50   Compiling crypto-common v0.1.6   Compiling block-buffer v0.10.4   Compiling dyn-clone v1.0.16   Compiling subtle v2.5.0   Compiling const-oid v0.9.5   Compiling cfg-if v1.0.0   Compiling bnum v0.8.1   Compiling digest v0.10.7   Compiling sha2 v0.10.8   Compiling serde_derive v1.0.193   Compiling serde_derive_internals v0.26.0   Compiling thiserror-impl v1.0.50   Compiling static_assertions v1.1.0   Compiling hex v0.4.3   Compiling forward_ref v1.0.0   Compiling base64 v0.21.5   Compiling schemars_derive v0.8.16   Compiling cosmwasm-derive v1.5.0   Compiling derivative v2.2.0   Compiling cosmwasm-schema-derive v1.5.0   Compiling semver v1.0.20   Compiling serde-json-wasm v0.5.1   Compiling cosmwasm-std v1.5.0   Compiling cosmwasm-schema v1.5.0   Compiling cw-storage-plus v1.2.0   Compiling cosmwasm-storage v1.5.0   Compiling archway-bindings v0.2.1   Compiling cw2 v1.1.2   Compiling increment v0.1.0 (/code/contracts/increment)

Drop Camp is here!

Join the queue and be one of the first to get in!.

Go Camping ↗