@ocap/contract 1.28.5 → 1.28.7
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.
- package/README.md +1 -1
- package/lib/index.js +1 -2
- package/package.json +12 -13
package/README.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-restricted-syntax */
|
|
2
1
|
const get = require('lodash/get');
|
|
3
2
|
const set = require('lodash/set');
|
|
4
3
|
const esprima = require('esprima');
|
|
@@ -165,7 +164,7 @@ const validate = (compiled, quota, ensureZeroSum = false) => {
|
|
|
165
164
|
|
|
166
165
|
// to track consumption
|
|
167
166
|
let remaining = new BN(quota ? quota.value : '0');
|
|
168
|
-
const tokenRemaining = Object.keys(quota
|
|
167
|
+
const tokenRemaining = Object.keys(quota?.tokens ? quota.tokens : {}).reduce((acc, x) => {
|
|
169
168
|
acc[x] = new BN(quota.tokens[x]);
|
|
170
169
|
return acc;
|
|
171
170
|
}, {});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocap/contract",
|
|
3
3
|
"description": "Utility to compile/validate and run ocap contract",
|
|
4
|
-
"version": "1.28.
|
|
4
|
+
"version": "1.28.7",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -18,15 +18,14 @@
|
|
|
18
18
|
"wangshijun <shijun@arcblock.io> (https://github.com/wangshijun)"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
+
"@arcblock/did": "1.28.7",
|
|
22
|
+
"@ocap/mcrypto": "1.28.7",
|
|
23
|
+
"@ocap/util": "1.28.7",
|
|
21
24
|
"debug": "^4.3.6",
|
|
22
25
|
"esprima": "^4.0.1",
|
|
23
|
-
"lodash": "^4.17.21"
|
|
24
|
-
"@ocap/mcrypto": "1.28.5",
|
|
25
|
-
"@ocap/util": "1.28.5",
|
|
26
|
-
"@arcblock/did": "1.28.5"
|
|
26
|
+
"lodash": "^4.17.21"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"jest": "^29.7.0",
|
|
30
29
|
"remark-cli": "^10.0.1",
|
|
31
30
|
"remark-preset-github": "^4.0.4"
|
|
32
31
|
},
|
|
@@ -56,16 +55,16 @@
|
|
|
56
55
|
"type": "git",
|
|
57
56
|
"url": "https://github.com/ArcBlock/blockchain/tree/master/core/contract"
|
|
58
57
|
},
|
|
59
|
-
"gitHead": "87990c8b5e215107fc587c1ced0d6b3e2cd2483e",
|
|
60
58
|
"scripts": {
|
|
61
|
-
"lint": "
|
|
62
|
-
"lint:fix": "
|
|
63
|
-
"docs": "
|
|
59
|
+
"lint": "biome check",
|
|
60
|
+
"lint:fix": "biome check --write",
|
|
61
|
+
"docs": "bun run gen-dts && bun run gen-docs && bun run cleanup-docs && bun run format-docs",
|
|
64
62
|
"cleanup-docs": "node ../../scripts/cleanup-docs.js docs/README.md $npm_package_name",
|
|
65
63
|
"gen-dts": "j2d lib/index.js",
|
|
66
64
|
"gen-docs": "jsdoc2md lib/index.js > docs/README.md",
|
|
67
65
|
"format-docs": "remark . -o",
|
|
68
|
-
"test": "
|
|
66
|
+
"test": "bun test",
|
|
69
67
|
"coverage": "npm run test -- --coverage"
|
|
70
|
-
}
|
|
71
|
-
|
|
68
|
+
},
|
|
69
|
+
"gitHead": "87990c8b5e215107fc587c1ced0d6b3e2cd2483e"
|
|
70
|
+
}
|