diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-22 17:54:48 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-22 17:54:48 +0800 |
commit | 1e8b54abfb7129fcdf4812ad01b6a7cd61e4f65d (patch) | |
tree | 6ad93d5117d8194ee700e3347b59d0602cd4c40c /ethvm/common.go | |
parent | 20ee1ae65e57ef7d60404277162c84c572c6bb10 (diff) | |
download | dexon-1e8b54abfb7129fcdf4812ad01b6a7cd61e4f65d.tar dexon-1e8b54abfb7129fcdf4812ad01b6a7cd61e4f65d.tar.gz dexon-1e8b54abfb7129fcdf4812ad01b6a7cd61e4f65d.tar.bz2 dexon-1e8b54abfb7129fcdf4812ad01b6a7cd61e4f65d.tar.lz dexon-1e8b54abfb7129fcdf4812ad01b6a7cd61e4f65d.tar.xz dexon-1e8b54abfb7129fcdf4812ad01b6a7cd61e4f65d.tar.zst dexon-1e8b54abfb7129fcdf4812ad01b6a7cd61e4f65d.zip |
Refactored state, state object and vm
* The State and StateObject have been moved to their own package
* The VM is moved to it's own package
Diffstat (limited to 'ethvm/common.go')
-rw-r--r-- | ethvm/common.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ethvm/common.go b/ethvm/common.go new file mode 100644 index 000000000..5a3aec648 --- /dev/null +++ b/ethvm/common.go @@ -0,0 +1,27 @@ +package ethvm + +import ( + "github.com/ethereum/eth-go/ethlog" + "github.com/ethereum/eth-go/ethutil" + "math/big" +) + +var vmlogger = ethlog.NewLogger("VM") + +var ( + GasStep = big.NewInt(1) + GasSha = big.NewInt(20) + GasSLoad = big.NewInt(20) + GasSStore = big.NewInt(100) + GasBalance = big.NewInt(20) + GasCreate = big.NewInt(100) + GasCall = big.NewInt(20) + GasMemory = big.NewInt(1) + GasData = big.NewInt(5) + GasTx = big.NewInt(500) + + Pow256 = ethutil.BigPow(2, 256) + + LogTyPretty byte = 0x1 + LogTyDiff byte = 0x2 +) |