From a6315bdf5f663df723aaafa137a3bd36c3dfc94e Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Thu, 2 Nov 2023 15:23:54 +0200 Subject: [PATCH 01/10] add Long and BigNumber types to the array methods Signed-off-by: svetoslav-nikol0v --- src/contract/ContractFunctionParameters.js | 128 ++++++++++----------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/src/contract/ContractFunctionParameters.js b/src/contract/ContractFunctionParameters.js index 8e22b3c34..312da7119 100644 --- a/src/contract/ContractFunctionParameters.js +++ b/src/contract/ContractFunctionParameters.js @@ -700,7 +700,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt8Array(value) { @@ -709,7 +709,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint8Array(value) { @@ -718,7 +718,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt16Array(value) { @@ -727,7 +727,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint16Array(value) { @@ -736,7 +736,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt24Array(value) { @@ -745,7 +745,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint24Array(value) { @@ -754,7 +754,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt32Array(value) { @@ -763,7 +763,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint32Array(value) { @@ -772,7 +772,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt40Array(value) { @@ -781,7 +781,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint40Array(value) { @@ -790,7 +790,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt48Array(value) { @@ -799,7 +799,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint48Array(value) { @@ -808,7 +808,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt56Array(value) { @@ -817,7 +817,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint56Array(value) { @@ -826,7 +826,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt64Array(value) { @@ -835,7 +835,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint64Array(value) { @@ -844,7 +844,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt72Array(value) { @@ -853,7 +853,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint72Array(value) { @@ -862,7 +862,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt80Array(value) { @@ -871,7 +871,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint80Array(value) { @@ -880,7 +880,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt88Array(value) { @@ -889,7 +889,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint88Array(value) { @@ -898,7 +898,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt96Array(value) { @@ -907,7 +907,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint96Array(value) { @@ -916,7 +916,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt104Array(value) { @@ -925,7 +925,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint104Array(value) { @@ -934,7 +934,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt112Array(value) { @@ -943,7 +943,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint112Array(value) { @@ -952,7 +952,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt120Array(value) { @@ -961,7 +961,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint120Array(value) { @@ -970,7 +970,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt128Array(value) { @@ -979,7 +979,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint128Array(value) { @@ -988,7 +988,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt136Array(value) { @@ -997,7 +997,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint136Array(value) { @@ -1006,7 +1006,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt144Array(value) { @@ -1015,7 +1015,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint144Array(value) { @@ -1024,7 +1024,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt152Array(value) { @@ -1033,7 +1033,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint152Array(value) { @@ -1042,7 +1042,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt160Array(value) { @@ -1051,7 +1051,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint160Array(value) { @@ -1060,7 +1060,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt168Array(value) { @@ -1069,7 +1069,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint168Array(value) { @@ -1078,7 +1078,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt176Array(value) { @@ -1087,7 +1087,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint176Array(value) { @@ -1096,7 +1096,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt184Array(value) { @@ -1105,7 +1105,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint184Array(value) { @@ -1114,7 +1114,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt192Array(value) { @@ -1123,7 +1123,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint192Array(value) { @@ -1132,7 +1132,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt200Array(value) { @@ -1141,7 +1141,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint200Array(value) { @@ -1150,7 +1150,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt208Array(value) { @@ -1159,7 +1159,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint208Array(value) { @@ -1168,7 +1168,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt216Array(value) { @@ -1177,7 +1177,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint216Array(value) { @@ -1186,7 +1186,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt224Array(value) { @@ -1195,7 +1195,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint224Array(value) { @@ -1204,7 +1204,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt232Array(value) { @@ -1213,7 +1213,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint232Array(value) { @@ -1222,7 +1222,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt240Array(value) { @@ -1231,7 +1231,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint240Array(value) { @@ -1240,7 +1240,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt248Array(value) { @@ -1249,7 +1249,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint248Array(value) { @@ -1258,7 +1258,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addInt256Array(value) { @@ -1267,7 +1267,7 @@ export default class ContractFunctionParameters { } /** - * @param {number[]} value + * @param {number[] | BigNumber[] | Long[]} value * @returns {ContractFunctionParameters} */ addUint256Array(value) { From 134af7dab5af2220c0bce91e99b3c8cf135c777e Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Thu, 2 Nov 2023 15:24:19 +0200 Subject: [PATCH 02/10] add missing ArgumentType.uint24 Signed-off-by: svetoslav-nikol0v --- src/contract/ContractFunctionParameters.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/contract/ContractFunctionParameters.js b/src/contract/ContractFunctionParameters.js index 312da7119..2e62bd8e2 100644 --- a/src/contract/ContractFunctionParameters.js +++ b/src/contract/ContractFunctionParameters.js @@ -1458,6 +1458,8 @@ function argumentToBytes(param, ty) { case ArgumentType.int8: case ArgumentType.uint16: case ArgumentType.int16: + case ArgumentType.uint24: + case ArgumentType.int24: case ArgumentType.uint32: case ArgumentType.int32: case ArgumentType.uint40: From 4d8d2151d9eaeda1776cde803dc8ce46270edfdc Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Thu, 2 Nov 2023 15:25:01 +0200 Subject: [PATCH 03/10] add new methods to the contract Signed-off-by: svetoslav-nikol0v --- test/integration/resources/ReadData.sol | 256 ++++++++++++++++++++++++ 1 file changed, 256 insertions(+) diff --git a/test/integration/resources/ReadData.sol b/test/integration/resources/ReadData.sol index c821c95d7..4314ddc52 100644 --- a/test/integration/resources/ReadData.sol +++ b/test/integration/resources/ReadData.sol @@ -279,4 +279,260 @@ contract ReturnDataTypes { ) external pure returns (int256, int256) { return (count, count + 1); } + + function returnInt8Array(int8[] memory arr) external pure returns (int8[] memory) { + return arr; + } + + function returnUint8Array(uint8[] memory arr) external pure returns (uint8[] memory) { + return arr; + } + + function returnInt16Array(int16[] memory arr) external pure returns (int16[] memory) { + return arr; + } + + function returnUint16Array(uint16[] memory arr) external pure returns (uint16[] memory) { + return arr; + } + + function returnInt24Array(int24[] memory arr) external pure returns (int24[] memory) { + return arr; + } + + function returnUint24Array(uint24[] memory arr) external pure returns (uint24[] memory) { + return arr; + } + + function returnInt32Array(int32[] memory arr) external pure returns (int32[] memory) { + return arr; + } + + function returnUint32Array(uint32[] memory arr) external pure returns (uint32[] memory) { + return arr; + } + + function returnInt40Array(int40[] memory arr) external pure returns (int40[] memory) { + return arr; + } + + function returnUint40Array(uint40[] memory arr) external pure returns (uint40[] memory) { + return arr; + } + + function returnInt48Array(int48[] memory arr) external pure returns (int48[] memory) { + return arr; + } + + function returnUint48Array(uint48[] memory arr) external pure returns (uint48[] memory) { + return arr; + } + + function returnInt56Array(int56[] memory arr) external pure returns (int56[] memory) { + return arr; + } + + function returnUint56Array(uint56[] memory arr) external pure returns (uint56[] memory) { + return arr; + } + + function returnInt64Array(int64[] memory arr) external pure returns (int64[] memory) { + return arr; + } + + function returnUint64Array(uint64[] memory arr) external pure returns (uint64[] memory) { + return arr; + } + + function returnInt72Array(int72[] memory arr) external pure returns (int72[] memory) { + return arr; + } + + function returnUint72Array(uint72[] memory arr) external pure returns (uint72[] memory) { + return arr; + } + + function returnInt80Array(int80[] memory arr) external pure returns (int80[] memory) { + return arr; + } + + function returnUint80Array(uint80[] memory arr) external pure returns (uint80[] memory) { + return arr; + } + + function returnInt88Array(int88[] memory arr) external pure returns (int88[] memory) { + return arr; + } + + function returnUint88Array(uint88[] memory arr) external pure returns (uint88[] memory) { + return arr; + } + + function returnInt96Array(int96[] memory arr) external pure returns (int96[] memory) { + return arr; + } + + function returnUint96Array(uint96[] memory arr) external pure returns (uint96[] memory) { + return arr; + } + + function returnInt104Array(int104[] memory arr) external pure returns (int104[] memory) { + return arr; + } + + function returnUint104Array(uint104[] memory arr) external pure returns (uint104[] memory) { + return arr; + } + + function returnInt112Array(int112[] memory arr) external pure returns (int112[] memory) { + return arr; + } + + function returnUint16Array(uint112[] memory arr) external pure returns (uint112[] memory) { + return arr; + } + + function returnInt120Array(int120[] memory arr) external pure returns (int120[] memory) { + return arr; + } + + function returnUint120Array(uint120[] memory arr) external pure returns (uint120[] memory) { + return arr; + } + + function returnInt128Array(int128[] memory arr) external pure returns (int128[] memory) { + return arr; + } + + function returnUint128Array(uint128[] memory arr) external pure returns (uint128[] memory) { + return arr; + } + + function returnInt136Array(int136[] memory arr) external pure returns (int136[] memory) { + return arr; + } + + function returnUint136Array(uint136[] memory arr) external pure returns (uint136[] memory) { + return arr; + } + + function returnInt144Array(int144[] memory arr) external pure returns (int144[] memory) { + return arr; + } + + function returnUint144Array(uint144[] memory arr) external pure returns (uint144[] memory) { + return arr; + } + + function returnInt152Array(int152[] memory arr) external pure returns (int152[] memory) { + return arr; + } + + function returnUint152Array(uint152[] memory arr) external pure returns (uint152[] memory) { + return arr; + } + + function returnInt160Array(int160[] memory arr) external pure returns (int160[] memory) { + return arr; + } + + function returnUint160Array(uint160[] memory arr) external pure returns (uint160[] memory) { + return arr; + } + + function returnInt168Array(int168[] memory arr) external pure returns (int168[] memory) { + return arr; + } + + function returnUint168Array(uint168[] memory arr) external pure returns (uint168[] memory) { + return arr; + } + + function returnInt176Array(int176[] memory arr) external pure returns (int176[] memory) { + return arr; + } + + function returnUint176Array(uint176[] memory arr) external pure returns (uint176[] memory) { + return arr; + } + + function returnInt184Array(int184[] memory arr) external pure returns (int184[] memory) { + return arr; + } + + function returnUint184Array(uint184[] memory arr) external pure returns (uint184[] memory) { + return arr; + } + + function returnInt192Array(int192[] memory arr) external pure returns (int192[] memory) { + return arr; + } + + function returnUint192Array(uint192[] memory arr) external pure returns (uint192[] memory) { + return arr; + } + + function returnInt200Array(int200[] memory arr) external pure returns (int200[] memory) { + return arr; + } + + function returnUint200Array(uint200[] memory arr) external pure returns (uint200[] memory) { + return arr; + } + + function returnInt208Array(int208[] memory arr) external pure returns (int208[] memory) { + return arr; + } + + function returnUint208Array(uint208[] memory arr) external pure returns (uint208[] memory) { + return arr; + } + + function returnInt216Array(int216[] memory arr) external pure returns (int216[] memory) { + return arr; + } + + function returnUint216Array(uint216[] memory arr) external pure returns (uint216[] memory) { + return arr; + } + + function returnInt224Array(int224[] memory arr) external pure returns (int224[] memory) { + return arr; + } + + function returnUint224Array(uint224[] memory arr) external pure returns (uint224[] memory) { + return arr; + } + + function returnInt232Array(int232[] memory arr) external pure returns (int232[] memory) { + return arr; + } + + function returnUint232Array(uint232[] memory arr) external pure returns (uint232[] memory) { + return arr; + } + + function returnInt240Array(int240[] memory arr) external pure returns (int240[] memory) { + return arr; + } + + function returnUint240Array(uint240[] memory arr) external pure returns (uint240[] memory) { + return arr; + } + + function returnInt248Array(int248[] memory arr) external pure returns (int248[] memory) { + return arr; + } + + function returnUint248Array(uint248[] memory arr) external pure returns (uint248[] memory) { + return arr; + } + + function returnInt256Array(int256[] memory arr) external pure returns (int256[] memory) { + return arr; + } + + function returnUint256Array(uint256[] memory arr) external pure returns (uint256[] memory) { + return arr; + } } From 92566196322d4cf95c727a91ca445cc976a27074 Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Thu, 2 Nov 2023 15:25:52 +0200 Subject: [PATCH 04/10] update bytecode of the contract Signed-off-by: svetoslav-nikol0v --- test/integration/ContractFunctionParametersIntegrationTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/ContractFunctionParametersIntegrationTest.js b/test/integration/ContractFunctionParametersIntegrationTest.js index da05df298..046adea08 100644 --- a/test/integration/ContractFunctionParametersIntegrationTest.js +++ b/test/integration/ContractFunctionParametersIntegrationTest.js @@ -76,7 +76,7 @@ const getDescription = (extremum, bitSize, inputType, methodType) => { }; let smartContractBytecode = - "0x60806040523480156200001157600080fd5b5060408051608081018252600491810182815263082d8caf60e31b60608301908152908252600160208301529091600091620000509183919062000064565b506020820151816001015590505062000147565b82805462000072906200010a565b90600052602060002090601f016020900481019282620000965760008555620000e1565b82601f10620000b157805160ff1916838001178555620000e1565b82800160010185558215620000e1579182015b82811115620000e1578251825591602001919060010190620000c4565b50620000ef929150620000f3565b5090565b5b80821115620000ef5760008155600101620000f4565b600181811c908216806200011f57607f821691505b602082108114156200014157634e487b7160e01b600052602260045260246000fd5b50919050565b6120d380620001576000396000f3fe608060405234801561001057600080fd5b506004361061048b5760003560e01c806381dbe13e11610262578063bb6b524311610151578063dbb04ed9116100ce578063e713cda811610092578063e713cda814610e01578063f4e490f514610e24578063f6e877f414610e45578063f8293f6e14610e6b578063fba1bc4c14610e8d578063ffb8050114610ea257600080fd5b8063dbb04ed914610d38578063de9fb48414610d61578063e05e91e014610d8e578063e066de5014610db5578063e0f53e2414610ddb57600080fd5b8063cbd2e6a511610115578063cbd2e6a514610ca5578063cdb9e4e814610cca578063d1b10ad714610678578063d79d4d4014610cf0578063dade0c0b14610d1657600080fd5b8063bb6b524314610be7578063bd90536a14610c0d578063c503772d14610c35578063c6c18a1c14610c55578063c7d8b87e14610c7f57600080fd5b8063a1bda122116101df578063b4e3e7b1116101a3578063b4e3e7b114610b33578063b834bfe914610b59578063b8da8d1614610b7a578063b989c7ee14610ba0578063ba945bdb14610bc157600080fd5b8063a1bda12214610aaa578063a401d60d14610acb578063a75761f114610af1578063aa80ca2e1461073e578063b2db404a14610b1257600080fd5b8063923f5edf11610226578063923f5edf14610a0057806394cd7c8014610a2157806398508ba314610a425780639b1794ae14610a63578063a08b9f6714610a8957600080fd5b806381dbe13e14610983578063827147ce146105da578063881c8fb71461099e57806388b7e6f5146109c4578063909c5b24146109e557600080fd5b806338fa66581161037e578063628bc3ef116102fb57806372a06b4d116102bf57806372a06b4d146108fa578063796a27ea1461091b5780637d0dc262146109415780637ec32d84146109625780637f8082f71461073e57600080fd5b8063628bc3ef1461084a57806364e008c11461086b57806368ef44661461088c5780636a54715c146108ad57806370a5cb81146108ce57600080fd5b806344e7b0371161034257806344e7b0371461069457806348d848d0146107e45780634bbc9a6714610802578063545e21131461081d57806359adb2df1461067857600080fd5b806338fa66581461073e5780633b45e6e0146107595780633e1a27711461077a5780633f396e671461079b578063407b899b146107c357600080fd5b8063129ed5da1161040c5780632421101f116103d05780632421101f146106945780632ef16e8e146106ba5780632f47a40d146106db5780632f6c1bb4146106fc57806333520ec31461071d57600080fd5b8063129ed5da146105f557806312cd95a11461061b578063189cea8e1461063c5780631d1145621461065d57806322937ea91461067857600080fd5b80630a958dc8116104535780630a958dc81461055657806310d5455314610577578063118b84151461059857806311ec6c90146105b9578063126bc815146105da57600080fd5b8063017fa10b14610490578063021d88ab146104be57806303745430146104e957806306ac6fe11461050a57806308123e0914610530575b600080fd5b6104a161049e36600461188f565b90565b6040516001600160801b0390911681526020015b60405180910390f35b6104cc61049e366004611c7a565b6040516bffffffffffffffffffffffff90911681526020016104b5565b6104f761049e366004611416565b604051600c9190910b81526020016104b5565b61051861049e366004611868565b6040516001600160781b0390911681526020016104b5565b61053e61049e366004611b8c565b60405166ffffffffffffff90911681526020016104b5565b61056461049e3660046116ec565b60405160049190910b81526020016104b5565b61058561049e3660046114bb565b60405160119190910b81526020016104b5565b6105a661049e3660046116aa565b604051601e9190910b81526020016104b5565b6105c761049e36600461151e565b60405160139190910b81526020016104b5565b6105e861049e3660046113db565b6040516104b59190611e65565b61060361049e366004611904565b6040516001600160981b0390911681526020016104b5565b61062961049e3660046114dc565b60405160129190910b81526020016104b5565b61064a61049e366004611581565b60405160169190910b81526020016104b5565b61066b61049e3660046110a0565b6040516104b59190611cf1565b61068661049e3660046113c3565b6040519081526020016104b5565b6106a261049e36600461107d565b6040516001600160a01b0390911681526020016104b5565b6106c861049e366004611689565b604051601d9190910b81526020016104b5565b6106e961049e3660046117d2565b604051600a9190910b81526020016104b5565b61070a61049e3660046115e4565b60405160199190910b81526020016104b5565b61072b61049e366004611605565b604051601a9190910b81526020016104b5565b61074c61049e3660046111cf565b6040516104b59190611d78565b61076761049e36600461149a565b60405160109190910b81526020016104b5565b61078861049e366004611647565b604051601c9190910b81526020016104b5565b6107a961049e366004611bdb565b60405168ffffffffffffffffff90911681526020016104b5565b6107d161049e36600461174f565b60405160079190910b81526020016104b5565b6107f261049e3660046113a9565b60405190151581526020016104b5565b61081061049e366004611141565b6040516104b59190611d3e565b61083061082b366004611791565b610ec6565b60408051600093840b81529190920b6020820152016104b5565b61085861049e3660046117b1565b60405160099190910b81526020016104b5565b61087961049e3660046115a2565b60405160179190910b81526020016104b5565b61089a61049e36600461153f565b60405160149190910b81526020016104b5565b6108bb61049e36600461172e565b60405160069190910b81526020016104b5565b6108dc61049e366004611814565b6040516cffffffffffffffffffffffffff90911681526020016104b5565b61090861049e366004611791565b60405160009190910b81526020016104b5565b61092961049e366004611a37565b6040516001600160d81b0390911681526020016104b5565b61094f61049e366004611626565b604051601b9190910b81526020016104b5565b61097061049e366004611668565b60405160029190910b81526020016104b5565b61099161049e366004611307565b6040516104b59190611e11565b6109ac61049e366004611974565b6040516001600160b01b0390911681526020016104b5565b6109d261049e366004611479565b604051600f9190910b81526020016104b5565b6109f361049e366004611256565b6040516104b59190611db0565b610a0e61049e366004611560565b60405160159190910b81526020016104b5565b610a2f61049e3660046115c3565b60405160189190910b81526020016104b5565b610a5061049e366004611437565b604051600d9190910b81526020016104b5565b610a7161049e36600461199b565b6040516001600160b81b0390911681526020016104b5565b610a9761049e3660046117f3565b604051600b9190910b81526020016104b5565b610ab861049e3660046114fd565b60405160019190910b81526020016104b5565b610ad961049e366004611acf565b6040516001600160f01b0390911681526020016104b5565b610aff61049e36600461192b565b60405161ffff90911681526020016104b5565b610b2061049e36600461170d565b60405160059190910b81526020016104b5565b610b4161049e366004611841565b6040516001600160701b0390911681526020016104b5565b610b6761049e366004611458565b604051600e9190910b81526020016104b5565b610b8861049e36600461194d565b6040516001600160a81b0390911681526020016104b5565b610bae61049e3660046116cb565b60405160039190910b81526020016104b5565b610bcf61049e3660046118b6565b6040516001600160881b0390911681526020016104b5565b610bf561049e3660046119e9565b6040516001600160c81b0390911681526020016104b5565b610c20610c1b3660046113c3565b610ede565b604080519283526020830191909152016104b5565b610c4361049e366004611c04565b60405160ff90911681526020016104b5565b610c6361049e366004611c4f565b6040516affffffffffffffffffffff90911681526020016104b5565b610c8d61049e366004611af6565b6040516001600160f81b0390911681526020016104b5565b610cb361049e366004611b66565b60405165ffffffffffff90911681526020016104b5565b610cd861049e366004611a5e565b6040516001600160e01b0390911681526020016104b5565b610cfe61049e366004611a10565b6040516001600160d01b0390911681526020016104b5565b610d29610d24366004611b1d565b610eed565b6040516104b593929190611eaa565b610d4661049e366004611c25565b60405169ffffffffffffffffffff90911681526020016104b5565b610d74610d6f3660046116ec565b610f2b565b60408051600493840b81529190920b6020820152016104b5565b610d9c61049e366004611bb3565b60405167ffffffffffffffff90911681526020016104b5565b610dc361049e366004611a85565b6040516001600160e81b0390911681526020016104b5565b610de961049e3660046119c2565b6040516001600160c01b0390911681526020016104b5565b610e0f61049e366004611b1d565b60405163ffffffff90911681526020016104b5565b610e3261049e366004611770565b60405160089190910b81526020016104b5565b610e5361049e3660046118dd565b6040516001600160901b0390911681526020016104b5565b610e7961049e366004611aac565b60405162ffffff90911681526020016104b5565b610e95610f3a565b6040516104b59190611e78565b610eb061049e366004611b41565b60405164ffffffffff90911681526020016104b5565b60008082610ed5816014611fc2565b91509150915091565b60008082610ed5816001611f37565b600080606083610efe600182611ff9565b6040805180820190915260028152614f4b60f01b602082015291945063ffffffff16925090509193909250565b60008082610ed5816001611f78565b6040805180820190915260608152600060208201526000604051806040016040529081600082018054610f6c9061201e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f989061201e565b8015610fe55780601f10610fba57610100808354040283529160200191610fe5565b820191906000526020600020905b815481529060010190602001808311610fc857829003601f168201915b50505050508152602001600182015481525050905090565b8035801515811461100d57600080fd5b919050565b600082601f830112611022578081fd5b813567ffffffffffffffff81111561103c5761103c61206f565b61104f601f8201601f1916602001611ee2565b818152846020838601011115611063578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561108e578081fd5b813561109981612085565b9392505050565b600060208083850312156110b2578182fd5b823567ffffffffffffffff8111156110c8578283fd5b8301601f810185136110d8578283fd5b80356110eb6110e682611f13565b611ee2565b80828252848201915084840188868560051b870101111561110a578687fd5b8694505b8385101561113557803561112181612085565b83526001949094019391850191850161110e565b50979650505050505050565b60006020808385031215611153578182fd5b823567ffffffffffffffff811115611169578283fd5b8301601f81018513611179578283fd5b80356111876110e682611f13565b80828252848201915084840188868560051b87010111156111a6578687fd5b8694505b83851015611135576111bb81610ffd565b8352600194909401939185019185016111aa565b600060208083850312156111e1578182fd5b823567ffffffffffffffff8111156111f7578283fd5b8301601f81018513611207578283fd5b80356112156110e682611f13565b80828252848201915084840188868560051b8701011115611234578687fd5b8694505b83851015611135578035835260019490940193918501918501611238565b60006020808385031215611268578182fd5b823567ffffffffffffffff8082111561127f578384fd5b818501915085601f830112611292578384fd5b81356112a06110e682611f13565b80828252858201915085850189878560051b88010111156112bf578788fd5b875b848110156112f8578135868111156112d757898afd5b6112e58c8a838b0101611012565b85525092870192908701906001016112c1565b50909998505050505050505050565b60006020808385031215611319578182fd5b823567ffffffffffffffff80821115611330578384fd5b818501915085601f830112611343578384fd5b81356113516110e682611f13565b80828252858201915085850189878560051b8801011115611370578788fd5b875b848110156112f85781358681111561138857898afd5b6113968c8a838b0101611012565b8552509287019290870190600101611372565b6000602082840312156113ba578081fd5b61109982610ffd565b6000602082840312156113d4578081fd5b5035919050565b6000602082840312156113ec578081fd5b813567ffffffffffffffff811115611402578182fd5b61140e84828501611012565b949350505050565b600060208284031215611427578081fd5b813580600c0b8114611099578182fd5b600060208284031215611448578081fd5b813580600d0b8114611099578182fd5b600060208284031215611469578081fd5b813580600e0b8114611099578182fd5b60006020828403121561148a578081fd5b813580600f0b8114611099578182fd5b6000602082840312156114ab578081fd5b81358060100b8114611099578182fd5b6000602082840312156114cc578081fd5b81358060110b8114611099578182fd5b6000602082840312156114ed578081fd5b81358060120b8114611099578182fd5b60006020828403121561150e578081fd5b81358060010b8114611099578182fd5b60006020828403121561152f578081fd5b81358060130b8114611099578182fd5b600060208284031215611550578081fd5b81358060140b8114611099578182fd5b600060208284031215611571578081fd5b81358060150b8114611099578182fd5b600060208284031215611592578081fd5b81358060160b8114611099578182fd5b6000602082840312156115b3578081fd5b81358060170b8114611099578182fd5b6000602082840312156115d4578081fd5b81358060180b8114611099578182fd5b6000602082840312156115f5578081fd5b81358060190b8114611099578182fd5b600060208284031215611616578081fd5b813580601a0b8114611099578182fd5b600060208284031215611637578081fd5b813580601b0b8114611099578182fd5b600060208284031215611658578081fd5b813580601c0b8114611099578182fd5b600060208284031215611679578081fd5b81358060020b8114611099578182fd5b60006020828403121561169a578081fd5b813580601d0b8114611099578182fd5b6000602082840312156116bb578081fd5b813580601e0b8114611099578182fd5b6000602082840312156116dc578081fd5b81358060030b8114611099578182fd5b6000602082840312156116fd578081fd5b81358060040b8114611099578182fd5b60006020828403121561171e578081fd5b81358060050b8114611099578182fd5b60006020828403121561173f578081fd5b81358060060b8114611099578182fd5b600060208284031215611760578081fd5b81358060070b8114611099578182fd5b600060208284031215611781578081fd5b81358060080b8114611099578182fd5b6000602082840312156117a2578081fd5b813580820b8114611099578182fd5b6000602082840312156117c2578081fd5b81358060090b8114611099578182fd5b6000602082840312156117e3578081fd5b813580600a0b8114611099578182fd5b600060208284031215611804578081fd5b813580600b0b8114611099578182fd5b600060208284031215611825578081fd5b81356cffffffffffffffffffffffffff81168114611099578182fd5b600060208284031215611852578081fd5b81356001600160701b0381168114611099578182fd5b600060208284031215611879578081fd5b81356001600160781b0381168114611099578182fd5b6000602082840312156118a0578081fd5b81356001600160801b0381168114611099578182fd5b6000602082840312156118c7578081fd5b81356001600160881b0381168114611099578182fd5b6000602082840312156118ee578081fd5b81356001600160901b0381168114611099578182fd5b600060208284031215611915578081fd5b81356001600160981b0381168114611099578182fd5b60006020828403121561193c578081fd5b813561ffff81168114611099578182fd5b60006020828403121561195e578081fd5b81356001600160a81b0381168114611099578182fd5b600060208284031215611985578081fd5b81356001600160b01b0381168114611099578182fd5b6000602082840312156119ac578081fd5b81356001600160b81b0381168114611099578182fd5b6000602082840312156119d3578081fd5b81356001600160c01b0381168114611099578182fd5b6000602082840312156119fa578081fd5b81356001600160c81b0381168114611099578182fd5b600060208284031215611a21578081fd5b81356001600160d01b0381168114611099578182fd5b600060208284031215611a48578081fd5b81356001600160d81b0381168114611099578182fd5b600060208284031215611a6f578081fd5b81356001600160e01b0381168114611099578182fd5b600060208284031215611a96578081fd5b81356001600160e81b0381168114611099578182fd5b600060208284031215611abd578081fd5b813562ffffff81168114611099578182fd5b600060208284031215611ae0578081fd5b81356001600160f01b0381168114611099578182fd5b600060208284031215611b07578081fd5b81356001600160f81b0381168114611099578182fd5b600060208284031215611b2e578081fd5b813563ffffffff81168114611099578182fd5b600060208284031215611b52578081fd5b813564ffffffffff81168114611099578182fd5b600060208284031215611b77578081fd5b813565ffffffffffff81168114611099578182fd5b600060208284031215611b9d578081fd5b813566ffffffffffffff81168114611099578182fd5b600060208284031215611bc4578081fd5b813567ffffffffffffffff81168114611099578182fd5b600060208284031215611bec578081fd5b813568ffffffffffffffffff81168114611099578182fd5b600060208284031215611c15578081fd5b813560ff81168114611099578182fd5b600060208284031215611c36578081fd5b813569ffffffffffffffffffff81168114611099578182fd5b600060208284031215611c60578081fd5b81356affffffffffffffffffffff81168114611099578182fd5b600060208284031215611c8b578081fd5b81356bffffffffffffffffffffffff81168114611099578182fd5b60008151808452815b81811015611ccb57602081850181015186830182015201611caf565b81811115611cdc5782602083870101525b50601f01601f19169290920160200192915050565b6020808252825182820181905260009190848201906040850190845b81811015611d325783516001600160a01b031683529284019291840191600101611d0d565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611d32578351151583529284019291840191600101611d5a565b6020808252825182820181905260009190848201906040850190845b81811015611d3257835183529284019291840191600101611d94565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b82811015611e0457603f19888603018452611df2858351611ca6565b94509285019290850190600101611dd6565b5092979650505050505050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b82811015611e0457603f19888603018452611e53858351611ca6565b94509285019290850190600101611e37565b6020815260006110996020830184611ca6565b602081526000825160406020840152611e946060840182611ca6565b9050602084015160408401528091505092915050565b63ffffffff8416815267ffffffffffffffff83166020820152606060408201526000611ed96060830184611ca6565b95945050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715611f0b57611f0b61206f565b604052919050565b600067ffffffffffffffff821115611f2d57611f2d61206f565b5060051b60200190565b600080821280156001600160ff1b0384900385131615611f5957611f59612059565b600160ff1b8390038412811615611f7257611f72612059565b50500190565b60008160040b8360040b82821282647fffffffff03821381151615611f9f57611f9f612059565b82647fffffffff19038212811615611fb957611fb9612059565b50019392505050565b600081810b83820b82821282607f03821381151615611fe357611fe3612059565b82607f19038212811615611fb957611fb9612059565b600063ffffffff8381169083168181101561201657612016612059565b039392505050565b600181811c9082168061203257607f821691505b6020821081141561205357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461209a57600080fd5b5056fea2646970667358221220a24fb4a757386fd79c7c7cb608767f7d70003a814f506c413abe673f348130f464736f6c63430008040033"; + "0x608060405234801561001057600080fd5b5061574c80620000216000396000f3fe608060405234801561001057600080fd5b50600436106107bc5760003560e01c8063897831d2116103f5578063c6c18a1c11610215578063e05e91e011610130578063ea5405b3116100c3578063f6e877f411610092578063f6e877f414611719578063f8293f6e1461173f578063f9e6743114611761578063faab75351461177c578063ffb805011461179757600080fd5b8063ea5405b3146116a7578063ef4a8c1b146116c2578063f4e490f5146116dd578063f53552ef146116fe57600080fd5b8063e4081890116100ff578063e408189014611633578063e436d3901461164e578063e4fadc1014611669578063e713cda81461168457600080fd5b8063e05e91e0146115a6578063e066de50146115cc578063e0f53e24146115f2578063e29dc38a1461161857600080fd5b8063d2e43ea2116101a8578063dade0c0b11610177578063dade0c0b14611513578063dbb04ed914611535578063de9fb4841461155e578063df8cfdbe1461158b57600080fd5b8063d2e43ea21461149c578063d32201bb146114b7578063d79d4d40146114d2578063d98dda69146114f857600080fd5b8063cbf2beee116101e4578063cbf2beee14611425578063cdb9e4e814611440578063ce1ccc7a14611466578063d037df461461148157600080fd5b8063c6c18a1c14611395578063c7d8b87e146113bf578063ca692370146113e5578063cbd2e6a51461140057600080fd5b8063aa450f1f11610310578063b989c7ee116102a3578063bd90536a11610272578063bd90536a146112fc578063c05cfd8e14611324578063c3d385b91461133f578063c4596b121461135a578063c503772d1461137557600080fd5b8063b989c7ee14611274578063ba945bdb14611295578063bb6b5243146112bb578063bbcb71ed146112e157600080fd5b8063b79ecc0c116102df578063b79ecc0c146111f7578063b82c0fce14611212578063b834bfe91461122d578063b8da8d161461124e57600080fd5b8063aa450f1f1461117a578063b0dfddc414611195578063b2db404a146111b0578063b4e3e7b1146111d157600080fd5b80639b1794ae11610388578063a1bda12211610357578063a1bda122146110f7578063a284da3114611118578063a401d60d14611133578063a75761f11461115957600080fd5b80639b1794ae1461107a5780639c5663c7146110a05780639d639bcc146110bb578063a08b9f67146110d657600080fd5b806394cd7c80116103c457806394cd7c8014611002578063956ce3d714611023578063967075e31461103e57806398508ba31461105957600080fd5b8063897831d214610f9057806389cd48ed14610fab5780638b61e01314610fc6578063923f5edf14610fe157600080fd5b80633f396e67116105e057806368ef4466116104fb578063779290b31161048e5780637fc360201161045d5780637fc3602014610ef85780638469c40614610f1357806387d062dc14610f2e578063881c8fb714610f4957806388b7e6f514610f6f57600080fd5b8063779290b314610e75578063796a27ea14610e905780637d0dc26214610eb65780637ec32d8414610ed757600080fd5b8063703bd050116104ca578063703bd05014610df857806370a5cb8114610e1357806372a06b4d14610e3957806375546bf214610e5a57600080fd5b806368ef446614610d8057806369993eff14610da15780636a54715c14610dbc5780636a842c3514610ddd57600080fd5b8063545e2113116105735780635e68a6a8116105425780635e68a6a814610d085780635f6a65e314610d23578063628bc3ef14610d3e57806364e008c114610d5f57600080fd5b8063545e211314610ca557806355bed93714610cd257806359adb2df14610a105780635b14551a14610ced57600080fd5b806344e7b037116105af57806344e7b03714610c2e57806347febd6614610c545780634d4ec9c814610c6f5780635154a08414610c8a57600080fd5b80633f396e6714610baf578063407b899b14610bd757806341b3ed9914610bf85780634384e5ee14610c1357600080fd5b8063189cea8e116106db57806333520ec31161066e5780633822abcb1161063d5780633822abcb14610b1c5780633b33ccd314610b375780633b45e6e014610b525780633e1a277114610b735780633ee0a4b514610b9457600080fd5b806333520ec314610ac557806335d794e7146108fa57806336e6630214610ae657806337ff875914610b0157600080fd5b80632ef16e8e116106aa5780632ef16e8e14610a475780632f47a40d14610a685780632f6c1bb414610a89578063324ff91e14610aaa57600080fd5b8063189cea8e146109d45780631e6dccfb146109f557806322937ea914610a105780632528956214610a2c57600080fd5b806310d5455311610753578063129ed5da11610722578063129ed5da1461095757806312cd95a11461097d57806313c5d0991461099e578063155464fa146109b957600080fd5b806310d54553146108d957806311259dcf146108fa578063118b84151461091557806311ec6c901461093657600080fd5b8063060e393a1161078f578063060e393a1461085157806306ac6fe11461086c57806308123e09146108925780630a958dc8146108b857600080fd5b8063017fa10b146107c1578063021d88ab146107ef5780630374543014610815578063048bf1fb14610836575b600080fd5b6107d26107cf36600461184b565b90565b6040516001600160801b0390911681526020015b60405180910390f35b6107fd6107cf366004611884565b6040516001600160601b0390911681526020016107e6565b6108236107cf3660046118b1565b604051600c9190910b81526020016107e6565b6108446107cf366004611947565b6040516107e691906119e3565b61085f6107cf366004611a41565b6040516107e69190611acd565b61087a6107cf366004611b25565b6040516001600160781b0390911681526020016107e6565b6108a06107cf366004611b57565b60405166ffffffffffffff90911681526020016107e6565b6108c66107cf366004611b84565b60405160049190910b81526020016107e6565b6108e76107cf366004611bb1565b60405160119190910b81526020016107e6565b6109086107cf366004611bcc565b6040516107e69190611c51565b6109236107cf366004611c9b565b604051601e9190910b81526020016107e6565b6109446107cf366004611cc8565b60405160139190910b81526020016107e6565b6109656107cf366004611cfa565b6040516001600160981b0390911681526020016107e6565b61098b6107cf366004611d27565b60405160129190910b81526020016107e6565b6109ac6107cf366004611d42565b6040516107e69190611dce565b6109c76107cf366004611e26565b6040516107e69190611eb2565b6109e26107cf366004611f05565b60405160169190910b81526020016107e6565b610a036107cf366004611f32565b6040516107e69190611fbe565b610a1e6107cf366004611ff9565b6040519081526020016107e6565b610a3a6107cf36600461202c565b6040516107e691906120b8565b610a556107cf36600461210e565b604051601d9190910b81526020016107e6565b610a766107cf36600461213b565b604051600a9190910b81526020016107e6565b610a976107cf366004612168565b60405160199190910b81526020016107e6565b610ab86107cf36600461219a565b6040516107e69190612226565b610ad36107cf366004612279565b604051601a9190910b81526020016107e6565b610af46107cf366004612294565b6040516107e69190612320565b610b0f6107cf366004612372565b6040516107e691906123fe565b610b2a6107cf366004612451565b6040516107e691906124dd565b610b456107cf36600461252a565b6040516107e691906125b6565b610b606107cf366004612603565b60405160109190910b81526020016107e6565b610b816107cf366004612630565b604051601c9190910b81526020016107e6565b610ba26107cf36600461265d565b6040516107e691906126e9565b610bbd6107cf36600461273d565b60405168ffffffffffffffffff90911681526020016107e6565b610be56107cf36600461276a565b60405160079190910b81526020016107e6565b610c066107cf36600461279c565b6040516107e69190612828565b610c216107cf366004612869565b6040516107e691906128f5565b610c3c6107cf366004612947565b6040516001600160a01b0390911681526020016107e6565b610c626107cf366004612962565b6040516107e691906129ee565b610c7d6107cf366004612a29565b6040516107e69190612ab5565b610c986107cf366004612b0d565b6040516107e69190612b99565b610cb8610cb3366004612bec565b6117bb565b60408051600093840b81529190920b6020820152016107e6565b610ce06107cf366004612c07565b6040516107e69190612c93565b610cfb6107cf366004612ceb565b6040516107e69190612d77565b610d166107cf366004612db8565b6040516107e69190612e44565b610d316107cf366004612e9a565b6040516107e69190612f26565b610d4c6107cf366004612f7d565b60405160099190910b81526020016107e6565b610d6d6107cf366004612faa565b60405160179190910b81526020016107e6565b610d8e6107cf366004612fc5565b60405160149190910b81526020016107e6565b610daf6107cf366004612fe0565b6040516107e6919061306c565b610dca6107cf3660046130a7565b60405160069190910b81526020016107e6565b610deb6107cf3660046130d4565b6040516107e69190613160565b610e066107cf3660046131ae565b6040516107e6919061323a565b610e216107cf36600461328c565b6040516001600160681b0390911681526020016107e6565b610e476107cf366004612bec565b60405160009190910b81526020016107e6565b610e686107cf3660046132b9565b6040516107e69190613345565b610e836107cf366004613397565b6040516107e69190613423565b610e9e6107cf366004613464565b6040516001600160d81b0390911681526020016107e6565b610ec46107cf366004613491565b604051601b9190910b81526020016107e6565b610ee56107cf3660046134be565b60405160029190910b81526020016107e6565b610f066107cf3660046134d9565b6040516107e69190613565565b610f216107cf3660046135a8565b6040516107e69190613634565b610f3c6107cf366004613675565b6040516107e69190613701565b610f576107cf366004613753565b6040516001600160b01b0390911681526020016107e6565b610f7d6107cf366004613780565b604051600f9190910b81526020016107e6565b610f9e6107cf3660046137b2565b6040516107e6919061383e565b610fb96107cf366004613896565b6040516107e69190613922565b610fd46107cf366004613963565b6040516107e691906139ef565b610fef6107cf366004613a3c565b60405160159190910b81526020016107e6565b6110106107cf366004613a57565b60405160189190910b81526020016107e6565b6110316107cf366004613a72565b6040516107e69190613afe565b61104c6107cf366004613b39565b6040516107e69190613bc5565b6110676107cf366004613c0d565b604051600d9190910b81526020016107e6565b6110886107cf366004613c28565b6040516001600160b81b0390911681526020016107e6565b6110ae6107cf366004613c55565b6040516107e69190613ce1565b6110c96107cf366004613d2f565b6040516107e69190613dbb565b6110e46107cf366004613df8565b604051600b9190910b81526020016107e6565b6111056107cf366004613e13565b60405160019190910b81526020016107e6565b6111266107cf366004613e2e565b6040516107e69190613eba565b6111416107cf366004613ef5565b6040516001600160f01b0390911681526020016107e6565b6111676107cf366004613f10565b60405161ffff90911681526020016107e6565b6111886107cf366004613f3f565b6040516107e69190613fcb565b6111a36107cf366004614009565b6040516107e69190614095565b6111be6107cf3660046140d0565b60405160059190910b81526020016107e6565b6111df6107cf3660046140eb565b6040516001600160701b0390911681526020016107e6565b6112056107cf36600461411d565b6040516107e691906141a9565b6112206107cf366004614200565b6040516107e6919061428c565b61123b6107cf3660046142cc565b604051600e9190910b81526020016107e6565b61125c6107cf3660046142fe565b6040516001600160a81b0390911681526020016107e6565b6112826107cf36600461432b565b60405160039190910b81526020016107e6565b6112a36107cf366004614346565b6040516001600160881b0390911681526020016107e6565b6112c96107cf366004614361565b6040516001600160c81b0390911681526020016107e6565b6112ef6107cf36600461437c565b6040516107e69190614408565b61130f61130a366004611ff9565b6117d3565b604080519283526020830191909152016107e6565b6113326107cf366004614449565b6040516107e691906144d5565b61134d6107cf366004614510565b6040516107e6919061459c565b6113686107cf3660046145d7565b6040516107e69190614663565b6113836107cf3660046146b5565b60405160ff90911681526020016107e6565b6113a36107cf3660046146d0565b6040516affffffffffffffffffffff90911681526020016107e6565b6113cd6107cf3660046146eb565b6040516001600160f81b0390911681526020016107e6565b6113f36107cf366004614706565b6040516107e69190614792565b61140e6107cf3660046147cd565b60405165ffffffffffff90911681526020016107e6565b6114336107cf3660046147e8565b6040516107e69190614874565b61144e6107cf3660046148b5565b6040516001600160e01b0390911681526020016107e6565b6114746107cf3660046148d0565b6040516107e6919061495c565b61148f6107cf3660046149ae565b6040516107e69190614a3a565b6114aa6107cf366004614a7b565b6040516107e69190614b07565b6114c56107cf366004614b54565b6040516107e69190614be0565b6114e06107cf366004614c32565b6040516001600160d01b0390911681526020016107e6565b6115066107cf366004614c4d565b6040516107e69190614cd9565b611526611521366004614d14565b6117e2565b6040516107e693929190614d2f565b6115436107cf366004614d9b565b60405169ffffffffffffffffffff90911681526020016107e6565b61157161156c366004611b84565b611820565b60408051600493840b81529190920b6020820152016107e6565b6115996107cf366004614db6565b6040516107e69190614e42565b6115b46107cf366004614e83565b6040516001600160401b0390911681526020016107e6565b6115da6107cf366004614e9e565b6040516001600160e81b0390911681526020016107e6565b6116006107cf366004614eb9565b6040516001600160c01b0390911681526020016107e6565b6116266107cf366004614ed4565b6040516107e69190614f60565b6116416107cf366004614f9b565b6040516107e69190615027565b61165c6107cf366004615068565b6040516107e691906150f4565b6116776107cf36600461512f565b6040516107e691906151bb565b6116926107cf366004614d14565b60405163ffffffff90911681526020016107e6565b6116b56107cf36600461520b565b6040516107e69190615297565b6116d06107cf3660046152d6565b6040516107e69190615362565b6116eb6107cf3660046153a3565b60405160089190910b81526020016107e6565b61170c6107cf3660046153be565b6040516107e6919061544a565b6117276107cf366004615485565b6040516001600160901b0390911681526020016107e6565b61174d6107cf3660046154a0565b60405162ffffff90911681526020016107e6565b61176f6107cf3660046154bb565b6040516107e69190615547565b61178a6107cf366004615582565b6040516107e6919061560e565b6117a56107cf366004615649565b60405164ffffffffff90911681526020016107e6565b600080826117ca81601461567a565b91509150915091565b600080826117ca8160016156a1565b6000806060836117f36001826156c9565b6040805180820190915260028152614f4b60f01b602082015291945063ffffffff16925090509193909250565b600080826117ca8160016156ed565b80356001600160801b038116811461184657600080fd5b919050565b60006020828403121561185d57600080fd5b6118668261182f565b9392505050565b80356001600160601b038116811461184657600080fd5b60006020828403121561189657600080fd5b6118668261186d565b8035600c81900b811461184657600080fd5b6000602082840312156118c357600080fd5b6118668261189f565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561190a5761190a6118cc565b604052919050565b60006001600160401b0382111561192b5761192b6118cc565b5060051b60200190565b8035601481900b811461184657600080fd5b6000602080838503121561195a57600080fd5b82356001600160401b0381111561197057600080fd5b8301601f8101851361198157600080fd5b803561199461198f82611912565b6118e2565b81815260059190911b820183019083810190878311156119b357600080fd5b928401925b828410156119d8576119c984611935565b825292840192908401906119b8565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160140b835292840192918401916001016119ff565b50909695505050505050565b80356001600160e81b038116811461184657600080fd5b60006020808385031215611a5457600080fd5b82356001600160401b03811115611a6a57600080fd5b8301601f81018513611a7b57600080fd5b8035611a8961198f82611912565b81815260059190911b82018301908381019087831115611aa857600080fd5b928401925b828410156119d857611abe84611a2a565b82529284019290840190611aad565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160e81b031683529284019291840191600101611ae9565b80356001600160781b038116811461184657600080fd5b600060208284031215611b3757600080fd5b61186682611b0e565b803566ffffffffffffff8116811461184657600080fd5b600060208284031215611b6957600080fd5b61186682611b40565b8035600481900b811461184657600080fd5b600060208284031215611b9657600080fd5b61186682611b72565b8035601181900b811461184657600080fd5b600060208284031215611bc357600080fd5b61186682611b9f565b60006020808385031215611bdf57600080fd5b82356001600160401b03811115611bf557600080fd5b8301601f81018513611c0657600080fd5b8035611c1461198f82611912565b81815260059190911b82018301908381019087831115611c3357600080fd5b928401925b828410156119d857833582529284019290840190611c38565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835183529284019291840191600101611c6d565b8035601e81900b811461184657600080fd5b600060208284031215611cad57600080fd5b61186682611c89565b8035601381900b811461184657600080fd5b600060208284031215611cda57600080fd5b61186682611cb6565b80356001600160981b038116811461184657600080fd5b600060208284031215611d0c57600080fd5b61186682611ce3565b8035601281900b811461184657600080fd5b600060208284031215611d3957600080fd5b61186682611d15565b60006020808385031215611d5557600080fd5b82356001600160401b03811115611d6b57600080fd5b8301601f81018513611d7c57600080fd5b8035611d8a61198f82611912565b81815260059190911b82018301908381019087831115611da957600080fd5b928401925b828410156119d857611dbf84611b40565b82529284019290840190611dae565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835166ffffffffffffff1683529284019291840191600101611dea565b80356001600160c01b038116811461184657600080fd5b60006020808385031215611e3957600080fd5b82356001600160401b03811115611e4f57600080fd5b8301601f81018513611e6057600080fd5b8035611e6e61198f82611912565b81815260059190911b82018301908381019087831115611e8d57600080fd5b928401925b828410156119d857611ea384611e0f565b82529284019290840190611e92565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160c01b031683529284019291840191600101611ece565b8035601681900b811461184657600080fd5b600060208284031215611f1757600080fd5b61186682611ef3565b8035600581900b811461184657600080fd5b60006020808385031215611f4557600080fd5b82356001600160401b03811115611f5b57600080fd5b8301601f81018513611f6c57600080fd5b8035611f7a61198f82611912565b81815260059190911b82018301908381019087831115611f9957600080fd5b928401925b828410156119d857611faf84611f20565b82529284019290840190611f9e565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160050b83529284019291840191600101611fda565b60006020828403121561200b57600080fd5b5035919050565b803569ffffffffffffffffffff8116811461184657600080fd5b6000602080838503121561203f57600080fd5b82356001600160401b0381111561205557600080fd5b8301601f8101851361206657600080fd5b803561207461198f82611912565b81815260059190911b8201830190838101908783111561209357600080fd5b928401925b828410156119d8576120a984612012565b82529284019290840190612098565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835169ffffffffffffffffffff16835292840192918401916001016120d4565b8035601d81900b811461184657600080fd5b60006020828403121561212057600080fd5b611866826120fc565b8035600a81900b811461184657600080fd5b60006020828403121561214d57600080fd5b61186682612129565b8035601981900b811461184657600080fd5b60006020828403121561217a57600080fd5b61186682612156565b80356001600160b81b038116811461184657600080fd5b600060208083850312156121ad57600080fd5b82356001600160401b038111156121c357600080fd5b8301601f810185136121d457600080fd5b80356121e261198f82611912565b81815260059190911b8201830190838101908783111561220157600080fd5b928401925b828410156119d85761221784612183565b82529284019290840190612206565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160b81b031683529284019291840191600101612242565b8035601a81900b811461184657600080fd5b60006020828403121561228b57600080fd5b61186682612267565b600060208083850312156122a757600080fd5b82356001600160401b038111156122bd57600080fd5b8301601f810185136122ce57600080fd5b80356122dc61198f82611912565b81815260059190911b820183019083810190878311156122fb57600080fd5b928401925b828410156119d85761231184611cb6565b82529284019290840190612300565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160130b8352928401929184019160010161233c565b80356001600160f01b038116811461184657600080fd5b6000602080838503121561238557600080fd5b82356001600160401b0381111561239b57600080fd5b8301601f810185136123ac57600080fd5b80356123ba61198f82611912565b81815260059190911b820183019083810190878311156123d957600080fd5b928401925b828410156119d8576123ef8461235b565b825292840192908401906123de565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160f01b03168352928401929184019160010161241a565b8035600681900b811461184657600080fd5b6000602080838503121561246457600080fd5b82356001600160401b0381111561247a57600080fd5b8301601f8101851361248b57600080fd5b803561249961198f82611912565b81815260059190911b820183019083810190878311156124b857600080fd5b928401925b828410156119d8576124ce8461243f565b825292840192908401906124bd565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160060b835292840192918401916001016124f9565b8035600181900b811461184657600080fd5b6000602080838503121561253d57600080fd5b82356001600160401b0381111561255357600080fd5b8301601f8101851361256457600080fd5b803561257261198f82611912565b81815260059190911b8201830190838101908783111561259157600080fd5b928401925b828410156119d8576125a784612518565b82529284019290840190612596565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600190810b84529385019392850192016125d2565b8035601081900b811461184657600080fd5b60006020828403121561261557600080fd5b611866826125f1565b8035601c81900b811461184657600080fd5b60006020828403121561264257600080fd5b6118668261261e565b8035600b81900b811461184657600080fd5b6000602080838503121561267057600080fd5b82356001600160401b0381111561268657600080fd5b8301601f8101851361269757600080fd5b80356126a561198f82611912565b81815260059190911b820183019083810190878311156126c457600080fd5b928401925b828410156119d8576126da8461264b565b825292840192908401906126c9565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600b0b83529284019291840191600101612705565b803568ffffffffffffffffff8116811461184657600080fd5b60006020828403121561274f57600080fd5b61186682612724565b8035600781900b811461184657600080fd5b60006020828403121561277c57600080fd5b61186682612758565b80356001600160d81b038116811461184657600080fd5b600060208083850312156127af57600080fd5b82356001600160401b038111156127c557600080fd5b8301601f810185136127d657600080fd5b80356127e461198f82611912565b81815260059190911b8201830190838101908783111561280357600080fd5b928401925b828410156119d85761281984612785565b82529284019290840190612808565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160d81b031683529284019291840191600101612844565b6000602080838503121561287c57600080fd5b82356001600160401b0381111561289257600080fd5b8301601f810185136128a357600080fd5b80356128b161198f82611912565b81815260059190911b820183019083810190878311156128d057600080fd5b928401925b828410156119d8576128e684611b9f565b825292840192908401906128d5565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160110b83529284019291840191600101612911565b80356001600160a01b038116811461184657600080fd5b60006020828403121561295957600080fd5b61186682612930565b6000602080838503121561297557600080fd5b82356001600160401b0381111561298b57600080fd5b8301601f8101851361299c57600080fd5b80356129aa61198f82611912565b81815260059190911b820183019083810190878311156129c957600080fd5b928401925b828410156119d8576129df8461189f565b825292840192908401906129ce565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600c0b83529284019291840191600101612a0a565b60006020808385031215612a3c57600080fd5b82356001600160401b03811115612a5257600080fd5b8301601f81018513612a6357600080fd5b8035612a7161198f82611912565b81815260059190911b82018301908381019087831115612a9057600080fd5b928401925b828410156119d857612aa68461186d565b82529284019290840190612a95565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160601b031683529284019291840191600101612ad1565b80356001600160e01b038116811461184657600080fd5b60006020808385031215612b2057600080fd5b82356001600160401b03811115612b3657600080fd5b8301601f81018513612b4757600080fd5b8035612b5561198f82611912565b81815260059190911b82018301908381019087831115612b7457600080fd5b928401925b828410156119d857612b8a84612af6565b82529284019290840190612b79565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160e01b031683529284019291840191600101612bb5565b8035600081900b811461184657600080fd5b600060208284031215612bfe57600080fd5b61186682612bda565b60006020808385031215612c1a57600080fd5b82356001600160401b03811115612c3057600080fd5b8301601f81018513612c4157600080fd5b8035612c4f61198f82611912565b81815260059190911b82018301908381019087831115612c6e57600080fd5b928401925b828410156119d857612c8484611b0e565b82529284019290840190612c73565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160781b031683529284019291840191600101612caf565b80356001600160c81b038116811461184657600080fd5b60006020808385031215612cfe57600080fd5b82356001600160401b03811115612d1457600080fd5b8301601f81018513612d2557600080fd5b8035612d3361198f82611912565b81815260059190911b82018301908381019087831115612d5257600080fd5b928401925b828410156119d857612d6884612cd4565b82529284019290840190612d57565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160c81b031683529284019291840191600101612d93565b60006020808385031215612dcb57600080fd5b82356001600160401b03811115612de157600080fd5b8301601f81018513612df257600080fd5b8035612e0061198f82611912565b81815260059190911b82018301908381019087831115612e1f57600080fd5b928401925b828410156119d857612e35846125f1565b82529284019290840190612e24565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160100b83529284019291840191600101612e60565b80356affffffffffffffffffffff8116811461184657600080fd5b60006020808385031215612ead57600080fd5b82356001600160401b03811115612ec357600080fd5b8301601f81018513612ed457600080fd5b8035612ee261198f82611912565b81815260059190911b82018301908381019087831115612f0157600080fd5b928401925b828410156119d857612f1784612e7f565b82529284019290840190612f06565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516affffffffffffffffffffff1683529284019291840191600101612f42565b8035600981900b811461184657600080fd5b600060208284031215612f8f57600080fd5b61186682612f6b565b8035601781900b811461184657600080fd5b600060208284031215612fbc57600080fd5b61186682612f98565b600060208284031215612fd757600080fd5b61186682611935565b60006020808385031215612ff357600080fd5b82356001600160401b0381111561300957600080fd5b8301601f8101851361301a57600080fd5b803561302861198f82611912565b81815260059190911b8201830190838101908783111561304757600080fd5b928401925b828410156119d85761305d84612f98565b8252928401929084019061304c565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160170b83529284019291840191600101613088565b6000602082840312156130b957600080fd5b6118668261243f565b803561ffff8116811461184657600080fd5b600060208083850312156130e757600080fd5b82356001600160401b038111156130fd57600080fd5b8301601f8101851361310e57600080fd5b803561311c61198f82611912565b81815260059190911b8201830190838101908783111561313b57600080fd5b928401925b828410156119d857613151846130c2565b82529284019290840190613140565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835161ffff168352928401929184019160010161317c565b8035600d81900b811461184657600080fd5b600060208083850312156131c157600080fd5b82356001600160401b038111156131d757600080fd5b8301601f810185136131e857600080fd5b80356131f661198f82611912565b81815260059190911b8201830190838101908783111561321557600080fd5b928401925b828410156119d85761322b8461319c565b8252928401929084019061321a565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600d0b83529284019291840191600101613256565b80356001600160681b038116811461184657600080fd5b60006020828403121561329e57600080fd5b61186682613275565b8035601881900b811461184657600080fd5b600060208083850312156132cc57600080fd5b82356001600160401b038111156132e257600080fd5b8301601f810185136132f357600080fd5b803561330161198f82611912565b81815260059190911b8201830190838101908783111561332057600080fd5b928401925b828410156119d857613336846132a7565b82529284019290840190613325565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160180b83529284019291840191600101613361565b80356001600160701b038116811461184657600080fd5b600060208083850312156133aa57600080fd5b82356001600160401b038111156133c057600080fd5b8301601f810185136133d157600080fd5b80356133df61198f82611912565b81815260059190911b820183019083810190878311156133fe57600080fd5b928401925b828410156119d85761341484613380565b82529284019290840190613403565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160701b03168352928401929184019160010161343f565b60006020828403121561347657600080fd5b61186682612785565b8035601b81900b811461184657600080fd5b6000602082840312156134a357600080fd5b6118668261347f565b8035600281900b811461184657600080fd5b6000602082840312156134d057600080fd5b611866826134ac565b600060208083850312156134ec57600080fd5b82356001600160401b0381111561350257600080fd5b8301601f8101851361351357600080fd5b803561352161198f82611912565b81815260059190911b8201830190838101908783111561354057600080fd5b928401925b828410156119d85761355684612724565b82529284019290840190613545565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835168ffffffffffffffffff1683529284019291840191600101613581565b600060208083850312156135bb57600080fd5b82356001600160401b038111156135d157600080fd5b8301601f810185136135e257600080fd5b80356135f061198f82611912565b81815260059190911b8201830190838101908783111561360f57600080fd5b928401925b828410156119d85761362584613275565b82529284019290840190613614565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160681b031683529284019291840191600101613650565b6000602080838503121561368857600080fd5b82356001600160401b0381111561369e57600080fd5b8301601f810185136136af57600080fd5b80356136bd61198f82611912565b81815260059190911b820183019083810190878311156136dc57600080fd5b928401925b828410156119d8576136f2846120fc565b825292840192908401906136e1565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601d0b8352928401929184019160010161371d565b80356001600160b01b038116811461184657600080fd5b60006020828403121561376557600080fd5b6118668261373c565b8035600f81900b811461184657600080fd5b60006020828403121561379257600080fd5b6118668261376e565b80356001600160881b038116811461184657600080fd5b600060208083850312156137c557600080fd5b82356001600160401b038111156137db57600080fd5b8301601f810185136137ec57600080fd5b80356137fa61198f82611912565b81815260059190911b8201830190838101908783111561381957600080fd5b928401925b828410156119d85761382f8461379b565b8252928401929084019061381e565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160881b03168352928401929184019160010161385a565b80356001600160f81b038116811461184657600080fd5b600060208083850312156138a957600080fd5b82356001600160401b038111156138bf57600080fd5b8301601f810185136138d057600080fd5b80356138de61198f82611912565b81815260059190911b820183019083810190878311156138fd57600080fd5b928401925b828410156119d8576139138461387f565b82529284019290840190613902565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160f81b03168352928401929184019160010161393e565b6000602080838503121561397657600080fd5b82356001600160401b0381111561398c57600080fd5b8301601f8101851361399d57600080fd5b80356139ab61198f82611912565b81815260059190911b820183019083810190878311156139ca57600080fd5b928401925b828410156119d8576139e084611d15565b825292840192908401906139cf565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160120b83529284019291840191600101613a0b565b8035601581900b811461184657600080fd5b600060208284031215613a4e57600080fd5b61186682613a2a565b600060208284031215613a6957600080fd5b611866826132a7565b60006020808385031215613a8557600080fd5b82356001600160401b03811115613a9b57600080fd5b8301601f81018513613aac57600080fd5b8035613aba61198f82611912565b81815260059190911b82018301908381019087831115613ad957600080fd5b928401925b828410156119d857613aef8461261e565b82529284019290840190613ade565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601c0b83529284019291840191600101613b1a565b60006020808385031215613b4c57600080fd5b82356001600160401b03811115613b6257600080fd5b8301601f81018513613b7357600080fd5b8035613b8161198f82611912565b81815260059190911b82018301908381019087831115613ba057600080fd5b928401925b828410156119d857613bb684612bda565b82529284019290840190613ba5565b602080825282518282018190526000919084820190604085019084805b82811015613c00578451820b84529385019392850192600101613be2565b5091979650505050505050565b600060208284031215613c1f57600080fd5b6118668261319c565b600060208284031215613c3a57600080fd5b61186682612183565b8035600e81900b811461184657600080fd5b60006020808385031215613c6857600080fd5b82356001600160401b03811115613c7e57600080fd5b8301601f81018513613c8f57600080fd5b8035613c9d61198f82611912565b81815260059190911b82018301908381019087831115613cbc57600080fd5b928401925b828410156119d857613cd284613c43565b82529284019290840190613cc1565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600e0b83529284019291840191600101613cfd565b803562ffffff8116811461184657600080fd5b60006020808385031215613d4257600080fd5b82356001600160401b03811115613d5857600080fd5b8301601f81018513613d6957600080fd5b8035613d7761198f82611912565b81815260059190911b82018301908381019087831115613d9657600080fd5b928401925b828410156119d857613dac84613d1c565b82529284019290840190613d9b565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835162ffffff1683529284019291840191600101613dd7565b600060208284031215613e0a57600080fd5b6118668261264b565b600060208284031215613e2557600080fd5b61186682612518565b60006020808385031215613e4157600080fd5b82356001600160401b03811115613e5757600080fd5b8301601f81018513613e6857600080fd5b8035613e7661198f82611912565b81815260059190911b82018301908381019087831115613e9557600080fd5b928401925b828410156119d857613eab84611c89565b82529284019290840190613e9a565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601e0b83529284019291840191600101613ed6565b600060208284031215613f0757600080fd5b6118668261235b565b600060208284031215613f2257600080fd5b611866826130c2565b803563ffffffff8116811461184657600080fd5b60006020808385031215613f5257600080fd5b82356001600160401b03811115613f6857600080fd5b8301601f81018513613f7957600080fd5b8035613f8761198f82611912565b81815260059190911b82018301908381019087831115613fa657600080fd5b928401925b828410156119d857613fbc84613f2b565b82529284019290840190613fab565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835163ffffffff1683529284019291840191600101613fe7565b6000602080838503121561401c57600080fd5b82356001600160401b0381111561403257600080fd5b8301601f8101851361404357600080fd5b803561405161198f82611912565b81815260059190911b8201830190838101908783111561407057600080fd5b928401925b828410156119d85761408684611b72565b82529284019290840190614075565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160040b835292840192918401916001016140b1565b6000602082840312156140e257600080fd5b61186682611f20565b6000602082840312156140fd57600080fd5b61186682613380565b80356001600160401b038116811461184657600080fd5b6000602080838503121561413057600080fd5b82356001600160401b0381111561414657600080fd5b8301601f8101851361415757600080fd5b803561416561198f82611912565b81815260059190911b8201830190838101908783111561418457600080fd5b928401925b828410156119d85761419a84614106565b82529284019290840190614189565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160401b0316835292840192918401916001016141c5565b803565ffffffffffff8116811461184657600080fd5b6000602080838503121561421357600080fd5b82356001600160401b0381111561422957600080fd5b8301601f8101851361423a57600080fd5b803561424861198f82611912565b81815260059190911b8201830190838101908783111561426757600080fd5b928401925b828410156119d85761427d846141ea565b8252928401929084019061426c565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835165ffffffffffff16835292840192918401916001016142a8565b6000602082840312156142de57600080fd5b61186682613c43565b80356001600160a81b038116811461184657600080fd5b60006020828403121561431057600080fd5b611866826142e7565b8035600381900b811461184657600080fd5b60006020828403121561433d57600080fd5b61186682614319565b60006020828403121561435857600080fd5b6118668261379b565b60006020828403121561437357600080fd5b61186682612cd4565b6000602080838503121561438f57600080fd5b82356001600160401b038111156143a557600080fd5b8301601f810185136143b657600080fd5b80356143c461198f82611912565b81815260059190911b820183019083810190878311156143e357600080fd5b928401925b828410156119d8576143f98461182f565b825292840192908401906143e8565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160801b031683529284019291840191600101614424565b6000602080838503121561445c57600080fd5b82356001600160401b0381111561447257600080fd5b8301601f8101851361448357600080fd5b803561449161198f82611912565b81815260059190911b820183019083810190878311156144b057600080fd5b928401925b828410156119d8576144c68461376e565b825292840192908401906144b5565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600f0b835292840192918401916001016144f1565b6000602080838503121561452357600080fd5b82356001600160401b0381111561453957600080fd5b8301601f8101851361454a57600080fd5b803561455861198f82611912565b81815260059190911b8201830190838101908783111561457757600080fd5b928401925b828410156119d85761458d84612f6b565b8252928401929084019061457c565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160090b835292840192918401916001016145b8565b600060208083850312156145ea57600080fd5b82356001600160401b0381111561460057600080fd5b8301601f8101851361461157600080fd5b803561461f61198f82611912565b81815260059190911b8201830190838101908783111561463e57600080fd5b928401925b828410156119d85761465484611ce3565b82529284019290840190614643565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160981b03168352928401929184019160010161467f565b803560ff8116811461184657600080fd5b6000602082840312156146c757600080fd5b611866826146a4565b6000602082840312156146e257600080fd5b61186682612e7f565b6000602082840312156146fd57600080fd5b6118668261387f565b6000602080838503121561471957600080fd5b82356001600160401b0381111561472f57600080fd5b8301601f8101851361474057600080fd5b803561474e61198f82611912565b81815260059190911b8201830190838101908783111561476d57600080fd5b928401925b828410156119d85761478384611ef3565b82529284019290840190614772565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160160b835292840192918401916001016147ae565b6000602082840312156147df57600080fd5b611866826141ea565b600060208083850312156147fb57600080fd5b82356001600160401b0381111561481157600080fd5b8301601f8101851361482257600080fd5b803561483061198f82611912565b81815260059190911b8201830190838101908783111561484f57600080fd5b928401925b828410156119d8576148658461373c565b82529284019290840190614854565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160b01b031683529284019291840191600101614890565b6000602082840312156148c757600080fd5b61186682612af6565b600060208083850312156148e357600080fd5b82356001600160401b038111156148f957600080fd5b8301601f8101851361490a57600080fd5b803561491861198f82611912565b81815260059190911b8201830190838101908783111561493757600080fd5b928401925b828410156119d85761494d84614319565b8252928401929084019061493c565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160030b83529284019291840191600101614978565b80356001600160901b038116811461184657600080fd5b600060208083850312156149c157600080fd5b82356001600160401b038111156149d757600080fd5b8301601f810185136149e857600080fd5b80356149f661198f82611912565b81815260059190911b82018301908381019087831115614a1557600080fd5b928401925b828410156119d857614a2b84614997565b82529284019290840190614a1a565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160901b031683529284019291840191600101614a56565b60006020808385031215614a8e57600080fd5b82356001600160401b03811115614aa457600080fd5b8301601f81018513614ab557600080fd5b8035614ac361198f82611912565b81815260059190911b82018301908381019087831115614ae257600080fd5b928401925b828410156119d857614af884612129565b82529284019290840190614ae7565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600a0b83529284019291840191600101614b23565b8035600881900b811461184657600080fd5b60006020808385031215614b6757600080fd5b82356001600160401b03811115614b7d57600080fd5b8301601f81018513614b8e57600080fd5b8035614b9c61198f82611912565b81815260059190911b82018301908381019087831115614bbb57600080fd5b928401925b828410156119d857614bd184614b42565b82529284019290840190614bc0565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160080b83529284019291840191600101614bfc565b80356001600160d01b038116811461184657600080fd5b600060208284031215614c4457600080fd5b61186682614c1b565b60006020808385031215614c6057600080fd5b82356001600160401b03811115614c7657600080fd5b8301601f81018513614c8757600080fd5b8035614c9561198f82611912565b81815260059190911b82018301908381019087831115614cb457600080fd5b928401925b828410156119d857614cca84612267565b82529284019290840190614cb9565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601a0b83529284019291840191600101614cf5565b600060208284031215614d2657600080fd5b61186682613f2b565b63ffffffff84168152600060206001600160401b0385168184015260606040840152835180606085015260005b81811015614d7857858101830151858201608001528201614d5c565b506000608082860101526080601f19601f83011685010192505050949350505050565b600060208284031215614dad57600080fd5b61186682612012565b60006020808385031215614dc957600080fd5b82356001600160401b03811115614ddf57600080fd5b8301601f81018513614df057600080fd5b8035614dfe61198f82611912565b81815260059190911b82018301908381019087831115614e1d57600080fd5b928401925b828410156119d857614e3384612930565b82529284019290840190614e22565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160a01b031683529284019291840191600101614e5e565b600060208284031215614e9557600080fd5b61186682614106565b600060208284031215614eb057600080fd5b61186682611a2a565b600060208284031215614ecb57600080fd5b61186682611e0f565b60006020808385031215614ee757600080fd5b82356001600160401b03811115614efd57600080fd5b8301601f81018513614f0e57600080fd5b8035614f1c61198f82611912565b81815260059190911b82018301908381019087831115614f3b57600080fd5b928401925b828410156119d857614f5184612758565b82529284019290840190614f40565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160070b83529284019291840191600101614f7c565b60006020808385031215614fae57600080fd5b82356001600160401b03811115614fc457600080fd5b8301601f81018513614fd557600080fd5b8035614fe361198f82611912565b81815260059190911b8201830190838101908783111561500257600080fd5b928401925b828410156119d857615018846142e7565b82529284019290840190615007565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160a81b031683529284019291840191600101615043565b6000602080838503121561507b57600080fd5b82356001600160401b0381111561509157600080fd5b8301601f810185136150a257600080fd5b80356150b061198f82611912565b81815260059190911b820183019083810190878311156150cf57600080fd5b928401925b828410156119d8576150e584613a2a565b825292840192908401906150d4565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160150b83529284019291840191600101615110565b6000602080838503121561514257600080fd5b82356001600160401b0381111561515857600080fd5b8301601f8101851361516957600080fd5b803561517761198f82611912565b81815260059190911b8201830190838101908783111561519657600080fd5b928401925b828410156119d8576151ac846134ac565b8252928401929084019061519b565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160020b835292840192918401916001016151d7565b803564ffffffffff8116811461184657600080fd5b6000602080838503121561521e57600080fd5b82356001600160401b0381111561523457600080fd5b8301601f8101851361524557600080fd5b803561525361198f82611912565b81815260059190911b8201830190838101908783111561527257600080fd5b928401925b828410156119d857615288846151f6565b82529284019290840190615277565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835164ffffffffff16835292840192918401916001016152b3565b600060208083850312156152e957600080fd5b82356001600160401b038111156152ff57600080fd5b8301601f8101851361531057600080fd5b803561531e61198f82611912565b81815260059190911b8201830190838101908783111561533d57600080fd5b928401925b828410156119d85761535384614c1b565b82529284019290840190615342565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160d01b03168352928401929184019160010161537e565b6000602082840312156153b557600080fd5b61186682614b42565b600060208083850312156153d157600080fd5b82356001600160401b038111156153e757600080fd5b8301601f810185136153f857600080fd5b803561540661198f82611912565b81815260059190911b8201830190838101908783111561542557600080fd5b928401925b828410156119d85761543b84612156565b8252928401929084019061542a565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160190b83529284019291840191600101615466565b60006020828403121561549757600080fd5b61186682614997565b6000602082840312156154b257600080fd5b61186682613d1c565b600060208083850312156154ce57600080fd5b82356001600160401b038111156154e457600080fd5b8301601f810185136154f557600080fd5b803561550361198f82611912565b81815260059190911b8201830190838101908783111561552257600080fd5b928401925b828410156119d857615538846146a4565b82529284019290840190615527565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160ff1683529284019291840191600101615563565b6000602080838503121561559557600080fd5b82356001600160401b038111156155ab57600080fd5b8301601f810185136155bc57600080fd5b80356155ca61198f82611912565b81815260059190911b820183019083810190878311156155e957600080fd5b928401925b828410156119d8576155ff8461347f565b825292840192908401906155ee565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601b0b8352928401929184019160010161562a565b60006020828403121561565b57600080fd5b611866826151f6565b634e487b7160e01b600052601160045260246000fd5b600081810b9083900b01607f8113607f198212171561569b5761569b615664565b92915050565b80820182811260008312801582168215821617156156c1576156c1615664565b505092915050565b63ffffffff8281168282160390808211156156e6576156e6615664565b5092915050565b600481810b9083900b01647fffffffff8113647fffffffff198212171561569b5761569b61566456fea264697066735822122059b2a999293b864561fd2a712500441a478d011203453b72f2b4088d8c8a521464736f6c63430008120033"; const bitSizes = [ 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, From ac5b4e4d4b33df7fcd93c4bc7dc6aace30997f19 Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Thu, 2 Nov 2023 15:26:50 +0200 Subject: [PATCH 05/10] add tests for array methods Signed-off-by: svetoslav-nikol0v --- ...ntractFunctionParametersIntegrationTest.js | 268 +++++++++++++++++- 1 file changed, 264 insertions(+), 4 deletions(-) diff --git a/test/integration/ContractFunctionParametersIntegrationTest.js b/test/integration/ContractFunctionParametersIntegrationTest.js index 046adea08..07dd07ca8 100644 --- a/test/integration/ContractFunctionParametersIntegrationTest.js +++ b/test/integration/ContractFunctionParametersIntegrationTest.js @@ -43,13 +43,13 @@ const calculateRange = (bitSize, inputType) => { // The maximum safe integer in JavaScript is 2^53-1. const MAX_EXPONENT = 53; - let exponent = bitSize; + let exponent = bitSize - 1; if (inputType === INPUT_TYPE.NUMBER && bitSize > MAX_EXPONENT) { exponent = MAX_EXPONENT; } - const extremum = 2 ** (exponent - 1); + const extremum = 2 ** exponent; return { min: extremum, @@ -57,6 +57,29 @@ const calculateRange = (bitSize, inputType) => { }; }; +/** + * @param {number} bitSize + * @param {string} inputType + * @returns {number[]} + */ +const createArray = (bitSize, inputType) => { + const { min, max } = calculateRange(bitSize, inputType); + + switch (inputType) { + case INPUT_TYPE.NUMBER: + return [-min, max]; + case INPUT_TYPE.BIG_NUMBER: + return [ + new BigNumber(-2).pow(bitSize - 1), + new BigNumber(2).pow(bitSize - 1).minus(1), + ]; + case INPUT_TYPE.LONG: + return [new Long(min).neg(), new Long(max)]; + default: + return [-min, max]; + } +}; + /** * @param {string} extremum * @param {number} bitSize @@ -75,6 +98,15 @@ const getDescription = (extremum, bitSize, inputType, methodType) => { } }; +/** + * @param {number} bitSize + * @param {string} inputType + * @param {string} methodType + * @returns {string} + */ +const getDescriptionForArrayMethod = (bitSize, inputType, methodType) => + `should return the right array of ${methodType}${bitSize} values [${inputType}]`; + let smartContractBytecode = "0x608060405234801561001057600080fd5b5061574c80620000216000396000f3fe608060405234801561001057600080fd5b50600436106107bc5760003560e01c8063897831d2116103f5578063c6c18a1c11610215578063e05e91e011610130578063ea5405b3116100c3578063f6e877f411610092578063f6e877f414611719578063f8293f6e1461173f578063f9e6743114611761578063faab75351461177c578063ffb805011461179757600080fd5b8063ea5405b3146116a7578063ef4a8c1b146116c2578063f4e490f5146116dd578063f53552ef146116fe57600080fd5b8063e4081890116100ff578063e408189014611633578063e436d3901461164e578063e4fadc1014611669578063e713cda81461168457600080fd5b8063e05e91e0146115a6578063e066de50146115cc578063e0f53e24146115f2578063e29dc38a1461161857600080fd5b8063d2e43ea2116101a8578063dade0c0b11610177578063dade0c0b14611513578063dbb04ed914611535578063de9fb4841461155e578063df8cfdbe1461158b57600080fd5b8063d2e43ea21461149c578063d32201bb146114b7578063d79d4d40146114d2578063d98dda69146114f857600080fd5b8063cbf2beee116101e4578063cbf2beee14611425578063cdb9e4e814611440578063ce1ccc7a14611466578063d037df461461148157600080fd5b8063c6c18a1c14611395578063c7d8b87e146113bf578063ca692370146113e5578063cbd2e6a51461140057600080fd5b8063aa450f1f11610310578063b989c7ee116102a3578063bd90536a11610272578063bd90536a146112fc578063c05cfd8e14611324578063c3d385b91461133f578063c4596b121461135a578063c503772d1461137557600080fd5b8063b989c7ee14611274578063ba945bdb14611295578063bb6b5243146112bb578063bbcb71ed146112e157600080fd5b8063b79ecc0c116102df578063b79ecc0c146111f7578063b82c0fce14611212578063b834bfe91461122d578063b8da8d161461124e57600080fd5b8063aa450f1f1461117a578063b0dfddc414611195578063b2db404a146111b0578063b4e3e7b1146111d157600080fd5b80639b1794ae11610388578063a1bda12211610357578063a1bda122146110f7578063a284da3114611118578063a401d60d14611133578063a75761f11461115957600080fd5b80639b1794ae1461107a5780639c5663c7146110a05780639d639bcc146110bb578063a08b9f67146110d657600080fd5b806394cd7c80116103c457806394cd7c8014611002578063956ce3d714611023578063967075e31461103e57806398508ba31461105957600080fd5b8063897831d214610f9057806389cd48ed14610fab5780638b61e01314610fc6578063923f5edf14610fe157600080fd5b80633f396e67116105e057806368ef4466116104fb578063779290b31161048e5780637fc360201161045d5780637fc3602014610ef85780638469c40614610f1357806387d062dc14610f2e578063881c8fb714610f4957806388b7e6f514610f6f57600080fd5b8063779290b314610e75578063796a27ea14610e905780637d0dc26214610eb65780637ec32d8414610ed757600080fd5b8063703bd050116104ca578063703bd05014610df857806370a5cb8114610e1357806372a06b4d14610e3957806375546bf214610e5a57600080fd5b806368ef446614610d8057806369993eff14610da15780636a54715c14610dbc5780636a842c3514610ddd57600080fd5b8063545e2113116105735780635e68a6a8116105425780635e68a6a814610d085780635f6a65e314610d23578063628bc3ef14610d3e57806364e008c114610d5f57600080fd5b8063545e211314610ca557806355bed93714610cd257806359adb2df14610a105780635b14551a14610ced57600080fd5b806344e7b037116105af57806344e7b03714610c2e57806347febd6614610c545780634d4ec9c814610c6f5780635154a08414610c8a57600080fd5b80633f396e6714610baf578063407b899b14610bd757806341b3ed9914610bf85780634384e5ee14610c1357600080fd5b8063189cea8e116106db57806333520ec31161066e5780633822abcb1161063d5780633822abcb14610b1c5780633b33ccd314610b375780633b45e6e014610b525780633e1a277114610b735780633ee0a4b514610b9457600080fd5b806333520ec314610ac557806335d794e7146108fa57806336e6630214610ae657806337ff875914610b0157600080fd5b80632ef16e8e116106aa5780632ef16e8e14610a475780632f47a40d14610a685780632f6c1bb414610a89578063324ff91e14610aaa57600080fd5b8063189cea8e146109d45780631e6dccfb146109f557806322937ea914610a105780632528956214610a2c57600080fd5b806310d5455311610753578063129ed5da11610722578063129ed5da1461095757806312cd95a11461097d57806313c5d0991461099e578063155464fa146109b957600080fd5b806310d54553146108d957806311259dcf146108fa578063118b84151461091557806311ec6c901461093657600080fd5b8063060e393a1161078f578063060e393a1461085157806306ac6fe11461086c57806308123e09146108925780630a958dc8146108b857600080fd5b8063017fa10b146107c1578063021d88ab146107ef5780630374543014610815578063048bf1fb14610836575b600080fd5b6107d26107cf36600461184b565b90565b6040516001600160801b0390911681526020015b60405180910390f35b6107fd6107cf366004611884565b6040516001600160601b0390911681526020016107e6565b6108236107cf3660046118b1565b604051600c9190910b81526020016107e6565b6108446107cf366004611947565b6040516107e691906119e3565b61085f6107cf366004611a41565b6040516107e69190611acd565b61087a6107cf366004611b25565b6040516001600160781b0390911681526020016107e6565b6108a06107cf366004611b57565b60405166ffffffffffffff90911681526020016107e6565b6108c66107cf366004611b84565b60405160049190910b81526020016107e6565b6108e76107cf366004611bb1565b60405160119190910b81526020016107e6565b6109086107cf366004611bcc565b6040516107e69190611c51565b6109236107cf366004611c9b565b604051601e9190910b81526020016107e6565b6109446107cf366004611cc8565b60405160139190910b81526020016107e6565b6109656107cf366004611cfa565b6040516001600160981b0390911681526020016107e6565b61098b6107cf366004611d27565b60405160129190910b81526020016107e6565b6109ac6107cf366004611d42565b6040516107e69190611dce565b6109c76107cf366004611e26565b6040516107e69190611eb2565b6109e26107cf366004611f05565b60405160169190910b81526020016107e6565b610a036107cf366004611f32565b6040516107e69190611fbe565b610a1e6107cf366004611ff9565b6040519081526020016107e6565b610a3a6107cf36600461202c565b6040516107e691906120b8565b610a556107cf36600461210e565b604051601d9190910b81526020016107e6565b610a766107cf36600461213b565b604051600a9190910b81526020016107e6565b610a976107cf366004612168565b60405160199190910b81526020016107e6565b610ab86107cf36600461219a565b6040516107e69190612226565b610ad36107cf366004612279565b604051601a9190910b81526020016107e6565b610af46107cf366004612294565b6040516107e69190612320565b610b0f6107cf366004612372565b6040516107e691906123fe565b610b2a6107cf366004612451565b6040516107e691906124dd565b610b456107cf36600461252a565b6040516107e691906125b6565b610b606107cf366004612603565b60405160109190910b81526020016107e6565b610b816107cf366004612630565b604051601c9190910b81526020016107e6565b610ba26107cf36600461265d565b6040516107e691906126e9565b610bbd6107cf36600461273d565b60405168ffffffffffffffffff90911681526020016107e6565b610be56107cf36600461276a565b60405160079190910b81526020016107e6565b610c066107cf36600461279c565b6040516107e69190612828565b610c216107cf366004612869565b6040516107e691906128f5565b610c3c6107cf366004612947565b6040516001600160a01b0390911681526020016107e6565b610c626107cf366004612962565b6040516107e691906129ee565b610c7d6107cf366004612a29565b6040516107e69190612ab5565b610c986107cf366004612b0d565b6040516107e69190612b99565b610cb8610cb3366004612bec565b6117bb565b60408051600093840b81529190920b6020820152016107e6565b610ce06107cf366004612c07565b6040516107e69190612c93565b610cfb6107cf366004612ceb565b6040516107e69190612d77565b610d166107cf366004612db8565b6040516107e69190612e44565b610d316107cf366004612e9a565b6040516107e69190612f26565b610d4c6107cf366004612f7d565b60405160099190910b81526020016107e6565b610d6d6107cf366004612faa565b60405160179190910b81526020016107e6565b610d8e6107cf366004612fc5565b60405160149190910b81526020016107e6565b610daf6107cf366004612fe0565b6040516107e6919061306c565b610dca6107cf3660046130a7565b60405160069190910b81526020016107e6565b610deb6107cf3660046130d4565b6040516107e69190613160565b610e066107cf3660046131ae565b6040516107e6919061323a565b610e216107cf36600461328c565b6040516001600160681b0390911681526020016107e6565b610e476107cf366004612bec565b60405160009190910b81526020016107e6565b610e686107cf3660046132b9565b6040516107e69190613345565b610e836107cf366004613397565b6040516107e69190613423565b610e9e6107cf366004613464565b6040516001600160d81b0390911681526020016107e6565b610ec46107cf366004613491565b604051601b9190910b81526020016107e6565b610ee56107cf3660046134be565b60405160029190910b81526020016107e6565b610f066107cf3660046134d9565b6040516107e69190613565565b610f216107cf3660046135a8565b6040516107e69190613634565b610f3c6107cf366004613675565b6040516107e69190613701565b610f576107cf366004613753565b6040516001600160b01b0390911681526020016107e6565b610f7d6107cf366004613780565b604051600f9190910b81526020016107e6565b610f9e6107cf3660046137b2565b6040516107e6919061383e565b610fb96107cf366004613896565b6040516107e69190613922565b610fd46107cf366004613963565b6040516107e691906139ef565b610fef6107cf366004613a3c565b60405160159190910b81526020016107e6565b6110106107cf366004613a57565b60405160189190910b81526020016107e6565b6110316107cf366004613a72565b6040516107e69190613afe565b61104c6107cf366004613b39565b6040516107e69190613bc5565b6110676107cf366004613c0d565b604051600d9190910b81526020016107e6565b6110886107cf366004613c28565b6040516001600160b81b0390911681526020016107e6565b6110ae6107cf366004613c55565b6040516107e69190613ce1565b6110c96107cf366004613d2f565b6040516107e69190613dbb565b6110e46107cf366004613df8565b604051600b9190910b81526020016107e6565b6111056107cf366004613e13565b60405160019190910b81526020016107e6565b6111266107cf366004613e2e565b6040516107e69190613eba565b6111416107cf366004613ef5565b6040516001600160f01b0390911681526020016107e6565b6111676107cf366004613f10565b60405161ffff90911681526020016107e6565b6111886107cf366004613f3f565b6040516107e69190613fcb565b6111a36107cf366004614009565b6040516107e69190614095565b6111be6107cf3660046140d0565b60405160059190910b81526020016107e6565b6111df6107cf3660046140eb565b6040516001600160701b0390911681526020016107e6565b6112056107cf36600461411d565b6040516107e691906141a9565b6112206107cf366004614200565b6040516107e6919061428c565b61123b6107cf3660046142cc565b604051600e9190910b81526020016107e6565b61125c6107cf3660046142fe565b6040516001600160a81b0390911681526020016107e6565b6112826107cf36600461432b565b60405160039190910b81526020016107e6565b6112a36107cf366004614346565b6040516001600160881b0390911681526020016107e6565b6112c96107cf366004614361565b6040516001600160c81b0390911681526020016107e6565b6112ef6107cf36600461437c565b6040516107e69190614408565b61130f61130a366004611ff9565b6117d3565b604080519283526020830191909152016107e6565b6113326107cf366004614449565b6040516107e691906144d5565b61134d6107cf366004614510565b6040516107e6919061459c565b6113686107cf3660046145d7565b6040516107e69190614663565b6113836107cf3660046146b5565b60405160ff90911681526020016107e6565b6113a36107cf3660046146d0565b6040516affffffffffffffffffffff90911681526020016107e6565b6113cd6107cf3660046146eb565b6040516001600160f81b0390911681526020016107e6565b6113f36107cf366004614706565b6040516107e69190614792565b61140e6107cf3660046147cd565b60405165ffffffffffff90911681526020016107e6565b6114336107cf3660046147e8565b6040516107e69190614874565b61144e6107cf3660046148b5565b6040516001600160e01b0390911681526020016107e6565b6114746107cf3660046148d0565b6040516107e6919061495c565b61148f6107cf3660046149ae565b6040516107e69190614a3a565b6114aa6107cf366004614a7b565b6040516107e69190614b07565b6114c56107cf366004614b54565b6040516107e69190614be0565b6114e06107cf366004614c32565b6040516001600160d01b0390911681526020016107e6565b6115066107cf366004614c4d565b6040516107e69190614cd9565b611526611521366004614d14565b6117e2565b6040516107e693929190614d2f565b6115436107cf366004614d9b565b60405169ffffffffffffffffffff90911681526020016107e6565b61157161156c366004611b84565b611820565b60408051600493840b81529190920b6020820152016107e6565b6115996107cf366004614db6565b6040516107e69190614e42565b6115b46107cf366004614e83565b6040516001600160401b0390911681526020016107e6565b6115da6107cf366004614e9e565b6040516001600160e81b0390911681526020016107e6565b6116006107cf366004614eb9565b6040516001600160c01b0390911681526020016107e6565b6116266107cf366004614ed4565b6040516107e69190614f60565b6116416107cf366004614f9b565b6040516107e69190615027565b61165c6107cf366004615068565b6040516107e691906150f4565b6116776107cf36600461512f565b6040516107e691906151bb565b6116926107cf366004614d14565b60405163ffffffff90911681526020016107e6565b6116b56107cf36600461520b565b6040516107e69190615297565b6116d06107cf3660046152d6565b6040516107e69190615362565b6116eb6107cf3660046153a3565b60405160089190910b81526020016107e6565b61170c6107cf3660046153be565b6040516107e6919061544a565b6117276107cf366004615485565b6040516001600160901b0390911681526020016107e6565b61174d6107cf3660046154a0565b60405162ffffff90911681526020016107e6565b61176f6107cf3660046154bb565b6040516107e69190615547565b61178a6107cf366004615582565b6040516107e6919061560e565b6117a56107cf366004615649565b60405164ffffffffff90911681526020016107e6565b600080826117ca81601461567a565b91509150915091565b600080826117ca8160016156a1565b6000806060836117f36001826156c9565b6040805180820190915260028152614f4b60f01b602082015291945063ffffffff16925090509193909250565b600080826117ca8160016156ed565b80356001600160801b038116811461184657600080fd5b919050565b60006020828403121561185d57600080fd5b6118668261182f565b9392505050565b80356001600160601b038116811461184657600080fd5b60006020828403121561189657600080fd5b6118668261186d565b8035600c81900b811461184657600080fd5b6000602082840312156118c357600080fd5b6118668261189f565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561190a5761190a6118cc565b604052919050565b60006001600160401b0382111561192b5761192b6118cc565b5060051b60200190565b8035601481900b811461184657600080fd5b6000602080838503121561195a57600080fd5b82356001600160401b0381111561197057600080fd5b8301601f8101851361198157600080fd5b803561199461198f82611912565b6118e2565b81815260059190911b820183019083810190878311156119b357600080fd5b928401925b828410156119d8576119c984611935565b825292840192908401906119b8565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160140b835292840192918401916001016119ff565b50909695505050505050565b80356001600160e81b038116811461184657600080fd5b60006020808385031215611a5457600080fd5b82356001600160401b03811115611a6a57600080fd5b8301601f81018513611a7b57600080fd5b8035611a8961198f82611912565b81815260059190911b82018301908381019087831115611aa857600080fd5b928401925b828410156119d857611abe84611a2a565b82529284019290840190611aad565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160e81b031683529284019291840191600101611ae9565b80356001600160781b038116811461184657600080fd5b600060208284031215611b3757600080fd5b61186682611b0e565b803566ffffffffffffff8116811461184657600080fd5b600060208284031215611b6957600080fd5b61186682611b40565b8035600481900b811461184657600080fd5b600060208284031215611b9657600080fd5b61186682611b72565b8035601181900b811461184657600080fd5b600060208284031215611bc357600080fd5b61186682611b9f565b60006020808385031215611bdf57600080fd5b82356001600160401b03811115611bf557600080fd5b8301601f81018513611c0657600080fd5b8035611c1461198f82611912565b81815260059190911b82018301908381019087831115611c3357600080fd5b928401925b828410156119d857833582529284019290840190611c38565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835183529284019291840191600101611c6d565b8035601e81900b811461184657600080fd5b600060208284031215611cad57600080fd5b61186682611c89565b8035601381900b811461184657600080fd5b600060208284031215611cda57600080fd5b61186682611cb6565b80356001600160981b038116811461184657600080fd5b600060208284031215611d0c57600080fd5b61186682611ce3565b8035601281900b811461184657600080fd5b600060208284031215611d3957600080fd5b61186682611d15565b60006020808385031215611d5557600080fd5b82356001600160401b03811115611d6b57600080fd5b8301601f81018513611d7c57600080fd5b8035611d8a61198f82611912565b81815260059190911b82018301908381019087831115611da957600080fd5b928401925b828410156119d857611dbf84611b40565b82529284019290840190611dae565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835166ffffffffffffff1683529284019291840191600101611dea565b80356001600160c01b038116811461184657600080fd5b60006020808385031215611e3957600080fd5b82356001600160401b03811115611e4f57600080fd5b8301601f81018513611e6057600080fd5b8035611e6e61198f82611912565b81815260059190911b82018301908381019087831115611e8d57600080fd5b928401925b828410156119d857611ea384611e0f565b82529284019290840190611e92565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160c01b031683529284019291840191600101611ece565b8035601681900b811461184657600080fd5b600060208284031215611f1757600080fd5b61186682611ef3565b8035600581900b811461184657600080fd5b60006020808385031215611f4557600080fd5b82356001600160401b03811115611f5b57600080fd5b8301601f81018513611f6c57600080fd5b8035611f7a61198f82611912565b81815260059190911b82018301908381019087831115611f9957600080fd5b928401925b828410156119d857611faf84611f20565b82529284019290840190611f9e565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160050b83529284019291840191600101611fda565b60006020828403121561200b57600080fd5b5035919050565b803569ffffffffffffffffffff8116811461184657600080fd5b6000602080838503121561203f57600080fd5b82356001600160401b0381111561205557600080fd5b8301601f8101851361206657600080fd5b803561207461198f82611912565b81815260059190911b8201830190838101908783111561209357600080fd5b928401925b828410156119d8576120a984612012565b82529284019290840190612098565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835169ffffffffffffffffffff16835292840192918401916001016120d4565b8035601d81900b811461184657600080fd5b60006020828403121561212057600080fd5b611866826120fc565b8035600a81900b811461184657600080fd5b60006020828403121561214d57600080fd5b61186682612129565b8035601981900b811461184657600080fd5b60006020828403121561217a57600080fd5b61186682612156565b80356001600160b81b038116811461184657600080fd5b600060208083850312156121ad57600080fd5b82356001600160401b038111156121c357600080fd5b8301601f810185136121d457600080fd5b80356121e261198f82611912565b81815260059190911b8201830190838101908783111561220157600080fd5b928401925b828410156119d85761221784612183565b82529284019290840190612206565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160b81b031683529284019291840191600101612242565b8035601a81900b811461184657600080fd5b60006020828403121561228b57600080fd5b61186682612267565b600060208083850312156122a757600080fd5b82356001600160401b038111156122bd57600080fd5b8301601f810185136122ce57600080fd5b80356122dc61198f82611912565b81815260059190911b820183019083810190878311156122fb57600080fd5b928401925b828410156119d85761231184611cb6565b82529284019290840190612300565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160130b8352928401929184019160010161233c565b80356001600160f01b038116811461184657600080fd5b6000602080838503121561238557600080fd5b82356001600160401b0381111561239b57600080fd5b8301601f810185136123ac57600080fd5b80356123ba61198f82611912565b81815260059190911b820183019083810190878311156123d957600080fd5b928401925b828410156119d8576123ef8461235b565b825292840192908401906123de565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160f01b03168352928401929184019160010161241a565b8035600681900b811461184657600080fd5b6000602080838503121561246457600080fd5b82356001600160401b0381111561247a57600080fd5b8301601f8101851361248b57600080fd5b803561249961198f82611912565b81815260059190911b820183019083810190878311156124b857600080fd5b928401925b828410156119d8576124ce8461243f565b825292840192908401906124bd565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160060b835292840192918401916001016124f9565b8035600181900b811461184657600080fd5b6000602080838503121561253d57600080fd5b82356001600160401b0381111561255357600080fd5b8301601f8101851361256457600080fd5b803561257261198f82611912565b81815260059190911b8201830190838101908783111561259157600080fd5b928401925b828410156119d8576125a784612518565b82529284019290840190612596565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600190810b84529385019392850192016125d2565b8035601081900b811461184657600080fd5b60006020828403121561261557600080fd5b611866826125f1565b8035601c81900b811461184657600080fd5b60006020828403121561264257600080fd5b6118668261261e565b8035600b81900b811461184657600080fd5b6000602080838503121561267057600080fd5b82356001600160401b0381111561268657600080fd5b8301601f8101851361269757600080fd5b80356126a561198f82611912565b81815260059190911b820183019083810190878311156126c457600080fd5b928401925b828410156119d8576126da8461264b565b825292840192908401906126c9565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600b0b83529284019291840191600101612705565b803568ffffffffffffffffff8116811461184657600080fd5b60006020828403121561274f57600080fd5b61186682612724565b8035600781900b811461184657600080fd5b60006020828403121561277c57600080fd5b61186682612758565b80356001600160d81b038116811461184657600080fd5b600060208083850312156127af57600080fd5b82356001600160401b038111156127c557600080fd5b8301601f810185136127d657600080fd5b80356127e461198f82611912565b81815260059190911b8201830190838101908783111561280357600080fd5b928401925b828410156119d85761281984612785565b82529284019290840190612808565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160d81b031683529284019291840191600101612844565b6000602080838503121561287c57600080fd5b82356001600160401b0381111561289257600080fd5b8301601f810185136128a357600080fd5b80356128b161198f82611912565b81815260059190911b820183019083810190878311156128d057600080fd5b928401925b828410156119d8576128e684611b9f565b825292840192908401906128d5565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160110b83529284019291840191600101612911565b80356001600160a01b038116811461184657600080fd5b60006020828403121561295957600080fd5b61186682612930565b6000602080838503121561297557600080fd5b82356001600160401b0381111561298b57600080fd5b8301601f8101851361299c57600080fd5b80356129aa61198f82611912565b81815260059190911b820183019083810190878311156129c957600080fd5b928401925b828410156119d8576129df8461189f565b825292840192908401906129ce565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600c0b83529284019291840191600101612a0a565b60006020808385031215612a3c57600080fd5b82356001600160401b03811115612a5257600080fd5b8301601f81018513612a6357600080fd5b8035612a7161198f82611912565b81815260059190911b82018301908381019087831115612a9057600080fd5b928401925b828410156119d857612aa68461186d565b82529284019290840190612a95565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160601b031683529284019291840191600101612ad1565b80356001600160e01b038116811461184657600080fd5b60006020808385031215612b2057600080fd5b82356001600160401b03811115612b3657600080fd5b8301601f81018513612b4757600080fd5b8035612b5561198f82611912565b81815260059190911b82018301908381019087831115612b7457600080fd5b928401925b828410156119d857612b8a84612af6565b82529284019290840190612b79565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160e01b031683529284019291840191600101612bb5565b8035600081900b811461184657600080fd5b600060208284031215612bfe57600080fd5b61186682612bda565b60006020808385031215612c1a57600080fd5b82356001600160401b03811115612c3057600080fd5b8301601f81018513612c4157600080fd5b8035612c4f61198f82611912565b81815260059190911b82018301908381019087831115612c6e57600080fd5b928401925b828410156119d857612c8484611b0e565b82529284019290840190612c73565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160781b031683529284019291840191600101612caf565b80356001600160c81b038116811461184657600080fd5b60006020808385031215612cfe57600080fd5b82356001600160401b03811115612d1457600080fd5b8301601f81018513612d2557600080fd5b8035612d3361198f82611912565b81815260059190911b82018301908381019087831115612d5257600080fd5b928401925b828410156119d857612d6884612cd4565b82529284019290840190612d57565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160c81b031683529284019291840191600101612d93565b60006020808385031215612dcb57600080fd5b82356001600160401b03811115612de157600080fd5b8301601f81018513612df257600080fd5b8035612e0061198f82611912565b81815260059190911b82018301908381019087831115612e1f57600080fd5b928401925b828410156119d857612e35846125f1565b82529284019290840190612e24565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160100b83529284019291840191600101612e60565b80356affffffffffffffffffffff8116811461184657600080fd5b60006020808385031215612ead57600080fd5b82356001600160401b03811115612ec357600080fd5b8301601f81018513612ed457600080fd5b8035612ee261198f82611912565b81815260059190911b82018301908381019087831115612f0157600080fd5b928401925b828410156119d857612f1784612e7f565b82529284019290840190612f06565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516affffffffffffffffffffff1683529284019291840191600101612f42565b8035600981900b811461184657600080fd5b600060208284031215612f8f57600080fd5b61186682612f6b565b8035601781900b811461184657600080fd5b600060208284031215612fbc57600080fd5b61186682612f98565b600060208284031215612fd757600080fd5b61186682611935565b60006020808385031215612ff357600080fd5b82356001600160401b0381111561300957600080fd5b8301601f8101851361301a57600080fd5b803561302861198f82611912565b81815260059190911b8201830190838101908783111561304757600080fd5b928401925b828410156119d85761305d84612f98565b8252928401929084019061304c565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160170b83529284019291840191600101613088565b6000602082840312156130b957600080fd5b6118668261243f565b803561ffff8116811461184657600080fd5b600060208083850312156130e757600080fd5b82356001600160401b038111156130fd57600080fd5b8301601f8101851361310e57600080fd5b803561311c61198f82611912565b81815260059190911b8201830190838101908783111561313b57600080fd5b928401925b828410156119d857613151846130c2565b82529284019290840190613140565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835161ffff168352928401929184019160010161317c565b8035600d81900b811461184657600080fd5b600060208083850312156131c157600080fd5b82356001600160401b038111156131d757600080fd5b8301601f810185136131e857600080fd5b80356131f661198f82611912565b81815260059190911b8201830190838101908783111561321557600080fd5b928401925b828410156119d85761322b8461319c565b8252928401929084019061321a565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600d0b83529284019291840191600101613256565b80356001600160681b038116811461184657600080fd5b60006020828403121561329e57600080fd5b61186682613275565b8035601881900b811461184657600080fd5b600060208083850312156132cc57600080fd5b82356001600160401b038111156132e257600080fd5b8301601f810185136132f357600080fd5b803561330161198f82611912565b81815260059190911b8201830190838101908783111561332057600080fd5b928401925b828410156119d857613336846132a7565b82529284019290840190613325565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160180b83529284019291840191600101613361565b80356001600160701b038116811461184657600080fd5b600060208083850312156133aa57600080fd5b82356001600160401b038111156133c057600080fd5b8301601f810185136133d157600080fd5b80356133df61198f82611912565b81815260059190911b820183019083810190878311156133fe57600080fd5b928401925b828410156119d85761341484613380565b82529284019290840190613403565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160701b03168352928401929184019160010161343f565b60006020828403121561347657600080fd5b61186682612785565b8035601b81900b811461184657600080fd5b6000602082840312156134a357600080fd5b6118668261347f565b8035600281900b811461184657600080fd5b6000602082840312156134d057600080fd5b611866826134ac565b600060208083850312156134ec57600080fd5b82356001600160401b0381111561350257600080fd5b8301601f8101851361351357600080fd5b803561352161198f82611912565b81815260059190911b8201830190838101908783111561354057600080fd5b928401925b828410156119d85761355684612724565b82529284019290840190613545565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835168ffffffffffffffffff1683529284019291840191600101613581565b600060208083850312156135bb57600080fd5b82356001600160401b038111156135d157600080fd5b8301601f810185136135e257600080fd5b80356135f061198f82611912565b81815260059190911b8201830190838101908783111561360f57600080fd5b928401925b828410156119d85761362584613275565b82529284019290840190613614565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160681b031683529284019291840191600101613650565b6000602080838503121561368857600080fd5b82356001600160401b0381111561369e57600080fd5b8301601f810185136136af57600080fd5b80356136bd61198f82611912565b81815260059190911b820183019083810190878311156136dc57600080fd5b928401925b828410156119d8576136f2846120fc565b825292840192908401906136e1565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601d0b8352928401929184019160010161371d565b80356001600160b01b038116811461184657600080fd5b60006020828403121561376557600080fd5b6118668261373c565b8035600f81900b811461184657600080fd5b60006020828403121561379257600080fd5b6118668261376e565b80356001600160881b038116811461184657600080fd5b600060208083850312156137c557600080fd5b82356001600160401b038111156137db57600080fd5b8301601f810185136137ec57600080fd5b80356137fa61198f82611912565b81815260059190911b8201830190838101908783111561381957600080fd5b928401925b828410156119d85761382f8461379b565b8252928401929084019061381e565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160881b03168352928401929184019160010161385a565b80356001600160f81b038116811461184657600080fd5b600060208083850312156138a957600080fd5b82356001600160401b038111156138bf57600080fd5b8301601f810185136138d057600080fd5b80356138de61198f82611912565b81815260059190911b820183019083810190878311156138fd57600080fd5b928401925b828410156119d8576139138461387f565b82529284019290840190613902565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160f81b03168352928401929184019160010161393e565b6000602080838503121561397657600080fd5b82356001600160401b0381111561398c57600080fd5b8301601f8101851361399d57600080fd5b80356139ab61198f82611912565b81815260059190911b820183019083810190878311156139ca57600080fd5b928401925b828410156119d8576139e084611d15565b825292840192908401906139cf565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160120b83529284019291840191600101613a0b565b8035601581900b811461184657600080fd5b600060208284031215613a4e57600080fd5b61186682613a2a565b600060208284031215613a6957600080fd5b611866826132a7565b60006020808385031215613a8557600080fd5b82356001600160401b03811115613a9b57600080fd5b8301601f81018513613aac57600080fd5b8035613aba61198f82611912565b81815260059190911b82018301908381019087831115613ad957600080fd5b928401925b828410156119d857613aef8461261e565b82529284019290840190613ade565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601c0b83529284019291840191600101613b1a565b60006020808385031215613b4c57600080fd5b82356001600160401b03811115613b6257600080fd5b8301601f81018513613b7357600080fd5b8035613b8161198f82611912565b81815260059190911b82018301908381019087831115613ba057600080fd5b928401925b828410156119d857613bb684612bda565b82529284019290840190613ba5565b602080825282518282018190526000919084820190604085019084805b82811015613c00578451820b84529385019392850192600101613be2565b5091979650505050505050565b600060208284031215613c1f57600080fd5b6118668261319c565b600060208284031215613c3a57600080fd5b61186682612183565b8035600e81900b811461184657600080fd5b60006020808385031215613c6857600080fd5b82356001600160401b03811115613c7e57600080fd5b8301601f81018513613c8f57600080fd5b8035613c9d61198f82611912565b81815260059190911b82018301908381019087831115613cbc57600080fd5b928401925b828410156119d857613cd284613c43565b82529284019290840190613cc1565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600e0b83529284019291840191600101613cfd565b803562ffffff8116811461184657600080fd5b60006020808385031215613d4257600080fd5b82356001600160401b03811115613d5857600080fd5b8301601f81018513613d6957600080fd5b8035613d7761198f82611912565b81815260059190911b82018301908381019087831115613d9657600080fd5b928401925b828410156119d857613dac84613d1c565b82529284019290840190613d9b565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835162ffffff1683529284019291840191600101613dd7565b600060208284031215613e0a57600080fd5b6118668261264b565b600060208284031215613e2557600080fd5b61186682612518565b60006020808385031215613e4157600080fd5b82356001600160401b03811115613e5757600080fd5b8301601f81018513613e6857600080fd5b8035613e7661198f82611912565b81815260059190911b82018301908381019087831115613e9557600080fd5b928401925b828410156119d857613eab84611c89565b82529284019290840190613e9a565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601e0b83529284019291840191600101613ed6565b600060208284031215613f0757600080fd5b6118668261235b565b600060208284031215613f2257600080fd5b611866826130c2565b803563ffffffff8116811461184657600080fd5b60006020808385031215613f5257600080fd5b82356001600160401b03811115613f6857600080fd5b8301601f81018513613f7957600080fd5b8035613f8761198f82611912565b81815260059190911b82018301908381019087831115613fa657600080fd5b928401925b828410156119d857613fbc84613f2b565b82529284019290840190613fab565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835163ffffffff1683529284019291840191600101613fe7565b6000602080838503121561401c57600080fd5b82356001600160401b0381111561403257600080fd5b8301601f8101851361404357600080fd5b803561405161198f82611912565b81815260059190911b8201830190838101908783111561407057600080fd5b928401925b828410156119d85761408684611b72565b82529284019290840190614075565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160040b835292840192918401916001016140b1565b6000602082840312156140e257600080fd5b61186682611f20565b6000602082840312156140fd57600080fd5b61186682613380565b80356001600160401b038116811461184657600080fd5b6000602080838503121561413057600080fd5b82356001600160401b0381111561414657600080fd5b8301601f8101851361415757600080fd5b803561416561198f82611912565b81815260059190911b8201830190838101908783111561418457600080fd5b928401925b828410156119d85761419a84614106565b82529284019290840190614189565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160401b0316835292840192918401916001016141c5565b803565ffffffffffff8116811461184657600080fd5b6000602080838503121561421357600080fd5b82356001600160401b0381111561422957600080fd5b8301601f8101851361423a57600080fd5b803561424861198f82611912565b81815260059190911b8201830190838101908783111561426757600080fd5b928401925b828410156119d85761427d846141ea565b8252928401929084019061426c565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835165ffffffffffff16835292840192918401916001016142a8565b6000602082840312156142de57600080fd5b61186682613c43565b80356001600160a81b038116811461184657600080fd5b60006020828403121561431057600080fd5b611866826142e7565b8035600381900b811461184657600080fd5b60006020828403121561433d57600080fd5b61186682614319565b60006020828403121561435857600080fd5b6118668261379b565b60006020828403121561437357600080fd5b61186682612cd4565b6000602080838503121561438f57600080fd5b82356001600160401b038111156143a557600080fd5b8301601f810185136143b657600080fd5b80356143c461198f82611912565b81815260059190911b820183019083810190878311156143e357600080fd5b928401925b828410156119d8576143f98461182f565b825292840192908401906143e8565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160801b031683529284019291840191600101614424565b6000602080838503121561445c57600080fd5b82356001600160401b0381111561447257600080fd5b8301601f8101851361448357600080fd5b803561449161198f82611912565b81815260059190911b820183019083810190878311156144b057600080fd5b928401925b828410156119d8576144c68461376e565b825292840192908401906144b5565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600f0b835292840192918401916001016144f1565b6000602080838503121561452357600080fd5b82356001600160401b0381111561453957600080fd5b8301601f8101851361454a57600080fd5b803561455861198f82611912565b81815260059190911b8201830190838101908783111561457757600080fd5b928401925b828410156119d85761458d84612f6b565b8252928401929084019061457c565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160090b835292840192918401916001016145b8565b600060208083850312156145ea57600080fd5b82356001600160401b0381111561460057600080fd5b8301601f8101851361461157600080fd5b803561461f61198f82611912565b81815260059190911b8201830190838101908783111561463e57600080fd5b928401925b828410156119d85761465484611ce3565b82529284019290840190614643565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160981b03168352928401929184019160010161467f565b803560ff8116811461184657600080fd5b6000602082840312156146c757600080fd5b611866826146a4565b6000602082840312156146e257600080fd5b61186682612e7f565b6000602082840312156146fd57600080fd5b6118668261387f565b6000602080838503121561471957600080fd5b82356001600160401b0381111561472f57600080fd5b8301601f8101851361474057600080fd5b803561474e61198f82611912565b81815260059190911b8201830190838101908783111561476d57600080fd5b928401925b828410156119d85761478384611ef3565b82529284019290840190614772565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160160b835292840192918401916001016147ae565b6000602082840312156147df57600080fd5b611866826141ea565b600060208083850312156147fb57600080fd5b82356001600160401b0381111561481157600080fd5b8301601f8101851361482257600080fd5b803561483061198f82611912565b81815260059190911b8201830190838101908783111561484f57600080fd5b928401925b828410156119d8576148658461373c565b82529284019290840190614854565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160b01b031683529284019291840191600101614890565b6000602082840312156148c757600080fd5b61186682612af6565b600060208083850312156148e357600080fd5b82356001600160401b038111156148f957600080fd5b8301601f8101851361490a57600080fd5b803561491861198f82611912565b81815260059190911b8201830190838101908783111561493757600080fd5b928401925b828410156119d85761494d84614319565b8252928401929084019061493c565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160030b83529284019291840191600101614978565b80356001600160901b038116811461184657600080fd5b600060208083850312156149c157600080fd5b82356001600160401b038111156149d757600080fd5b8301601f810185136149e857600080fd5b80356149f661198f82611912565b81815260059190911b82018301908381019087831115614a1557600080fd5b928401925b828410156119d857614a2b84614997565b82529284019290840190614a1a565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160901b031683529284019291840191600101614a56565b60006020808385031215614a8e57600080fd5b82356001600160401b03811115614aa457600080fd5b8301601f81018513614ab557600080fd5b8035614ac361198f82611912565b81815260059190911b82018301908381019087831115614ae257600080fd5b928401925b828410156119d857614af884612129565b82529284019290840190614ae7565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351600a0b83529284019291840191600101614b23565b8035600881900b811461184657600080fd5b60006020808385031215614b6757600080fd5b82356001600160401b03811115614b7d57600080fd5b8301601f81018513614b8e57600080fd5b8035614b9c61198f82611912565b81815260059190911b82018301908381019087831115614bbb57600080fd5b928401925b828410156119d857614bd184614b42565b82529284019290840190614bc0565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160080b83529284019291840191600101614bfc565b80356001600160d01b038116811461184657600080fd5b600060208284031215614c4457600080fd5b61186682614c1b565b60006020808385031215614c6057600080fd5b82356001600160401b03811115614c7657600080fd5b8301601f81018513614c8757600080fd5b8035614c9561198f82611912565b81815260059190911b82018301908381019087831115614cb457600080fd5b928401925b828410156119d857614cca84612267565b82529284019290840190614cb9565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601a0b83529284019291840191600101614cf5565b600060208284031215614d2657600080fd5b61186682613f2b565b63ffffffff84168152600060206001600160401b0385168184015260606040840152835180606085015260005b81811015614d7857858101830151858201608001528201614d5c565b506000608082860101526080601f19601f83011685010192505050949350505050565b600060208284031215614dad57600080fd5b61186682612012565b60006020808385031215614dc957600080fd5b82356001600160401b03811115614ddf57600080fd5b8301601f81018513614df057600080fd5b8035614dfe61198f82611912565b81815260059190911b82018301908381019087831115614e1d57600080fd5b928401925b828410156119d857614e3384612930565b82529284019290840190614e22565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160a01b031683529284019291840191600101614e5e565b600060208284031215614e9557600080fd5b61186682614106565b600060208284031215614eb057600080fd5b61186682611a2a565b600060208284031215614ecb57600080fd5b61186682611e0f565b60006020808385031215614ee757600080fd5b82356001600160401b03811115614efd57600080fd5b8301601f81018513614f0e57600080fd5b8035614f1c61198f82611912565b81815260059190911b82018301908381019087831115614f3b57600080fd5b928401925b828410156119d857614f5184612758565b82529284019290840190614f40565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160070b83529284019291840191600101614f7c565b60006020808385031215614fae57600080fd5b82356001600160401b03811115614fc457600080fd5b8301601f81018513614fd557600080fd5b8035614fe361198f82611912565b81815260059190911b8201830190838101908783111561500257600080fd5b928401925b828410156119d857615018846142e7565b82529284019290840190615007565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160a81b031683529284019291840191600101615043565b6000602080838503121561507b57600080fd5b82356001600160401b0381111561509157600080fd5b8301601f810185136150a257600080fd5b80356150b061198f82611912565b81815260059190911b820183019083810190878311156150cf57600080fd5b928401925b828410156119d8576150e584613a2a565b825292840192908401906150d4565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160150b83529284019291840191600101615110565b6000602080838503121561514257600080fd5b82356001600160401b0381111561515857600080fd5b8301601f8101851361516957600080fd5b803561517761198f82611912565b81815260059190911b8201830190838101908783111561519657600080fd5b928401925b828410156119d8576151ac846134ac565b8252928401929084019061519b565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160020b835292840192918401916001016151d7565b803564ffffffffff8116811461184657600080fd5b6000602080838503121561521e57600080fd5b82356001600160401b0381111561523457600080fd5b8301601f8101851361524557600080fd5b803561525361198f82611912565b81815260059190911b8201830190838101908783111561527257600080fd5b928401925b828410156119d857615288846151f6565b82529284019290840190615277565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835164ffffffffff16835292840192918401916001016152b3565b600060208083850312156152e957600080fd5b82356001600160401b038111156152ff57600080fd5b8301601f8101851361531057600080fd5b803561531e61198f82611912565b81815260059190911b8201830190838101908783111561533d57600080fd5b928401925b828410156119d85761535384614c1b565b82529284019290840190615342565b6020808252825182820181905260009190848201906040850190845b81811015611a1e5783516001600160d01b03168352928401929184019160010161537e565b6000602082840312156153b557600080fd5b61186682614b42565b600060208083850312156153d157600080fd5b82356001600160401b038111156153e757600080fd5b8301601f810185136153f857600080fd5b803561540661198f82611912565b81815260059190911b8201830190838101908783111561542557600080fd5b928401925b828410156119d85761543b84612156565b8252928401929084019061542a565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160190b83529284019291840191600101615466565b60006020828403121561549757600080fd5b61186682614997565b6000602082840312156154b257600080fd5b61186682613d1c565b600060208083850312156154ce57600080fd5b82356001600160401b038111156154e457600080fd5b8301601f810185136154f557600080fd5b803561550361198f82611912565b81815260059190911b8201830190838101908783111561552257600080fd5b928401925b828410156119d857615538846146a4565b82529284019290840190615527565b6020808252825182820181905260009190848201906040850190845b81811015611a1e57835160ff1683529284019291840191600101615563565b6000602080838503121561559557600080fd5b82356001600160401b038111156155ab57600080fd5b8301601f810185136155bc57600080fd5b80356155ca61198f82611912565b81815260059190911b820183019083810190878311156155e957600080fd5b928401925b828410156119d8576155ff8461347f565b825292840192908401906155ee565b6020808252825182820181905260009190848201906040850190845b81811015611a1e578351601b0b8352928401929184019160010161562a565b60006020828403121561565b57600080fd5b611866826151f6565b634e487b7160e01b600052601160045260246000fd5b600081810b9083900b01607f8113607f198212171561569b5761569b615664565b92915050565b80820182811260008312801582168215821617156156c1576156c1615664565b505092915050565b63ffffffff8281168282160390808211156156e6576156e6615664565b5092915050565b600481810b9083900b01647fffffffff8113647fffffffff198212171561569b5761569b61566456fea264697066735822122059b2a999293b864561fd2a712500441a478d011203453b72f2b4088d8c8a521464736f6c63430008120033"; @@ -83,7 +115,9 @@ const bitSizes = [ 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, ]; -describe("ContractFunctionParameters", function () { +// const bitSizes = [112]; + +describe.only("ContractFunctionParameters", function () { this.timeout(120000); let env; let newContractId; @@ -104,7 +138,7 @@ describe("ContractFunctionParameters", function () { const fileAppendTx = new FileAppendTransaction() .setFileId(bytecodeFileId) .setContents(smartContractBytecode) - .setMaxChunks(10) + .setMaxChunks(20) .freezeWith(env.client); const fileAppendSign = await fileAppendTx.sign(env.operatorKey); const fileAppendSubmit = await fileAppendSign.execute(env.client); @@ -344,6 +378,116 @@ describe("ContractFunctionParameters", function () { ); }); + describe(`Tests for addInt${bitSize}Array method`, function () { + it( + getDescriptionForArrayMethod( + bitSize, + INPUT_TYPE.NUMBER, + METHOD_TYPE.INT + ), + async function () { + const arr = createArray(bitSize, INPUT_TYPE.NUMBER); + const contractQuery = await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnInt${bitSize}Array`, + new ContractFunctionParameters()[ + `addInt${bitSize}Array` + ](arr) + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + //Submit to a Hedera network + const txResponse = await contractQuery.execute(env.client); + const result = txResponse.getResult([`int${bitSize}[]`])[0]; + + expect(result).to.be.an("array"); + arr.map((item, i) => { + expect(item.toString(10)).to.be.equal( + result[i].toString(10) + ); + }); + } + ); + + it( + getDescriptionForArrayMethod( + bitSize, + INPUT_TYPE.BIG_NUMBER, + METHOD_TYPE.INT + ), + async function () { + const arr = createArray(bitSize, INPUT_TYPE.BIG_NUMBER); + const contractQuery = await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnInt${bitSize}Array`, + new ContractFunctionParameters()[ + `addInt${bitSize}Array` + ](arr) + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + //Submit to a Hedera network + const txResponse = await contractQuery.execute(env.client); + const result = txResponse.getResult([`int${bitSize}[]`])[0]; + + expect(result).to.be.an("array"); + arr.map((item, i) => { + expect(item.toString(10)).to.be.equal( + result[i].toString(10) + ); + }); + } + ); + + it( + getDescriptionForArrayMethod( + bitSize, + INPUT_TYPE.LONG, + METHOD_TYPE.INT + ), + async function () { + const arr = createArray(bitSize, INPUT_TYPE.LONG); + const contractQuery = await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnInt${bitSize}Array`, + new ContractFunctionParameters()[ + `addInt${bitSize}Array` + ](arr) + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + //Submit to a Hedera network + const txResponse = await contractQuery.execute(env.client); + const result = txResponse.getResult([`int${bitSize}[]`])[0]; + + expect(result).to.be.an("array"); + arr.map((item, i) => { + expect(item.toString(10)).to.be.equal( + result[i].toString(10) + ); + }); + } + ); + }); + describe(`Tests for addUint${bitSize} method`, function () { it( getDescription( @@ -450,6 +594,122 @@ describe("ContractFunctionParameters", function () { } ); }); + + describe(`Tests for addUint${bitSize}Array method`, function () { + it( + getDescriptionForArrayMethod( + bitSize, + INPUT_TYPE.NUMBER, + METHOD_TYPE.UINT + ), + async function () { + const range = calculateRange(bitSize, INPUT_TYPE.NUMBER); + const arr = [0, range.min + range.max]; + const contractQuery = await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnUint${bitSize}Array`, + new ContractFunctionParameters()[ + `addUint${bitSize}Array` + ](arr) + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + //Submit to a Hedera network + const txResponse = await contractQuery.execute(env.client); + const result = txResponse.getResult([ + `uint${bitSize}[]`, + ])[0]; + + expect(result).to.be.an("array"); + arr.map((item, i) => { + expect(item.toString(10)).to.be.equal( + result[i].toString(10) + ); + }); + } + ); + it( + getDescriptionForArrayMethod( + bitSize, + INPUT_TYPE.BIG_NUMBER, + METHOD_TYPE.UINT + ), + async function () { + const arr = [0, new BigNumber(2).pow(bitSize - 1).minus(1)]; + const contractQuery = await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnUint${bitSize}Array`, + new ContractFunctionParameters()[ + `addUint${bitSize}Array` + ](arr) + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + //Submit to a Hedera network + const txResponse = await contractQuery.execute(env.client); + const result = txResponse.getResult([ + `uint${bitSize}[]`, + ])[0]; + + expect(result).to.be.an("array"); + arr.map((item, i) => { + expect(item.toString(10)).to.be.equal( + result[i].toString(10) + ); + }); + } + ); + it( + getDescriptionForArrayMethod( + bitSize, + INPUT_TYPE.LONG, + METHOD_TYPE.UINT + ), + async function () { + const range = calculateRange(bitSize, INPUT_TYPE.NUMBER); + const arr = [0, new Long(range.min + range.max)]; + const contractQuery = await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnUint${bitSize}Array`, + new ContractFunctionParameters()[ + `addUint${bitSize}Array` + ](arr) + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + //Submit to a Hedera network + const txResponse = await contractQuery.execute(env.client); + const result = txResponse.getResult([ + `uint${bitSize}[]`, + ])[0]; + + expect(result).to.be.an("array"); + arr.map((item, i) => { + expect(item.toString(10)).to.be.equal( + result[i].toString(10) + ); + }); + } + ); + }); }); it("should return the right min multiple int8 value", async function () { From e21f9856a739f271a3a7028e4fb75e8e37669c7b Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Thu, 2 Nov 2023 15:29:07 +0200 Subject: [PATCH 06/10] remove test Signed-off-by: svetoslav-nikol0v --- ...ntractFunctionParametersIntegrationTest.js | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/test/integration/ContractFunctionParametersIntegrationTest.js b/test/integration/ContractFunctionParametersIntegrationTest.js index 07dd07ca8..0123d02c9 100644 --- a/test/integration/ContractFunctionParametersIntegrationTest.js +++ b/test/integration/ContractFunctionParametersIntegrationTest.js @@ -882,25 +882,26 @@ describe.only("ContractFunctionParameters", function () { ); }); - it("should return the right User value", async function () { - const contractQuery = await new ContractCallQuery() - //Set the gas for the query - .setGas(15000000) - //Set the contract ID to return the request for - .setContractId(newContractId) - //Set the contract function to call - .setFunction("get_user") - //Set the query payment for the node returning the request - //This value must cover the cost of the request otherwise will fail - .setQueryPayment(new Hbar(15)); - - //Submit to a Hedera network - const txResponse = await contractQuery.execute(env.client); - - const result = txResponse.getResult(["tuple(string, uint256)"]); - expect(result[0][0]).to.be.equal("Alex"); // tuple is returned as array - expect(result[0][1].toNumber()).to.be.equal(1); // tuple is returned as array - }); + // it("should return the right User value", async function () { + // const contractQuery = await new ContractCallQuery() + // //Set the gas for the query + // .setGas(15000000) + // //Set the contract ID to return the request for + // .setContractId(newContractId) + // //Set the contract function to call + // .setFunction("get_user") + // //Set the query payment for the node returning the request + // //This value must cover the cost of the request otherwise will fail + // .setQueryPayment(new Hbar(15)); + + // //Submit to a Hedera network + // const txResponse = await contractQuery.execute(env.client); + + // const result = txResponse.getResult(["tuple(string, uint256)"]); + // console.log("result", result); + // // expect(result[0][0]).to.be.equal("Alex"); // tuple is returned as array + // // expect(result[0][1].toNumber()).to.be.equal(1); // tuple is returned as array + // }); it("contract create of A nonce, which deploys contract B in CONSTRUCTOR", async function () { const SMART_CONTRACT_BYTECODE = From 02c6d74cae760c7925fbf4ce5bdd159445ff3b7c Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Fri, 3 Nov 2023 09:34:45 +0200 Subject: [PATCH 07/10] remove commented out line Signed-off-by: svetoslav-nikol0v --- test/integration/ContractFunctionParametersIntegrationTest.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/integration/ContractFunctionParametersIntegrationTest.js b/test/integration/ContractFunctionParametersIntegrationTest.js index 0123d02c9..d5f0019ec 100644 --- a/test/integration/ContractFunctionParametersIntegrationTest.js +++ b/test/integration/ContractFunctionParametersIntegrationTest.js @@ -115,8 +115,6 @@ const bitSizes = [ 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, ]; -// const bitSizes = [112]; - describe.only("ContractFunctionParameters", function () { this.timeout(120000); let env; From df00adba4257df149d7ec839f2a3331bafc02986 Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Fri, 3 Nov 2023 09:35:47 +0200 Subject: [PATCH 08/10] delete test Signed-off-by: svetoslav-nikol0v --- ...ntractFunctionParametersIntegrationTest.js | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/test/integration/ContractFunctionParametersIntegrationTest.js b/test/integration/ContractFunctionParametersIntegrationTest.js index d5f0019ec..708008876 100644 --- a/test/integration/ContractFunctionParametersIntegrationTest.js +++ b/test/integration/ContractFunctionParametersIntegrationTest.js @@ -880,27 +880,6 @@ describe.only("ContractFunctionParameters", function () { ); }); - // it("should return the right User value", async function () { - // const contractQuery = await new ContractCallQuery() - // //Set the gas for the query - // .setGas(15000000) - // //Set the contract ID to return the request for - // .setContractId(newContractId) - // //Set the contract function to call - // .setFunction("get_user") - // //Set the query payment for the node returning the request - // //This value must cover the cost of the request otherwise will fail - // .setQueryPayment(new Hbar(15)); - - // //Submit to a Hedera network - // const txResponse = await contractQuery.execute(env.client); - - // const result = txResponse.getResult(["tuple(string, uint256)"]); - // console.log("result", result); - // // expect(result[0][0]).to.be.equal("Alex"); // tuple is returned as array - // // expect(result[0][1].toNumber()).to.be.equal(1); // tuple is returned as array - // }); - it("contract create of A nonce, which deploys contract B in CONSTRUCTOR", async function () { const SMART_CONTRACT_BYTECODE = "6080604052348015600f57600080fd5b50604051601a90603b565b604051809103906000f0801580156035573d6000803e3d6000fd5b50506047565b605c8061009483390190565b603f806100556000396000f3fe6080604052600080fdfea2646970667358221220a20122cbad3457fedcc0600363d6e895f17048f5caa4afdab9e655123737567d64736f6c634300081200336080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122053dfd8835e3dc6fedfb8b4806460b9b7163f8a7248bac510c6d6808d9da9d6d364736f6c63430008120033"; From 5f75aa7c05544acdb8a2365cbb74db945cb5d7d8 Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Fri, 3 Nov 2023 10:27:30 +0200 Subject: [PATCH 09/10] remove .only Signed-off-by: svetoslav-nikol0v --- test/integration/ContractFunctionParametersIntegrationTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/ContractFunctionParametersIntegrationTest.js b/test/integration/ContractFunctionParametersIntegrationTest.js index 708008876..87255ee5f 100644 --- a/test/integration/ContractFunctionParametersIntegrationTest.js +++ b/test/integration/ContractFunctionParametersIntegrationTest.js @@ -115,7 +115,7 @@ const bitSizes = [ 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, ]; -describe.only("ContractFunctionParameters", function () { +describe("ContractFunctionParameters", function () { this.timeout(120000); let env; let newContractId; From d64abdb78537667b94c7bf2a86a033c01119c264 Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v <136077184+svetoslav-nikol0v@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:05:50 +0200 Subject: [PATCH 10/10] Fix for "Reduce of empty array with no initial value" error in ContractFunctionParameters array methods (#2016) * adding an initial value of the reduce method + tests Signed-off-by: svetoslav-nikol0v * remove .only Signed-off-by: svetoslav-nikol0v * adding test for when methods fail Signed-off-by: svetoslav-nikol0v * using const Signed-off-by: svetoslav-nikol0v --------- Signed-off-by: svetoslav-nikol0v Signed-off-by: ochikov --- src/contract/ContractFunctionParameters.js | 2 +- ...ntractFunctionParametersIntegrationTest.js | 99 +++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) diff --git a/src/contract/ContractFunctionParameters.js b/src/contract/ContractFunctionParameters.js index 2e62bd8e2..9a3b90aec 100644 --- a/src/contract/ContractFunctionParameters.js +++ b/src/contract/ContractFunctionParameters.js @@ -1451,7 +1451,7 @@ function argumentToBytes(param, ty) { const totalLengthOfValues = values .map((a) => a.length) - .reduce((total, current) => total + current); + .reduce((total, current) => total + current, 0); switch (ty.ty) { case ArgumentType.uint8: diff --git a/test/integration/ContractFunctionParametersIntegrationTest.js b/test/integration/ContractFunctionParametersIntegrationTest.js index 87255ee5f..f7edfb9b9 100644 --- a/test/integration/ContractFunctionParametersIntegrationTest.js +++ b/test/integration/ContractFunctionParametersIntegrationTest.js @@ -9,6 +9,7 @@ import { FileAppendTransaction, FileDeleteTransaction, } from "../../src/exports.js"; +import { REQUIRE_ARRAY_ERROR } from "../../src/util.js"; import IntegrationTestEnv from "./client/NodeIntegrationTestEnv.js"; import BigNumber from "bignumber.js"; import Long from "long"; @@ -484,6 +485,55 @@ describe("ContractFunctionParameters", function () { }); } ); + + it(`addInt${bitSize}Array method should return an empty array`, async function () { + const contractQuery = await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnInt${bitSize}Array`, + new ContractFunctionParameters()[ + `addInt${bitSize}Array` + ]( + // eslint-disable-next-line no-loss-of-precision + [] + ) + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + + //Submit to a Hedera network + const txResponse = await contractQuery.execute(env.client); + const result = txResponse.getResult([`uint${bitSize}[]`])[0]; + expect(result).to.be.an("array").to.have.length(0); + }); + + it(`addInt${bitSize}Array method should throw an error`, async function () { + try { + await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnInt${bitSize}Array`, + new ContractFunctionParameters()[ + `addInt${bitSize}Array` + ]() + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + } catch (error) { + expect(error).to.be.instanceOf(Error); + expect(error.message).to.be.equal(REQUIRE_ARRAY_ERROR); + } + }); }); describe(`Tests for addUint${bitSize} method`, function () { @@ -707,6 +757,55 @@ describe("ContractFunctionParameters", function () { }); } ); + + it(`addUint${bitSize}Array method should return an empty array`, async function () { + const contractQuery = await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnUint${bitSize}Array`, + new ContractFunctionParameters()[ + `addUint${bitSize}Array` + ]( + // eslint-disable-next-line no-loss-of-precision + [] + ) + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + + //Submit to a Hedera network + const txResponse = await contractQuery.execute(env.client); + const result = txResponse.getResult([`uint${bitSize}[]`])[0]; + expect(result).to.be.an("array").to.have.length(0); + }); + + it(`addUint${bitSize}Array method should throw an error`, async function () { + try { + await new ContractCallQuery() + //Set the gas for the query + .setGas(15000000) + //Set the contract ID to return the request for + .setContractId(newContractId) + //Set the contract function to call + .setFunction( + `returnUint${bitSize}Array`, + new ContractFunctionParameters()[ + `addUint${bitSize}Array` + ]() + ) + //Set the query payment for the node returning the request + //This value must cover the cost of the request otherwise will fail + .setQueryPayment(new Hbar(15)); + } catch (error) { + expect(error).to.be.instanceOf(Error); + expect(error.message).to.be.equal(REQUIRE_ARRAY_ERROR); + } + }); }); });