diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..e19d842633d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "cw-plus"] + path = cw-plus + url = git@github.com:CosmWasm/cw-plus.git diff --git a/Makefile b/Makefile index d50cdbdb9f2..6b16206c7be 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,23 @@ CONTRACTS=vesting_contract mixnet_contract nym_service_provider_directory nym_na CONTRACTS_WASM=$(addsuffix .wasm, $(CONTRACTS)) CONTRACTS_OUT_DIR=contracts/target/wasm32-unknown-unknown/release -contracts: build-release-contracts wasm-opt-contracts +contracts: build-release-contracts wasm-opt-contracts canonical-multisig + +canonical-multisig: prepare-cw-plus build-cw3 build-cw4 opt-cw3 opt-cw4 +prepare-cw-plus: + git -C cw-plus fetch + # make sure to use correct version + git -C cw-plus reset --hard v1.0.0 + +build-cw3: + RUSTFLAGS='-C link-arg=-s' cargo build --manifest-path cw-plus/contracts/cw3-flex-multisig/Cargo.toml --release --lib --target wasm32-unknown-unknown +build-cw4: + RUSTFLAGS='-C link-arg=-s' cargo build --manifest-path cw-plus/contracts/cw4-group/Cargo.toml --release --lib --target wasm32-unknown-unknown + +opt-cw3: + wasm-opt --signext-lowering -Os cw-plus/target/wasm32-unknown-unknown/release/cw3_flex_multisig.wasm -o cw-plus/target/wasm32-unknown-unknown/release/cw3_flex_multisig.wasm +opt-cw4: + wasm-opt --signext-lowering -Os cw-plus/target/wasm32-unknown-unknown/release/cw4_group.wasm -o cw-plus/target/wasm32-unknown-unknown/release/cw4_group.wasm wasm-opt-contracts: for contract in $(CONTRACTS_WASM); do \ diff --git a/cw-plus b/cw-plus new file mode 160000 index 00000000000..1a598fd99f7 --- /dev/null +++ b/cw-plus @@ -0,0 +1 @@ +Subproject commit 1a598fd99f788e1f0a2d735ff7d19571ca70205c