diff --git a/cli/nep_test/nep17_test.go b/cli/nep_test/nep17_test.go index 6aeed8df7..6a6a78a1d 100644 --- a/cli/nep_test/nep17_test.go +++ b/cli/nep_test/nep17_test.go @@ -99,7 +99,7 @@ func TestNEP17Balance(t *testing.T) { } e.CheckNextLine(t, "^\\s*$") - addr4, err := address.StringToUint160("NfWu6j9KPLQMsWLfHz9iZRy5sNw2bUZWQL") // deployed verify.go contract + addr4, err := address.StringToUint160("NiFxRcC5Anz9pmqQyMHh5vamBUZDbRRRzA") // deployed verify.go contract require.NoError(t, err) e.CheckNextLine(t, "^Account "+address.Uint160ToString(addr4)) e.CheckEOF(t) diff --git a/cli/testdata/wallet1_solo.json b/cli/testdata/wallet1_solo.json index 4c9345ae1..a862c61d3 100644 --- a/cli/testdata/wallet1_solo.json +++ b/cli/testdata/wallet1_solo.json @@ -61,7 +61,7 @@ "isDefault": false }, { - "address": "NfWu6j9KPLQMsWLfHz9iZRy5sNw2bUZWQL", + "address": "NiFxRcC5Anz9pmqQyMHh5vamBUZDbRRRzA", "key": "6PYSATFztBa3CHjSR6sLAKungUEAbQUCVE16KzmaQQ38gLeYGZ9Knd5mGv", "label": "verify", "contract": { diff --git a/cli/vm/cli_test.go b/cli/vm/cli_test.go index 2b32b8f79..a7ecdc957 100644 --- a/cli/vm/cli_test.go +++ b/cli/vm/cli_test.go @@ -924,7 +924,7 @@ func TestRunWithHistoricState(t *testing.T) { e.checkNextLine(t, "READY: loaded 36 instructions") e.checkStack(t, []byte{1}) e.checkNextLine(t, "READY: loaded 36 instructions") - e.checkNextLineExact(t, "Error: at instruction 31 (SYSCALL): System.Contract.Call failed: called contract cd583ac7a1a4faef70d6e9f513bc988dde22f672 not found: key not found\n") + e.checkNextLineExact(t, "Error: at instruction 31 (SYSCALL): System.Contract.Call failed: called contract 73a23e915b66ae406866787f4a6c1c517dc981e2 not found: key not found\n") } func TestEvents(t *testing.T) { @@ -949,7 +949,7 @@ func TestEvents(t *testing.T) { }), }), } - e.checkNextLine(t, "READY: loaded 43 instructions") + e.checkNextLine(t, "READY: loaded 42 instructions") e.checkStack(t, stackitem.Null{}) e.checkEvents(t, true, expectedEvent) // automatically printed after `run` command e.checkEvents(t, false, expectedEvent) // printed after `events` command diff --git a/pkg/core/fee/opcode.go b/pkg/core/fee/opcode.go index 19a73cbdd..ba9e9a558 100644 --- a/pkg/core/fee/opcode.go +++ b/pkg/core/fee/opcode.go @@ -20,6 +20,8 @@ var coefficients = [256]uint16{ opcode.PUSHINT64: 1 << 0, opcode.PUSHINT128: 1 << 2, opcode.PUSHINT256: 1 << 2, + opcode.PUSHT: 1 << 0, + opcode.PUSHF: 1 << 0, opcode.PUSHA: 1 << 2, opcode.PUSHNULL: 1 << 0, opcode.PUSHDATA1: 1 << 3, diff --git a/pkg/services/rpcsrv/server_test.go b/pkg/services/rpcsrv/server_test.go index ec6270e86..764af4756 100644 --- a/pkg/services/rpcsrv/server_test.go +++ b/pkg/services/rpcsrv/server_test.go @@ -2560,7 +2560,7 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) [] t.Run("contract-based verification with parameters", func(t *testing.T) { verAcc, err := util.Uint160DecodeStringLE(verifyWithArgsContractHash) require.NoError(t, err) - checkContract(t, verAcc, []byte{}, 245250) // No C# match, but we believe it's OK and it differs from the one above. + checkContract(t, verAcc, []byte{}, 244130) // No C# match, but we believe it's OK and it differs from the one above. }) t.Run("contract-based verification with invocation script", func(t *testing.T) { verAcc, err := util.Uint160DecodeStringLE(verifyWithArgsContractHash) @@ -2570,7 +2570,7 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) [] emit.Int(invocWriter.BinWriter, 5) emit.String(invocWriter.BinWriter, "") invocScript := invocWriter.Bytes() - checkContract(t, verAcc, invocScript, 148080) // No C# match, but we believe it's OK and it has a specific invocation script overriding anything server-side. + checkContract(t, verAcc, invocScript, 146960) // No C# match, but we believe it's OK and it has a specific invocation script overriding anything server-side. }) }) } diff --git a/pkg/smartcontract/param_type_test.go b/pkg/smartcontract/param_type_test.go index 83294a316..88ac51fd6 100644 --- a/pkg/smartcontract/param_type_test.go +++ b/pkg/smartcontract/param_type_test.go @@ -347,7 +347,7 @@ func TestEncodeDefaultValue(t *testing.T) { for p, l := range map[ParamType]int{ UnknownType: 0, AnyType: 66, - BoolType: 2, + BoolType: 1, IntegerType: 33, ByteArrayType: 66, StringType: 66, diff --git a/pkg/vm/emit/emit.go b/pkg/vm/emit/emit.go index fedf8929d..8292aa30e 100644 --- a/pkg/vm/emit/emit.go +++ b/pkg/vm/emit/emit.go @@ -31,11 +31,11 @@ func Opcodes(w *io.BinWriter, ops ...opcode.Opcode) { // Bool emits a bool type to the given buffer. func Bool(w *io.BinWriter, ok bool) { - var opVal = opcode.PUSHF + var opVal = opcode.PUSHT if !ok { - opVal = opcode.PUSHT + opVal = opcode.PUSHF } - Opcodes(w, opVal, opcode.NOT) + Opcodes(w, opVal) } func padRight(s int, buf []byte) []byte { diff --git a/pkg/vm/emit/emit_test.go b/pkg/vm/emit/emit_test.go index 130cc5e54..a585161b4 100644 --- a/pkg/vm/emit/emit_test.go +++ b/pkg/vm/emit/emit_test.go @@ -224,15 +224,15 @@ func TestEmitArray(t *testing.T) { veryBig := new(big.Int).SetUint64(math.MaxUint64) veryBig.Add(veryBig, big.NewInt(1)) Array(buf.BinWriter, p160, p256, &u160, &u256, u160, u256, big.NewInt(0), veryBig, - []interface{}{int64(1), int64(2)}, nil, int64(1), "str", true, []byte{0xCA, 0xFE}) + []interface{}{int64(1), int64(2)}, nil, int64(1), "str", false, true, []byte{0xCA, 0xFE}) require.NoError(t, buf.Err) res := buf.Bytes() assert.EqualValues(t, opcode.PUSHDATA1, res[0]) assert.EqualValues(t, 2, res[1]) assert.EqualValues(t, []byte{0xCA, 0xFE}, res[2:4]) - assert.EqualValues(t, opcode.PUSHF, res[4]) - assert.EqualValues(t, opcode.NOT, res[5]) + assert.EqualValues(t, opcode.PUSHT, res[4]) + assert.EqualValues(t, opcode.PUSHF, res[5]) assert.EqualValues(t, opcode.PUSHDATA1, res[6]) assert.EqualValues(t, 3, res[7]) assert.EqualValues(t, []byte("str"), res[8:11]) @@ -280,10 +280,8 @@ func TestEmitBool(t *testing.T) { Bool(buf.BinWriter, true) Bool(buf.BinWriter, false) result := buf.Bytes() - assert.EqualValues(t, opcode.PUSH0, result[0]) - assert.EqualValues(t, opcode.NOT, result[1]) - assert.EqualValues(t, opcode.PUSH1, result[2]) - assert.EqualValues(t, opcode.NOT, result[3]) + assert.EqualValues(t, opcode.PUSHT, result[0]) + assert.EqualValues(t, opcode.PUSHF, result[1]) } func TestEmitOpcode(t *testing.T) { diff --git a/pkg/vm/opcode/opcode.go b/pkg/vm/opcode/opcode.go index 08e1c8cdf..00eb6bf2a 100644 --- a/pkg/vm/opcode/opcode.go +++ b/pkg/vm/opcode/opcode.go @@ -15,6 +15,9 @@ const ( PUSHINT128 Opcode = 0x04 PUSHINT256 Opcode = 0x05 + PUSHT Opcode = 0x08 + PUSHF Opcode = 0x09 + PUSHA Opcode = 0x0A PUSHNULL Opcode = 0x0B @@ -24,9 +27,7 @@ const ( PUSHM1 Opcode = 0x0F PUSH0 Opcode = 0x10 - PUSHF Opcode = PUSH0 PUSH1 Opcode = 0x11 - PUSHT Opcode = PUSH1 PUSH2 Opcode = 0x12 PUSH3 Opcode = 0x13 PUSH4 Opcode = 0x14 diff --git a/pkg/vm/opcode/opcode_string.go b/pkg/vm/opcode/opcode_string.go index 9c3a3582c..ee4e7e2e5 100644 --- a/pkg/vm/opcode/opcode_string.go +++ b/pkg/vm/opcode/opcode_string.go @@ -14,6 +14,8 @@ func _() { _ = x[PUSHINT64-3] _ = x[PUSHINT128-4] _ = x[PUSHINT256-5] + _ = x[PUSHT-8] + _ = x[PUSHF-9] _ = x[PUSHA-10] _ = x[PUSHNULL-11] _ = x[PUSHDATA1-12] @@ -21,9 +23,7 @@ func _() { _ = x[PUSHDATA4-14] _ = x[PUSHM1-15] _ = x[PUSH0-16] - _ = x[PUSHF-16] _ = x[PUSH1-17] - _ = x[PUSHT-17] _ = x[PUSH2-18] _ = x[PUSH3-19] _ = x[PUSH4-20] @@ -204,7 +204,7 @@ func _() { _ = x[CONVERT-219] } -const _Opcode_name = "PUSHINT8PUSHINT16PUSHINT32PUSHINT64PUSHINT128PUSHINT256PUSHAPUSHNULLPUSHDATA1PUSHDATA2PUSHDATA4PUSHM1PUSH0PUSH1PUSH2PUSH3PUSH4PUSH5PUSH6PUSH7PUSH8PUSH9PUSH10PUSH11PUSH12PUSH13PUSH14PUSH15PUSH16NOPJMPJMP_LJMPIFJMPIF_LJMPIFNOTJMPIFNOT_LJMPEQJMPEQ_LJMPNEJMPNE_LJMPGTJMPGT_LJMPGEJMPGE_LJMPLTJMPLT_LJMPLEJMPLE_LCALLCALL_LCALLACALLTABORTASSERTTHROWTRYTRY_LENDTRYENDTRY_LENDFINALLYRETSYSCALLDEPTHDROPNIPXDROPCLEARDUPOVERPICKTUCKSWAPROTROLLREVERSE3REVERSE4REVERSENINITSSLOTINITSLOTLDSFLD0LDSFLD1LDSFLD2LDSFLD3LDSFLD4LDSFLD5LDSFLD6LDSFLDSTSFLD0STSFLD1STSFLD2STSFLD3STSFLD4STSFLD5STSFLD6STSFLDLDLOC0LDLOC1LDLOC2LDLOC3LDLOC4LDLOC5LDLOC6LDLOCSTLOC0STLOC1STLOC2STLOC3STLOC4STLOC5STLOC6STLOCLDARG0LDARG1LDARG2LDARG3LDARG4LDARG5LDARG6LDARGSTARG0STARG1STARG2STARG3STARG4STARG5STARG6STARGNEWBUFFERMEMCPYCATSUBSTRLEFTRIGHTINVERTANDORXOREQUALNOTEQUALSIGNABSNEGATEINCDECADDSUBMULDIVMODPOWSQRTMODMULMODPOWSHLSHRNOTBOOLANDBOOLORNZNUMEQUALNUMNOTEQUALLTLEGTGEMINMAXWITHINPACKMAPPACKSTRUCTPACKUNPACKNEWARRAY0NEWARRAYNEWARRAY_TNEWSTRUCT0NEWSTRUCTNEWMAPSIZEHASKEYKEYSVALUESPICKITEMAPPENDSETITEMREVERSEITEMSREMOVECLEARITEMSPOPITEMISNULLISTYPECONVERT" +const _Opcode_name = "PUSHINT8PUSHINT16PUSHINT32PUSHINT64PUSHINT128PUSHINT256PUSHTPUSHFPUSHAPUSHNULLPUSHDATA1PUSHDATA2PUSHDATA4PUSHM1PUSH0PUSH1PUSH2PUSH3PUSH4PUSH5PUSH6PUSH7PUSH8PUSH9PUSH10PUSH11PUSH12PUSH13PUSH14PUSH15PUSH16NOPJMPJMP_LJMPIFJMPIF_LJMPIFNOTJMPIFNOT_LJMPEQJMPEQ_LJMPNEJMPNE_LJMPGTJMPGT_LJMPGEJMPGE_LJMPLTJMPLT_LJMPLEJMPLE_LCALLCALL_LCALLACALLTABORTASSERTTHROWTRYTRY_LENDTRYENDTRY_LENDFINALLYRETSYSCALLDEPTHDROPNIPXDROPCLEARDUPOVERPICKTUCKSWAPROTROLLREVERSE3REVERSE4REVERSENINITSSLOTINITSLOTLDSFLD0LDSFLD1LDSFLD2LDSFLD3LDSFLD4LDSFLD5LDSFLD6LDSFLDSTSFLD0STSFLD1STSFLD2STSFLD3STSFLD4STSFLD5STSFLD6STSFLDLDLOC0LDLOC1LDLOC2LDLOC3LDLOC4LDLOC5LDLOC6LDLOCSTLOC0STLOC1STLOC2STLOC3STLOC4STLOC5STLOC6STLOCLDARG0LDARG1LDARG2LDARG3LDARG4LDARG5LDARG6LDARGSTARG0STARG1STARG2STARG3STARG4STARG5STARG6STARGNEWBUFFERMEMCPYCATSUBSTRLEFTRIGHTINVERTANDORXOREQUALNOTEQUALSIGNABSNEGATEINCDECADDSUBMULDIVMODPOWSQRTMODMULMODPOWSHLSHRNOTBOOLANDBOOLORNZNUMEQUALNUMNOTEQUALLTLEGTGEMINMAXWITHINPACKMAPPACKSTRUCTPACKUNPACKNEWARRAY0NEWARRAYNEWARRAY_TNEWSTRUCT0NEWSTRUCTNEWMAPSIZEHASKEYKEYSVALUESPICKITEMAPPENDSETITEMREVERSEITEMSREMOVECLEARITEMSPOPITEMISNULLISTYPECONVERT" var _Opcode_map = map[Opcode]string{ 0: _Opcode_name[0:8], @@ -213,192 +213,194 @@ var _Opcode_map = map[Opcode]string{ 3: _Opcode_name[26:35], 4: _Opcode_name[35:45], 5: _Opcode_name[45:55], - 10: _Opcode_name[55:60], - 11: _Opcode_name[60:68], - 12: _Opcode_name[68:77], - 13: _Opcode_name[77:86], - 14: _Opcode_name[86:95], - 15: _Opcode_name[95:101], - 16: _Opcode_name[101:106], - 17: _Opcode_name[106:111], - 18: _Opcode_name[111:116], - 19: _Opcode_name[116:121], - 20: _Opcode_name[121:126], - 21: _Opcode_name[126:131], - 22: _Opcode_name[131:136], - 23: _Opcode_name[136:141], - 24: _Opcode_name[141:146], - 25: _Opcode_name[146:151], - 26: _Opcode_name[151:157], - 27: _Opcode_name[157:163], - 28: _Opcode_name[163:169], - 29: _Opcode_name[169:175], - 30: _Opcode_name[175:181], - 31: _Opcode_name[181:187], - 32: _Opcode_name[187:193], - 33: _Opcode_name[193:196], - 34: _Opcode_name[196:199], - 35: _Opcode_name[199:204], - 36: _Opcode_name[204:209], - 37: _Opcode_name[209:216], - 38: _Opcode_name[216:224], - 39: _Opcode_name[224:234], - 40: _Opcode_name[234:239], - 41: _Opcode_name[239:246], - 42: _Opcode_name[246:251], - 43: _Opcode_name[251:258], - 44: _Opcode_name[258:263], - 45: _Opcode_name[263:270], - 46: _Opcode_name[270:275], - 47: _Opcode_name[275:282], - 48: _Opcode_name[282:287], - 49: _Opcode_name[287:294], - 50: _Opcode_name[294:299], - 51: _Opcode_name[299:306], - 52: _Opcode_name[306:310], - 53: _Opcode_name[310:316], - 54: _Opcode_name[316:321], - 55: _Opcode_name[321:326], - 56: _Opcode_name[326:331], - 57: _Opcode_name[331:337], - 58: _Opcode_name[337:342], - 59: _Opcode_name[342:345], - 60: _Opcode_name[345:350], - 61: _Opcode_name[350:356], - 62: _Opcode_name[356:364], - 63: _Opcode_name[364:374], - 64: _Opcode_name[374:377], - 65: _Opcode_name[377:384], - 67: _Opcode_name[384:389], - 69: _Opcode_name[389:393], - 70: _Opcode_name[393:396], - 72: _Opcode_name[396:401], - 73: _Opcode_name[401:406], - 74: _Opcode_name[406:409], - 75: _Opcode_name[409:413], - 77: _Opcode_name[413:417], - 78: _Opcode_name[417:421], - 80: _Opcode_name[421:425], - 81: _Opcode_name[425:428], - 82: _Opcode_name[428:432], - 83: _Opcode_name[432:440], - 84: _Opcode_name[440:448], - 85: _Opcode_name[448:456], - 86: _Opcode_name[456:465], - 87: _Opcode_name[465:473], - 88: _Opcode_name[473:480], - 89: _Opcode_name[480:487], - 90: _Opcode_name[487:494], - 91: _Opcode_name[494:501], - 92: _Opcode_name[501:508], - 93: _Opcode_name[508:515], - 94: _Opcode_name[515:522], - 95: _Opcode_name[522:528], - 96: _Opcode_name[528:535], - 97: _Opcode_name[535:542], - 98: _Opcode_name[542:549], - 99: _Opcode_name[549:556], - 100: _Opcode_name[556:563], - 101: _Opcode_name[563:570], - 102: _Opcode_name[570:577], - 103: _Opcode_name[577:583], - 104: _Opcode_name[583:589], - 105: _Opcode_name[589:595], - 106: _Opcode_name[595:601], - 107: _Opcode_name[601:607], - 108: _Opcode_name[607:613], - 109: _Opcode_name[613:619], - 110: _Opcode_name[619:625], - 111: _Opcode_name[625:630], - 112: _Opcode_name[630:636], - 113: _Opcode_name[636:642], - 114: _Opcode_name[642:648], - 115: _Opcode_name[648:654], - 116: _Opcode_name[654:660], - 117: _Opcode_name[660:666], - 118: _Opcode_name[666:672], - 119: _Opcode_name[672:677], - 120: _Opcode_name[677:683], - 121: _Opcode_name[683:689], - 122: _Opcode_name[689:695], - 123: _Opcode_name[695:701], - 124: _Opcode_name[701:707], - 125: _Opcode_name[707:713], - 126: _Opcode_name[713:719], - 127: _Opcode_name[719:724], - 128: _Opcode_name[724:730], - 129: _Opcode_name[730:736], - 130: _Opcode_name[736:742], - 131: _Opcode_name[742:748], - 132: _Opcode_name[748:754], - 133: _Opcode_name[754:760], - 134: _Opcode_name[760:766], - 135: _Opcode_name[766:771], - 136: _Opcode_name[771:780], - 137: _Opcode_name[780:786], - 139: _Opcode_name[786:789], - 140: _Opcode_name[789:795], - 141: _Opcode_name[795:799], - 142: _Opcode_name[799:804], - 144: _Opcode_name[804:810], - 145: _Opcode_name[810:813], - 146: _Opcode_name[813:815], - 147: _Opcode_name[815:818], - 151: _Opcode_name[818:823], - 152: _Opcode_name[823:831], - 153: _Opcode_name[831:835], - 154: _Opcode_name[835:838], - 155: _Opcode_name[838:844], - 156: _Opcode_name[844:847], - 157: _Opcode_name[847:850], - 158: _Opcode_name[850:853], - 159: _Opcode_name[853:856], - 160: _Opcode_name[856:859], - 161: _Opcode_name[859:862], - 162: _Opcode_name[862:865], - 163: _Opcode_name[865:868], - 164: _Opcode_name[868:872], - 165: _Opcode_name[872:878], - 166: _Opcode_name[878:884], - 168: _Opcode_name[884:887], - 169: _Opcode_name[887:890], - 170: _Opcode_name[890:893], - 171: _Opcode_name[893:900], - 172: _Opcode_name[900:906], - 177: _Opcode_name[906:908], - 179: _Opcode_name[908:916], - 180: _Opcode_name[916:927], - 181: _Opcode_name[927:929], - 182: _Opcode_name[929:931], - 183: _Opcode_name[931:933], - 184: _Opcode_name[933:935], - 185: _Opcode_name[935:938], - 186: _Opcode_name[938:941], - 187: _Opcode_name[941:947], - 190: _Opcode_name[947:954], - 191: _Opcode_name[954:964], - 192: _Opcode_name[964:968], - 193: _Opcode_name[968:974], - 194: _Opcode_name[974:983], - 195: _Opcode_name[983:991], - 196: _Opcode_name[991:1001], - 197: _Opcode_name[1001:1011], - 198: _Opcode_name[1011:1020], - 200: _Opcode_name[1020:1026], - 202: _Opcode_name[1026:1030], - 203: _Opcode_name[1030:1036], - 204: _Opcode_name[1036:1040], - 205: _Opcode_name[1040:1046], - 206: _Opcode_name[1046:1054], - 207: _Opcode_name[1054:1060], - 208: _Opcode_name[1060:1067], - 209: _Opcode_name[1067:1079], - 210: _Opcode_name[1079:1085], - 211: _Opcode_name[1085:1095], - 212: _Opcode_name[1095:1102], - 216: _Opcode_name[1102:1108], - 217: _Opcode_name[1108:1114], - 219: _Opcode_name[1114:1121], + 8: _Opcode_name[55:60], + 9: _Opcode_name[60:65], + 10: _Opcode_name[65:70], + 11: _Opcode_name[70:78], + 12: _Opcode_name[78:87], + 13: _Opcode_name[87:96], + 14: _Opcode_name[96:105], + 15: _Opcode_name[105:111], + 16: _Opcode_name[111:116], + 17: _Opcode_name[116:121], + 18: _Opcode_name[121:126], + 19: _Opcode_name[126:131], + 20: _Opcode_name[131:136], + 21: _Opcode_name[136:141], + 22: _Opcode_name[141:146], + 23: _Opcode_name[146:151], + 24: _Opcode_name[151:156], + 25: _Opcode_name[156:161], + 26: _Opcode_name[161:167], + 27: _Opcode_name[167:173], + 28: _Opcode_name[173:179], + 29: _Opcode_name[179:185], + 30: _Opcode_name[185:191], + 31: _Opcode_name[191:197], + 32: _Opcode_name[197:203], + 33: _Opcode_name[203:206], + 34: _Opcode_name[206:209], + 35: _Opcode_name[209:214], + 36: _Opcode_name[214:219], + 37: _Opcode_name[219:226], + 38: _Opcode_name[226:234], + 39: _Opcode_name[234:244], + 40: _Opcode_name[244:249], + 41: _Opcode_name[249:256], + 42: _Opcode_name[256:261], + 43: _Opcode_name[261:268], + 44: _Opcode_name[268:273], + 45: _Opcode_name[273:280], + 46: _Opcode_name[280:285], + 47: _Opcode_name[285:292], + 48: _Opcode_name[292:297], + 49: _Opcode_name[297:304], + 50: _Opcode_name[304:309], + 51: _Opcode_name[309:316], + 52: _Opcode_name[316:320], + 53: _Opcode_name[320:326], + 54: _Opcode_name[326:331], + 55: _Opcode_name[331:336], + 56: _Opcode_name[336:341], + 57: _Opcode_name[341:347], + 58: _Opcode_name[347:352], + 59: _Opcode_name[352:355], + 60: _Opcode_name[355:360], + 61: _Opcode_name[360:366], + 62: _Opcode_name[366:374], + 63: _Opcode_name[374:384], + 64: _Opcode_name[384:387], + 65: _Opcode_name[387:394], + 67: _Opcode_name[394:399], + 69: _Opcode_name[399:403], + 70: _Opcode_name[403:406], + 72: _Opcode_name[406:411], + 73: _Opcode_name[411:416], + 74: _Opcode_name[416:419], + 75: _Opcode_name[419:423], + 77: _Opcode_name[423:427], + 78: _Opcode_name[427:431], + 80: _Opcode_name[431:435], + 81: _Opcode_name[435:438], + 82: _Opcode_name[438:442], + 83: _Opcode_name[442:450], + 84: _Opcode_name[450:458], + 85: _Opcode_name[458:466], + 86: _Opcode_name[466:475], + 87: _Opcode_name[475:483], + 88: _Opcode_name[483:490], + 89: _Opcode_name[490:497], + 90: _Opcode_name[497:504], + 91: _Opcode_name[504:511], + 92: _Opcode_name[511:518], + 93: _Opcode_name[518:525], + 94: _Opcode_name[525:532], + 95: _Opcode_name[532:538], + 96: _Opcode_name[538:545], + 97: _Opcode_name[545:552], + 98: _Opcode_name[552:559], + 99: _Opcode_name[559:566], + 100: _Opcode_name[566:573], + 101: _Opcode_name[573:580], + 102: _Opcode_name[580:587], + 103: _Opcode_name[587:593], + 104: _Opcode_name[593:599], + 105: _Opcode_name[599:605], + 106: _Opcode_name[605:611], + 107: _Opcode_name[611:617], + 108: _Opcode_name[617:623], + 109: _Opcode_name[623:629], + 110: _Opcode_name[629:635], + 111: _Opcode_name[635:640], + 112: _Opcode_name[640:646], + 113: _Opcode_name[646:652], + 114: _Opcode_name[652:658], + 115: _Opcode_name[658:664], + 116: _Opcode_name[664:670], + 117: _Opcode_name[670:676], + 118: _Opcode_name[676:682], + 119: _Opcode_name[682:687], + 120: _Opcode_name[687:693], + 121: _Opcode_name[693:699], + 122: _Opcode_name[699:705], + 123: _Opcode_name[705:711], + 124: _Opcode_name[711:717], + 125: _Opcode_name[717:723], + 126: _Opcode_name[723:729], + 127: _Opcode_name[729:734], + 128: _Opcode_name[734:740], + 129: _Opcode_name[740:746], + 130: _Opcode_name[746:752], + 131: _Opcode_name[752:758], + 132: _Opcode_name[758:764], + 133: _Opcode_name[764:770], + 134: _Opcode_name[770:776], + 135: _Opcode_name[776:781], + 136: _Opcode_name[781:790], + 137: _Opcode_name[790:796], + 139: _Opcode_name[796:799], + 140: _Opcode_name[799:805], + 141: _Opcode_name[805:809], + 142: _Opcode_name[809:814], + 144: _Opcode_name[814:820], + 145: _Opcode_name[820:823], + 146: _Opcode_name[823:825], + 147: _Opcode_name[825:828], + 151: _Opcode_name[828:833], + 152: _Opcode_name[833:841], + 153: _Opcode_name[841:845], + 154: _Opcode_name[845:848], + 155: _Opcode_name[848:854], + 156: _Opcode_name[854:857], + 157: _Opcode_name[857:860], + 158: _Opcode_name[860:863], + 159: _Opcode_name[863:866], + 160: _Opcode_name[866:869], + 161: _Opcode_name[869:872], + 162: _Opcode_name[872:875], + 163: _Opcode_name[875:878], + 164: _Opcode_name[878:882], + 165: _Opcode_name[882:888], + 166: _Opcode_name[888:894], + 168: _Opcode_name[894:897], + 169: _Opcode_name[897:900], + 170: _Opcode_name[900:903], + 171: _Opcode_name[903:910], + 172: _Opcode_name[910:916], + 177: _Opcode_name[916:918], + 179: _Opcode_name[918:926], + 180: _Opcode_name[926:937], + 181: _Opcode_name[937:939], + 182: _Opcode_name[939:941], + 183: _Opcode_name[941:943], + 184: _Opcode_name[943:945], + 185: _Opcode_name[945:948], + 186: _Opcode_name[948:951], + 187: _Opcode_name[951:957], + 190: _Opcode_name[957:964], + 191: _Opcode_name[964:974], + 192: _Opcode_name[974:978], + 193: _Opcode_name[978:984], + 194: _Opcode_name[984:993], + 195: _Opcode_name[993:1001], + 196: _Opcode_name[1001:1011], + 197: _Opcode_name[1011:1021], + 198: _Opcode_name[1021:1030], + 200: _Opcode_name[1030:1036], + 202: _Opcode_name[1036:1040], + 203: _Opcode_name[1040:1046], + 204: _Opcode_name[1046:1050], + 205: _Opcode_name[1050:1056], + 206: _Opcode_name[1056:1064], + 207: _Opcode_name[1064:1070], + 208: _Opcode_name[1070:1077], + 209: _Opcode_name[1077:1089], + 210: _Opcode_name[1089:1095], + 211: _Opcode_name[1095:1105], + 212: _Opcode_name[1105:1112], + 216: _Opcode_name[1112:1118], + 217: _Opcode_name[1118:1124], + 219: _Opcode_name[1124:1131], } func (i Opcode) String() string { diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index e3944c72f..9893716a0 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -605,6 +605,9 @@ func (v *VM) execute(ctx *Context, op opcode.Opcode, parameter []byte) (err erro case opcode.PUSHDATA1, opcode.PUSHDATA2, opcode.PUSHDATA4: v.estack.PushItem(stackitem.NewByteArray(parameter)) + case opcode.PUSHT, opcode.PUSHF: + v.estack.PushItem(stackitem.NewBool(op == opcode.PUSHT)) + case opcode.PUSHA: n := getJumpOffset(ctx, parameter) ptr := stackitem.NewPointerWithHash(n, ctx.sc.prog, ctx.ScriptHash())