Skip to content

Commit

Permalink
Add bash script to build test fixture contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Nov 3, 2024
1 parent d283c55 commit c2a3446
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ciphernode:lint": "cd packages/ciphernode && cargo fmt -- --check",
"ciphernode:add": "cd packages/evm && yarn ciphernode:add",
"ciphernode:remove": "cd packages/evm && yarn ciphernode:remove",
"ciphernode:test": "cd packages/ciphernode && cargo test",
"ciphernode:test": "cd packages/ciphernode && ./scripts/test.sh",
"ciphernode:build": "cd packages/ciphernode && cargo build --release",
"preciphernode:build": "yarn evm:compile",
"committee:new": "cd packages/evm && yarn committee:new",
Expand Down
6 changes: 5 additions & 1 deletion packages/ciphernode/evm/scripts/build_fixtures.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env bash


set -e

echo "Building fixtures..."

echo "{\"abi\": $(solc --abi tests/fixtures/emit_logs.sol | tail -n 1), \"bin\": \"$(solc --bin tests/fixtures/emit_logs.sol| tail -n 1)\"}" | jq '.' > tests/fixtures/emit_logs.json
7 changes: 7 additions & 0 deletions packages/ciphernode/scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

pushd ./evm && ./scripts/build_fixtures.sh && popd

cargo test -- $@

0 comments on commit c2a3446

Please sign in to comment.