@etherisc/gif-next 0.0.2-836a512-798 → 0.0.2-839b2a2-792

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.
Files changed (149) hide show
  1. package/README.md +8 -0
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
  3. package/artifacts/contracts/components/Component.sol/Component.json +1 -1
  4. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +1 -1
  5. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +2 -2
  6. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IPool.sol/IPoolComponent.json +1 -1
  8. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  10. package/artifacts/contracts/components/Pool.sol/Pool.json +5 -5
  11. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  12. package/artifacts/contracts/components/Product.sol/Product.json +5 -5
  13. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  14. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +2 -2
  15. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  16. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +2 -2
  17. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  18. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
  19. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  20. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
  21. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  22. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  29. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  30. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  32. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
  33. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  34. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
  35. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  36. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
  37. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  38. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
  39. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  40. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +137 -21
  41. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  42. package/artifacts/contracts/instance/Instance.sol/Instance.json +175 -35
  43. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +1 -1
  44. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +1 -1
  45. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +1 -1
  46. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +1 -1
  47. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  48. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  49. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.json +2 -21
  50. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +1 -1
  51. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +65 -10
  52. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +1 -1
  53. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +1 -1
  54. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.json +1 -1
  55. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  56. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +2 -21
  57. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +1 -1
  58. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +47 -0
  59. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +1 -1
  60. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  61. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +1 -1
  62. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +1 -1
  63. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +2 -2
  64. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  65. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  66. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  67. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  68. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  69. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  70. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +1 -1
  71. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +1 -1
  72. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +1 -1
  73. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +1 -1
  74. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +14 -14
  75. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
  76. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
  77. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.json +135 -0
  78. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  79. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +2 -2
  80. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
  81. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.json +135 -0
  82. package/artifacts/contracts/mock/Dip.sol/DIP.dbg.json +4 -0
  83. package/artifacts/contracts/mock/Dip.sol/DIP.json +338 -0
  84. package/artifacts/contracts/mock/TestPool.sol/TestPool.dbg.json +4 -0
  85. package/artifacts/contracts/mock/TestPool.sol/TestPool.json +294 -0
  86. package/artifacts/contracts/mock/TestProduct.sol/TestProduct.dbg.json +4 -0
  87. package/artifacts/contracts/mock/TestProduct.sol/TestProduct.json +384 -0
  88. package/artifacts/contracts/mock/Usdc.sol/USDC.dbg.json +4 -0
  89. package/artifacts/contracts/mock/Usdc.sol/USDC.json +338 -0
  90. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  91. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
  92. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  93. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +1 -1
  94. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +1 -1
  95. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  96. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +1 -1
  97. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +1 -1
  98. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  99. package/artifacts/contracts/registry/Registry.sol/Registry.json +10 -10
  100. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +1 -1
  101. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +2 -2
  102. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  103. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
  104. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  105. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
  106. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  107. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  108. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  109. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  110. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  111. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  112. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  113. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +2 -2
  114. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  115. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +37 -11
  116. package/contracts/components/Component.sol +12 -12
  117. package/contracts/components/IPool.sol +6 -2
  118. package/contracts/components/IProduct.sol +7 -2
  119. package/contracts/components/Pool.sol +14 -7
  120. package/contracts/components/Product.sol +14 -6
  121. package/contracts/experiment/statemachine/Dummy.sol +12 -18
  122. package/contracts/experiment/statemachine/ISM.sol +7 -2
  123. package/contracts/experiment/statemachine/SM.sol +15 -12
  124. package/contracts/experiment/statemachine/SimpleStateMachine.sol +11 -4
  125. package/contracts/instance/IInstance.sol +4 -1
  126. package/contracts/instance/Instance.sol +8 -5
  127. package/contracts/instance/component/ComponentModule.sol +55 -35
  128. package/contracts/instance/component/IComponent.sol +12 -14
  129. package/contracts/instance/lifecycle/ILifecycle.sol +32 -17
  130. package/contracts/instance/lifecycle/LifecycleModule.sol +28 -31
  131. package/contracts/instance/policy/IPolicy.sol +0 -2
  132. package/contracts/instance/policy/PolicyModule.sol +14 -7
  133. package/contracts/instance/pool/IPoolModule.sol +3 -2
  134. package/contracts/instance/pool/PoolModule.sol +11 -12
  135. package/contracts/instance/product/ProductService.sol +30 -12
  136. package/contracts/instance/treasury/ITreasury.sol +43 -25
  137. package/contracts/instance/treasury/TokenHandler.sol +1 -4
  138. package/contracts/instance/treasury/TreasuryModule.sol +82 -45
  139. package/contracts/mock/Dip.sol +26 -0
  140. package/contracts/mock/TestPool.sol +16 -0
  141. package/contracts/mock/TestProduct.sol +39 -0
  142. package/contracts/mock/Usdc.sol +26 -0
  143. package/contracts/registry/IRegistry.sol +0 -2
  144. package/contracts/registry/Registry.sol +7 -2
  145. package/contracts/types/Fee.sol +6 -4
  146. package/contracts/types/ObjectType.sol +77 -20
  147. package/contracts/types/StateId.sol +68 -23
  148. package/contracts/types/UFixed.sol +18 -14
  149. package/package.json +4 -2
@@ -3,8 +3,8 @@
3
3
  "contractName": "TypeALib",
4
4
  "sourceName": "contracts/experiment/types/TypeA.sol",
5
5
  "abi": [],
6
- "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122016a0c772a28af48f26df8157a954d8fd9dcdcf5cc391b34fda641344434211de64736f6c63430008140033",
7
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122016a0c772a28af48f26df8157a954d8fd9dcdcf5cc391b34fda641344434211de64736f6c63430008140033",
6
+ "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122093fd13de095db220ed5748653d42b1ae7bf41db959dbec592038060eacc641a164736f6c63430008140033",
7
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122093fd13de095db220ed5748653d42b1ae7bf41db959dbec592038060eacc641a164736f6c63430008140033",
8
8
  "linkReferences": {},
9
9
  "deployedLinkReferences": {}
10
10
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../../build-info/cf2d2e1c79c39858c3089f23d02154a8.json"
3
+ "buildInfo": "../../../../build-info/371956c35f778b248bb1774ada1ed516.json"
4
4
  }
@@ -3,8 +3,8 @@
3
3
  "contractName": "TypeBLib",
4
4
  "sourceName": "contracts/experiment/types/TypeB.sol",
5
5
  "abi": [],
6
- "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212202a81add0c4bb6352226456a18906ca1dc02847c0b9de5130dd5a0029080d5c9364736f6c63430008140033",
7
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212202a81add0c4bb6352226456a18906ca1dc02847c0b9de5130dd5a0029080d5c9364736f6c63430008140033",
6
+ "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122032a558edadaf027db09db28520087387052afa1b5982f309365dff5079b8c42a64736f6c63430008140033",
7
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122032a558edadaf027db09db28520087387052afa1b5982f309365dff5079b8c42a64736f6c63430008140033",
8
8
  "linkReferences": {},
9
9
  "deployedLinkReferences": {}
10
10
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/cf2d2e1c79c39858c3089f23d02154a8.json"
3
+ "buildInfo": "../../../build-info/371956c35f778b248bb1774ada1ed516.json"
4
4
  }
@@ -203,6 +203,47 @@
203
203
  "stateMutability": "nonpayable",
204
204
  "type": "function"
205
205
  },
206
+ {
207
+ "inputs": [
208
+ {
209
+ "internalType": "uint256",
210
+ "name": "amount",
211
+ "type": "uint256"
212
+ },
213
+ {
214
+ "components": [
215
+ {
216
+ "internalType": "UFixed",
217
+ "name": "fractionalFee",
218
+ "type": "uint256"
219
+ },
220
+ {
221
+ "internalType": "uint256",
222
+ "name": "fixedFee",
223
+ "type": "uint256"
224
+ }
225
+ ],
226
+ "internalType": "struct Fee",
227
+ "name": "fee",
228
+ "type": "tuple"
229
+ }
230
+ ],
231
+ "name": "calculateFeeAmount",
232
+ "outputs": [
233
+ {
234
+ "internalType": "uint256",
235
+ "name": "feeAmount",
236
+ "type": "uint256"
237
+ },
238
+ {
239
+ "internalType": "uint256",
240
+ "name": "netAmount",
241
+ "type": "uint256"
242
+ }
243
+ ],
244
+ "stateMutability": "pure",
245
+ "type": "function"
246
+ },
206
247
  {
207
248
  "inputs": [],
208
249
  "name": "components",
@@ -412,7 +453,7 @@
412
453
  "type": "uint8"
413
454
  },
414
455
  {
415
- "internalType": "contract IERC20",
456
+ "internalType": "contract IERC20Metadata",
416
457
  "name": "token",
417
458
  "type": "address"
418
459
  }
@@ -425,25 +466,6 @@
425
466
  "stateMutability": "view",
426
467
  "type": "function"
427
468
  },
428
- {
429
- "inputs": [
430
- {
431
- "internalType": "NftId",
432
- "name": "nftId",
433
- "type": "uint96"
434
- }
435
- ],
436
- "name": "getComponentOwner",
437
- "outputs": [
438
- {
439
- "internalType": "address",
440
- "name": "owner",
441
- "type": "address"
442
- }
443
- ],
444
- "stateMutability": "view",
445
- "type": "function"
446
- },
447
469
  {
448
470
  "inputs": [],
449
471
  "name": "getComponentOwnerService",
@@ -1316,7 +1338,7 @@
1316
1338
  "type": "uint8"
1317
1339
  },
1318
1340
  {
1319
- "internalType": "contract IERC20",
1341
+ "internalType": "contract IERC20Metadata",
1320
1342
  "name": "token",
1321
1343
  "type": "address"
1322
1344
  }
@@ -1337,6 +1359,100 @@
1337
1359
  "stateMutability": "nonpayable",
1338
1360
  "type": "function"
1339
1361
  },
1362
+ {
1363
+ "inputs": [
1364
+ {
1365
+ "internalType": "NftId",
1366
+ "name": "poolNftId",
1367
+ "type": "uint96"
1368
+ },
1369
+ {
1370
+ "components": [
1371
+ {
1372
+ "internalType": "UFixed",
1373
+ "name": "fractionalFee",
1374
+ "type": "uint256"
1375
+ },
1376
+ {
1377
+ "internalType": "uint256",
1378
+ "name": "fixedFee",
1379
+ "type": "uint256"
1380
+ }
1381
+ ],
1382
+ "internalType": "struct Fee",
1383
+ "name": "stakingFee",
1384
+ "type": "tuple"
1385
+ },
1386
+ {
1387
+ "components": [
1388
+ {
1389
+ "internalType": "UFixed",
1390
+ "name": "fractionalFee",
1391
+ "type": "uint256"
1392
+ },
1393
+ {
1394
+ "internalType": "uint256",
1395
+ "name": "fixedFee",
1396
+ "type": "uint256"
1397
+ }
1398
+ ],
1399
+ "internalType": "struct Fee",
1400
+ "name": "performanceFee",
1401
+ "type": "tuple"
1402
+ }
1403
+ ],
1404
+ "name": "setPoolFees",
1405
+ "outputs": [],
1406
+ "stateMutability": "nonpayable",
1407
+ "type": "function"
1408
+ },
1409
+ {
1410
+ "inputs": [
1411
+ {
1412
+ "internalType": "NftId",
1413
+ "name": "productNftId",
1414
+ "type": "uint96"
1415
+ },
1416
+ {
1417
+ "components": [
1418
+ {
1419
+ "internalType": "UFixed",
1420
+ "name": "fractionalFee",
1421
+ "type": "uint256"
1422
+ },
1423
+ {
1424
+ "internalType": "uint256",
1425
+ "name": "fixedFee",
1426
+ "type": "uint256"
1427
+ }
1428
+ ],
1429
+ "internalType": "struct Fee",
1430
+ "name": "policyFee",
1431
+ "type": "tuple"
1432
+ },
1433
+ {
1434
+ "components": [
1435
+ {
1436
+ "internalType": "UFixed",
1437
+ "name": "fractionalFee",
1438
+ "type": "uint256"
1439
+ },
1440
+ {
1441
+ "internalType": "uint256",
1442
+ "name": "fixedFee",
1443
+ "type": "uint256"
1444
+ }
1445
+ ],
1446
+ "internalType": "struct Fee",
1447
+ "name": "processingFee",
1448
+ "type": "tuple"
1449
+ }
1450
+ ],
1451
+ "name": "setProductFees",
1452
+ "outputs": [],
1453
+ "stateMutability": "nonpayable",
1454
+ "type": "function"
1455
+ },
1340
1456
  {
1341
1457
  "inputs": [
1342
1458
  {
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/cf2d2e1c79c39858c3089f23d02154a8.json"
3
+ "buildInfo": "../../../build-info/371956c35f778b248bb1774ada1ed516.json"
4
4
  }