@etherisc/gif-next 0.0.2-f619be3-760 → 0.0.2-f72939c-683
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +114 -11
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
- package/artifacts/contracts/components/{Component.sol/Component.json → BaseComponent.sol/BaseComponent.json} +26 -57
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
- package/artifacts/contracts/{instance/component/IComponent.sol/IComponentContract.json → components/IBaseComponent.sol/IBaseComponent.json} +26 -57
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +356 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
- package/artifacts/contracts/components/{IPool.sol/IPoolComponent.json → IProductComponent.sol/IProductComponent.json} +89 -65
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +156 -29
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +74 -72
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1124 -598
- package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +4 -0
- package/artifacts/contracts/instance/{component/IComponent.sol → IInstanceLinked.sol}/IInstanceLinked.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +1424 -782
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/{component/ComponentModule.sol/ComponentModule.json → base/ComponentServiceBase.sol/ComponentServiceBase.json} +133 -132
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +81 -0
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +560 -0
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/{lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
- package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IService.sol/IService.json +300 -0
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +344 -0
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +710 -0
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
- package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.json +10 -0
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +300 -0
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{access → module/access}/Access.sol/AccessModule.json +85 -152
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccess.json +1 -1
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccessModule.json +96 -99
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +265 -0
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +4 -0
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.json +10 -0
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +265 -0
- package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +10 -0
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +4 -0
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.json +10 -0
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.json +10 -0
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +136 -0
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +4 -0
- package/artifacts/contracts/instance/{component → module/component}/IComponent.sol/IComponent.json +1 -1
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{product/IProductService.sol/IProductService.json → module/component/IComponent.sol/IComponentModule.json} +66 -57
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +4 -0
- package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicy.json +1 -1
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicyModule.json +145 -111
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{policy → module/policy}/PolicyModule.sol/PolicyModule.json +146 -112
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +4 -0
- package/artifacts/contracts/instance/{pool → module/pool}/IPoolModule.sol/IPool.json +1 -1
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{pool → module/pool}/IPoolModule.sol/IPoolModule.json +67 -52
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{pool → module/pool}/PoolModule.sol/PoolModule.json +51 -62
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.json +10 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +132 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +150 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
- package/artifacts/contracts/instance/{treasury → module/treasury}/ITreasury.sol/ITreasury.json +1 -1
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{treasury → module/treasury}/ITreasury.sol/ITreasuryModule.json +231 -190
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +4 -0
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +76 -0
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{treasury → module/treasury}/TreasuryModule.sol/TreasuryModule.json +232 -191
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +523 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +364 -0
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +376 -0
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +548 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +471 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +744 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +65 -2
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +147 -30
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +24 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +241 -25
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +35 -0
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +4 -0
- package/artifacts/contracts/{registry/IRegistry.sol → shared/IOwnable.sol}/IOwnable.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
- package/artifacts/contracts/{registry/IRegistry.sol → shared/IRegisterable.sol}/IRegisterable.json +16 -61
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +164 -0
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
- package/artifacts/contracts/{registry/Registry.sol → shared/Registerable.sol}/Registerable.json +16 -61
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +164 -0
- package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +4 -0
- package/artifacts/contracts/test/TestFee.sol/TestFee.json +119 -0
- package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +4 -0
- package/artifacts/contracts/test/TestPool.sol/TestPool.json +455 -0
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +4 -0
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +479 -0
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +4 -0
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +137 -0
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +4 -0
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +116 -0
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +4 -0
- package/artifacts/contracts/test/TestService.sol/TestService.json +379 -0
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +4 -0
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +338 -0
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +4 -0
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +218 -0
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +4 -0
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +206 -0
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
- package/artifacts/contracts/{mock → test}/Usdc.sol/USDC.json +3 -3
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +4 -0
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +10 -0
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
- package/artifacts/contracts/types/Fee.sol/FeeLib.json +218 -0
- package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
- package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +10 -0
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +64 -2
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +58 -58
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
- package/artifacts/contracts/types/Version.sol/VersionLib.json +139 -0
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +4 -0
- package/artifacts/contracts/types/Version.sol/VersionPartLib.json +30 -0
- package/contracts/components/BaseComponent.sol +94 -0
- package/contracts/components/IBaseComponent.sol +19 -0
- package/contracts/components/IPoolComponent.sol +57 -0
- package/contracts/components/{IProduct.sol → IProductComponent.sol} +9 -6
- package/contracts/components/Pool.sol +155 -16
- package/contracts/components/Product.sol +116 -24
- package/contracts/instance/IInstance.sol +37 -11
- package/contracts/instance/IInstanceLinked.sol +8 -0
- package/contracts/instance/Instance.sol +48 -49
- package/contracts/instance/base/ComponentServiceBase.sol +42 -0
- package/contracts/instance/base/IInstanceBase.sol +19 -0
- package/contracts/instance/base/IKeyValueStore.sol +50 -0
- package/contracts/instance/{lifecycle → base}/ILifecycle.sol +4 -21
- package/contracts/instance/base/IService.sol +15 -0
- package/contracts/instance/base/InstanceBase.sol +84 -0
- package/contracts/instance/base/KeyValueStore.sol +161 -0
- package/contracts/instance/base/Lifecycle.sol +100 -0
- package/contracts/instance/base/ModuleBase.sol +53 -0
- package/contracts/instance/base/ServiceBase.sol +37 -0
- package/contracts/instance/module/access/Access.sol +149 -0
- package/contracts/instance/module/access/IAccess.sol +53 -0
- package/contracts/instance/module/bundle/BundleModule.sol +135 -0
- package/contracts/instance/module/bundle/IBundle.sol +51 -0
- package/contracts/instance/module/compensation/CompensationModule.sol +17 -0
- package/contracts/instance/module/compensation/ICompensation.sol +10 -0
- package/contracts/instance/module/component/ComponentModule.sol +81 -0
- package/contracts/instance/module/component/IComponent.sol +29 -0
- package/contracts/instance/module/policy/IPolicy.sol +62 -0
- package/contracts/instance/module/policy/PolicyModule.sol +92 -0
- package/contracts/instance/module/pool/IPoolModule.sol +40 -0
- package/contracts/instance/module/pool/PoolModule.sol +90 -0
- package/contracts/instance/module/risk/IRisk.sol +27 -0
- package/contracts/instance/module/risk/RiskModule.sol +70 -0
- package/contracts/instance/module/treasury/ITreasury.sol +96 -0
- package/contracts/instance/module/treasury/TokenHandler.sol +48 -0
- package/contracts/instance/module/treasury/TreasuryModule.sol +171 -0
- package/contracts/instance/service/ComponentOwnerService.sol +155 -0
- package/contracts/instance/service/IComponentOwnerService.sol +22 -0
- package/contracts/instance/service/IPoolService.sol +30 -0
- package/contracts/instance/service/IProductService.sol +78 -0
- package/contracts/instance/service/PoolService.sol +129 -0
- package/contracts/instance/service/ProductService.sol +406 -0
- package/contracts/registry/ChainNft.sol +61 -37
- package/contracts/registry/IRegistry.sol +24 -34
- package/contracts/registry/IRegistryLinked.sol +8 -0
- package/contracts/registry/Registry.sol +284 -85
- package/contracts/shared/ERC165.sol +21 -0
- package/contracts/shared/IOwnable.sol +6 -0
- package/contracts/shared/IRegisterable.sol +24 -0
- package/contracts/shared/IVersionable.sol +52 -0
- package/contracts/shared/Registerable.sol +86 -0
- package/contracts/shared/Versionable.sol +89 -0
- package/contracts/test/TestFee.sol +25 -0
- package/contracts/test/TestPool.sol +24 -0
- package/contracts/test/TestProduct.sol +66 -0
- package/contracts/test/TestRegisterable.sol +19 -0
- package/contracts/test/TestRoleId.sol +14 -0
- package/contracts/test/TestService.sol +32 -0
- package/contracts/{mock/Dip.sol → test/TestToken.sol} +5 -5
- package/contracts/test/TestVersion.sol +44 -0
- package/contracts/test/TestVersionable.sol +17 -0
- package/contracts/{mock → test}/Usdc.sol +1 -1
- package/contracts/types/AddressSet.sol +58 -0
- package/contracts/types/Fee.sol +39 -20
- package/contracts/types/Key32.sol +45 -0
- package/contracts/types/NftId.sol +22 -1
- package/contracts/types/NftIdSet.sol +60 -0
- package/contracts/types/ObjectType.sol +33 -13
- package/contracts/types/RiskId.sol +43 -0
- package/contracts/types/RoleId.sol +38 -0
- package/contracts/types/StateId.sol +13 -3
- package/contracts/types/Timestamp.sol +22 -1
- package/contracts/types/UFixed.sol +12 -13
- package/contracts/types/Version.sol +95 -0
- package/package.json +8 -3
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
- package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +0 -4
- package/artifacts/contracts/components/Component.sol/InstanceLinked.json +0 -35
- package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -74
- package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +0 -4
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +0 -4
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +0 -35
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +0 -4
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +0 -50
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -202
- package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +0 -217
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -141
- package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
- package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +0 -4
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
- package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
- package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +0 -4
- package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +0 -75
- package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +0 -4
- package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +0 -4
- package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +0 -75
- package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +0 -4
- package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +0 -196
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
- package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
- package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +0 -45
- package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
- package/artifacts/contracts/mock/Dip.sol/DIP.dbg.json +0 -4
- package/artifacts/contracts/mock/Dip.sol/DIP.json +0 -338
- package/artifacts/contracts/mock/TestPool.sol/TestPool.dbg.json +0 -4
- package/artifacts/contracts/mock/TestPool.sol/TestPool.json +0 -294
- package/artifacts/contracts/mock/TestProduct.sol/TestProduct.dbg.json +0 -4
- package/artifacts/contracts/mock/TestProduct.sol/TestProduct.json +0 -384
- package/artifacts/contracts/mock/Usdc.sol/USDC.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +0 -49
- package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +0 -4
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +0 -4
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
- package/contracts/components/Component.sol +0 -77
- package/contracts/components/IPool.sol +0 -15
- package/contracts/instance/access/Access.sol +0 -165
- package/contracts/instance/access/IAccess.sol +0 -63
- package/contracts/instance/component/ComponentModule.sol +0 -274
- package/contracts/instance/component/IComponent.sol +0 -74
- package/contracts/instance/lifecycle/LifecycleModule.sol +0 -88
- package/contracts/instance/policy/IPolicy.sol +0 -50
- package/contracts/instance/policy/PolicyModule.sol +0 -114
- package/contracts/instance/pool/IPoolModule.sol +0 -23
- package/contracts/instance/pool/PoolModule.sol +0 -81
- package/contracts/instance/product/IProductService.sol +0 -36
- package/contracts/instance/product/ProductService.sol +0 -136
- package/contracts/instance/treasury/ITreasury.sol +0 -91
- package/contracts/instance/treasury/TokenHandler.sol +0 -24
- package/contracts/instance/treasury/TreasuryModule.sol +0 -168
- package/contracts/mock/TestPool.sol +0 -16
- package/contracts/mock/TestProduct.sol +0 -39
@@ -217,17 +217,17 @@
|
|
217
217
|
"type": "uint256"
|
218
218
|
},
|
219
219
|
{
|
220
|
-
"internalType": "
|
221
|
-
"name": "
|
222
|
-
"type": "
|
220
|
+
"internalType": "UFixed",
|
221
|
+
"name": "b",
|
222
|
+
"type": "uint256"
|
223
223
|
}
|
224
224
|
],
|
225
|
-
"name": "
|
225
|
+
"name": "gt",
|
226
226
|
"outputs": [
|
227
227
|
{
|
228
|
-
"internalType": "
|
229
|
-
"name": "",
|
230
|
-
"type": "
|
228
|
+
"internalType": "bool",
|
229
|
+
"name": "isGreaterThan",
|
230
|
+
"type": "bool"
|
231
231
|
}
|
232
232
|
],
|
233
233
|
"stateMutability": "pure",
|
@@ -239,14 +239,19 @@
|
|
239
239
|
"internalType": "UFixed",
|
240
240
|
"name": "a",
|
241
241
|
"type": "uint256"
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"internalType": "UFixed",
|
245
|
+
"name": "b",
|
246
|
+
"type": "uint256"
|
242
247
|
}
|
243
248
|
],
|
244
|
-
"name": "
|
249
|
+
"name": "gte",
|
245
250
|
"outputs": [
|
246
251
|
{
|
247
|
-
"internalType": "
|
248
|
-
"name": "",
|
249
|
-
"type": "
|
252
|
+
"internalType": "bool",
|
253
|
+
"name": "isGreaterThan",
|
254
|
+
"type": "bool"
|
250
255
|
}
|
251
256
|
],
|
252
257
|
"stateMutability": "pure",
|
@@ -258,18 +263,13 @@
|
|
258
263
|
"internalType": "UFixed",
|
259
264
|
"name": "a",
|
260
265
|
"type": "uint256"
|
261
|
-
},
|
262
|
-
{
|
263
|
-
"internalType": "UFixed",
|
264
|
-
"name": "b",
|
265
|
-
"type": "uint256"
|
266
266
|
}
|
267
267
|
],
|
268
|
-
"name": "
|
268
|
+
"name": "gtz",
|
269
269
|
"outputs": [
|
270
270
|
{
|
271
271
|
"internalType": "bool",
|
272
|
-
"name": "
|
272
|
+
"name": "isZero",
|
273
273
|
"type": "bool"
|
274
274
|
}
|
275
275
|
],
|
@@ -289,7 +289,7 @@
|
|
289
289
|
"type": "uint256"
|
290
290
|
}
|
291
291
|
],
|
292
|
-
"name": "
|
292
|
+
"name": "lt",
|
293
293
|
"outputs": [
|
294
294
|
{
|
295
295
|
"internalType": "bool",
|
@@ -306,13 +306,18 @@
|
|
306
306
|
"internalType": "UFixed",
|
307
307
|
"name": "a",
|
308
308
|
"type": "uint256"
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"internalType": "UFixed",
|
312
|
+
"name": "b",
|
313
|
+
"type": "uint256"
|
309
314
|
}
|
310
315
|
],
|
311
|
-
"name": "
|
316
|
+
"name": "lte",
|
312
317
|
"outputs": [
|
313
318
|
{
|
314
319
|
"internalType": "bool",
|
315
|
-
"name": "
|
320
|
+
"name": "isGreaterThan",
|
316
321
|
"type": "bool"
|
317
322
|
}
|
318
323
|
],
|
@@ -322,12 +327,17 @@
|
|
322
327
|
{
|
323
328
|
"inputs": [
|
324
329
|
{
|
325
|
-
"internalType": "
|
330
|
+
"internalType": "UFixed",
|
326
331
|
"name": "a",
|
327
332
|
"type": "uint256"
|
333
|
+
},
|
334
|
+
{
|
335
|
+
"internalType": "UFixed",
|
336
|
+
"name": "b",
|
337
|
+
"type": "uint256"
|
328
338
|
}
|
329
339
|
],
|
330
|
-
"name": "
|
340
|
+
"name": "mul",
|
331
341
|
"outputs": [
|
332
342
|
{
|
333
343
|
"internalType": "UFixed",
|
@@ -341,17 +351,17 @@
|
|
341
351
|
{
|
342
352
|
"inputs": [
|
343
353
|
{
|
344
|
-
"internalType": "
|
354
|
+
"internalType": "UFixed",
|
345
355
|
"name": "a",
|
346
356
|
"type": "uint256"
|
347
357
|
},
|
348
358
|
{
|
349
|
-
"internalType": "
|
350
|
-
"name": "
|
351
|
-
"type": "
|
359
|
+
"internalType": "UFixed",
|
360
|
+
"name": "b",
|
361
|
+
"type": "uint256"
|
352
362
|
}
|
353
363
|
],
|
354
|
-
"name": "
|
364
|
+
"name": "sub",
|
355
365
|
"outputs": [
|
356
366
|
{
|
357
367
|
"internalType": "UFixed",
|
@@ -368,19 +378,14 @@
|
|
368
378
|
"internalType": "UFixed",
|
369
379
|
"name": "a",
|
370
380
|
"type": "uint256"
|
371
|
-
},
|
372
|
-
{
|
373
|
-
"internalType": "UFixed",
|
374
|
-
"name": "b",
|
375
|
-
"type": "uint256"
|
376
381
|
}
|
377
382
|
],
|
378
|
-
"name": "
|
383
|
+
"name": "toInt",
|
379
384
|
"outputs": [
|
380
385
|
{
|
381
|
-
"internalType": "
|
382
|
-
"name": "
|
383
|
-
"type": "
|
386
|
+
"internalType": "uint256",
|
387
|
+
"name": "",
|
388
|
+
"type": "uint256"
|
384
389
|
}
|
385
390
|
],
|
386
391
|
"stateMutability": "pure",
|
@@ -394,17 +399,17 @@
|
|
394
399
|
"type": "uint256"
|
395
400
|
},
|
396
401
|
{
|
397
|
-
"internalType": "
|
398
|
-
"name": "
|
399
|
-
"type": "
|
402
|
+
"internalType": "uint8",
|
403
|
+
"name": "rounding",
|
404
|
+
"type": "uint8"
|
400
405
|
}
|
401
406
|
],
|
402
|
-
"name": "
|
407
|
+
"name": "toIntWithRounding",
|
403
408
|
"outputs": [
|
404
409
|
{
|
405
|
-
"internalType": "
|
406
|
-
"name": "
|
407
|
-
"type": "
|
410
|
+
"internalType": "uint256",
|
411
|
+
"name": "",
|
412
|
+
"type": "uint256"
|
408
413
|
}
|
409
414
|
],
|
410
415
|
"stateMutability": "pure",
|
@@ -413,17 +418,17 @@
|
|
413
418
|
{
|
414
419
|
"inputs": [
|
415
420
|
{
|
416
|
-
"internalType": "
|
421
|
+
"internalType": "uint256",
|
417
422
|
"name": "a",
|
418
423
|
"type": "uint256"
|
419
424
|
},
|
420
425
|
{
|
421
|
-
"internalType": "
|
422
|
-
"name": "
|
423
|
-
"type": "
|
426
|
+
"internalType": "int8",
|
427
|
+
"name": "exp",
|
428
|
+
"type": "int8"
|
424
429
|
}
|
425
430
|
],
|
426
|
-
"name": "
|
431
|
+
"name": "toUFixed",
|
427
432
|
"outputs": [
|
428
433
|
{
|
429
434
|
"internalType": "UFixed",
|
@@ -437,17 +442,12 @@
|
|
437
442
|
{
|
438
443
|
"inputs": [
|
439
444
|
{
|
440
|
-
"internalType": "
|
445
|
+
"internalType": "uint256",
|
441
446
|
"name": "a",
|
442
447
|
"type": "uint256"
|
443
|
-
},
|
444
|
-
{
|
445
|
-
"internalType": "UFixed",
|
446
|
-
"name": "b",
|
447
|
-
"type": "uint256"
|
448
448
|
}
|
449
449
|
],
|
450
|
-
"name": "
|
450
|
+
"name": "toUFixed",
|
451
451
|
"outputs": [
|
452
452
|
{
|
453
453
|
"internalType": "UFixed",
|
@@ -472,8 +472,8 @@
|
|
472
472
|
"type": "function"
|
473
473
|
}
|
474
474
|
],
|
475
|
-
"bytecode": "
|
476
|
-
"deployedBytecode": "
|
475
|
+
"bytecode": "0x610a2a61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106101625760003560e01c80637a858b97116100cd578063bc1b392d11610086578063bc1b392d146102c7578063bdbb4630146102ce578063c8a4ac9c146102d5578063cc8b7b73146102e8578063ea6515c4146102fb578063eb646d711461030e57600080fd5b80637a858b971461025f57806389fa8ed71461027257806393aa872514610287578063a391c15b1461028e578063b4773329146102a1578063b67d77c5146102b457600080fd5b8063313ce5671161011f578063313ce567146101f957806332148d731461020057806344aa68361461021357806345ebb61e14610226578063753b14a514610239578063771602f71461024c57600080fd5b8063059f8b161461016757806308c76ec414610182578063118fc88c146101955780631488c845146101b85780631a12cd47146101cb57806321e5749b146101e6575b600080fd5b61016f610316565b6040519081526020015b60405180910390f35b61016f610190366004610797565b610325565b6101a86101a33660046107cd565b6103ad565b6040519015158152602001610179565b61016f6101c63660046107ef565b6103ba565b6101d3601281565b60405160009190910b8152602001610179565b6101a86101f43660046107cd565b61049c565b601261016f565b6101a861020e3660046107cd565b6104a6565b61016f61022136600461081a565b6104b0565b61016f61023436600461081a565b6104bd565b6101a861024736600461081a565b6104d5565b61016f61025a3660046107cd565b6104de565b6101a861026d36600461081a565b6104ea565b60025b60405160ff9091168152602001610179565b6000610275565b61016f61029c3660046107cd565b6104f4565b6101a86102af3660046107cd565b610500565b61016f6102c23660046107cd565b61050b565b600061016f565b6001610275565b61016f6102e33660046107cd565b610517565b61016f6102f63660046107cd565b610523565b6101a86103093660046107cd565b61052f565b61016f61053a565b6103226012600a61092d565b81565b600060011960ff8316016103745761036d60026103446012600a61092d565b61034e919061094f565b6103589085610971565b60016103666012600a61092d565b6000610552565b90506103a7565b60ff821661038e5761036d8360016103666012600a61092d565b61036d8360016103a06012600a61092d565b6001610552565b92915050565b60008282115b9392505050565b6000806103c8836012610984565b60000b121561041e5760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c0060448201526064015b60405180910390fd5b604061042b836012610984565b60000b131561047c5760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c41524745006044820152606401610415565b610487826012610984565b61049290600a6109a5565b6103b390846109b4565b60008282106103b3565b60008183146103b3565b60006103a7826002610325565b60006104cb6012600a61092d565b6103a790836109b4565b600081156103a7565b60006103b383836105af565b60008115156103a7565b60006103b383836105bb565b6000828211156103b3565b60006103b3838361061f565b60006103b3838361067b565b60006103b38383610690565b6000828210156103b3565b60026105486012600a61092d565b610322919061094f565b6000806105608686866106ae565b90506001836002811115610576576105766109cb565b14801561059357506000848061058e5761058e610939565b868809115b156105a6576105a3600182610971565b90505b95945050505050565b60006103b38284610971565b600080821161060c5760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a55464d2d3032303a44495649534f525f5a45524f0000000000006044820152606401610415565b6103b383670de0b6b3a7640000846106ae565b6000828211156106715760405162461bcd60e51b815260206004820152601d60248201527f4552524f523a55464d2d3031303a4e454741544956455f524553554c540000006044820152606401610415565b6103b382846109e1565b60006103b38383670de0b6b3a76400006106ae565b6000828210156106a45761036d838361061f565b6103b3828461061f565b60008080600019858709858702925082811083820303915050806000036106e8578382816106de576106de610939565b04925050506103b3565b80841161072f5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401610415565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b600080604083850312156107aa57600080fd5b82359150602083013560ff811681146107c257600080fd5b809150509250929050565b600080604083850312156107e057600080fd5b50508035926020909101359150565b6000806040838503121561080257600080fd5b8235915060208301358060000b81146107c257600080fd5b60006020828403121561082c57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561088457816000190482111561086a5761086a610833565b8085161561087757918102915b93841c939080029061084e565b509250929050565b60008261089b575060016103a7565b816108a8575060006103a7565b81600181146108be57600281146108c8576108e4565b60019150506103a7565b60ff8411156108d9576108d9610833565b50506001821b6103a7565b5060208310610133831016604e8410600b8410161715610907575081810a6103a7565b6109118383610849565b806000190482111561092557610925610833565b029392505050565b60006103b3838361088c565b634e487b7160e01b600052601260045260246000fd5b60008261096c57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156103a7576103a7610833565b600081810b9083900b01607f8113607f19821217156103a7576103a7610833565b60006103b360ff84168361088c565b80820281158282048414176103a7576103a7610833565b634e487b7160e01b600052602160045260246000fd5b818103818111156103a7576103a761083356fea2646970667358221220fb084aab1469254041156892d0f0d9cc43b94e6c38b151c477083dab1d1e70aa64736f6c63430008140033",
|
476
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106101625760003560e01c80637a858b97116100cd578063bc1b392d11610086578063bc1b392d146102c7578063bdbb4630146102ce578063c8a4ac9c146102d5578063cc8b7b73146102e8578063ea6515c4146102fb578063eb646d711461030e57600080fd5b80637a858b971461025f57806389fa8ed71461027257806393aa872514610287578063a391c15b1461028e578063b4773329146102a1578063b67d77c5146102b457600080fd5b8063313ce5671161011f578063313ce567146101f957806332148d731461020057806344aa68361461021357806345ebb61e14610226578063753b14a514610239578063771602f71461024c57600080fd5b8063059f8b161461016757806308c76ec414610182578063118fc88c146101955780631488c845146101b85780631a12cd47146101cb57806321e5749b146101e6575b600080fd5b61016f610316565b6040519081526020015b60405180910390f35b61016f610190366004610797565b610325565b6101a86101a33660046107cd565b6103ad565b6040519015158152602001610179565b61016f6101c63660046107ef565b6103ba565b6101d3601281565b60405160009190910b8152602001610179565b6101a86101f43660046107cd565b61049c565b601261016f565b6101a861020e3660046107cd565b6104a6565b61016f61022136600461081a565b6104b0565b61016f61023436600461081a565b6104bd565b6101a861024736600461081a565b6104d5565b61016f61025a3660046107cd565b6104de565b6101a861026d36600461081a565b6104ea565b60025b60405160ff9091168152602001610179565b6000610275565b61016f61029c3660046107cd565b6104f4565b6101a86102af3660046107cd565b610500565b61016f6102c23660046107cd565b61050b565b600061016f565b6001610275565b61016f6102e33660046107cd565b610517565b61016f6102f63660046107cd565b610523565b6101a86103093660046107cd565b61052f565b61016f61053a565b6103226012600a61092d565b81565b600060011960ff8316016103745761036d60026103446012600a61092d565b61034e919061094f565b6103589085610971565b60016103666012600a61092d565b6000610552565b90506103a7565b60ff821661038e5761036d8360016103666012600a61092d565b61036d8360016103a06012600a61092d565b6001610552565b92915050565b60008282115b9392505050565b6000806103c8836012610984565b60000b121561041e5760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c0060448201526064015b60405180910390fd5b604061042b836012610984565b60000b131561047c5760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c41524745006044820152606401610415565b610487826012610984565b61049290600a6109a5565b6103b390846109b4565b60008282106103b3565b60008183146103b3565b60006103a7826002610325565b60006104cb6012600a61092d565b6103a790836109b4565b600081156103a7565b60006103b383836105af565b60008115156103a7565b60006103b383836105bb565b6000828211156103b3565b60006103b3838361061f565b60006103b3838361067b565b60006103b38383610690565b6000828210156103b3565b60026105486012600a61092d565b610322919061094f565b6000806105608686866106ae565b90506001836002811115610576576105766109cb565b14801561059357506000848061058e5761058e610939565b868809115b156105a6576105a3600182610971565b90505b95945050505050565b60006103b38284610971565b600080821161060c5760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a55464d2d3032303a44495649534f525f5a45524f0000000000006044820152606401610415565b6103b383670de0b6b3a7640000846106ae565b6000828211156106715760405162461bcd60e51b815260206004820152601d60248201527f4552524f523a55464d2d3031303a4e454741544956455f524553554c540000006044820152606401610415565b6103b382846109e1565b60006103b38383670de0b6b3a76400006106ae565b6000828210156106a45761036d838361061f565b6103b3828461061f565b60008080600019858709858702925082811083820303915050806000036106e8578382816106de576106de610939565b04925050506103b3565b80841161072f5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401610415565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b600080604083850312156107aa57600080fd5b82359150602083013560ff811681146107c257600080fd5b809150509250929050565b600080604083850312156107e057600080fd5b50508035926020909101359150565b6000806040838503121561080257600080fd5b8235915060208301358060000b81146107c257600080fd5b60006020828403121561082c57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561088457816000190482111561086a5761086a610833565b8085161561087757918102915b93841c939080029061084e565b509250929050565b60008261089b575060016103a7565b816108a8575060006103a7565b81600181146108be57600281146108c8576108e4565b60019150506103a7565b60ff8411156108d9576108d9610833565b50506001821b6103a7565b5060208310610133831016604e8410600b8410161715610907575081810a6103a7565b6109118383610849565b806000190482111561092557610925610833565b029392505050565b60006103b3838361088c565b634e487b7160e01b600052601260045260246000fd5b60008261096c57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156103a7576103a7610833565b600081810b9083900b01607f8113607f19821217156103a7576103a7610833565b60006103b360ff84168361088c565b80820281158282048414176103a7576103a7610833565b634e487b7160e01b600052602160045260246000fd5b818103818111156103a7576103a761083356fea2646970667358221220fb084aab1469254041156892d0f0d9cc43b94e6c38b151c477083dab1d1e70aa64736f6c63430008140033",
|
477
477
|
"linkReferences": {},
|
478
478
|
"deployedLinkReferences": {}
|
479
479
|
}
|
@@ -0,0 +1,139 @@
|
|
1
|
+
{
|
2
|
+
"_format": "hh-sol-artifact-1",
|
3
|
+
"contractName": "VersionLib",
|
4
|
+
"sourceName": "contracts/types/Version.sol",
|
5
|
+
"abi": [
|
6
|
+
{
|
7
|
+
"inputs": [
|
8
|
+
{
|
9
|
+
"internalType": "Version",
|
10
|
+
"name": "version",
|
11
|
+
"type": "uint24"
|
12
|
+
}
|
13
|
+
],
|
14
|
+
"name": "toInt",
|
15
|
+
"outputs": [
|
16
|
+
{
|
17
|
+
"internalType": "uint256",
|
18
|
+
"name": "",
|
19
|
+
"type": "uint256"
|
20
|
+
}
|
21
|
+
],
|
22
|
+
"stateMutability": "pure",
|
23
|
+
"type": "function"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"inputs": [
|
27
|
+
{
|
28
|
+
"internalType": "Version",
|
29
|
+
"name": "version",
|
30
|
+
"type": "uint24"
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"name": "toMajorPart",
|
34
|
+
"outputs": [
|
35
|
+
{
|
36
|
+
"internalType": "VersionPart",
|
37
|
+
"name": "major",
|
38
|
+
"type": "uint8"
|
39
|
+
}
|
40
|
+
],
|
41
|
+
"stateMutability": "pure",
|
42
|
+
"type": "function"
|
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
|
+
},
|
92
|
+
{
|
93
|
+
"inputs": [
|
94
|
+
{
|
95
|
+
"internalType": "Version",
|
96
|
+
"name": "version",
|
97
|
+
"type": "uint24"
|
98
|
+
}
|
99
|
+
],
|
100
|
+
"name": "toVersionParts",
|
101
|
+
"outputs": [
|
102
|
+
{
|
103
|
+
"internalType": "VersionPart",
|
104
|
+
"name": "major",
|
105
|
+
"type": "uint8"
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"internalType": "VersionPart",
|
109
|
+
"name": "minor",
|
110
|
+
"type": "uint8"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"internalType": "VersionPart",
|
114
|
+
"name": "patch",
|
115
|
+
"type": "uint8"
|
116
|
+
}
|
117
|
+
],
|
118
|
+
"stateMutability": "pure",
|
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"
|
133
|
+
}
|
134
|
+
],
|
135
|
+
"bytecode": "0x61030c61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806304b8f6c5146100715780632efe01131461008d57806349a7111a146100a057806355601007146100d75780638e4ad86c146100fb578063c9e66e291461011e575b600080fd5b60005b60405162ffffff90911681526020015b60405180910390f35b61007461009b366004610213565b610135565b6100b36100ae36600461023f565b6101d6565b6040805160ff94851681529284166020840152921691810191909152606001610084565b6100ed6100e536600461023f565b62ffffff1690565b604051908152602001610084565b61010c61010936600461026b565b90565b60405160ff9091168152602001610084565b61010c61012c36600461023f565b60101c60ff1690565b600061010084108015610149575061010083105b8015610156575061010082105b6101b15760405162461bcd60e51b815260206004820152602260248201527f4552524f523a5652532d3031303a56455253494f4e5f504152545f544f4f5f42604482015261494760f01b606482015260840160405180910390fd5b816101c4600885901b601087901b61029a565b6101ce919061029a565b949350505050565b600080808360ff601082901c166101ed83836102b3565b915061ffff600883901c16600061020481856102b3565b92989197509195509350505050565b60008060006060848603121561022857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561025157600080fd5b813562ffffff8116811461026457600080fd5b9392505050565b60006020828403121561027d57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102ad576102ad610284565b92915050565b62ffffff8281168282160390808211156102cf576102cf610284565b509291505056fea2646970667358221220ba37649b9b622a7a14f84638f29a11cfa2b93f381baaceb770e1fea23e6fae7964736f6c63430008140033",
|
136
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806304b8f6c5146100715780632efe01131461008d57806349a7111a146100a057806355601007146100d75780638e4ad86c146100fb578063c9e66e291461011e575b600080fd5b60005b60405162ffffff90911681526020015b60405180910390f35b61007461009b366004610213565b610135565b6100b36100ae36600461023f565b6101d6565b6040805160ff94851681529284166020840152921691810191909152606001610084565b6100ed6100e536600461023f565b62ffffff1690565b604051908152602001610084565b61010c61010936600461026b565b90565b60405160ff9091168152602001610084565b61010c61012c36600461023f565b60101c60ff1690565b600061010084108015610149575061010083105b8015610156575061010082105b6101b15760405162461bcd60e51b815260206004820152602260248201527f4552524f523a5652532d3031303a56455253494f4e5f504152545f544f4f5f42604482015261494760f01b606482015260840160405180910390fd5b816101c4600885901b601087901b61029a565b6101ce919061029a565b949350505050565b600080808360ff601082901c166101ed83836102b3565b915061ffff600883901c16600061020481856102b3565b92989197509195509350505050565b60008060006060848603121561022857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561025157600080fd5b813562ffffff8116811461026457600080fd5b9392505050565b60006020828403121561027d57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102ad576102ad610284565b92915050565b62ffffff8281168282160390808211156102cf576102cf610284565b509291505056fea2646970667358221220ba37649b9b622a7a14f84638f29a11cfa2b93f381baaceb770e1fea23e6fae7964736f6c63430008140033",
|
137
|
+
"linkReferences": {},
|
138
|
+
"deployedLinkReferences": {}
|
139
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"_format": "hh-sol-artifact-1",
|
3
|
+
"contractName": "VersionPartLib",
|
4
|
+
"sourceName": "contracts/types/Version.sol",
|
5
|
+
"abi": [
|
6
|
+
{
|
7
|
+
"inputs": [
|
8
|
+
{
|
9
|
+
"internalType": "VersionPart",
|
10
|
+
"name": "x",
|
11
|
+
"type": "uint8"
|
12
|
+
}
|
13
|
+
],
|
14
|
+
"name": "toInt",
|
15
|
+
"outputs": [
|
16
|
+
{
|
17
|
+
"internalType": "uint256",
|
18
|
+
"name": "",
|
19
|
+
"type": "uint256"
|
20
|
+
}
|
21
|
+
],
|
22
|
+
"stateMutability": "pure",
|
23
|
+
"type": "function"
|
24
|
+
}
|
25
|
+
],
|
26
|
+
"bytecode": "0x60b9610039600b82828239805160001a60731461002c57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063ac43d834146038575b600080fd5b60496043366004605b565b60ff1690565b60405190815260200160405180910390f35b600060208284031215606c57600080fd5b813560ff81168114607c57600080fd5b939250505056fea2646970667358221220f9eff042249ef4290a2228b4a1d7046915ad93d6defe14b8c405ef07df444fa264736f6c63430008140033",
|
27
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063ac43d834146038575b600080fd5b60496043366004605b565b60ff1690565b60405190815260200160405180910390f35b600060208284031215606c57600080fd5b813560ff81168114607c57600080fd5b939250505056fea2646970667358221220f9eff042249ef4290a2228b4a1d7046915ad93d6defe14b8c405ef07df444fa264736f6c63430008140033",
|
28
|
+
"linkReferences": {},
|
29
|
+
"deployedLinkReferences": {}
|
30
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
5
|
+
|
6
|
+
import {IRegisterable} from "../shared/IRegisterable.sol";
|
7
|
+
import {Registerable} from "../shared/Registerable.sol";
|
8
|
+
|
9
|
+
import {IRegistry} from "../registry/IRegistry.sol";
|
10
|
+
import {IInstance} from "../instance/IInstance.sol";
|
11
|
+
|
12
|
+
import {IInstance} from "../instance/IInstance.sol";
|
13
|
+
import {IComponent, IComponentModule} from "../instance/module/component/IComponent.sol";
|
14
|
+
import {IComponentOwnerService} from "../instance/service/IComponentOwnerService.sol";
|
15
|
+
import {IBaseComponent} from "./IBaseComponent.sol";
|
16
|
+
import {Fee, FeeLib} from "../types/Fee.sol";
|
17
|
+
import {NftId} from "../types/NftId.sol";
|
18
|
+
|
19
|
+
abstract contract BaseComponent is
|
20
|
+
Registerable,
|
21
|
+
IBaseComponent
|
22
|
+
{
|
23
|
+
IComponentOwnerService internal _componentOwnerService;
|
24
|
+
|
25
|
+
address internal _deployer;
|
26
|
+
address internal _wallet;
|
27
|
+
IERC20Metadata internal _token;
|
28
|
+
IInstance internal _instance;
|
29
|
+
bool internal _isRegistered;
|
30
|
+
Fee internal _zeroFee;
|
31
|
+
|
32
|
+
constructor(
|
33
|
+
address registry,
|
34
|
+
NftId instanceNftId,
|
35
|
+
address token
|
36
|
+
)
|
37
|
+
Registerable(registry, instanceNftId)
|
38
|
+
{
|
39
|
+
IRegistry.ObjectInfo memory instanceInfo = _registry.getObjectInfo(instanceNftId);
|
40
|
+
_instance = IInstance(instanceInfo.objectAddress);
|
41
|
+
require(
|
42
|
+
_instance.supportsInterface(type(IInstance).interfaceId),
|
43
|
+
""
|
44
|
+
);
|
45
|
+
|
46
|
+
_componentOwnerService = _instance.getComponentOwnerService();
|
47
|
+
_wallet = address(this);
|
48
|
+
_token = IERC20Metadata(token);
|
49
|
+
_isRegistered = false;
|
50
|
+
_zeroFee = FeeLib.zeroFee();
|
51
|
+
}
|
52
|
+
|
53
|
+
// from registerable
|
54
|
+
function register() public override(IRegisterable, Registerable) returns (NftId componentId) {
|
55
|
+
require(msg.sender == getOwner(), "");
|
56
|
+
require(
|
57
|
+
address(_registry) != address(0),
|
58
|
+
"ERROR:COB-001:REGISTRY_ZERO"
|
59
|
+
);
|
60
|
+
require(
|
61
|
+
_registry.isRegistered(address(_instance)),
|
62
|
+
"ERROR:COB:INSTANCE_NOT_REGISTERED"
|
63
|
+
);
|
64
|
+
|
65
|
+
_isRegistered = true;
|
66
|
+
return _componentOwnerService.register(this);
|
67
|
+
}
|
68
|
+
|
69
|
+
// from component contract
|
70
|
+
function lock() external onlyOwner override {
|
71
|
+
_componentOwnerService.lock(this);
|
72
|
+
}
|
73
|
+
|
74
|
+
function unlock() external onlyOwner override {
|
75
|
+
_componentOwnerService.unlock(this);
|
76
|
+
}
|
77
|
+
|
78
|
+
function getWallet()
|
79
|
+
external
|
80
|
+
view
|
81
|
+
override
|
82
|
+
returns (address walletAddress)
|
83
|
+
{
|
84
|
+
return _wallet;
|
85
|
+
}
|
86
|
+
|
87
|
+
function getToken() external view override returns (IERC20Metadata token) {
|
88
|
+
return _token;
|
89
|
+
}
|
90
|
+
|
91
|
+
function getInstance() external view override returns (IInstance instance) {
|
92
|
+
return _instance;
|
93
|
+
}
|
94
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
5
|
+
|
6
|
+
import {IRegisterable} from "../shared/IRegisterable.sol";
|
7
|
+
import {IInstanceLinked} from "../instance/IInstanceLinked.sol";
|
8
|
+
|
9
|
+
interface IBaseComponent is IRegisterable, IInstanceLinked {
|
10
|
+
|
11
|
+
function lock() external;
|
12
|
+
|
13
|
+
function unlock() external;
|
14
|
+
|
15
|
+
function getToken() external view returns (IERC20Metadata token);
|
16
|
+
|
17
|
+
function getWallet() external view returns (address walletAddress);
|
18
|
+
|
19
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
import {NftId} from "../types/NftId.sol";
|
5
|
+
import {Fee} from "../types/Fee.sol";
|
6
|
+
import {UFixed} from "../types/UFixed.sol";
|
7
|
+
import {IBaseComponent} from "./IBaseComponent.sol";
|
8
|
+
|
9
|
+
interface IPoolComponent is IBaseComponent {
|
10
|
+
|
11
|
+
event LogUnderwrittenByPool(NftId policyNftId, uint256 collateralizationAmount, address pool);
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @dev creates a new bundle for this pool.
|
15
|
+
*/
|
16
|
+
function createBundle(
|
17
|
+
uint256 initialAmount,
|
18
|
+
uint256 lifetime,
|
19
|
+
bytes memory filter
|
20
|
+
) external returns(NftId bundleNftId);
|
21
|
+
|
22
|
+
/**
|
23
|
+
* @dev this is a callback function that is called by the product service when underwriting a policy.
|
24
|
+
* the pool has the option to check the details and object to underwriting by reverting.
|
25
|
+
* the function is only called for "active" pools that ask to be involved/notified
|
26
|
+
* by product related state changes.
|
27
|
+
*/
|
28
|
+
function underwrite(
|
29
|
+
NftId policyNftId,
|
30
|
+
bytes memory policyData,
|
31
|
+
bytes memory bundleFilter,
|
32
|
+
uint256 collateralizationAmount
|
33
|
+
) external;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @dev returns true iff the policy application data in policyData matches
|
37
|
+
* with the bundle filter criteria encoded in bundleFilter.
|
38
|
+
*/
|
39
|
+
function policyMatchesBundle(
|
40
|
+
bytes memory policyData,
|
41
|
+
bytes memory bundleFilter
|
42
|
+
)
|
43
|
+
external
|
44
|
+
view
|
45
|
+
returns (bool isMatching);
|
46
|
+
|
47
|
+
function isVerifying() external view returns (bool verifying);
|
48
|
+
|
49
|
+
function getCollateralizationLevel() external view returns (UFixed collateralizationLevel);
|
50
|
+
|
51
|
+
function getStakingFee() external view returns (Fee memory stakingFee);
|
52
|
+
|
53
|
+
function getPerformanceFee()
|
54
|
+
external
|
55
|
+
view
|
56
|
+
returns (Fee memory performanceFee);
|
57
|
+
}
|
@@ -3,14 +3,17 @@ pragma solidity ^0.8.19;
|
|
3
3
|
|
4
4
|
import {NftId} from "../types/NftId.sol";
|
5
5
|
import {Fee} from "../types/Fee.sol";
|
6
|
+
import {IBaseComponent} from "./IBaseComponent.sol";
|
6
7
|
|
7
|
-
interface IProductComponent {
|
8
|
-
function
|
8
|
+
interface IProductComponent is IBaseComponent {
|
9
|
+
function setFees(
|
10
|
+
Fee memory policyFee,
|
11
|
+
Fee memory processingFee
|
12
|
+
) external;
|
9
13
|
|
14
|
+
function getPoolNftId() external view returns (NftId poolNftId);
|
15
|
+
|
10
16
|
function getPolicyFee() external view returns (Fee memory policyFee);
|
11
17
|
|
12
|
-
function getProcessingFee()
|
13
|
-
external
|
14
|
-
view
|
15
|
-
returns (Fee memory processingFee);
|
18
|
+
function getProcessingFee() external view returns (Fee memory processingFee);
|
16
19
|
}
|