@agoric/inter-protocol 0.16.2-dev-46e77e4.0 → 0.16.2-dev-c4520c5.0
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/package.json +15 -15
- package/src/contractSupport.d.ts.map +1 -1
- package/src/contractSupport.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/inter-protocol",
|
|
3
|
-
"version": "0.16.2-dev-
|
|
3
|
+
"version": "0.16.2-dev-c4520c5.0+c4520c5",
|
|
4
4
|
"description": "Core cryptoeconomy contracts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
35
|
-
"@agoric/governance": "0.10.4-dev-
|
|
36
|
-
"@agoric/internal": "0.3.3-dev-
|
|
37
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
38
|
-
"@agoric/store": "0.9.3-dev-
|
|
39
|
-
"@agoric/time": "0.3.3-dev-
|
|
40
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
41
|
-
"@agoric/vats": "0.15.2-dev-
|
|
42
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
34
|
+
"@agoric/ertp": "0.16.3-dev-c4520c5.0+c4520c5",
|
|
35
|
+
"@agoric/governance": "0.10.4-dev-c4520c5.0+c4520c5",
|
|
36
|
+
"@agoric/internal": "0.3.3-dev-c4520c5.0+c4520c5",
|
|
37
|
+
"@agoric/notifier": "0.6.3-dev-c4520c5.0+c4520c5",
|
|
38
|
+
"@agoric/store": "0.9.3-dev-c4520c5.0+c4520c5",
|
|
39
|
+
"@agoric/time": "0.3.3-dev-c4520c5.0+c4520c5",
|
|
40
|
+
"@agoric/vat-data": "0.5.3-dev-c4520c5.0+c4520c5",
|
|
41
|
+
"@agoric/vats": "0.15.2-dev-c4520c5.0+c4520c5",
|
|
42
|
+
"@agoric/zoe": "0.26.3-dev-c4520c5.0+c4520c5",
|
|
43
43
|
"@endo/captp": "^4.2.2",
|
|
44
44
|
"@endo/errors": "^1.2.4",
|
|
45
45
|
"@endo/eventual-send": "^1.2.4",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"jessie.js": "^0.3.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
54
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
55
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
56
|
-
"@agoric/zone": "0.2.3-dev-
|
|
53
|
+
"@agoric/smart-wallet": "0.5.4-dev-c4520c5.0+c4520c5",
|
|
54
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-c4520c5.0+c4520c5",
|
|
55
|
+
"@agoric/swingset-vat": "0.32.3-dev-c4520c5.0+c4520c5",
|
|
56
|
+
"@agoric/zone": "0.2.3-dev-c4520c5.0+c4520c5",
|
|
57
57
|
"@endo/bundle-source": "^3.3.0",
|
|
58
58
|
"@endo/init": "^1.1.3",
|
|
59
59
|
"@endo/promise-kit": "^1.1.4",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"typeCoverage": {
|
|
85
85
|
"atLeast": 95.81
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "c4520c570b0d32e7fa402952a6c099c692953a06"
|
|
88
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractSupport.d.ts","sourceRoot":"","sources":["contractSupport.js"],"names":[],"mappings":";;;;;;;;AA4BO,4BANe,CAAC,SAAT,MAAO,QACV,CAAC,QACD,CAAC,QACD,CAAC,GACC,CAAC,CAGyC;AAQhD,gCALe,CAAC,SAAT,MAAO,QACV,CAAC,SACD,CAAC,GACC,CAAC,CAK2C;AAQlD,yCAHI,cAAc,QACd,MAAM,EAAE,QAQlB;AAMM,kCAHI,MAAM,EAAE,GACN,OAAO,CAInB;
|
|
1
|
+
{"version":3,"file":"contractSupport.d.ts","sourceRoot":"","sources":["contractSupport.js"],"names":[],"mappings":";;;;;;;;AA4BO,4BANe,CAAC,SAAT,MAAO,QACV,CAAC,QACD,CAAC,QACD,CAAC,GACC,CAAC,CAGyC;AAQhD,gCALe,CAAC,SAAT,MAAO,QACV,CAAC,SACD,CAAC,GACC,CAAC,CAK2C;AAQlD,yCAHI,cAAc,QACd,MAAM,EAAE,QAQlB;AAMM,kCAHI,MAAM,EAAE,GACN,OAAO,CAInB;AAUM,0CAPI,MAAM,CAAC,KAAK,CAAC,aACb,MAAM,CAAC,KAAK,CAAC,UACb,MAAM,CAAC,KAAK,CAAC,QAcvB;AAoBM,0CAHI,KAAK;;;EAIsC;AAG/C,0CADK,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,WAAW,CAAC,SAEO;gCAtBtD,CAAC;wBAEA,iBAAiB,CAAC,CAAC,CAAC;yBACpB,kBAAkB,CAAC,CAAC,CAAC;;8BAItB,CAAC;sBAEA,SAAS,CAAC,CAAC,CAAC;uBACZ,gBAAgB,CAAC,CAAC,CAAC;;sCAvF6D,4BAA4B"}
|
package/src/contractSupport.js
CHANGED
|
@@ -67,8 +67,13 @@ export const allEmpty = amounts => {
|
|
|
67
67
|
* @param {Amount<'nat'>} totalDebt
|
|
68
68
|
* @param {Amount<'nat'>} toMint
|
|
69
69
|
* @throws if minting would exceed total debt
|
|
70
|
+
*
|
|
71
|
+
* Note: Succeeds regardless of debtLimit if toMint is empty.
|
|
70
72
|
*/
|
|
71
73
|
export const checkDebtLimit = (debtLimit, totalDebt, toMint) => {
|
|
74
|
+
if (AmountMath.isEmpty(toMint)) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
72
77
|
const debtPost = AmountMath.add(totalDebt, toMint);
|
|
73
78
|
AmountMath.isGTE(debtLimit, debtPost) ||
|
|
74
79
|
Fail`Minting ${q(toMint)} past ${q(
|