From ea8411f29fdf3af20bb5023d703d49911040a474 Mon Sep 17 00:00:00 2001 From: akorchyn Date: Wed, 14 Aug 2024 15:37:41 +0300 Subject: [PATCH] fix cargo near build --- contract/Cargo.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/contract/Cargo.toml b/contract/Cargo.toml index fc2063c..c3db80e 100644 --- a/contract/Cargo.toml +++ b/contract/Cargo.toml @@ -6,6 +6,20 @@ edition.workspace = true license.workspace = true authors.workspace = true +# fields to configure build with WASM reproducibility, according to specs +# in https://github.com/near/NEPs/blob/master/neps/nep-0330.md +[package.metadata.near.reproducible_build] +# docker image, descriptor of build environment +image = "sourcescan/cargo-near:git-e3c8adb4b5542cbfc159bb1534f2b94c900c1648-1.80.0" +# tag after colon above serves only descriptive purpose; image is identified by digest +image_digest = "sha256:4bbcdf985936e1cb9b71c627a00cb9b53546ac0c9ef6b175da2918c1dea21363" +# build command inside of docker container +# if docker image from default gallery is used https://hub.docker.com/r/sourcescan/cargo-near/tags, +# the command may be any combination of flags of `cargo-near`, +# supported by respective version of binary inside the container besides `--no-locked` flag +container_build_command = ["cargo", "near", "build"] + + [lib] crate-type = ["cdylib"]