aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/common.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-27 22:50:44 +0800
committerobscuren <geffobscura@gmail.com>2014-04-27 22:53:35 +0800
commit16e52327a4baa5547c38965fce53b3ff40b98173 (patch)
tree27fb43512c802e2c3c0fe8bd8d97a55aa2499758 /ethutil/common.go
parent05d2d8f27d0bea5b20be9bc3b4a259a12298ecab (diff)
downloaddexon-16e52327a4baa5547c38965fce53b3ff40b98173.tar
dexon-16e52327a4baa5547c38965fce53b3ff40b98173.tar.gz
dexon-16e52327a4baa5547c38965fce53b3ff40b98173.tar.bz2
dexon-16e52327a4baa5547c38965fce53b3ff40b98173.tar.lz
dexon-16e52327a4baa5547c38965fce53b3ff40b98173.tar.xz
dexon-16e52327a4baa5547c38965fce53b3ff40b98173.tar.zst
dexon-16e52327a4baa5547c38965fce53b3ff40b98173.zip
Upped version number
Diffstat (limited to 'ethutil/common.go')
-rw-r--r--ethutil/common.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/ethutil/common.go b/ethutil/common.go
index c63af29a6..d0ee7b538 100644
--- a/ethutil/common.go
+++ b/ethutil/common.go
@@ -38,5 +38,12 @@ var (
Big1 = big.NewInt(1)
Big2 = big.NewInt(1)
Big0 = big.NewInt(0)
+ Big32 = big.NewInt(32)
Big256 = big.NewInt(0xff)
)
+
+func CreateAddress(b []byte, nonce *big.Int) []byte {
+ addrBytes := append(b, nonce.Bytes()...)
+
+ return Sha3Bin(addrBytes)[12:]
+}