diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-05 21:48:17 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-05 21:48:17 +0800 |
commit | 14a6e6a9cea48bcc7f6d5286e4f85b1a0cce84d8 (patch) | |
tree | dc6e553bf757863c68ed45087962e10d8012a56b /ethutil | |
parent | 3e5a7b34b111e5b72cd4878cdee42af956143406 (diff) | |
download | dexon-14a6e6a9cea48bcc7f6d5286e4f85b1a0cce84d8.tar dexon-14a6e6a9cea48bcc7f6d5286e4f85b1a0cce84d8.tar.gz dexon-14a6e6a9cea48bcc7f6d5286e4f85b1a0cce84d8.tar.bz2 dexon-14a6e6a9cea48bcc7f6d5286e4f85b1a0cce84d8.tar.lz dexon-14a6e6a9cea48bcc7f6d5286e4f85b1a0cce84d8.tar.xz dexon-14a6e6a9cea48bcc7f6d5286e4f85b1a0cce84d8.tar.zst dexon-14a6e6a9cea48bcc7f6d5286e4f85b1a0cce84d8.zip |
Added the ability to submit byte code for contracts instead of Mutan code.
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/bytes.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ethutil/bytes.go b/ethutil/bytes.go index 500368017..b298675a2 100644 --- a/ethutil/bytes.go +++ b/ethutil/bytes.go @@ -83,3 +83,8 @@ func CopyBytes(b []byte) (copiedBytes []byte) { return } + +func IsHex(str string) bool { + l := len(str) + return l >= 4 && l%2 == 0 && str[0:2] == "0x" +} |