From 62a65612b4323d0ec33acc66277e6f43e95f5086 Mon Sep 17 00:00:00 2001
From: smblucker <smblucker@outlook.com>
Date: Tue, 15 May 2018 12:22:49 -0400
Subject: [PATCH] Adding create2 opcode placeholder

Signed-off-by: smblucker <smblucker@outlook.com>
---
 execution/evm/asm/opcodes.go            | 2 ++
 execution/evm/vm.go                     | 2 +-
 rpc/tm/integration/websocket_helpers.go | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/execution/evm/asm/opcodes.go b/execution/evm/asm/opcodes.go
index 8dd39340..3017c213 100644
--- a/execution/evm/asm/opcodes.go
+++ b/execution/evm/asm/opcodes.go
@@ -188,6 +188,7 @@ const (
 
 	// 0x70 range - other
 	STATICCALL   = 0xfa
+	CREATE2      = 0xfb
 	REVERT       = 0xfd
 	INVALID      = 0xfe
 	SELFDESTRUCT = 0xff
@@ -347,6 +348,7 @@ var opCodeNames = map[OpCode]string{
 	DELEGATECALL: "DELEGATECALL",
 	STATICCALL:   "STATICCALL",
 	// 0x70 range - other
+	CREATE2:      "CREATE2",
 	REVERT:       "REVERT",
 	INVALID:      "INVALID",
 	SELFDESTRUCT: "SELFDESTRUCT",
diff --git a/execution/evm/vm.go b/execution/evm/vm.go
index c0191bf6..03c67c3f 100644
--- a/execution/evm/vm.go
+++ b/execution/evm/vm.go
@@ -1153,7 +1153,7 @@ func (vm *VM) call(caller acm.Account, callee acm.MutableAccount, code, input []
 		case STOP: // 0x00
 			return nil, nil
 
-		case STATICCALL:
+		case STATICCALL, CREATE2:
 			return nil, fmt.Errorf("%s not yet implemented", op.Name())
 		default:
 			vm.Debugf("(pc) %-3v Unknown opcode %X\n", pc, op)
diff --git a/rpc/tm/integration/websocket_helpers.go b/rpc/tm/integration/websocket_helpers.go
index 9f0a4364..ea30de8f 100644
--- a/rpc/tm/integration/websocket_helpers.go
+++ b/rpc/tm/integration/websocket_helpers.go
@@ -37,7 +37,7 @@ import (
 )
 
 const (
-	timeoutSeconds       = 4
+	timeoutSeconds       = 8
 	expectBlockInSeconds = 2
 )
 
-- 
GitLab