-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from lightclient/addr-gen
scripts: add script to mine deployment addr
- Loading branch information
Showing
4 changed files
with
85 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
if ! command -v go &> /dev/null | ||
then | ||
echo "Go is not installed. Please install Go and try again." | ||
exit 1 | ||
fi | ||
|
||
if ! command -v nick &> /dev/null | ||
then | ||
echo "nick could not be found, installing..." | ||
go install github.com/lightclient/nick@latest | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to install nick." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if ! command -v geas &> /dev/null | ||
then | ||
echo "geas could not be found, installing..." | ||
go install github.com/fjl/geas@latest | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to install geas." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
default_score=5 | ||
score=${2:-$default_score} | ||
|
||
case $1 in | ||
withdrawals|wxs|7002) | ||
echo "searching for withdrawals deployment data " | ||
nick search --score=$score --initcode="0x$(geas src/withdrawals/ctor.eas)" --prefix=0x0000 --suffix=0xaaaa | ||
;; | ||
consolidations|cxs|7251) | ||
echo "searching for consolidations deployment data " | ||
nick search --score=$score --initcode="0x$(geas src/consolidations/ctor.eas)" --prefix=0x0000 --suffix=0xbbbb | ||
;; | ||
*) | ||
echo "Invalid option. Usage: $0 {withdrawals|consolidations}" | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,5 @@ push0 | |
return | ||
|
||
.start: | ||
#assemble "consolidation.eas" | ||
#assemble "main.eas" | ||
.end: |