-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathvanitygen.sh
More file actions
executable file
·27 lines (22 loc) · 852 Bytes
/
vanitygen.sh
File metadata and controls
executable file
·27 lines (22 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/bash
BATCHSIZE=${1-128}
BATCHSIZE_ITER=$((${BATCHSIZE} - 1))
ITERATIONS=${2-90863}
rm -rf tmp
mkdir tmp
for i in `seq 0 ${BATCHSIZE_ITER}`; do
mkdir -p "./tmp/${i}/contracts"
cp contracts/ERC1820Registry.sol "./tmp/${i}/contracts/"
done
for OFFSET in `seq 0 $BATCHSIZE $ITERATIONS`; do
for VALUE in `seq 0 ${BATCHSIZE_ITER}`; do
IV=$((${OFFSET} + ${VALUE}))
sed -i '' -Ee "s/^\/\/ IV:.+$/\/\/ IV: $((${IV}))/1" "tmp/${VALUE}/contracts/ERC1820Registry.sol"
pushd "./tmp/${VALUE}" > /dev/null
solc --overwrite --optimize --optimize-runs 200 --metadata-literal --output-dir ./artifacts \
--combined-json abi,bin ./contracts/ERC1820Registry.sol >/dev/null &
popd > /dev/null
done
wait
node scripts/vanitygen-info.js "${OFFSET}" "${BATCHSIZE}" | tee -a addrs.txt
done