Skip to content

Commit

Permalink
fix build scripts for contract
Browse files Browse the repository at this point in the history
	new file:   .DS_Store
	modified:   Cargo.lock
	modified:   kairos-deposit-contract/build-macos-darwin-feat-2.0.sh
	modified:   kairos-deposit-contract/build-ubuntu-feat-2.0.sh

	modified:   Cargo.lock
	modified:   kairos-deposit-contract/build-macos-darwin-feat-2.0.sh
	modified:   kairos-deposit-contract/build-ubuntu-feat-2.0.sh
  • Loading branch information
jonas089 committed Feb 20, 2024
1 parent 89b8ef7 commit dadd89e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 60 deletions.
Binary file added .DS_Store
Binary file not shown.
61 changes: 16 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 11 additions & 8 deletions kairos-deposit-contract/build-macos-darwin-feat-2.0.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
#rm -rf /Users/chef/.cargo/git/checkouts/casper-node-*
rm -rf /Users/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release
user=$1
version="6f1becc37e1a8f50/0bcc25f"

#rm -rf /Users/$user/.cargo/git/checkouts/casper-node-*
rm -rf /Users/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release
rustup target add wasm32-unknown-unknown

mkdir -p /Users/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release
mkdir -p /Users/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release
cargo build -p contract --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/deposit-contract.wasm -o ../target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm

cargo build -p deposit-session --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/deposit-session.wasm -o ../target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm /Users/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm /Users/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm /Users/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm /Users/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm

cargo build -p malicious-session --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/malicious-session.wasm -o ../target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm /Users/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm /Users/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm

cargo build -p withdrawal-session --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/withdrawal-session.wasm -o ../target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm /Users/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm /Users/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm

cargo build -p malicious-reader --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/malicious-reader.wasm -o ../target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm /Users/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm /Users/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm
17 changes: 10 additions & 7 deletions kairos-deposit-contract/build-ubuntu-feat-2.0.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
rm -rf /home/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release
user=$1
version="6f1becc37e1a8f50/0bcc25f"

rm -rf /home/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release
rustup target add wasm32-unknown-unknown

mkdir -p /home/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release
mkdir -p /home/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release
cargo build -p contract --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/deposit-contract.wasm -o ../target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm

cargo build -p deposit-session --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/deposit-session.wasm -o ../target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm /home/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm /home/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm /home/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/deposit-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm /home/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/deposit-contract-optimized.wasm

cargo build -p malicious-session --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/malicious-session.wasm -o ../target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm /home/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm /home/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/malicious-session-optimized.wasm

cargo build -p withdrawal-session --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/withdrawal-session.wasm -o ../target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm /home/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm /home/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/withdrawal-session-optimized.wasm

cargo build -p malicious-reader --release --target wasm32-unknown-unknown
wasm-opt --strip-debug --signext-lowering ../target/wasm32-unknown-unknown/release/malicious-reader.wasm -o ../target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm /home/chef/.cargo/git/checkouts/casper-node-6f1becc37e1a8f50/0bcc25f/target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm
cp ../target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm /home/$user/.cargo/git/checkouts/casper-node-$version/target/wasm32-unknown-unknown/release/malicious-reader-optimized.wasm

0 comments on commit dadd89e

Please sign in to comment.