@etherisc/gif-next 0.0.2-da77c50-824 → 0.0.2-dc7e4cb-141

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
  2. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
  3. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  4. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  5. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  6. package/artifacts/contracts/components/Pool.sol/Pool.json +2 -2
  7. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  8. package/artifacts/contracts/components/Product.sol/Product.json +2 -2
  9. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  10. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  11. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  12. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  13. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  14. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  15. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  16. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  17. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  18. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  20. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  22. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  26. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  27. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +6 -11
  28. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
  29. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +1 -1
  30. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  31. package/artifacts/contracts/instance/Instance.sol/Instance.json +71 -86
  32. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +1 -1
  33. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.json +5 -5
  34. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +1 -1
  35. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +1 -1
  36. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  37. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
  38. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
  39. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
  40. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +4 -0
  41. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +10 -0
  42. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +4 -0
  43. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.json +10 -0
  44. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +4 -0
  45. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.json +10 -0
  46. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  47. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
  48. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  49. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  50. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +1 -1
  51. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +1 -1
  52. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  53. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  54. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  55. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  56. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  57. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  58. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
  59. package/artifacts/contracts/instance/module/{product/ProductModule.sol/ProductModule.json → risk/IRisk.sol/IRisk.json} +2 -2
  60. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
  61. package/artifacts/contracts/instance/module/{product/IProductModule.sol/IProductModule.json → risk/IRisk.sol/IRiskModule.json} +2 -2
  62. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
  63. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +10 -0
  64. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
  65. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
  66. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +1 -6
  67. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  68. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
  69. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +1 -6
  70. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
  71. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +25 -53
  72. package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +1 -1
  73. package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.json +5 -5
  74. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
  75. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +5 -5
  76. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  77. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +5 -5
  78. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  79. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +5 -5
  80. package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +1 -1
  81. package/artifacts/contracts/instance/service/IService.sol/IService.json +5 -5
  82. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  83. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +18 -46
  84. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  85. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +47 -59
  86. package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +1 -1
  87. package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.json +5 -5
  88. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  89. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  90. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  91. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  92. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  93. package/artifacts/contracts/registry/Registry.sol/Registry.json +2 -2
  94. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  95. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +1 -1
  96. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  97. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  98. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +5 -5
  99. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  100. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  101. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +5 -5
  102. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  103. package/artifacts/contracts/test/TestFee.sol/TestFee.json +28 -4
  104. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
  105. package/artifacts/contracts/test/TestPool.sol/TestPool.json +2 -2
  106. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
  107. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +2 -2
  108. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  109. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +2 -2
  110. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  111. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  112. package/artifacts/contracts/test/TestService.sol/TestService.json +15 -43
  113. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  114. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  115. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +14 -18
  116. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  117. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +15 -39
  118. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
  119. package/artifacts/contracts/test/Usdc.sol/USDC.json +338 -0
  120. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  121. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  122. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  123. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
  124. package/artifacts/contracts/types/Fee.sol/FeeLib.json +218 -0
  125. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  126. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  127. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  128. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  129. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  130. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  131. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +34 -8
  132. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  133. package/artifacts/contracts/types/Version.sol/VersionLib.json +63 -2
  134. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  135. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
  136. package/contracts/instance/IInstance.sol +4 -1
  137. package/contracts/instance/Instance.sol +4 -0
  138. package/contracts/instance/InstanceBase.sol +2 -5
  139. package/contracts/instance/module/compensation/CompensationModule.sol +8 -0
  140. package/contracts/instance/module/compensation/ICompensation.sol +10 -0
  141. package/contracts/instance/module/component/ComponentModule.sol +1 -2
  142. package/contracts/instance/module/{product/IProductModule.sol → risk/IRisk.sol} +6 -2
  143. package/contracts/instance/module/risk/RiskModule.sol +8 -0
  144. package/contracts/instance/module/treasury/ITreasury.sol +2 -3
  145. package/contracts/instance/module/treasury/TreasuryModule.sol +15 -11
  146. package/contracts/instance/service/ComponentOwnerService.sol +3 -6
  147. package/contracts/instance/service/PoolService.sol +35 -10
  148. package/contracts/instance/service/ProductService.sol +5 -8
  149. package/contracts/instance/service/ServiceBase.sol +1 -1
  150. package/contracts/shared/IVersionable.sol +2 -2
  151. package/contracts/shared/Versionable.sol +3 -6
  152. package/contracts/test/TestFee.sol +3 -3
  153. package/contracts/test/TestPool.sol +1 -1
  154. package/contracts/test/TestProduct.sol +1 -1
  155. package/contracts/test/TestService.sol +2 -5
  156. package/contracts/test/TestVersion.sol +4 -7
  157. package/contracts/test/TestVersionable.sol +2 -5
  158. package/contracts/test/Usdc.sol +26 -0
  159. package/contracts/types/Fee.sol +39 -20
  160. package/contracts/types/UFixed.sol +19 -16
  161. package/contracts/types/Version.sol +29 -25
  162. package/package.json +1 -1
  163. package/artifacts/contracts/instance/module/product/IProductModule.sol/IProductModule.dbg.json +0 -4
  164. package/artifacts/contracts/instance/module/product/ProductModule.sol/ProductModule.dbg.json +0 -4
  165. package/contracts/instance/module/product/ProductModule.sol +0 -8
@@ -44,15 +44,41 @@
44
44
  },
45
45
  {
46
46
  "inputs": [],
47
- "name": "ROUNDING_DEFAULT",
47
+ "name": "ROUNDING_DOWN",
48
48
  "outputs": [
49
49
  {
50
- "internalType": "enum UFixedMathLib.Rounding",
50
+ "internalType": "uint8",
51
51
  "name": "",
52
- "type": "UFixedMathLib.Rounding"
52
+ "type": "uint8"
53
53
  }
54
54
  ],
55
- "stateMutability": "view",
55
+ "stateMutability": "pure",
56
+ "type": "function"
57
+ },
58
+ {
59
+ "inputs": [],
60
+ "name": "ROUNDING_HALF_UP",
61
+ "outputs": [
62
+ {
63
+ "internalType": "uint8",
64
+ "name": "",
65
+ "type": "uint8"
66
+ }
67
+ ],
68
+ "stateMutability": "pure",
69
+ "type": "function"
70
+ },
71
+ {
72
+ "inputs": [],
73
+ "name": "ROUNDING_UP",
74
+ "outputs": [
75
+ {
76
+ "internalType": "uint8",
77
+ "name": "",
78
+ "type": "uint8"
79
+ }
80
+ ],
81
+ "stateMutability": "pure",
56
82
  "type": "function"
57
83
  },
58
84
  {
@@ -373,9 +399,9 @@
373
399
  "type": "uint256"
374
400
  },
375
401
  {
376
- "internalType": "enum UFixedMathLib.Rounding",
402
+ "internalType": "uint8",
377
403
  "name": "rounding",
378
- "type": "UFixedMathLib.Rounding"
404
+ "type": "uint8"
379
405
  }
380
406
  ],
381
407
  "name": "toIntWithRounding",
@@ -446,8 +472,8 @@
446
472
  "type": "function"
447
473
  }
448
474
  ],
449
- "bytecode": "0x610a4d61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061014c5760003560e01c80637a858b97116100c2578063c8a4ac9c11610086578063c8a4ac9c14610289578063cc8b7b731461029c578063df739011146102af578063ea6515c4146102c2578063eb646d71146102d5578063f30ed598146102dd57600080fd5b80637a858b9714610236578063a391c15b14610249578063b47733291461025c578063b67d77c51461026f578063bc1b392d1461028257600080fd5b8063313ce56711610114578063313ce567146101d057806332148d73146101d757806344aa6836146101ea57806345ebb61e146101fd578063753b14a514610210578063771602f71461022357600080fd5b8063059f8b1614610151578063118fc88c1461016c5780631488c8451461018f5780631a12cd47146101a257806321e5749b146101bd575b600080fd5b6101596102f2565b6040519081526020015b60405180910390f35b61017f61017a366004610794565b610301565b6040519015158152602001610163565b61015961019d3660046107b6565b610310565b6101aa601281565b60405160009190910b8152602001610163565b61017f6101cb366004610794565b6103f2565b6012610159565b61017f6101e5366004610794565b6103fc565b6101596101f83660046107ec565b610406565b61015961020b3660046107ec565b610413565b61017f61021e3660046107ec565b61042b565b610159610231366004610794565b610434565b61017f6102443660046107ec565b610440565b610159610257366004610794565b61044a565b61017f61026a366004610794565b610456565b61015961027d366004610794565b610461565b6000610159565b610159610297366004610794565b61046d565b6101596102aa366004610794565b610479565b6101596102bd366004610805565b610485565b61017f6102d0366004610794565b610525565b610159610530565b6102e5600281565b6040516101639190610844565b6102fe6012600a610966565b81565b60008282115b90505b92915050565b60008061031e836012610972565b60000b12156103745760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c0060448201526064015b60405180910390fd5b6040610381836012610972565b60000b13156103d25760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c4152474500604482015260640161036b565b6103dd826012610972565b6103e890600a610993565b61030790846109a2565b6000828210610307565b6000818314610307565b600061030a826002610485565b60006104216012600a610966565b61030a90836109a2565b6000811561030a565b60006103078383610548565b600081151561030a565b60006103078383610554565b600082821115610307565b600061030783836105b8565b60006103078383610614565b60006103078383610629565b6000600282600281111561049b5761049b61082e565b036104e1576104da60026104b16012600a610966565b6104bb91906109cf565b6104c590856109f1565b60016104d36012600a610966565b6000610647565b905061030a565b60008260028111156104f5576104f561082e565b0361050c576104da8360016104d36012600a610966565b6104da83600161051e6012600a610966565b6001610647565b600082821015610307565b600261053e6012600a610966565b6102fe91906109cf565b600061030782846109f1565b60008082116105a55760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a55464d2d3032303a44495649534f525f5a45524f000000000000604482015260640161036b565b61030783670de0b6b3a7640000846106a4565b60008282111561060a5760405162461bcd60e51b815260206004820152601d60248201527f4552524f523a55464d2d3031303a4e454741544956455f524553554c54000000604482015260640161036b565b6103078284610a04565b60006103078383670de0b6b3a76400006106a4565b60008282101561063d576104da83836105b8565b61030782846105b8565b6000806106558686866106a4565b9050600183600281111561066b5761066b61082e565b148015610688575060008480610683576106836109b9565b868809115b1561069b576106986001826109f1565b90505b95945050505050565b60008080600019858709858702925082811083820303915050806000036106de578382816106d4576106d46109b9565b049250505061078d565b8084116107255760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161036b565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b600080604083850312156107a757600080fd5b50508035926020909101359150565b600080604083850312156107c957600080fd5b8235915060208301358060000b81146107e157600080fd5b809150509250929050565b6000602082840312156107fe57600080fd5b5035919050565b6000806040838503121561081857600080fd5b823591506020830135600381106107e157600080fd5b634e487b7160e01b600052602160045260246000fd5b602081016003831061086657634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156108bd5781600019048211156108a3576108a361086c565b808516156108b057918102915b93841c9390800290610887565b509250929050565b6000826108d45750600161030a565b816108e15750600061030a565b81600181146108f757600281146109015761091d565b600191505061030a565b60ff8411156109125761091261086c565b50506001821b61030a565b5060208310610133831016604e8410600b8410161715610940575081810a61030a565b61094a8383610882565b806000190482111561095e5761095e61086c565b029392505050565b600061030783836108c5565b600081810b9083900b01607f8113607f198212171561030a5761030a61086c565b600061030760ff8416836108c5565b808202811582820484141761030a5761030a61086c565b634e487b7160e01b600052601260045260246000fd5b6000826109ec57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561030a5761030a61086c565b8181038181111561030a5761030a61086c56fea26469706673582212203e54f48eab75437862b6140e654746538ce5d107025fea2883a132e04e5d771c64736f6c63430008140033",
450
- "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061014c5760003560e01c80637a858b97116100c2578063c8a4ac9c11610086578063c8a4ac9c14610289578063cc8b7b731461029c578063df739011146102af578063ea6515c4146102c2578063eb646d71146102d5578063f30ed598146102dd57600080fd5b80637a858b9714610236578063a391c15b14610249578063b47733291461025c578063b67d77c51461026f578063bc1b392d1461028257600080fd5b8063313ce56711610114578063313ce567146101d057806332148d73146101d757806344aa6836146101ea57806345ebb61e146101fd578063753b14a514610210578063771602f71461022357600080fd5b8063059f8b1614610151578063118fc88c1461016c5780631488c8451461018f5780631a12cd47146101a257806321e5749b146101bd575b600080fd5b6101596102f2565b6040519081526020015b60405180910390f35b61017f61017a366004610794565b610301565b6040519015158152602001610163565b61015961019d3660046107b6565b610310565b6101aa601281565b60405160009190910b8152602001610163565b61017f6101cb366004610794565b6103f2565b6012610159565b61017f6101e5366004610794565b6103fc565b6101596101f83660046107ec565b610406565b61015961020b3660046107ec565b610413565b61017f61021e3660046107ec565b61042b565b610159610231366004610794565b610434565b61017f6102443660046107ec565b610440565b610159610257366004610794565b61044a565b61017f61026a366004610794565b610456565b61015961027d366004610794565b610461565b6000610159565b610159610297366004610794565b61046d565b6101596102aa366004610794565b610479565b6101596102bd366004610805565b610485565b61017f6102d0366004610794565b610525565b610159610530565b6102e5600281565b6040516101639190610844565b6102fe6012600a610966565b81565b60008282115b90505b92915050565b60008061031e836012610972565b60000b12156103745760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c0060448201526064015b60405180910390fd5b6040610381836012610972565b60000b13156103d25760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c4152474500604482015260640161036b565b6103dd826012610972565b6103e890600a610993565b61030790846109a2565b6000828210610307565b6000818314610307565b600061030a826002610485565b60006104216012600a610966565b61030a90836109a2565b6000811561030a565b60006103078383610548565b600081151561030a565b60006103078383610554565b600082821115610307565b600061030783836105b8565b60006103078383610614565b60006103078383610629565b6000600282600281111561049b5761049b61082e565b036104e1576104da60026104b16012600a610966565b6104bb91906109cf565b6104c590856109f1565b60016104d36012600a610966565b6000610647565b905061030a565b60008260028111156104f5576104f561082e565b0361050c576104da8360016104d36012600a610966565b6104da83600161051e6012600a610966565b6001610647565b600082821015610307565b600261053e6012600a610966565b6102fe91906109cf565b600061030782846109f1565b60008082116105a55760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a55464d2d3032303a44495649534f525f5a45524f000000000000604482015260640161036b565b61030783670de0b6b3a7640000846106a4565b60008282111561060a5760405162461bcd60e51b815260206004820152601d60248201527f4552524f523a55464d2d3031303a4e454741544956455f524553554c54000000604482015260640161036b565b6103078284610a04565b60006103078383670de0b6b3a76400006106a4565b60008282101561063d576104da83836105b8565b61030782846105b8565b6000806106558686866106a4565b9050600183600281111561066b5761066b61082e565b148015610688575060008480610683576106836109b9565b868809115b1561069b576106986001826109f1565b90505b95945050505050565b60008080600019858709858702925082811083820303915050806000036106de578382816106d4576106d46109b9565b049250505061078d565b8084116107255760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161036b565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b600080604083850312156107a757600080fd5b50508035926020909101359150565b600080604083850312156107c957600080fd5b8235915060208301358060000b81146107e157600080fd5b809150509250929050565b6000602082840312156107fe57600080fd5b5035919050565b6000806040838503121561081857600080fd5b823591506020830135600381106107e157600080fd5b634e487b7160e01b600052602160045260246000fd5b602081016003831061086657634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156108bd5781600019048211156108a3576108a361086c565b808516156108b057918102915b93841c9390800290610887565b509250929050565b6000826108d45750600161030a565b816108e15750600061030a565b81600181146108f757600281146109015761091d565b600191505061030a565b60ff8411156109125761091261086c565b50506001821b61030a565b5060208310610133831016604e8410600b8410161715610940575081810a61030a565b61094a8383610882565b806000190482111561095e5761095e61086c565b029392505050565b600061030783836108c5565b600081810b9083900b01607f8113607f198212171561030a5761030a61086c565b600061030760ff8416836108c5565b808202811582820484141761030a5761030a61086c565b634e487b7160e01b600052601260045260246000fd5b6000826109ec57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561030a5761030a61086c565b8181038181111561030a5761030a61086c56fea26469706673582212203e54f48eab75437862b6140e654746538ce5d107025fea2883a132e04e5d771c64736f6c63430008140033",
475
+ "bytecode": "0x610a2a61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106101625760003560e01c80637a858b97116100cd578063bc1b392d11610086578063bc1b392d146102c7578063bdbb4630146102ce578063c8a4ac9c146102d5578063cc8b7b73146102e8578063ea6515c4146102fb578063eb646d711461030e57600080fd5b80637a858b971461025f57806389fa8ed71461027257806393aa872514610287578063a391c15b1461028e578063b4773329146102a1578063b67d77c5146102b457600080fd5b8063313ce5671161011f578063313ce567146101f957806332148d731461020057806344aa68361461021357806345ebb61e14610226578063753b14a514610239578063771602f71461024c57600080fd5b8063059f8b161461016757806308c76ec414610182578063118fc88c146101955780631488c845146101b85780631a12cd47146101cb57806321e5749b146101e6575b600080fd5b61016f610316565b6040519081526020015b60405180910390f35b61016f610190366004610797565b610325565b6101a86101a33660046107cd565b6103ad565b6040519015158152602001610179565b61016f6101c63660046107ef565b6103ba565b6101d3601281565b60405160009190910b8152602001610179565b6101a86101f43660046107cd565b61049c565b601261016f565b6101a861020e3660046107cd565b6104a6565b61016f61022136600461081a565b6104b0565b61016f61023436600461081a565b6104bd565b6101a861024736600461081a565b6104d5565b61016f61025a3660046107cd565b6104de565b6101a861026d36600461081a565b6104ea565b60025b60405160ff9091168152602001610179565b6000610275565b61016f61029c3660046107cd565b6104f4565b6101a86102af3660046107cd565b610500565b61016f6102c23660046107cd565b61050b565b600061016f565b6001610275565b61016f6102e33660046107cd565b610517565b61016f6102f63660046107cd565b610523565b6101a86103093660046107cd565b61052f565b61016f61053a565b6103226012600a61092d565b81565b600060011960ff8316016103745761036d60026103446012600a61092d565b61034e919061094f565b6103589085610971565b60016103666012600a61092d565b6000610552565b90506103a7565b60ff821661038e5761036d8360016103666012600a61092d565b61036d8360016103a06012600a61092d565b6001610552565b92915050565b60008282115b9392505050565b6000806103c8836012610984565b60000b121561041e5760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c0060448201526064015b60405180910390fd5b604061042b836012610984565b60000b131561047c5760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c41524745006044820152606401610415565b610487826012610984565b61049290600a6109a5565b6103b390846109b4565b60008282106103b3565b60008183146103b3565b60006103a7826002610325565b60006104cb6012600a61092d565b6103a790836109b4565b600081156103a7565b60006103b383836105af565b60008115156103a7565b60006103b383836105bb565b6000828211156103b3565b60006103b3838361061f565b60006103b3838361067b565b60006103b38383610690565b6000828210156103b3565b60026105486012600a61092d565b610322919061094f565b6000806105608686866106ae565b90506001836002811115610576576105766109cb565b14801561059357506000848061058e5761058e610939565b868809115b156105a6576105a3600182610971565b90505b95945050505050565b60006103b38284610971565b600080821161060c5760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a55464d2d3032303a44495649534f525f5a45524f0000000000006044820152606401610415565b6103b383670de0b6b3a7640000846106ae565b6000828211156106715760405162461bcd60e51b815260206004820152601d60248201527f4552524f523a55464d2d3031303a4e454741544956455f524553554c540000006044820152606401610415565b6103b382846109e1565b60006103b38383670de0b6b3a76400006106ae565b6000828210156106a45761036d838361061f565b6103b3828461061f565b60008080600019858709858702925082811083820303915050806000036106e8578382816106de576106de610939565b04925050506103b3565b80841161072f5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401610415565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b600080604083850312156107aa57600080fd5b82359150602083013560ff811681146107c257600080fd5b809150509250929050565b600080604083850312156107e057600080fd5b50508035926020909101359150565b6000806040838503121561080257600080fd5b8235915060208301358060000b81146107c257600080fd5b60006020828403121561082c57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561088457816000190482111561086a5761086a610833565b8085161561087757918102915b93841c939080029061084e565b509250929050565b60008261089b575060016103a7565b816108a8575060006103a7565b81600181146108be57600281146108c8576108e4565b60019150506103a7565b60ff8411156108d9576108d9610833565b50506001821b6103a7565b5060208310610133831016604e8410600b8410161715610907575081810a6103a7565b6109118383610849565b806000190482111561092557610925610833565b029392505050565b60006103b3838361088c565b634e487b7160e01b600052601260045260246000fd5b60008261096c57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156103a7576103a7610833565b600081810b9083900b01607f8113607f19821217156103a7576103a7610833565b60006103b360ff84168361088c565b80820281158282048414176103a7576103a7610833565b634e487b7160e01b600052602160045260246000fd5b818103818111156103a7576103a761083356fea2646970667358221220fb084aab1469254041156892d0f0d9cc43b94e6c38b151c477083dab1d1e70aa64736f6c63430008140033",
476
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106101625760003560e01c80637a858b97116100cd578063bc1b392d11610086578063bc1b392d146102c7578063bdbb4630146102ce578063c8a4ac9c146102d5578063cc8b7b73146102e8578063ea6515c4146102fb578063eb646d711461030e57600080fd5b80637a858b971461025f57806389fa8ed71461027257806393aa872514610287578063a391c15b1461028e578063b4773329146102a1578063b67d77c5146102b457600080fd5b8063313ce5671161011f578063313ce567146101f957806332148d731461020057806344aa68361461021357806345ebb61e14610226578063753b14a514610239578063771602f71461024c57600080fd5b8063059f8b161461016757806308c76ec414610182578063118fc88c146101955780631488c845146101b85780631a12cd47146101cb57806321e5749b146101e6575b600080fd5b61016f610316565b6040519081526020015b60405180910390f35b61016f610190366004610797565b610325565b6101a86101a33660046107cd565b6103ad565b6040519015158152602001610179565b61016f6101c63660046107ef565b6103ba565b6101d3601281565b60405160009190910b8152602001610179565b6101a86101f43660046107cd565b61049c565b601261016f565b6101a861020e3660046107cd565b6104a6565b61016f61022136600461081a565b6104b0565b61016f61023436600461081a565b6104bd565b6101a861024736600461081a565b6104d5565b61016f61025a3660046107cd565b6104de565b6101a861026d36600461081a565b6104ea565b60025b60405160ff9091168152602001610179565b6000610275565b61016f61029c3660046107cd565b6104f4565b6101a86102af3660046107cd565b610500565b61016f6102c23660046107cd565b61050b565b600061016f565b6001610275565b61016f6102e33660046107cd565b610517565b61016f6102f63660046107cd565b610523565b6101a86103093660046107cd565b61052f565b61016f61053a565b6103226012600a61092d565b81565b600060011960ff8316016103745761036d60026103446012600a61092d565b61034e919061094f565b6103589085610971565b60016103666012600a61092d565b6000610552565b90506103a7565b60ff821661038e5761036d8360016103666012600a61092d565b61036d8360016103a06012600a61092d565b6001610552565b92915050565b60008282115b9392505050565b6000806103c8836012610984565b60000b121561041e5760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c0060448201526064015b60405180910390fd5b604061042b836012610984565b60000b131561047c5760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c41524745006044820152606401610415565b610487826012610984565b61049290600a6109a5565b6103b390846109b4565b60008282106103b3565b60008183146103b3565b60006103a7826002610325565b60006104cb6012600a61092d565b6103a790836109b4565b600081156103a7565b60006103b383836105af565b60008115156103a7565b60006103b383836105bb565b6000828211156103b3565b60006103b3838361061f565b60006103b3838361067b565b60006103b38383610690565b6000828210156103b3565b60026105486012600a61092d565b610322919061094f565b6000806105608686866106ae565b90506001836002811115610576576105766109cb565b14801561059357506000848061058e5761058e610939565b868809115b156105a6576105a3600182610971565b90505b95945050505050565b60006103b38284610971565b600080821161060c5760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a55464d2d3032303a44495649534f525f5a45524f0000000000006044820152606401610415565b6103b383670de0b6b3a7640000846106ae565b6000828211156106715760405162461bcd60e51b815260206004820152601d60248201527f4552524f523a55464d2d3031303a4e454741544956455f524553554c540000006044820152606401610415565b6103b382846109e1565b60006103b38383670de0b6b3a76400006106ae565b6000828210156106a45761036d838361061f565b6103b3828461061f565b60008080600019858709858702925082811083820303915050806000036106e8578382816106de576106de610939565b04925050506103b3565b80841161072f5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401610415565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b600080604083850312156107aa57600080fd5b82359150602083013560ff811681146107c257600080fd5b809150509250929050565b600080604083850312156107e057600080fd5b50508035926020909101359150565b6000806040838503121561080257600080fd5b8235915060208301358060000b81146107c257600080fd5b60006020828403121561082c57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561088457816000190482111561086a5761086a610833565b8085161561087757918102915b93841c939080029061084e565b509250929050565b60008261089b575060016103a7565b816108a8575060006103a7565b81600181146108be57600281146108c8576108e4565b60019150506103a7565b60ff8411156108d9576108d9610833565b50506001821b6103a7565b5060208310610133831016604e8410600b8410161715610907575081810a6103a7565b6109118383610849565b806000190482111561092557610925610833565b029392505050565b60006103b3838361088c565b634e487b7160e01b600052601260045260246000fd5b60008261096c57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156103a7576103a7610833565b600081810b9083900b01607f8113607f19821217156103a7576103a7610833565b60006103b360ff84168361088c565b80820281158282048414176103a7576103a7610833565b634e487b7160e01b600052602160045260246000fd5b818103818111156103a7576103a761083356fea2646970667358221220fb084aab1469254041156892d0f0d9cc43b94e6c38b151c477083dab1d1e70aa64736f6c63430008140033",
451
477
  "linkReferences": {},
452
478
  "deployedLinkReferences": {}
453
479
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/73036ef8d3587a4d497b53a8e5f6bc33.json"
3
+ "buildInfo": "../../../build-info/7f4061414c08959ccea0f1ff89c2ba75.json"
4
4
  }
@@ -41,6 +41,54 @@
41
41
  "stateMutability": "pure",
42
42
  "type": "function"
43
43
  },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "uint256",
48
+ "name": "major",
49
+ "type": "uint256"
50
+ },
51
+ {
52
+ "internalType": "uint256",
53
+ "name": "minor",
54
+ "type": "uint256"
55
+ },
56
+ {
57
+ "internalType": "uint256",
58
+ "name": "patch",
59
+ "type": "uint256"
60
+ }
61
+ ],
62
+ "name": "toVersion",
63
+ "outputs": [
64
+ {
65
+ "internalType": "Version",
66
+ "name": "",
67
+ "type": "uint24"
68
+ }
69
+ ],
70
+ "stateMutability": "pure",
71
+ "type": "function"
72
+ },
73
+ {
74
+ "inputs": [
75
+ {
76
+ "internalType": "uint256",
77
+ "name": "versionPart",
78
+ "type": "uint256"
79
+ }
80
+ ],
81
+ "name": "toVersionPart",
82
+ "outputs": [
83
+ {
84
+ "internalType": "VersionPart",
85
+ "name": "",
86
+ "type": "uint8"
87
+ }
88
+ ],
89
+ "stateMutability": "pure",
90
+ "type": "function"
91
+ },
44
92
  {
45
93
  "inputs": [
46
94
  {
@@ -69,10 +117,23 @@
69
117
  ],
70
118
  "stateMutability": "pure",
71
119
  "type": "function"
120
+ },
121
+ {
122
+ "inputs": [],
123
+ "name": "zeroVersion",
124
+ "outputs": [
125
+ {
126
+ "internalType": "Version",
127
+ "name": "",
128
+ "type": "uint24"
129
+ }
130
+ ],
131
+ "stateMutability": "pure",
132
+ "type": "function"
72
133
  }
73
134
  ],
74
- "bytecode": "0x6101a961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806349a7111a14610050578063556010071461008c578063c9e66e29146100b0575b600080fd5b61006361005e366004610116565b6100d9565b6040805160ff948516815292841660208401529216918101919091526060015b60405180910390f35b6100a261009a366004610116565b62ffffff1690565b604051908152602001610083565b6100c76100be366004610116565b60101c60ff1690565b60405160ff9091168152602001610083565b600080808360ff601082901c166100f08383610142565b915061ffff600883901c1660006101078185610142565b92989197509195509350505050565b60006020828403121561012857600080fd5b813562ffffff8116811461013b57600080fd5b9392505050565b62ffffff82811682821603908082111561016c57634e487b7160e01b600052601160045260246000fd5b509291505056fea26469706673582212200bd4c7b26105f56f3e5ca7e3e58f905d9e6d04e631e2e84ea5ff0d590ca4399f64736f6c63430008140033",
75
- "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806349a7111a14610050578063556010071461008c578063c9e66e29146100b0575b600080fd5b61006361005e366004610116565b6100d9565b6040805160ff948516815292841660208401529216918101919091526060015b60405180910390f35b6100a261009a366004610116565b62ffffff1690565b604051908152602001610083565b6100c76100be366004610116565b60101c60ff1690565b60405160ff9091168152602001610083565b600080808360ff601082901c166100f08383610142565b915061ffff600883901c1660006101078185610142565b92989197509195509350505050565b60006020828403121561012857600080fd5b813562ffffff8116811461013b57600080fd5b9392505050565b62ffffff82811682821603908082111561016c57634e487b7160e01b600052601160045260246000fd5b509291505056fea26469706673582212200bd4c7b26105f56f3e5ca7e3e58f905d9e6d04e631e2e84ea5ff0d590ca4399f64736f6c63430008140033",
135
+ "bytecode": "0x61030c61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806304b8f6c5146100715780632efe01131461008d57806349a7111a146100a057806355601007146100d75780638e4ad86c146100fb578063c9e66e291461011e575b600080fd5b60005b60405162ffffff90911681526020015b60405180910390f35b61007461009b366004610213565b610135565b6100b36100ae36600461023f565b6101d6565b6040805160ff94851681529284166020840152921691810191909152606001610084565b6100ed6100e536600461023f565b62ffffff1690565b604051908152602001610084565b61010c61010936600461026b565b90565b60405160ff9091168152602001610084565b61010c61012c36600461023f565b60101c60ff1690565b600061010084108015610149575061010083105b8015610156575061010082105b6101b15760405162461bcd60e51b815260206004820152602260248201527f4552524f523a5652532d3031303a56455253494f4e5f504152545f544f4f5f42604482015261494760f01b606482015260840160405180910390fd5b816101c4600885901b601087901b61029a565b6101ce919061029a565b949350505050565b600080808360ff601082901c166101ed83836102b3565b915061ffff600883901c16600061020481856102b3565b92989197509195509350505050565b60008060006060848603121561022857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561025157600080fd5b813562ffffff8116811461026457600080fd5b9392505050565b60006020828403121561027d57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102ad576102ad610284565b92915050565b62ffffff8281168282160390808211156102cf576102cf610284565b509291505056fea2646970667358221220ba37649b9b622a7a14f84638f29a11cfa2b93f381baaceb770e1fea23e6fae7964736f6c63430008140033",
136
+ "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806304b8f6c5146100715780632efe01131461008d57806349a7111a146100a057806355601007146100d75780638e4ad86c146100fb578063c9e66e291461011e575b600080fd5b60005b60405162ffffff90911681526020015b60405180910390f35b61007461009b366004610213565b610135565b6100b36100ae36600461023f565b6101d6565b6040805160ff94851681529284166020840152921691810191909152606001610084565b6100ed6100e536600461023f565b62ffffff1690565b604051908152602001610084565b61010c61010936600461026b565b90565b60405160ff9091168152602001610084565b61010c61012c36600461023f565b60101c60ff1690565b600061010084108015610149575061010083105b8015610156575061010082105b6101b15760405162461bcd60e51b815260206004820152602260248201527f4552524f523a5652532d3031303a56455253494f4e5f504152545f544f4f5f42604482015261494760f01b606482015260840160405180910390fd5b816101c4600885901b601087901b61029a565b6101ce919061029a565b949350505050565b600080808360ff601082901c166101ed83836102b3565b915061ffff600883901c16600061020481856102b3565b92989197509195509350505050565b60008060006060848603121561022857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561025157600080fd5b813562ffffff8116811461026457600080fd5b9392505050565b60006020828403121561027d57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102ad576102ad610284565b92915050565b62ffffff8281168282160390808211156102cf576102cf610284565b509291505056fea2646970667358221220ba37649b9b622a7a14f84638f29a11cfa2b93f381baaceb770e1fea23e6fae7964736f6c63430008140033",
76
137
  "linkReferences": {},
77
138
  "deployedLinkReferences": {}
78
139
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/73036ef8d3587a4d497b53a8e5f6bc33.json"
3
+ "buildInfo": "../../../build-info/7f4061414c08959ccea0f1ff89c2ba75.json"
4
4
  }
@@ -23,8 +23,8 @@
23
23
  "type": "function"
24
24
  }
25
25
  ],
26
- "bytecode": "0x60b9610039600b82828239805160001a60731461002c57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063ac43d834146038575b600080fd5b60496043366004605b565b60ff1690565b60405190815260200160405180910390f35b600060208284031215606c57600080fd5b813560ff81168114607c57600080fd5b939250505056fea26469706673582212203ebb69088f45515ad3bf7d61298feea5dae8d24b3fbf854881fdd75e3046518764736f6c63430008140033",
27
- "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063ac43d834146038575b600080fd5b60496043366004605b565b60ff1690565b60405190815260200160405180910390f35b600060208284031215606c57600080fd5b813560ff81168114607c57600080fd5b939250505056fea26469706673582212203ebb69088f45515ad3bf7d61298feea5dae8d24b3fbf854881fdd75e3046518764736f6c63430008140033",
26
+ "bytecode": "0x60b9610039600b82828239805160001a60731461002c57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063ac43d834146038575b600080fd5b60496043366004605b565b60ff1690565b60405190815260200160405180910390f35b600060208284031215606c57600080fd5b813560ff81168114607c57600080fd5b939250505056fea2646970667358221220f9eff042249ef4290a2228b4a1d7046915ad93d6defe14b8c405ef07df444fa264736f6c63430008140033",
27
+ "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063ac43d834146038575b600080fd5b60496043366004605b565b60ff1690565b60405190815260200160405180910390f35b600060208284031215606c57600080fd5b813560ff81168114607c57600080fd5b939250505056fea2646970667358221220f9eff042249ef4290a2228b4a1d7046915ad93d6defe14b8c405ef07df444fa264736f6c63430008140033",
28
28
  "linkReferences": {},
29
29
  "deployedLinkReferences": {}
30
30
  }
@@ -10,11 +10,13 @@ import {IOwnable} from "../shared/IOwnable.sol";
10
10
  import {RoleId} from "../types/RoleId.sol";
11
11
 
12
12
  import {IAccessModule} from "./module/access/IAccess.sol";
13
+ import {IBundleModule} from "./module/bundle/IBundle.sol";
14
+ import {ICompensationModule} from "./module/compensation/ICompensation.sol";
13
15
  import {ILifecycleModule} from "./module/lifecycle/ILifecycle.sol";
14
16
  import {IComponentModule} from "./module/component/IComponent.sol";
15
17
  import {IPolicyModule} from "./module/policy/IPolicy.sol";
16
18
  import {IPoolModule} from "./module/pool/IPoolModule.sol";
17
- import {IBundleModule} from "./module/bundle/IBundle.sol";
19
+ import {IRiskModule} from "./module/risk/IRisk.sol";
18
20
  import {ITreasuryModule} from "./module/treasury/ITreasury.sol";
19
21
 
20
22
  import {IRegistry, IRegistryLinked} from "../registry/IRegistryLinked.sol";
@@ -37,6 +39,7 @@ interface IInstance is
37
39
  IBundleModule,
38
40
  IComponentModule,
39
41
  ITreasuryModule,
42
+ ICompensationModule,
40
43
  IServiceLinked
41
44
  {
42
45
  function getRegistry() external view override (IBundleModule, IComponentModule, IPolicyModule, IRegisterable) returns (IRegistry registry);
@@ -6,10 +6,12 @@ import {RoleId} from "../types/RoleId.sol";
6
6
 
7
7
  import {InstanceBase} from "./InstanceBase.sol";
8
8
  import {AccessModule} from "./module/access/Access.sol";
9
+ import {CompensationModule} from "./module/compensation/CompensationModule.sol";
9
10
  import {LifecycleModule} from "./module/lifecycle/LifecycleModule.sol";
10
11
  import {ComponentModule} from "./module/component/ComponentModule.sol";
11
12
  import {PolicyModule} from "./module/policy/PolicyModule.sol";
12
13
  import {PoolModule} from "./module/pool/PoolModule.sol";
14
+ import {RiskModule} from "./module/risk/RiskModule.sol";
13
15
  import {BundleModule} from "./module/bundle/BundleModule.sol";
14
16
  import {TreasuryModule} from "./module/treasury/TreasuryModule.sol";
15
17
 
@@ -31,9 +33,11 @@ contract Instance is
31
33
  AccessModule,
32
34
  BundleModule,
33
35
  ComponentModule,
36
+ CompensationModule,
34
37
  LifecycleModule,
35
38
  PolicyModule,
36
39
  PoolModule,
40
+ RiskModule,
37
41
  TreasuryModule
38
42
  {
39
43
  constructor(
@@ -8,7 +8,7 @@ import {Registerable} from "../shared/Registerable.sol";
8
8
  // import {IInstance} from "./IInstance.sol";
9
9
  import {ObjectType, INSTANCE} from "../types/ObjectType.sol";
10
10
  import {NftId} from "../types/NftId.sol";
11
- import {Version, VersionPart, toVersion, toVersionPart} from "../types/Version.sol";
11
+ import {Version, VersionPart, VersionLib} from "../types/Version.sol";
12
12
 
13
13
  import {IComponentOwnerService} from "./service/IComponentOwnerService.sol";
14
14
  import {IProductService} from "./service/IProductService.sol";
@@ -44,10 +44,7 @@ abstract contract InstanceBase is
44
44
  virtual override
45
45
  returns(Version)
46
46
  {
47
- return toVersion(
48
- toVersionPart(3),
49
- toVersionPart(0),
50
- toVersionPart(0));
47
+ return VersionLib.toVersion(3,0,0);
51
48
  }
52
49
 
53
50
  // from registerable
@@ -0,0 +1,8 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {ICompensationModule} from "./ICompensation.sol";
5
+
6
+ contract CompensationModule is ICompensationModule {
7
+
8
+ }
@@ -0,0 +1,10 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ interface ICompensation {
5
+
6
+ }
7
+
8
+ interface ICompensationModule is ICompensation {
9
+
10
+ }
@@ -12,8 +12,7 @@ import {IComponentOwnerService} from "../../service/IComponentOwnerService.sol";
12
12
  import {ObjectType, PRODUCT, ORACLE, POOL} from "../../../types/ObjectType.sol";
13
13
  import {StateId, ACTIVE, PAUSED} from "../../../types/StateId.sol";
14
14
  import {NftId, NftIdLib, zeroNftId} from "../../../types/NftId.sol";
15
- import {Fee, zeroFee} from "../../../types/Fee.sol";
16
- // import {IBaseComponent} from "../../../components/IBaseComponent.sol";
15
+ import {Fee} from "../../../types/Fee.sol";
17
16
 
18
17
  abstract contract ComponentModule is
19
18
  IComponentModule
@@ -1,6 +1,10 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.19;
3
3
 
4
- interface IProductModule
5
- {
4
+ interface IRisk {
5
+
6
6
  }
7
+
8
+ interface IRiskModule is IRisk {
9
+
10
+ }
@@ -0,0 +1,8 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {IRiskModule} from "./IRisk.sol";
5
+
6
+ contract RiskModule is IRiskModule {
7
+
8
+ }
@@ -18,7 +18,6 @@ interface ITreasury {
18
18
  NftId distributorNftId;
19
19
  NftId poolNftId;
20
20
  IERC20Metadata token;
21
- TokenHandler tokenHandler;
22
21
  address wallet;
23
22
  Fee policyFee;
24
23
  Fee processingFee;
@@ -27,7 +26,7 @@ interface ITreasury {
27
26
  struct DistributorSetup {
28
27
  NftId distributorNftId;
29
28
  address wallet;
30
- Fee commissionFees;
29
+ Fee commissionFee;
31
30
  }
32
31
 
33
32
  struct PoolSetup {
@@ -70,7 +69,7 @@ interface ITreasuryModule is ITreasury {
70
69
  ) external;
71
70
 
72
71
  function getTokenHandler(
73
- NftId productNftId
72
+ NftId componentNftId
74
73
  ) external view returns (TokenHandler tokenHandler);
75
74
 
76
75
  function getProductSetup(
@@ -4,7 +4,7 @@ pragma solidity ^0.8.19;
4
4
  import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
5
 
6
6
  import {NftId} from "../../../types/NftId.sol";
7
- import {Fee, feeIsZero, toFee, zeroFee} from "../../../types/Fee.sol";
7
+ import {Fee, FeeLib} from "../../../types/Fee.sol";
8
8
  import {UFixed, UFixedMathLib} from "../../../types/UFixed.sol";
9
9
  import {TokenHandler} from "./TokenHandler.sol";
10
10
  import {ITreasuryModule} from "./ITreasury.sol";
@@ -14,6 +14,7 @@ abstract contract TreasuryModule is ITreasuryModule {
14
14
  mapping(NftId distributorNftId => DistributorSetup setup)
15
15
  private _distributorSetup;
16
16
  mapping(NftId poolNftId => PoolSetup setup) private _poolSetup;
17
+ mapping(NftId componentNftId => TokenHandler tokenHanlder) _tokenHandler;
17
18
 
18
19
  function registerProduct(
19
20
  NftId productNftId,
@@ -25,17 +26,23 @@ abstract contract TreasuryModule is ITreasuryModule {
25
26
  Fee memory processingFee
26
27
  ) external override // TODO add authz (only component module)
27
28
  {
28
- // TODO add validation
29
+ require(address(_tokenHandler[productNftId]) == address(0), "ERROR:TRS-010:TOKEN_HANDLER_ALREADY_REGISTERED");
30
+ require(address(_tokenHandler[poolNftId]) == address(0), "ERROR:TRS-011:TOKEN_HANDLER_ALREADY_REGISTERED");
31
+ require(address(_tokenHandler[distributorNftId]) == address(0), "ERROR:TRS-012:TOKEN_HANDLER_ALREADY_REGISTERED");
32
+ // TODO add additional validations
29
33
 
30
34
  // deploy product specific handler contract
31
35
  TokenHandler tokenHandler = new TokenHandler(productNftId, address(token));
36
+ _tokenHandler[productNftId] = tokenHandler;
37
+ _tokenHandler[poolNftId] = tokenHandler;
38
+ _tokenHandler[distributorNftId] = tokenHandler;
32
39
 
40
+ // create product setup
33
41
  _productSetup[productNftId] = ProductSetup(
34
42
  productNftId,
35
43
  distributorNftId,
36
44
  poolNftId,
37
45
  token,
38
- tokenHandler,
39
46
  wallet,
40
47
  policyFee,
41
48
  processingFee
@@ -94,9 +101,9 @@ abstract contract TreasuryModule is ITreasuryModule {
94
101
  }
95
102
 
96
103
  function getTokenHandler(
97
- NftId productNftId
104
+ NftId componentNftId
98
105
  ) external view override returns (TokenHandler tokenHandler) {
99
- return _productSetup[productNftId].tokenHandler;
106
+ return _tokenHandler[componentNftId];
100
107
  }
101
108
 
102
109
  function getProductSetup(
@@ -115,21 +122,18 @@ abstract contract TreasuryModule is ITreasuryModule {
115
122
  uint256 amount,
116
123
  Fee memory fee
117
124
  ) public pure override returns (uint256 feeAmount, uint256 netAmount) {
118
- UFixed fractionalAmount = UFixedMathLib.toUFixed(amount) *
119
- fee.fractionalFee;
120
- feeAmount = fractionalAmount.toInt() + fee.fixedFee;
121
- netAmount = amount - feeAmount;
125
+ return FeeLib.calculateFee(amount, fee);
122
126
  }
123
127
 
124
128
  function getFee(
125
129
  UFixed fractionalFee,
126
130
  uint256 fixedFee
127
131
  ) external pure override returns (Fee memory fee) {
128
- return toFee(fractionalFee, fixedFee);
132
+ return FeeLib.toFee(fractionalFee, fixedFee);
129
133
  }
130
134
 
131
135
  function getZeroFee() external pure override returns (Fee memory fee) {
132
- return zeroFee();
136
+ return FeeLib.zeroFee();
133
137
  }
134
138
 
135
139
  function getUFixed(
@@ -20,8 +20,8 @@ import {RoleId, PRODUCT_OWNER_ROLE, POOL_OWNER_ROLE, ORACLE_OWNER_ROLE} from "..
20
20
  import {ObjectType, PRODUCT, ORACLE, POOL} from "../../types/ObjectType.sol";
21
21
  import {StateId, ACTIVE, PAUSED} from "../../types/StateId.sol";
22
22
  import {NftId, NftIdLib, zeroNftId} from "../../types/NftId.sol";
23
- import {Fee, zeroFee} from "../../types/Fee.sol";
24
- import {Version, toVersion, toVersionPart} from "../../types/Version.sol";
23
+ import {Fee} from "../../types/Fee.sol";
24
+ import {Version, VersionLib} from "../../types/Version.sol";
25
25
 
26
26
  import {IProductComponent} from "../../components/IProductComponent.sol";
27
27
  import {ServiceBase} from "./ServiceBase.sol";
@@ -55,10 +55,7 @@ contract ComponentOwnerService is
55
55
  virtual override (IVersionable, Versionable)
56
56
  returns(Version)
57
57
  {
58
- return toVersion(
59
- toVersionPart(3),
60
- toVersionPart(0),
61
- toVersionPart(0));
58
+ return VersionLib.toVersion(3,0,0);
62
59
  }
63
60
 
64
61
  function getName() external pure override returns(string memory name) {
@@ -10,8 +10,8 @@ import {Versionable} from "../../shared/Versionable.sol";
10
10
 
11
11
  import {NftId, NftIdLib} from "../../types/NftId.sol";
12
12
  import {POOL, BUNDLE} from "../../types/ObjectType.sol";
13
- import {Fee, feeIsZero} from "../../types/Fee.sol";
14
- import {Version, toVersion, toVersionPart} from "../../types/Version.sol";
13
+ import {Fee} from "../../types/Fee.sol";
14
+ import {Version, VersionLib} from "../../types/Version.sol";
15
15
 
16
16
  import {ComponentServiceBase} from "./ComponentServiceBase.sol";
17
17
  import {IPoolService} from "./IPoolService.sol";
@@ -36,10 +36,7 @@ contract PoolService is ComponentServiceBase, IPoolService {
36
36
  virtual override (IVersionable, Versionable)
37
37
  returns(Version)
38
38
  {
39
- return toVersion(
40
- toVersionPart(3),
41
- toVersionPart(0),
42
- toVersionPart(0));
39
+ return VersionLib.toVersion(3,0,0);
43
40
  }
44
41
 
45
42
  function getName() external pure override returns(string memory name) {
@@ -59,7 +56,7 @@ contract PoolService is ComponentServiceBase, IPoolService {
59
56
 
60
57
  function createBundle(
61
58
  address owner,
62
- uint256 amount,
59
+ uint256 stakingAmount,
63
60
  uint256 lifetime,
64
61
  bytes calldata filter
65
62
  )
@@ -81,7 +78,7 @@ contract PoolService is ComponentServiceBase, IPoolService {
81
78
  instance.createBundleInfo(
82
79
  bundleNftId,
83
80
  poolNftId,
84
- amount,
81
+ stakingAmount,
85
82
  lifetime,
86
83
  filter);
87
84
 
@@ -89,10 +86,38 @@ contract PoolService is ComponentServiceBase, IPoolService {
89
86
  instance.addBundleToPool(
90
87
  bundleNftId,
91
88
  poolNftId,
92
- amount);
89
+ stakingAmount);
93
90
 
94
- // TODO collect capital
91
+ // collect capital
92
+ _processStakingByTreasury(
93
+ instance,
94
+ poolNftId,
95
+ bundleNftId,
96
+ stakingAmount);
95
97
 
96
98
  // TODO add logging
97
99
  }
100
+
101
+
102
+ function _processStakingByTreasury(
103
+ IInstance instance,
104
+ NftId poolNftId,
105
+ NftId bundleNftId,
106
+ uint256 stakingAmount
107
+ )
108
+ internal
109
+ {
110
+ // process token transfer(s)
111
+ if(stakingAmount > 0) {
112
+ TokenHandler tokenHandler = instance.getTokenHandler(poolNftId);
113
+ address bundleOwner = _registry.getOwner(bundleNftId);
114
+ address poolWallet = instance.getPoolSetup(poolNftId).wallet;
115
+
116
+ tokenHandler.transfer(
117
+ bundleOwner,
118
+ poolWallet,
119
+ stakingAmount
120
+ );
121
+ }
122
+ }
98
123
  }
@@ -19,8 +19,8 @@ import {ObjectType, INSTANCE, PRODUCT, POLICY} from "../../types/ObjectType.sol"
19
19
  import {APPLIED, UNDERWRITTEN, ACTIVE} from "../../types/StateId.sol";
20
20
  import {NftId, NftIdLib} from "../../types/NftId.sol";
21
21
  import {Blocknumber, blockNumber} from "../../types/Blocknumber.sol";
22
- import {Fee, feeIsZero} from "../../types/Fee.sol";
23
- import {Version, toVersion, toVersionPart} from "../../types/Version.sol";
22
+ import {Fee, FeeLib} from "../../types/Fee.sol";
23
+ import {Version, VersionLib} from "../../types/Version.sol";
24
24
 
25
25
  import {ComponentServiceBase} from "./ComponentServiceBase.sol";
26
26
  import {IProductService} from "./IProductService.sol";
@@ -47,10 +47,7 @@ contract ProductService is ComponentServiceBase, IProductService {
47
47
  virtual override (IVersionable, Versionable)
48
48
  returns(Version)
49
49
  {
50
- return toVersion(
51
- toVersionPart(3),
52
- toVersionPart(0),
53
- toVersionPart(0));
50
+ return VersionLib.toVersion(3,0,0);
54
51
  }
55
52
 
56
53
  function getName() external pure override returns(string memory name) {
@@ -329,13 +326,13 @@ contract ProductService is ComponentServiceBase, IProductService {
329
326
  {
330
327
  // process token transfer(s)
331
328
  if(premiumAmount > 0) {
332
- TokenHandler tokenHandler = product.tokenHandler;
329
+ TokenHandler tokenHandler = instance.getTokenHandler(product.productNftId);
333
330
  address policyOwner = _registry.getOwner(policyNftId);
334
331
  address poolWallet = instance.getPoolSetup(product.poolNftId).wallet;
335
332
  netPremiumAmount = premiumAmount;
336
333
  Fee memory policyFee = product.policyFee;
337
334
 
338
- if (feeIsZero(policyFee)) {
335
+ if (FeeLib.feeIsZero(policyFee)) {
339
336
  tokenHandler.transfer(
340
337
  policyOwner,
341
338
  poolWallet,
@@ -5,7 +5,7 @@ pragma solidity ^0.8.19;
5
5
  // import {ITreasury, ITreasuryModule, TokenHandler} from "../../instance/module/treasury/ITreasury.sol";
6
6
  import {NftId, zeroNftId} from "../../types/NftId.sol";
7
7
  import {ObjectType, SERVICE} from "../../types/ObjectType.sol";
8
- import {Version, VersionPart, toVersion, toVersionPart} from "../../types/Version.sol";
8
+ import {Version, VersionPart} from "../../types/Version.sol";
9
9
 
10
10
  import {Registerable} from "../../shared/Registerable.sol";
11
11
  import {IVersionable} from "../../shared/IVersionable.sol";
@@ -3,7 +3,7 @@ pragma solidity ^0.8.19;
3
3
 
4
4
  import {Blocknumber, blockNumber} from "../types/Blocknumber.sol";
5
5
  import {Timestamp, blockTimestamp} from "../types/Timestamp.sol";
6
- import {Version, VersionPart, zeroVersion} from "../types/Version.sol";
6
+ import {Version, VersionPart} from "../types/Version.sol";
7
7
 
8
8
  interface IVersionable {
9
9
 
@@ -11,8 +11,8 @@ interface IVersionable {
11
11
  Version version;
12
12
  address implementation;
13
13
  address activatedBy;
14
- Blocknumber activatedIn;
15
14
  Timestamp activatedAt;
15
+ Blocknumber activatedIn;
16
16
  }
17
17
 
18
18
  event LogVersionableActivated(Version version, address implementation, address activatedBy);