Skip to content

Commit

Permalink
Copy in make cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
deuszx committed Apr 23, 2024
1 parent f4682a2 commit ee63b53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
3 changes: 3 additions & 0 deletions amm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ build-amm: ## Builds AMM contracts.
@for d in $(AMM_CONTRACTS_PATHS); do \
echo "Building $$d contract" ; \
cargo contract build --quiet --manifest-path $$d/Cargo.toml --release ; \
cp ../target/ink/$$d/$$d.wasm ../artifacts/$$d.wasm ; \
cp ../target/ink/$$d/$$d.json ../artifacts/$$d.json ; \
cp ../target/ink/$$d/$$d.contract ../artifacts/$$d.contract ;
done

.PHONY: check-amm
Expand Down
16 changes: 0 additions & 16 deletions amm/scripts/prepare_rust_wrappers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

readonly SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

declare -a AMM_CONTRACTS=(
"factory_contract"
"pair_contract"
"router_contract"
)

declare -a CONTRACTS=(
"factory_contract"
"pair_contract"
Expand All @@ -20,15 +14,6 @@ declare -a CONTRACTS=(
"psp22"
)

function copy_wasms() {
for c in ${AMM_CONTRACTS[@]}; do
echo "Copying $c"
cp $SCRIPT_DIR/../../target/ink/$c/$c.wasm $SCRIPT_DIR/../../artifacts/$c.wasm;
cp $SCRIPT_DIR/../../target/ink/$c/$c.json $SCRIPT_DIR/../../artifacts/$c.json;
cp $SCRIPT_DIR/../../target/ink/$c/$c.contract $SCRIPT_DIR/../../artifacts/$c.contract;
done
}

function wrap_contracts() {
for c in ${CONTRACTS[@]}; do
echo "Wrapping $c"
Expand All @@ -40,7 +25,6 @@ function wrap_contracts() {


function run() {
copy_wasms
wrap_contracts
}

Expand Down

0 comments on commit ee63b53

Please sign in to comment.