diff --git a/src/lib/deployment.ts b/src/lib/deployment.ts index ee18c78..acb32c8 100644 --- a/src/lib/deployment.ts +++ b/src/lib/deployment.ts @@ -47,7 +47,10 @@ export const storeCode = async ({ if (!noRebuild) { execSync("cargo wasm", { stdio: "inherit", env: process.env }); - execSync("cargo run-script optimize", { stdio: "inherit", env: process.env }); + execSync(`docker run --rm -v "$(pwd)":/code \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + cosmwasm/rust-optimizer:0.12.5`, { stdio: "inherit", env: process.env }); } const wasmByteCode = fs