@1inch/solidity-utils 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
 
3
- pragma solidity 0.8.9;
3
+ pragma solidity ^0.8.0;
4
4
 
5
5
 
6
6
  library AddressArray {
@@ -1,6 +1,6 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
 
3
- pragma solidity 0.8.9;
3
+ pragma solidity ^0.8.0;
4
4
 
5
5
  import "./AddressArray.sol";
6
6
 
package/js/profileEVM.js CHANGED
@@ -44,7 +44,7 @@ async function profileEVM (txHash, instruction, optionalTraceFile) {
44
44
  return str.split('"' + instruction.toUpperCase() + '"').length - 1;
45
45
  }
46
46
 
47
- async function gasspectEVM (txHash, optionalTraceFile) {
47
+ async function gasspectEVM (txHash, options = {}, optionalTraceFile) {
48
48
  const trace = await promisify(web3.currentProvider.send.bind(web3.currentProvider))({
49
49
  jsonrpc: '2.0',
50
50
  method: 'debug_traceTransaction',
@@ -69,7 +69,11 @@ async function gasspectEVM (txHash, optionalTraceFile) {
69
69
  }
70
70
  }
71
71
 
72
- const result = ops.filter(op => op.gasCost > 300).map(op => op.traceAddress.join('-') + '-' + op.op + ' = ' + op.gasCost);
72
+ const minOpGasCost = options.minOpGasCost ? options.minOpGasCost : 300;
73
+ const result = ops.filter(op => op.gasCost > minOpGasCost).map(op => op.traceAddress.join('-') + '-' + op.op +
74
+ (options.args ? '(' + (op.args || []).join(',') + ')' : '') +
75
+ (options.res ? (op.res ? ':0x' + op.res : '') : '') +
76
+ ' = ' + op.gasCost);
73
77
 
74
78
  if (optionalTraceFile) {
75
79
  await fs.writeFile(optionalTraceFile, JSON.stringify(result));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1inch/solidity-utils",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,28 +8,29 @@
8
8
  },
9
9
  "license": "MIT",
10
10
  "dependencies": {
11
- "@openzeppelin/contracts": "^4.3.2"
11
+ "@openzeppelin/contracts": "^4.4.0",
12
+ "ethereumjs-wallet": "^1.0.2"
12
13
  },
13
14
  "devDependencies": {
14
- "@nomiclabs/hardhat-etherscan": "^2.1.6",
15
+ "@nomiclabs/hardhat-etherscan": "^2.1.8",
15
16
  "@nomiclabs/hardhat-truffle5": "^2.0.0",
16
17
  "@nomiclabs/hardhat-web3": "^2.0.0",
17
- "@openzeppelin/test-helpers": "^0.5.13",
18
+ "@openzeppelin/test-helpers": "^0.5.15",
18
19
  "chai": "^4.3.4",
19
20
  "cross-spawn": "^7.0.3",
20
21
  "dotenv": "^10.0.0",
21
- "eslint": "^7.32.0",
22
+ "eslint": "^8.3.0",
22
23
  "eslint-config-standard": "^16.0.3",
23
- "eslint-plugin-import": "^2.24.2",
24
+ "eslint-plugin-import": "^2.25.3",
24
25
  "eslint-plugin-node": "^11.1.0",
25
- "eslint-plugin-promise": "^5.1.0",
26
+ "eslint-plugin-promise": "^5.1.1",
26
27
  "eslint-plugin-standard": "^5.0.0",
27
- "hardhat": "^2.6.4",
28
- "hardhat-deploy": "^0.9.2",
29
- "hardhat-gas-reporter": "^1.0.4",
28
+ "hardhat": "^2.7.0",
29
+ "hardhat-deploy": "^0.9.14",
30
+ "hardhat-gas-reporter": "^1.0.6",
30
31
  "rimraf": "^3.0.2",
31
32
  "shx": "^0.3.3",
32
- "solc": "^0.8.9",
33
+ "solc": "^0.8.10",
33
34
  "solhint": "^3.3.6",
34
35
  "solidity-coverage": "^0.7.17"
35
36
  },
@@ -55,5 +56,5 @@
55
56
  "test": "test"
56
57
  },
57
58
  "author": "1inch",
58
- "description": ""
59
+ "description": "Solidity and JS utils"
59
60
  }