diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-18 13:12:16 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 13:49:53 +0800 |
commit | f8969c0635452e2610995ffef8f7417d7051c43e (patch) | |
tree | e5c929c58fd8435fd8404ac22e11450ae17b821d /core/vm/evm.go | |
parent | 96cbe2f0f1cbfb44649178b32fba8bd4d0859747 (diff) | |
download | dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.gz dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.bz2 dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.lz dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.xz dexon-f8969c0635452e2610995ffef8f7417d7051c43e.tar.zst dexon-f8969c0635452e2610995ffef8f7417d7051c43e.zip |
core: vm: implement RAND opcode support
DEXON has a built-in on chain random oracle that allow one to retrieve a
random variable. Add a new opcode `RAND` to load the random variable
onto the stack.
Diffstat (limited to 'core/vm/evm.go')
-rw-r--r-- | core/vm/evm.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/vm/evm.go b/core/vm/evm.go index e22acb81c..be2dabcf5 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -90,6 +90,7 @@ type Context struct { GasLimit uint64 // Provides information for GASLIMIT BlockNumber *big.Int // Provides information for NUMBER Time *big.Int // Provides information for TIME + Randomness []byte // Provides information for RAND Difficulty *big.Int // Provides information for DIFFICULTY } |