mirror of
https://github.com/status-im/open-bounty.git
synced 2025-01-11 18:14:25 +00:00
Build script for solidity contracts
* added simple script that compiles .sol contracts and generates java code for them
This commit is contained in:
parent
4d6d925772
commit
7c39d6940e
15
build_contracts.sh
Normal file
15
build_contracts.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
SOLC=$(which solc)
|
||||
WEB3J=$(which web3j)
|
||||
|
||||
# compile contracts
|
||||
for f in contracts/*.sol; do
|
||||
$SOLC $f --bin --abi --optimize -o resources/contracts
|
||||
done
|
||||
|
||||
# generate java classes
|
||||
for f in resources/contracts/*.bin; do
|
||||
abi=$(echo $f|sed s/\.bin/.abi/)
|
||||
$WEB3J solidity generate $f $abi -o src/java -p commiteth.contracts
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user