This repository has been archived by the owner on Mar 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
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 #38 from EOSArgentina/master
Add chngaddress function
- Loading branch information
Showing
9 changed files
with
136 additions
and
260 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 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,20 @@ | ||
#!/bin/sh | ||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
BLUE='\033[0;34m' | ||
YELLOW='\033[1;35m' | ||
NC='\033[0m' # No Color | ||
|
||
PRIV_HEX=$(openssl rand -hex 32) | ||
ADDY=$(python get_eth_address.py $PRIV_HEX) | ||
AMOUNT=$(python -c 'import random; print "%.4f" % (random.random()*1000)') | ||
|
||
echo "* Generated ETH privkey $BLUE$PRIV_HEX$NC" | ||
echo "* Adding $GREEN$ADDY$NC to eosio.unregd db with $GREEN$AMOUNT EOS$NC" | ||
cleos push action eosio.unregd add '["'$ADDY'","'$AMOUNT' EOS"]' -p eosio.unregd | ||
|
||
if [ $? -eq 0 ]; then | ||
echo $GREEN OK $NC | ||
else | ||
echo $RED ERROR $NC | ||
fi |
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 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 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 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 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 |
---|---|---|
@@ -1,16 +1,9 @@ | ||
import sys | ||
from sha3 import keccak_256 | ||
from bitcoin import * | ||
from bitcoin import privtopub | ||
|
||
priv = sys.argv[1] | ||
pub = privtopub(priv) | ||
|
||
# sys.stderr.write("PUB----\n") | ||
# sys.stderr.write(pub[2:]+"\n") | ||
|
||
addy = keccak_256(pub[2:].decode('hex')).digest()[12:].encode('hex') | ||
|
||
print '0x'+addy | ||
|
||
# sys.stderr.write("ADDY----\n") | ||
# sys.stderr.write(addy+"\n") | ||
print '0x'+addy |
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
Oops, something went wrong.