diff --git a/src/Neo.Compiler.CSharp/MethodConvert/System/SystemCall.Math.cs b/src/Neo.Compiler.CSharp/MethodConvert/System/SystemCall.Math.cs index dd83bc3c8..1fc77c111 100644 --- a/src/Neo.Compiler.CSharp/MethodConvert/System/SystemCall.Math.cs +++ b/src/Neo.Compiler.CSharp/MethodConvert/System/SystemCall.Math.cs @@ -306,41 +306,36 @@ private static void HandleMathClamp(MethodConvert methodConvert, SemanticModel m if (arguments is not null) methodConvert.PrepareArgumentsForMethod(model, symbol, arguments, CallingConvention.StdCall); - var endTarget = new JumpTarget(); var exceptionTarget = new JumpTarget(); - var minTarget = new JumpTarget(); - var maxTarget = new JumpTarget(); - methodConvert.AddInstruction(OpCode.DUP);// 5 0 10 10 - methodConvert.AddInstruction(OpCode.ROT);// 5 10 10 0 - methodConvert.AddInstruction(OpCode.DUP);// 5 10 10 0 0 - methodConvert.AddInstruction(OpCode.ROT);// 5 10 0 0 10 - methodConvert.Jump(OpCode.JMPLT, exceptionTarget);// 5 10 0 + // Evaluation stack: value=5 min=0 max=10 <- top + methodConvert.AddInstruction(OpCode.OVER); // 5 0 10 0 + methodConvert.AddInstruction(OpCode.OVER); // 5 0 10 0 10 <- top + methodConvert.Jump(OpCode.JMPLE, exceptionTarget); // 5 0 10 // if 0 <= 10, continue execution + //methodConvert.Push("min>max"); methodConvert.AddInstruction(OpCode.THROW); exceptionTarget.Instruction = methodConvert.AddInstruction(OpCode.NOP); - methodConvert.AddInstruction(OpCode.ROT);// 10 0 5 - methodConvert.AddInstruction(OpCode.DUP);// 10 0 5 5 - methodConvert.AddInstruction(OpCode.ROT);// 10 5 5 0 - methodConvert.AddInstruction(OpCode.DUP);// 10 5 5 0 0 - methodConvert.AddInstruction(OpCode.ROT);// 10 5 0 0 5 - methodConvert.Jump(OpCode.JMPGT, minTarget);// 10 5 0 - methodConvert.AddInstruction(OpCode.DROP);// 10 5 - methodConvert.AddInstruction(OpCode.DUP);// 10 5 5 - methodConvert.AddInstruction(OpCode.ROT);// 5 5 10 - methodConvert.AddInstruction(OpCode.DUP);// 5 5 10 10 - methodConvert.AddInstruction(OpCode.ROT);// 5 10 10 5 - methodConvert.Jump(OpCode.JMPLT, maxTarget);// 5 10 - methodConvert.AddInstruction(OpCode.DROP); - methodConvert.Jump(OpCode.JMP, endTarget); - minTarget.Instruction = methodConvert.AddInstruction(OpCode.NOP); - methodConvert.AddInstruction(OpCode.REVERSE3); - methodConvert.AddInstruction(OpCode.DROP); - methodConvert.AddInstruction(OpCode.DROP); - methodConvert.Jump(OpCode.JMP, endTarget); - maxTarget.Instruction = methodConvert.AddInstruction(OpCode.NOP); - methodConvert.AddInstruction(OpCode.SWAP); - methodConvert.AddInstruction(OpCode.DROP); - methodConvert.Jump(OpCode.JMP, endTarget); - endTarget.Instruction = methodConvert.AddInstruction(OpCode.NOP); + methodConvert.AddInstruction(OpCode.REVERSE3); // 10 0 5 + // MAX&MIN costs 1<<3 each; 16 Datoshi more expensive at runtime + methodConvert.AddInstruction(OpCode.MAX); // 10 5 + methodConvert.AddInstruction(OpCode.MIN); // 5 + //methodConvert.AddInstruction(OpCode.RET); + // Alternatively, a slightly cheaper way at runtime; 10 to 16 Datoshi + //methodConvert.AddInstruction(OpCode.OVER); // 10 0 5 0 + //methodConvert.AddInstruction(OpCode.OVER); // 10 0 5 0 5 + //methodConvert.Jump(OpCode.JMPGE, minTarget); // 10 0 5; should return 0 if JMPed + //methodConvert.AddInstruction(OpCode.NIP); // 10 5 + //methodConvert.AddInstruction(OpCode.OVER); // 10 5 10 + //methodConvert.AddInstruction(OpCode.OVER); // 10 5 10 5 + //methodConvert.Jump(OpCode.JMPLE, maxTarget); // 10 5; should return 10 if JMPed + //methodConvert.AddInstruction(OpCode.NIP); // 5; should return 5 + //methodConvert.AddInstruction(OpCode.RET); + //minTarget.Instruction = methodConvert.AddInstruction(OpCode.NOP); // 10 0 5; should return 0 + //methodConvert.AddInstruction(OpCode.DROP); // 10 0; should return 0 + //methodConvert.AddInstruction(OpCode.NIP); // 0; should return 0 + //methodConvert.AddInstruction(OpCode.RET); + //maxTarget.Instruction = methodConvert.AddInstruction(OpCode.NOP); // 10 5; should return 10 + //methodConvert.AddInstruction(OpCode.DROP); // 10; should return 10 + //methodConvert.AddInstruction(OpCode.RET); } private static void HandleMathBigMul(MethodConvert methodConvert, SemanticModel model, IMethodSymbol symbol, ExpressionSyntax? instanceExpression, IReadOnlyList? arguments) diff --git a/tests/Neo.Compiler.CSharp.UnitTests/TestingArtifacts/Contract_Integer.cs b/tests/Neo.Compiler.CSharp.UnitTests/TestingArtifacts/Contract_Integer.cs index 8875e2f2a..ddc2efc2f 100644 --- a/tests/Neo.Compiler.CSharp.UnitTests/TestingArtifacts/Contract_Integer.cs +++ b/tests/Neo.Compiler.CSharp.UnitTests/TestingArtifacts/Contract_Integer.cs @@ -10,12 +10,12 @@ public abstract class Contract_Integer(Neo.SmartContract.Testing.SmartContractIn { #region Compiled data - public static Neo.SmartContract.Manifest.ContractManifest Manifest => Neo.SmartContract.Manifest.ContractManifest.Parse(@"{""name"":""Contract_Integer"",""groups"":[],""features"":{},""supportedstandards"":[],""abi"":{""methods"":[{""name"":""divRemByte"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":0,""safe"":false},{""name"":""divRemShort"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":27,""safe"":false},{""name"":""divRemInt"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":58,""safe"":false},{""name"":""divRemLong"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":95,""safe"":false},{""name"":""divRemSbyte"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":144,""safe"":false},{""name"":""divRemUshort"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":172,""safe"":false},{""name"":""divRemUint"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":201,""safe"":false},{""name"":""divRemUlong"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":234,""safe"":false},{""name"":""clampByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":275,""safe"":false},{""name"":""clampSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":311,""safe"":false},{""name"":""clampShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":347,""safe"":false},{""name"":""clampUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":383,""safe"":false},{""name"":""clampInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":419,""safe"":false},{""name"":""clampUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":455,""safe"":false},{""name"":""clampLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":491,""safe"":false},{""name"":""clampULong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":527,""safe"":false},{""name"":""clampBigInteger"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":563,""safe"":false},{""name"":""copySignInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""sign"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":599,""safe"":false},{""name"":""copySignSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""sign"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":645,""safe"":false},{""name"":""copySignShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""sign"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":682,""safe"":false},{""name"":""copySignLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""sign"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":722,""safe"":false},{""name"":""createCheckedInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":780,""safe"":false},{""name"":""createCheckedByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":804,""safe"":false},{""name"":""createCheckedLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":818,""safe"":false},{""name"":""createCheckedUlong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":854,""safe"":false},{""name"":""createCheckedChar"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":882,""safe"":false},{""name"":""createCheckedShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":898,""safe"":false},{""name"":""createCheckedSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":916,""safe"":false},{""name"":""createSaturatingInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":931,""safe"":false},{""name"":""createSaturatingByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":975,""safe"":false},{""name"":""createSaturatingLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1013,""safe"":false},{""name"":""createSaturatingUlong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1065,""safe"":false},{""name"":""createSaturatingChar"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1117,""safe"":false},{""name"":""createSaturatingSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1157,""safe"":false},{""name"":""isEvenIntegerInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1195,""safe"":false},{""name"":""isEventUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1204,""safe"":false},{""name"":""isEvenLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1213,""safe"":false},{""name"":""isEvenUlong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1222,""safe"":false},{""name"":""isEvenShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1231,""safe"":false},{""name"":""isEvenUshort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1240,""safe"":false},{""name"":""isEvenByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1249,""safe"":false},{""name"":""isEvenSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1258,""safe"":false},{""name"":""isOddIntegerInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1267,""safe"":false},{""name"":""isOddUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1276,""safe"":false},{""name"":""isOddLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1285,""safe"":false},{""name"":""isOddUlong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1294,""safe"":false},{""name"":""isOddShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1303,""safe"":false},{""name"":""isOddUshort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1312,""safe"":false},{""name"":""isOddByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1321,""safe"":false},{""name"":""isOddSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1330,""safe"":false},{""name"":""isNegativeInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1339,""safe"":false},{""name"":""isNegativeLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1347,""safe"":false},{""name"":""isNegativeShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1355,""safe"":false},{""name"":""isNegativeSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1363,""safe"":false},{""name"":""isPositiveInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1371,""safe"":false},{""name"":""isPositiveLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1379,""safe"":false},{""name"":""isPositiveShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1387,""safe"":false},{""name"":""isPositiveSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1395,""safe"":false},{""name"":""isPow2Int"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1403,""safe"":false},{""name"":""isPow2UInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1425,""safe"":false},{""name"":""isPow2Long"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1447,""safe"":false},{""name"":""isPow2Ulong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1469,""safe"":false},{""name"":""isPow2Short"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1491,""safe"":false},{""name"":""isPow2Ushort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1513,""safe"":false},{""name"":""isPow2Byte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1535,""safe"":false},{""name"":""isPow2Sbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1557,""safe"":false},{""name"":""leadingZeroCountInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1579,""safe"":false},{""name"":""leadingZeroCountUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1608,""safe"":false},{""name"":""leadingZeroCountLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1630,""safe"":false},{""name"":""leadingZeroCountShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1659,""safe"":false},{""name"":""leadingZeroCountUshort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1687,""safe"":false},{""name"":""leadingZeroCountByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1708,""safe"":false},{""name"":""leadingZeroCountSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1729,""safe"":false},{""name"":""log2Int"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1757,""safe"":false},{""name"":""log2UInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1788,""safe"":false},{""name"":""log2Long"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1819,""safe"":false},{""name"":""log2Short"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1850,""safe"":false},{""name"":""log2Ushort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1881,""safe"":false},{""name"":""log2Byte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1912,""safe"":false},{""name"":""log2Sbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1943,""safe"":false},{""name"":""rotateLeftInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1974,""safe"":false},{""name"":""rotateLeftUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2049,""safe"":false},{""name"":""rotateLeftLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2112,""safe"":false},{""name"":""rotateLeftULong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2227,""safe"":false},{""name"":""rotateLeftShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2322,""safe"":false},{""name"":""rotateLeftUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2374,""safe"":false},{""name"":""rotateLeftByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2418,""safe"":false},{""name"":""rotateLeftSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2454,""safe"":false},{""name"":""rotateRightInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2496,""safe"":false},{""name"":""rotateRightUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2585,""safe"":false},{""name"":""rotateRightLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2615,""safe"":false},{""name"":""rotateRightULong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2744,""safe"":false},{""name"":""rotateRightShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2782,""safe"":false},{""name"":""rotateRightUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2844,""safe"":false},{""name"":""rotateRightByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2867,""safe"":false},{""name"":""rotateRightSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2888,""safe"":false},{""name"":""popCountByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2940,""safe"":false},{""name"":""popCountSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2966,""safe"":false},{""name"":""popCountShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2992,""safe"":false},{""name"":""popCountUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":3020,""safe"":false},{""name"":""popCountInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":3048,""safe"":false},{""name"":""popCountUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":3080,""safe"":false},{""name"":""popCountLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":3112,""safe"":false},{""name"":""popCountULong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":3152,""safe"":false},{""name"":""popCountBigInteger"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":3192,""safe"":false}],""events"":[]},""permissions"":[],""trusts"":[],""extra"":{""nef"":{""optimization"":""All""}}}"); + public static Neo.SmartContract.Manifest.ContractManifest Manifest => Neo.SmartContract.Manifest.ContractManifest.Parse(@"{""name"":""Contract_Integer"",""groups"":[],""features"":{},""supportedstandards"":[],""abi"":{""methods"":[{""name"":""divRemByte"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":0,""safe"":false},{""name"":""divRemShort"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":27,""safe"":false},{""name"":""divRemInt"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":58,""safe"":false},{""name"":""divRemLong"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":95,""safe"":false},{""name"":""divRemSbyte"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":144,""safe"":false},{""name"":""divRemUshort"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":172,""safe"":false},{""name"":""divRemUint"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":201,""safe"":false},{""name"":""divRemUlong"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":234,""safe"":false},{""name"":""clampByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":275,""safe"":false},{""name"":""clampSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":290,""safe"":false},{""name"":""clampShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":305,""safe"":false},{""name"":""clampUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":320,""safe"":false},{""name"":""clampInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":335,""safe"":false},{""name"":""clampUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":350,""safe"":false},{""name"":""clampLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":365,""safe"":false},{""name"":""clampULong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":380,""safe"":false},{""name"":""clampBigInteger"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":395,""safe"":false},{""name"":""copySignInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""sign"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":410,""safe"":false},{""name"":""copySignSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""sign"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":456,""safe"":false},{""name"":""copySignShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""sign"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":493,""safe"":false},{""name"":""copySignLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""sign"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":533,""safe"":false},{""name"":""createCheckedInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":591,""safe"":false},{""name"":""createCheckedByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":615,""safe"":false},{""name"":""createCheckedLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":629,""safe"":false},{""name"":""createCheckedUlong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":665,""safe"":false},{""name"":""createCheckedChar"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":693,""safe"":false},{""name"":""createCheckedShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":709,""safe"":false},{""name"":""createCheckedSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":727,""safe"":false},{""name"":""createSaturatingInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":742,""safe"":false},{""name"":""createSaturatingByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":786,""safe"":false},{""name"":""createSaturatingLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":824,""safe"":false},{""name"":""createSaturatingUlong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":876,""safe"":false},{""name"":""createSaturatingChar"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":928,""safe"":false},{""name"":""createSaturatingSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":968,""safe"":false},{""name"":""isEvenIntegerInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1006,""safe"":false},{""name"":""isEventUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1015,""safe"":false},{""name"":""isEvenLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1024,""safe"":false},{""name"":""isEvenUlong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1033,""safe"":false},{""name"":""isEvenShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1042,""safe"":false},{""name"":""isEvenUshort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1051,""safe"":false},{""name"":""isEvenByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1060,""safe"":false},{""name"":""isEvenSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1069,""safe"":false},{""name"":""isOddIntegerInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1078,""safe"":false},{""name"":""isOddUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1087,""safe"":false},{""name"":""isOddLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1096,""safe"":false},{""name"":""isOddUlong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1105,""safe"":false},{""name"":""isOddShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1114,""safe"":false},{""name"":""isOddUshort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1123,""safe"":false},{""name"":""isOddByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1132,""safe"":false},{""name"":""isOddSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1141,""safe"":false},{""name"":""isNegativeInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1150,""safe"":false},{""name"":""isNegativeLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1158,""safe"":false},{""name"":""isNegativeShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1166,""safe"":false},{""name"":""isNegativeSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1174,""safe"":false},{""name"":""isPositiveInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1182,""safe"":false},{""name"":""isPositiveLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1190,""safe"":false},{""name"":""isPositiveShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1198,""safe"":false},{""name"":""isPositiveSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1206,""safe"":false},{""name"":""isPow2Int"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1214,""safe"":false},{""name"":""isPow2UInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1236,""safe"":false},{""name"":""isPow2Long"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1258,""safe"":false},{""name"":""isPow2Ulong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1280,""safe"":false},{""name"":""isPow2Short"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1302,""safe"":false},{""name"":""isPow2Ushort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1324,""safe"":false},{""name"":""isPow2Byte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1346,""safe"":false},{""name"":""isPow2Sbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Boolean"",""offset"":1368,""safe"":false},{""name"":""leadingZeroCountInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1390,""safe"":false},{""name"":""leadingZeroCountUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1419,""safe"":false},{""name"":""leadingZeroCountLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1441,""safe"":false},{""name"":""leadingZeroCountShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1470,""safe"":false},{""name"":""leadingZeroCountUshort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1498,""safe"":false},{""name"":""leadingZeroCountByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1519,""safe"":false},{""name"":""leadingZeroCountSbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1540,""safe"":false},{""name"":""log2Int"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1568,""safe"":false},{""name"":""log2UInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1599,""safe"":false},{""name"":""log2Long"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1630,""safe"":false},{""name"":""log2Short"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1661,""safe"":false},{""name"":""log2Ushort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1692,""safe"":false},{""name"":""log2Byte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1723,""safe"":false},{""name"":""log2Sbyte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1754,""safe"":false},{""name"":""rotateLeftInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1785,""safe"":false},{""name"":""rotateLeftUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1860,""safe"":false},{""name"":""rotateLeftLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":1923,""safe"":false},{""name"":""rotateLeftULong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2038,""safe"":false},{""name"":""rotateLeftShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2133,""safe"":false},{""name"":""rotateLeftUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2185,""safe"":false},{""name"":""rotateLeftByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2229,""safe"":false},{""name"":""rotateLeftSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2265,""safe"":false},{""name"":""rotateRightInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2307,""safe"":false},{""name"":""rotateRightUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2396,""safe"":false},{""name"":""rotateRightLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2426,""safe"":false},{""name"":""rotateRightULong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2555,""safe"":false},{""name"":""rotateRightShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2593,""safe"":false},{""name"":""rotateRightUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2655,""safe"":false},{""name"":""rotateRightByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2678,""safe"":false},{""name"":""rotateRightSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""offset"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2699,""safe"":false},{""name"":""popCountByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2751,""safe"":false},{""name"":""popCountSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2777,""safe"":false},{""name"":""popCountShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2803,""safe"":false},{""name"":""popCountUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2831,""safe"":false},{""name"":""popCountInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2859,""safe"":false},{""name"":""popCountUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2891,""safe"":false},{""name"":""popCountLong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2923,""safe"":false},{""name"":""popCountULong"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":2963,""safe"":false},{""name"":""popCountBigInteger"",""parameters"":[{""name"":""value"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":3003,""safe"":false}],""events"":[]},""permissions"":[],""trusts"":[],""extra"":{""nef"":{""optimization"":""All""}}}"); /// /// Optimization: "All" /// - public static Neo.SmartContract.NefFile Nef => Neo.IO.Helper.AsSerializable(Convert.FromBase64String(@"TkVGM1Rlc3RpbmdFbmdpbmUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP3xDFcAAnl4SlFOoUpRoFFQn0oQAQABuyQDOhLAQFcAAnl4SlFOoUpRoFFQn0oBAIACAIAAALskAzoSwEBXAAJ5eEpRTqFKUaBRUJ9KAgAAAIADAAAAgAAAAAC7JAM6EsBAVwACeXhKUU6hSlGgUVCfSgMAAAAAAAAAgAQAAAAAAAAAgAAAAAAAAAAAuyQDOhLAQFcAAnl4SlFOoUpRoFFQn0oAgAGA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EEBFOlcAAXhKECgUShAwEw9QShAoCBGpUJwi90VARRBARTpXAAF4ShAoFEoQMBMPUEoQKAgRqVCcIvdFQEUQQEU6VwABeEoQKBRKEDATD1BKECgIEalQnCL3RUBFEEBFOlcAAXhKECgUShAwEw9QShAoCBGpUJwi90VARRBARTpXAAF4ShAoFEoQMBMPUEoQKAgRqVCcIvdFQEUQQEU6VwABeEoQKBRKEDATD1BKECgIEalQnCL3RUBFEEBFOlcAAnh5AB+RUAP/////AAAAAJFQqAP/////AAAAAJF4A/////8AAAAAkXkAIFCfAB+RqZJKAwAAAIAAAAAAMAwDAAAAAAEAAACfQFcAAnh5AB+RUAP/////AAAAAJFQqAP/////AAAAAJF4A/////8AAAAAkXkAIFCfAB+RqZID/////wAAAACRQFcAAnh5AD+RUAT//////////wAAAAAAAAAAkVCoBP//////////AAAAAAAAAACReAT//////////wAAAAAAAAAAkXkAQFCfAD+RqZJKBAAAAAAAAACAAAAAAAAAAAAwFAQAAAAAAAAAAAEAAAAAAAAAn0BXAAJ4eQA/kVAE//////////8AAAAAAAAAAJFQqAT//////////wAAAAAAAAAAkXgE//////////8AAAAAAAAAAJF5AEBQnwA/kamSBP//////////AAAAAAAAAACRQFcAAnh5H5FQAv//AACRUKgC//8AAJF4Av//AACReSBQnx+RqZJKAgCAAAAwCAIAAAEAn0BXAAJ4eR+RUAL//wAAkVCoAv//AACReAL//wAAkXkgUJ8fkamSAv//AACRQFcAAnh5F5FQAf8AkVCoAf8AkXgB/wCReRhQnxeRqZIB/wCRQFcAAnh5F5FQAf8AkVCoAf8AkXgB/wCReRhQnxeRqZJKAYAAMAYBAAGfQFcAAnh5AB+RACCiACBQn1AD/////wAAAACRUKgD/////wAAAACReAP/////AAAAAJF5ACCiACBQnwAgUJ8AH5GpkkoDAAAAgAAAAAAwDAMAAAAAAQAAAJ9AVwACeHkAH5GpeAAgeZ8AH5GokgP/////AAAAAJFAVwACeHkAP5EAQKIAQFCfUAT//////////wAAAAAAAAAAkVCoBP//////////AAAAAAAAAACReAT//////////wAAAAAAAAAAkXkAQKIAQFCfAEBQnwA/kamSSgQAAAAAAAAAgAAAAAAAAAAAMBQEAAAAAAAAAAABAAAAAAAAAJ9AVwACeHkAP5GpeABAeZ8AP5GokgT//////////wAAAAAAAAAAkUBXAAJ4eR+RIKIgUJ9QAv//AACRUKgC//8AAJF4Av//AACReSCiIFCfIFCfH5GpkkoCAIAAADAIAgAAAQCfQFcAAnh5H5GpeCB5nx+RqJIC//8AAJFAVwACeHkXkal4GHmfF5GokgH/AJFAVwACeHkXkRiiGFCfUAH/AJFQqAH/AJF4Af8AkXkYohhQnxhQnxeRqZJKAYAAMAYBAAGfQFcAAXgB/wCREFBKECgMShGRUZ5QEaki9EVAVwABeAH/AJEQUEoQKAxKEZFRnlARqSL0RUBXAAF4Av//AACREFBKECgMShGRUZ5QEaki9EVAVwABeAL//wAAkRBQShAoDEoRkVGeUBGpIvRFQFcAAXgD/////wAAAACREFBKECgMShGRUZ5QEaki9EVAVwABeAP/////AAAAAJEQUEoQKAxKEZFRnlARqSL0RUBXAAF4BP//////////AAAAAAAAAACREFBKECgMShGRUZ5QEaki9EVAVwABeAT//////////wAAAAAAAAAAkRBQShAoDEoRkVGeUBGpIvRFQFcAAXhKAgAAAIADAAAAgAAAAAC7Jg4D/////wAAAACRIkcMQlZhbHVlIG91dCBvZiByYW5nZSwgbXVzdCBiZSBiZXR3ZWVuIGludC5NaW5WYWx1ZSBhbmQgaW50Lk1heFZhbHVlLjoQUEoQKAxKEZFRnlARqSL0RUCnHrt2")); + public static Neo.SmartContract.NefFile Nef => Neo.IO.Helper.AsSerializable(Convert.FromBase64String(@"TkVGM1Rlc3RpbmdFbmdpbmUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP00DFcAAnl4SlFOoUpRoFFQn0oQAQABuyQDOhLAQFcAAnl4SlFOoUpRoFFQn0oBAIACAIAAALskAzoSwEBX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AAXhKECgUShAwEw9QShAoCBGpUJwi90VARRBARTpXAAF4ShAoFEoQMBMPUEoQKAgRqVCcIvdFQEUQQEU6VwABeEoQKBRKEDATD1BKECgIEalQnCL3RUBFEEBFOlcAAnh5AB+RUAP/////AAAAAJFQqAP/////AAAAAJF4A/////8AAAAAkXkAIFCfAB+RqZJKAwAAAIAAAAAAMAwDAAAAAAEAAACfQFcAAnh5AB+RUAP/////AAAAAJFQqAP/////AAAAAJF4A/////8AAAAAkXkAIFCfAB+RqZID/////wAAAACRQFcAAnh5AD+RUAT//////////wAAAAAAAAAAkVCoBP//////////AAAAAAAAAACReAT//////////wAAAAAAAAAAkXkAQFCfAD+RqZJKBAAAAAAAAACAAAAAAAAAAAAwFAQAAAAAAAAAAAEAAAAAAAAAn0BXAAJ4eQA/kVAE//////////8AAAAAAAAAAJFQqAT//////////wAAAAAAAAAAkXgE//////////8AAAAAAAAAAJF5AEBQnwA/kamSBP//////////AAAAAAAAAACRQFcAAnh5H5FQAv//AACRUKgC//8AAJF4Av//AACReSBQnx+RqZJKAgCAAAAwCAIAAAEAn0BXAAJ4eR+RUAL//wAAkVCoAv//AACReAL//wAAkXkgUJ8fkamSAv//AACRQFcAAnh5F5FQAf8AkVCoAf8AkXgB/wCReRhQnxeRqZIB/wCRQFcAAnh5F5FQAf8AkVCoAf8AkXgB/wCReRhQnxeRqZJKAYAAMAYBAAGfQFcAAnh5AB+RACCiACBQn1AD/////wAAAACRUKgD/////wAAAACReAP/////AAAAAJF5ACCiACBQnwAgUJ8AH5GpkkoDAAAAgAAAAAAwDAMAAAAAAQAAAJ9AVwACeHkAH5GpeAAgeZ8AH5GokgP/////AAAAAJFAVwACeHkAP5EAQKIAQFCfUAT//////////wAAAAAAAAAAkVCoBP//////////AAAAAAAAAACReAT//////////wAAAAAAAAAAkXkAQKIAQFCfAEBQnwA/kamSSgQAAAAAAAAAgAAAAAAAAAAAMBQEAAAAAAAAAAABAAAAAAAAAJ9AVwACeHkAP5GpeABAeZ8AP5GokgT//////////wAAAAAAAAAAkUBXAAJ4eR+RIKIgUJ9QAv//AACRUKgC//8AAJF4Av//AACReSCiIFCfIFCfH5GpkkoCAIAAADAIAgAAAQCfQFcAAnh5H5GpeCB5nx+RqJIC//8AAJFAVwACeHkXkal4GHmfF5GokgH/AJFAVwACeHkXkRiiGFCfUAH/AJFQqAH/AJF4Af8AkXkYohhQnxhQnxeRqZJKAYAAMAYBAAGfQFcAAXgB/wCREFBKECgMShGRUZ5QEaki9EVAVwABeAH/AJEQUEoQKAxKEZFRnlARqSL0RUBXAAF4Av//AACREFBKECgMShGRUZ5QEaki9EVAVwABeAL//wAAkRBQShAoDEoRkVGeUBGpIvRFQFcAAXgD/////wAAAACREFBKECgMShGRUZ5QEaki9EVAVwABeAP/////AAAAAJEQUEoQKAxKEZFRnlARqSL0RUBXAAF4BP//////////AAAAAAAAAACREFBKECgMShGRUZ5QEaki9EVAVwABeAT//////////wAAAAAAAAAAkRBQShAoDEoRkVGeUBGpIvRFQFcAAXhKAgAAAIADAAAAgAAAAAC7Jg4D/////wAAAACRIkcMQlZhbHVlIG91dCBvZiByYW5nZSwgbXVzdCBiZSBiZXR3ZWVuIGludC5NaW5WYWx1ZSBhbmQgaW50Lk1heFZhbHVlLjoQUEoQKAxKEZFRnlARqSL0RUBklKGU")); #endregion diff --git a/tests/Neo.Compiler.CSharp.UnitTests/TestingArtifacts/Contract_Math.cs b/tests/Neo.Compiler.CSharp.UnitTests/TestingArtifacts/Contract_Math.cs index 8e5547b41..898b9c835 100644 --- a/tests/Neo.Compiler.CSharp.UnitTests/TestingArtifacts/Contract_Math.cs +++ b/tests/Neo.Compiler.CSharp.UnitTests/TestingArtifacts/Contract_Math.cs @@ -10,12 +10,12 @@ public abstract class Contract_Math(Neo.SmartContract.Testing.SmartContractIniti { #region Compiled data - public static Neo.SmartContract.Manifest.ContractManifest Manifest => Neo.SmartContract.Manifest.ContractManifest.Parse(@"{""name"":""Contract_Math"",""groups"":[],""features"":{},""supportedstandards"":[],""abi"":{""methods"":[{""name"":""max"",""parameters"":[{""name"":""a"",""type"":""Integer""},{""name"":""b"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":0,""safe"":false},{""name"":""min"",""parameters"":[{""name"":""a"",""type"":""Integer""},{""name"":""b"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":7,""safe"":false},{""name"":""sign"",""parameters"":[{""name"":""a"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":14,""safe"":false},{""name"":""abs"",""parameters"":[{""name"":""a"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":20,""safe"":false},{""name"":""bigMul"",""parameters"":[{""name"":""a"",""type"":""Integer""},{""name"":""b"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":26,""safe"":false},{""name"":""divRemByte"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":64,""safe"":false},{""name"":""divRemShort"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":91,""safe"":false},{""name"":""divRemInt"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":122,""safe"":false},{""name"":""divRemLong"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":159,""safe"":false},{""name"":""divRemSbyte"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":208,""safe"":false},{""name"":""divRemUshort"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":236,""safe"":false},{""name"":""divRemUint"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":265,""safe"":false},{""name"":""divRemUlong"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":298,""safe"":false},{""name"":""clampByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":339,""safe"":false},{""name"":""clampSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":375,""safe"":false},{""name"":""clampShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":411,""safe"":false},{""name"":""clampUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":447,""safe"":false},{""name"":""clampInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":483,""safe"":false},{""name"":""clampUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":519,""safe"":false},{""name"":""clampLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":555,""safe"":false},{""name"":""clampULong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":591,""safe"":false}],""events"":[]},""permissions"":[],""trusts"":[],""extra"":{""nef"":{""optimization"":""All""}}}"); + public static Neo.SmartContract.Manifest.ContractManifest Manifest => Neo.SmartContract.Manifest.ContractManifest.Parse(@"{""name"":""Contract_Math"",""groups"":[],""features"":{},""supportedstandards"":[],""abi"":{""methods"":[{""name"":""max"",""parameters"":[{""name"":""a"",""type"":""Integer""},{""name"":""b"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":0,""safe"":false},{""name"":""min"",""parameters"":[{""name"":""a"",""type"":""Integer""},{""name"":""b"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":7,""safe"":false},{""name"":""sign"",""parameters"":[{""name"":""a"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":14,""safe"":false},{""name"":""abs"",""parameters"":[{""name"":""a"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":20,""safe"":false},{""name"":""bigMul"",""parameters"":[{""name"":""a"",""type"":""Integer""},{""name"":""b"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":26,""safe"":false},{""name"":""divRemByte"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":64,""safe"":false},{""name"":""divRemShort"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":91,""safe"":false},{""name"":""divRemInt"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":122,""safe"":false},{""name"":""divRemLong"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":159,""safe"":false},{""name"":""divRemSbyte"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":208,""safe"":false},{""name"":""divRemUshort"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":236,""safe"":false},{""name"":""divRemUint"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":265,""safe"":false},{""name"":""divRemUlong"",""parameters"":[{""name"":""left"",""type"":""Integer""},{""name"":""right"",""type"":""Integer""}],""returntype"":""Array"",""offset"":298,""safe"":false},{""name"":""clampByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":339,""safe"":false},{""name"":""clampSByte"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":354,""safe"":false},{""name"":""clampShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":369,""safe"":false},{""name"":""clampUShort"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":384,""safe"":false},{""name"":""clampInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":399,""safe"":false},{""name"":""clampUInt"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":414,""safe"":false},{""name"":""clampLong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":429,""safe"":false},{""name"":""clampULong"",""parameters"":[{""name"":""value"",""type"":""Integer""},{""name"":""min"",""type"":""Integer""},{""name"":""max"",""type"":""Integer""}],""returntype"":""Integer"",""offset"":444,""safe"":false}],""events"":[]},""permissions"":[],""trusts"":[],""extra"":{""nef"":{""optimization"":""All""}}}"); /// /// Optimization: "All" /// - public static Neo.SmartContract.NefFile Nef => Neo.IO.Helper.AsSerializable(Convert.FromBase64String(@"TkVGM1Rlc3RpbmdFbmdpbmUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAP3LAVcAAnl4ukBXAAJ5eLlAVwABeJlAVwABeJpAVwACeXigSgMAAAAAAAAAgAQAAAAAAAAAgAAAAAAAAAAAuyQDOkBXAAJ5eEpRTqFKUaBRUJ9KEAEAAbskAzoSwEBXAAJ5eEpRTqFKUaBRUJ9KAQCAAgCAAAC7JAM6EsBAVwACeXhKUU6hSlGgUVCfSgIAAACAAwAAAIAAAAAAuyQDOhLAQFcAAnl4SlFOoUpRoFFQn0oDAAAAAAAAAIAEAAAAAAAAAIAAAAAAAAAAALskAzoSwEBXAAJ5eEpRTqFKUaBRUJ9KAIABgAC7JAM6EsBAVwACeXhKUU6hSlGgUVCfShACAAABALskAzoSwEBXAAJ5eEpRTqFKUaBRUJ9KEAMAAAAAAQAAALskAzoSwEBXAAJ5eEpRTqFKUaBRUJ9KEAQAAAAAAAAAAAEAAAAAAAAAuyQDOhLAQFcAA3h5ektLMgM6U7q5QFcAA3h5ektLMgM6U7q5QFcAA3h5ektLMgM6U7q5QFcAA3h5ektLMgM6U7q5QFcAA3h5ektLMgM6U7q5QFcAA3h5ektLMgM6U7q5QFcAA3h5ektLMgM6U7q5QFcAA3h5ektLMgM6U7q5QNYWGhM=")); #endregion diff --git a/tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Integer.cs b/tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Integer.cs index 256e1d5b5..c09c73280 100644 --- a/tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Integer.cs +++ b/tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Integer.cs @@ -278,138 +278,138 @@ public void TestDivRemUlong_AlternatingBits() public void TestClampByte() { Assert.AreEqual((byte)5, Contract.ClampByte(5, 0, 10)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.ThrowsException(() => Contract.ClampByte(5, 10, 0)); - AssertGasConsumed(1062870); + AssertGasConsumed(1062750); Assert.AreEqual((byte)5, Contract.ClampByte(0, 5, 10)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((byte)5, Contract.ClampByte(10, 0, 5)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual((byte)0, Contract.ClampByte(0, 0, 10)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((byte)10, Contract.ClampByte(10, 0, 10)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((byte)10, Contract.ClampByte(255, 0, 10)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual((byte)10, Contract.ClampByte(20, 0, 10)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampSByte() { Assert.AreEqual((sbyte)0, Contract.ClampSByte(0, -5, 5)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((sbyte)-5, Contract.ClampSByte(-10, -5, 5)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((sbyte)5, Contract.ClampSByte(10, -5, 5)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual((sbyte)-5, Contract.ClampSByte(sbyte.MinValue, -5, 5)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((sbyte)5, Contract.ClampSByte(sbyte.MaxValue, -5, 5)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampShort() { Assert.AreEqual((short)0, Contract.ClampShort(0, -1000, 1000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((short)-1000, Contract.ClampShort(-2000, -1000, 1000)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((short)1000, Contract.ClampShort(2000, -1000, 1000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual((short)-1000, Contract.ClampShort(short.MinValue, -1000, 1000)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((short)1000, Contract.ClampShort(short.MaxValue, -1000, 1000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampUShort() { Assert.AreEqual((ushort)500, Contract.ClampUShort(500, 0, 1000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((ushort)0, Contract.ClampUShort(0, 0, 1000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((ushort)1000, Contract.ClampUShort(1000, 0, 1000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((ushort)1000, Contract.ClampUShort(ushort.MaxValue, 0, 1000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampInt() { Assert.AreEqual(0, Contract.ClampInt(0, -1000000, 1000000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(-1000000, Contract.ClampInt(-2000000, -1000000, 1000000)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual(1000000, Contract.ClampInt(2000000, -1000000, 1000000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual(-1000000, Contract.ClampInt(int.MinValue, -1000000, 1000000)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual(1000000, Contract.ClampInt(int.MaxValue, -1000000, 1000000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampUInt() { Assert.AreEqual(500000U, Contract.ClampUInt(500000U, 0U, 1000000U)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(0U, Contract.ClampUInt(0U, 0U, 1000000U)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(1000000U, Contract.ClampUInt(1000000U, 0U, 1000000U)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(1000000U, Contract.ClampUInt(uint.MaxValue, 0U, 1000000U)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampLong() { Assert.AreEqual(0L, Contract.ClampLong(0L, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(-1000000000000L, Contract.ClampLong(-2000000000000L, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual(1000000000000L, Contract.ClampLong(2000000000000L, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual(-1000000000000L, Contract.ClampLong(long.MinValue, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual(1000000000000L, Contract.ClampLong(long.MaxValue, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampULong() { Assert.AreEqual(500000000000UL, Contract.ClampULong(500000000000UL, 0UL, 1000000000000UL)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(0UL, Contract.ClampULong(0UL, 0UL, 1000000000000UL)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(1000000000000UL, Contract.ClampULong(1000000000000UL, 0UL, 1000000000000UL)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(1000000000000UL, Contract.ClampULong(ulong.MaxValue, 0UL, 1000000000000UL)); - AssertGasConsumed(1048440); + AssertGasConsumed(1048020); } [TestMethod] public void TestClampBigInteger() { Assert.AreEqual(BigInteger.Zero, Contract.ClampBigInteger(BigInteger.Zero, BigInteger.MinusOne, BigInteger.One)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(BigInteger.MinusOne, Contract.ClampBigInteger(BigInteger.MinusOne, BigInteger.MinusOne, BigInteger.One)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(BigInteger.One, Contract.ClampBigInteger(BigInteger.One, BigInteger.MinusOne, BigInteger.One)); - AssertGasConsumed(1048290); - Assert.ThrowsException(() => Contract.ClampBigInteger(BigInteger.MinusOne, BigInteger.MinusOne, BigInteger.MinusOne)); - AssertGasConsumed(1062870); + AssertGasConsumed(1047930); + Assert.AreEqual(BigInteger.MinusOne, Contract.ClampBigInteger(BigInteger.MinusOne, BigInteger.MinusOne, BigInteger.MinusOne)); + AssertGasConsumed(1047930); Assert.AreEqual(BigInteger.One, Contract.ClampBigInteger(BigInteger.One, BigInteger.MinusOne, BigInteger.One)); Assert.ThrowsException(() => Contract.ClampBigInteger(BigInteger.MinusOne, BigInteger.One, BigInteger.MinusOne)); - AssertGasConsumed(1062870); + AssertGasConsumed(1062750); Assert.ThrowsException(() => Contract.ClampBigInteger(BigInteger.One, BigInteger.One, BigInteger.MinusOne)); - AssertGasConsumed(1062870); + AssertGasConsumed(1062750); } [TestMethod] diff --git a/tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Math.cs b/tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Math.cs index ca8be50d0..f4d8879e8 100644 --- a/tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Math.cs +++ b/tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Math.cs @@ -330,120 +330,120 @@ public void TestDivRemUlong_AlternatingBits() public void TestClampByte() { Assert.AreEqual((byte)5, Contract.ClampByte(5, 0, 10)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.ThrowsException(() => Contract.ClampByte(5, 10, 0)); - AssertGasConsumed(1062870); + AssertGasConsumed(1062750); Assert.AreEqual((byte)5, Contract.ClampByte(0, 5, 10)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((byte)5, Contract.ClampByte(10, 0, 5)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual((byte)0, Contract.ClampByte(0, 0, 10)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((byte)10, Contract.ClampByte(10, 0, 10)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((byte)10, Contract.ClampByte(255, 0, 10)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual((byte)10, Contract.ClampByte(20, 0, 10)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampSByte() { Assert.AreEqual((sbyte)0, Contract.ClampSByte(0, -5, 5)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((sbyte)-5, Contract.ClampSByte(-10, -5, 5)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((sbyte)5, Contract.ClampSByte(10, -5, 5)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual((sbyte)-5, Contract.ClampSByte(sbyte.MinValue, -5, 5)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((sbyte)5, Contract.ClampSByte(sbyte.MaxValue, -5, 5)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampShort() { Assert.AreEqual((short)0, Contract.ClampShort(0, -1000, 1000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((short)-1000, Contract.ClampShort(-2000, -1000, 1000)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((short)1000, Contract.ClampShort(2000, -1000, 1000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual((short)-1000, Contract.ClampShort(short.MinValue, -1000, 1000)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual((short)1000, Contract.ClampShort(short.MaxValue, -1000, 1000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampUShort() { Assert.AreEqual((ushort)500, Contract.ClampUShort(500, 0, 1000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((ushort)0, Contract.ClampUShort(0, 0, 1000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((ushort)1000, Contract.ClampUShort(1000, 0, 1000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual((ushort)1000, Contract.ClampUShort(ushort.MaxValue, 0, 1000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampInt() { Assert.AreEqual(0, Contract.ClampInt(0, -1000000, 1000000)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(-1000000, Contract.ClampInt(-2000000, -1000000, 1000000)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual(1000000, Contract.ClampInt(2000000, -1000000, 1000000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual(-1000000, Contract.ClampInt(int.MinValue, -1000000, 1000000)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual(1000000, Contract.ClampInt(int.MaxValue, -1000000, 1000000)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampUInt() { Assert.AreEqual(500000U, Contract.ClampUInt(500000U, 0U, 1000000U)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(0U, Contract.ClampUInt(0U, 0U, 1000000U)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(1000000U, Contract.ClampUInt(1000000U, 0U, 1000000U)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(1000000U, Contract.ClampUInt(uint.MaxValue, 0U, 1000000U)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampLong() { Assert.AreEqual(0L, Contract.ClampLong(0L, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(-1000000000000L, Contract.ClampLong(-2000000000000L, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual(1000000000000L, Contract.ClampLong(2000000000000L, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); Assert.AreEqual(-1000000000000L, Contract.ClampLong(long.MinValue, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048050); + AssertGasConsumed(1047930); Assert.AreEqual(1000000000000L, Contract.ClampLong(long.MaxValue, -1000000000000L, 1000000000000L)); - AssertGasConsumed(1048350); + AssertGasConsumed(1047930); } [TestMethod] public void TestClampULong() { Assert.AreEqual(500000000000UL, Contract.ClampULong(500000000000UL, 0UL, 1000000000000UL)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(0UL, Contract.ClampULong(0UL, 0UL, 1000000000000UL)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(1000000000000UL, Contract.ClampULong(1000000000000UL, 0UL, 1000000000000UL)); - AssertGasConsumed(1048290); + AssertGasConsumed(1047930); Assert.AreEqual(1000000000000UL, Contract.ClampULong(ulong.MaxValue, 0UL, 1000000000000UL)); - AssertGasConsumed(1048440); + AssertGasConsumed(1048020); } } }