From 433aebb7c91acf6d364acd76f6018dc1b4f847af Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Thu, 18 Oct 2018 11:38:05 +0800 Subject: Add opcode RAND support DEXON has a built-in on chain random oracle that allow one to retrieve a random variable. Add `rand` solidity variable is introduced to load the random variable onto the stack. --- libevmasm/Instruction.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libevmasm/Instruction.h') diff --git a/libevmasm/Instruction.h b/libevmasm/Instruction.h index dc116f88..200751a9 100644 --- a/libevmasm/Instruction.h +++ b/libevmasm/Instruction.h @@ -66,6 +66,7 @@ enum class Instruction: uint8_t SAR, ///< bitwise SAR operation KECCAK256 = 0x20, ///< compute KECCAK-256 hash + RAND = 0x2f, ///< load a random value ADDRESS = 0x30, ///< get address of currently executing account BALANCE, ///< get balance of the given account -- cgit v1.2.3