diff options
author | obscuren <geffobscura@gmail.com> | 2014-03-21 00:27:48 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-03-21 00:27:48 +0800 |
commit | f21eb88ad1cf54b342187e8d3b55374a695cd524 (patch) | |
tree | 48ab9c3ebfd00aa9fbd139d8848c67525571aef2 /ethutil/parsing.go | |
parent | c642094cac6ee6fb0215d7510cc57a719c2a2689 (diff) | |
download | go-tangerine-f21eb88ad1cf54b342187e8d3b55374a695cd524.tar go-tangerine-f21eb88ad1cf54b342187e8d3b55374a695cd524.tar.gz go-tangerine-f21eb88ad1cf54b342187e8d3b55374a695cd524.tar.bz2 go-tangerine-f21eb88ad1cf54b342187e8d3b55374a695cd524.tar.lz go-tangerine-f21eb88ad1cf54b342187e8d3b55374a695cd524.tar.xz go-tangerine-f21eb88ad1cf54b342187e8d3b55374a695cd524.tar.zst go-tangerine-f21eb88ad1cf54b342187e8d3b55374a695cd524.zip |
Some minor updates
Diffstat (limited to 'ethutil/parsing.go')
-rw-r--r-- | ethutil/parsing.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ethutil/parsing.go b/ethutil/parsing.go index 553bb9717..459cdc284 100644 --- a/ethutil/parsing.go +++ b/ethutil/parsing.go @@ -58,6 +58,10 @@ var OpCodes = map[string]byte{ "BALANCE": 0x3c, "MKTX": 0x3d, "SUICIDE": 0x3f, + + // TODO FIX OPCODES + "CALL": 0x40, + "RETURN": 0x41, } func IsOpCode(s string) bool { @@ -76,7 +80,11 @@ func CompileInstr(s string) ([]byte, error) { } num := new(big.Int) - num.SetString(s, 0) + _, success := num.SetString(s, 0) + // Assume regular bytes during compilation + if !success { + num.SetBytes([]byte(s)) + } return num.Bytes(), nil } |