@etherisc/gif-next 0.0.2-ead1eb0-841 → 0.0.2-eadf4ad-932
Sign up to get free protection for your applications and to get access to all the features.
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +80 -80
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +97 -58
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +2 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +2 -2
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +2 -2
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +2 -2
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +2 -2
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +24 -24
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +69 -30
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +2 -2
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
- package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +44 -44
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +79 -40
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +48 -48
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +81 -42
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +4 -4
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +68 -29
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +10 -10
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +90 -51
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +8 -8
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +90 -51
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +30 -30
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +77 -38
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +6 -6
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +66 -27
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +73 -13
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +153 -51
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +93 -25
- package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +48 -95
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +170 -68
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +72 -28
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +363 -76
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +2 -2
- package/artifacts/contracts/shared/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +43 -14
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +2 -2
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +4 -4
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +667 -0
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +2 -2
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/contracts/distribution/DistributionService.sol +8 -6
- package/contracts/distribution/DistributionServiceManager.sol +9 -6
- package/contracts/instance/InstanceService.sol +9 -16
- package/contracts/instance/InstanceServiceManager.sol +10 -20
- package/contracts/pool/BundleService.sol +13 -11
- package/contracts/pool/BundleServiceManager.sol +9 -18
- package/contracts/pool/PoolService.sol +12 -11
- package/contracts/pool/PoolServiceManager.sol +9 -18
- package/contracts/product/ApplicationService.sol +6 -5
- package/contracts/product/ApplicationServiceManager.sol +9 -6
- package/contracts/product/ClaimService.sol +6 -5
- package/contracts/product/ClaimServiceManager.sol +9 -6
- package/contracts/product/PolicyService.sol +6 -4
- package/contracts/product/PolicyServiceManager.sol +9 -21
- package/contracts/product/PricingService.sol +6 -5
- package/contracts/product/PricingServiceManager.sol +9 -18
- package/contracts/product/ProductService.sol +6 -4
- package/contracts/product/ProductServiceManager.sol +9 -21
- package/contracts/registry/IRegistry.sol +19 -12
- package/contracts/registry/IRegistryService.sol +22 -30
- package/contracts/registry/Registry.sol +40 -36
- package/contracts/registry/RegistryAccessManager.sol +39 -123
- package/contracts/registry/RegistryService.sol +22 -76
- package/contracts/registry/RegistryServiceManager.sol +21 -9
- package/contracts/registry/ReleaseManager.sol +243 -189
- package/contracts/shared/ComponentService.sol +0 -9
- package/contracts/shared/ProxyManager.sol +26 -0
- package/contracts/staking/StakingService.sol +7 -4
- package/contracts/staking/{StakeingServiceManager.sol → StakingServiceManager.sol} +8 -5
- package/contracts/type/RoleId.sol +10 -3
- package/package.json +1 -1
- package/artifacts/contracts/staking/StakeingServiceManager.sol/StakingServiceManager.dbg.json +0 -4
- package/artifacts/contracts/staking/StakeingServiceManager.sol/StakingServiceManager.json +0 -628
@@ -131,8 +131,8 @@
|
|
131
131
|
"type": "function"
|
132
132
|
}
|
133
133
|
],
|
134
|
-
"bytecode": "0x6102a461003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806368aebf7b1161006557806368aebf7b14610119578063a42e52e914610127578063bc1b392d14610144578063f37f38f01461014b57600080fd5b8063057182b41461008c578063545ce21c146100bd57806367cb8ec1146100e7575b600080fd5b6100a861009a36600461020b565b67ffffffffffffffff161590565b60405190151581526020015b60405180910390f35b6100ce6100cb36600461020b565b90565b60405167ffffffffffffffff90911681526020016100b4565b6101066100f536600461020b565b60081b68ffffffffffffffff001690565b60405160ff1990911681526020016100b4565b6100ce6100cb36600461023c565b6100a861013536600461020b565b67ffffffffffffffff16151590565b60006100ce565b61015e61015936600461020b565b61016c565b6040519081526020016100b4565b600073__$4b9aaffa8d044614668dad578b824b8eee$
|
135
|
-
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806368aebf7b1161006557806368aebf7b14610119578063a42e52e914610127578063bc1b392d14610144578063f37f38f01461014b57600080fd5b8063057182b41461008c578063545ce21c146100bd57806367cb8ec1146100e7575b600080fd5b6100a861009a36600461020b565b67ffffffffffffffff161590565b60405190151581526020015b60405180910390f35b6100ce6100cb36600461020b565b90565b60405167ffffffffffffffff90911681526020016100b4565b6101066100f536600461020b565b60081b68ffffffffffffffff001690565b60405160ff1990911681526020016100b4565b6100ce6100cb36600461023c565b6100a861013536600461020b565b67ffffffffffffffff16151590565b60006100ce565b61015e61015936600461020b565b61016c565b6040519081526020016100b4565b600073__$4b9aaffa8d044614668dad578b824b8eee$
|
134
|
+
"bytecode": "0x6102a461003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806368aebf7b1161006557806368aebf7b14610119578063a42e52e914610127578063bc1b392d14610144578063f37f38f01461014b57600080fd5b8063057182b41461008c578063545ce21c146100bd57806367cb8ec1146100e7575b600080fd5b6100a861009a36600461020b565b67ffffffffffffffff161590565b60405190151581526020015b60405180910390f35b6100ce6100cb36600461020b565b90565b60405167ffffffffffffffff90911681526020016100b4565b6101066100f536600461020b565b60081b68ffffffffffffffff001690565b60405160ff1990911681526020016100b4565b6100ce6100cb36600461023c565b6100a861013536600461020b565b67ffffffffffffffff16151590565b60006100ce565b61015e61015936600461020b565b61016c565b6040519081526020016100b4565b600073__$4b9aaffa8d044614668dad578b824b8eee$__63f48016ce6014600885901b68ffffffffffffffff00166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102059190610255565b92915050565b60006020828403121561021d57600080fd5b813567ffffffffffffffff8116811461023557600080fd5b9392505050565b60006020828403121561024e57600080fd5b5035919050565b60006020828403121561026757600080fd5b505191905056fea26469706673582212205d7168abf718df24d6d18c611922fe1b9ef1a934aa86b261ecc919a9cbb1f8d064736f6c63430008140033",
|
135
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806368aebf7b1161006557806368aebf7b14610119578063a42e52e914610127578063bc1b392d14610144578063f37f38f01461014b57600080fd5b8063057182b41461008c578063545ce21c146100bd57806367cb8ec1146100e7575b600080fd5b6100a861009a36600461020b565b67ffffffffffffffff161590565b60405190151581526020015b60405180910390f35b6100ce6100cb36600461020b565b90565b60405167ffffffffffffffff90911681526020016100b4565b6101066100f536600461020b565b60081b68ffffffffffffffff001690565b60405160ff1990911681526020016100b4565b6100ce6100cb36600461023c565b6100a861013536600461020b565b67ffffffffffffffff16151590565b60006100ce565b61015e61015936600461020b565b61016c565b6040519081526020016100b4565b600073__$4b9aaffa8d044614668dad578b824b8eee$__63f48016ce6014600885901b68ffffffffffffffff00166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102059190610255565b92915050565b60006020828403121561021d57600080fd5b813567ffffffffffffffff8116811461023557600080fd5b9392505050565b60006020828403121561024e57600080fd5b5035919050565b60006020828403121561026757600080fd5b505191905056fea26469706673582212205d7168abf718df24d6d18c611922fe1b9ef1a934aa86b261ecc919a9cbb1f8d064736f6c63430008140033",
|
136
136
|
"linkReferences": {
|
137
137
|
"contracts/type/Key32.sol": {
|
138
138
|
"Key32Lib": [
|
@@ -58,12 +58,13 @@ contract DistributionService is
|
|
58
58
|
initializer
|
59
59
|
virtual override
|
60
60
|
{
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
61
|
+
(
|
62
|
+
address registryAddress,,
|
63
|
+
//address managerAddress
|
64
|
+
address authority
|
65
|
+
) = abi.decode(data, (address, address, address));
|
66
|
+
|
67
|
+
initializeService(registryAddress, authority, owner);
|
67
68
|
registerInterface(type(IDistributionService).interfaceId);
|
68
69
|
}
|
69
70
|
|
@@ -284,6 +285,7 @@ contract DistributionService is
|
|
284
285
|
)
|
285
286
|
external
|
286
287
|
virtual
|
288
|
+
restricted
|
287
289
|
{
|
288
290
|
bool isReferral = ! referralId.eqz();
|
289
291
|
bool referralValid = referralIsValid(distributionNftId, referralId);
|
@@ -14,15 +14,18 @@ contract DistributionServiceManager is ProxyManager {
|
|
14
14
|
|
15
15
|
/// @dev initializes proxy manager with distribution service implementation and deploys instance
|
16
16
|
constructor(
|
17
|
-
address
|
18
|
-
|
17
|
+
address authority,
|
18
|
+
address registryAddress,
|
19
|
+
bytes32 salt
|
20
|
+
)
|
19
21
|
ProxyManager(registryAddress)
|
20
22
|
{
|
21
|
-
DistributionService distSrv = new DistributionService();
|
22
|
-
bytes memory data = abi.encode(registryAddress, address(this));
|
23
|
-
IVersionable versionable =
|
23
|
+
DistributionService distSrv = new DistributionService{salt: salt}();
|
24
|
+
bytes memory data = abi.encode(registryAddress, address(this), authority);
|
25
|
+
IVersionable versionable = deployDetermenistic(
|
24
26
|
address(distSrv),
|
25
|
-
data
|
27
|
+
data,
|
28
|
+
salt);
|
26
29
|
|
27
30
|
_distributionService = DistributionService(address(versionable));
|
28
31
|
|
@@ -52,15 +52,8 @@ contract InstanceService is
|
|
52
52
|
}
|
53
53
|
_;
|
54
54
|
}
|
55
|
-
|
56
|
-
// TODO check
|
57
|
-
modifier onlyRegisteredService() {
|
58
|
-
if (! getRegistry().isRegisteredService(msg.sender)) {
|
59
|
-
revert ErrorInstanceServiceRequestUnauhorized(msg.sender);
|
60
|
-
}
|
61
|
-
_;
|
62
|
-
}
|
63
|
-
// TODO check release version?
|
55
|
+
|
56
|
+
// TODO check component - service - instance version match
|
64
57
|
modifier onlyComponent() {
|
65
58
|
if (! getRegistry().isRegisteredComponent(msg.sender)) {
|
66
59
|
revert ErrorInstanceServiceRequestUnauhorized(msg.sender);
|
@@ -214,7 +207,7 @@ contract InstanceService is
|
|
214
207
|
RoleId[] memory roles
|
215
208
|
)
|
216
209
|
external
|
217
|
-
|
210
|
+
restricted
|
218
211
|
{
|
219
212
|
(
|
220
213
|
IInstance instance, // or instanceInfo
|
@@ -270,18 +263,18 @@ contract InstanceService is
|
|
270
263
|
virtual override
|
271
264
|
{
|
272
265
|
(
|
273
|
-
address registryAddress
|
274
|
-
address
|
275
|
-
|
266
|
+
address registryAddress,,
|
267
|
+
//address managerAddress
|
268
|
+
address authority
|
269
|
+
) = abi.decode(data, (address, address, address));
|
270
|
+
|
271
|
+
initializeService(registryAddress, authority, owner);
|
276
272
|
|
277
273
|
_registryService = IRegistryService(
|
278
274
|
IRegistry(registryAddress).getServiceAddress(
|
279
275
|
REGISTRY(),
|
280
276
|
getVersion().toMajorPart()));
|
281
277
|
|
282
|
-
// TODO while InstanceService is not deployed in InstanceServiceManager constructor
|
283
|
-
// owner is InstanceServiceManager deployer
|
284
|
-
initializeService(registryAddress, address(0), owner);
|
285
278
|
registerInterface(type(IInstanceService).interfaceId);
|
286
279
|
}
|
287
280
|
|
@@ -13,33 +13,23 @@ contract InstanceServiceManager is ProxyManager {
|
|
13
13
|
|
14
14
|
InstanceService private _instanceService;
|
15
15
|
|
16
|
-
/// @dev initializes proxy manager with instance service implementation
|
16
|
+
/// @dev initializes proxy manager with instance service implementation
|
17
17
|
constructor(
|
18
|
-
address
|
19
|
-
|
18
|
+
address authority,
|
19
|
+
address registryAddress,
|
20
|
+
bytes32 salt
|
21
|
+
)
|
20
22
|
ProxyManager(registryAddress)
|
21
23
|
{
|
22
|
-
InstanceService instSrv = new InstanceService();
|
24
|
+
InstanceService instSrv = new InstanceService{salt: salt}();
|
23
25
|
// bytes memory initCode = type(InstanceService).creationCode;
|
24
|
-
bytes memory data = abi.encode(registryAddress, address(this));
|
25
|
-
IVersionable versionable =
|
26
|
+
bytes memory data = abi.encode(registryAddress, address(this), authority);
|
27
|
+
IVersionable versionable = deployDetermenistic(
|
26
28
|
address(instSrv),
|
27
|
-
data
|
29
|
+
data,
|
30
|
+
salt);
|
28
31
|
|
29
32
|
_instanceService = InstanceService(address(versionable));
|
30
|
-
|
31
|
-
// TODO `this` must have a role or own nft to register service
|
32
|
-
//Registry registry = Registry(registryAddress);
|
33
|
-
//address registryServiceAddress = registry.getServiceAddress(REGISTRY(), _instanceService.getMajorVersion());
|
34
|
-
//RegistryService registryService = RegistryService(registryServiceAddress);
|
35
|
-
//registryService.registerService(_instanceService);
|
36
|
-
// RegistryService registryService = _instanceService.getRegistryService();
|
37
|
-
|
38
|
-
// TODO no nft to link yet
|
39
|
-
// link ownership of instance service manager ot nft owner of instance service
|
40
|
-
//_linkToNftOwnable(
|
41
|
-
// address(registryAddress),
|
42
|
-
// address(_instanceService));
|
43
33
|
}
|
44
34
|
|
45
35
|
//--- view functions ----------------------------------------------------//
|
@@ -53,12 +53,13 @@ contract BundleService is
|
|
53
53
|
initializer
|
54
54
|
virtual override
|
55
55
|
{
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
56
|
+
(
|
57
|
+
address registryAddress,,
|
58
|
+
//address managerAddress
|
59
|
+
address authority
|
60
|
+
) = abi.decode(data, (address, address, address));
|
61
|
+
|
62
|
+
initializeService(registryAddress, authority, owner);
|
62
63
|
registerInterface(type(IBundleService).interfaceId);
|
63
64
|
}
|
64
65
|
|
@@ -122,7 +123,7 @@ contract BundleService is
|
|
122
123
|
)
|
123
124
|
external
|
124
125
|
override
|
125
|
-
|
126
|
+
restricted
|
126
127
|
returns(NftId bundleNftId)
|
127
128
|
{
|
128
129
|
// register bundle with registry
|
@@ -192,7 +193,7 @@ contract BundleService is
|
|
192
193
|
Amount premiumAmount // premium part that reaches bundle for this policy
|
193
194
|
)
|
194
195
|
external
|
195
|
-
|
196
|
+
restricted
|
196
197
|
{
|
197
198
|
InstanceReader instanceReader = instance.getInstanceReader();
|
198
199
|
StateId bundleState = instanceReader.getMetadata(bundleNftId.toKey32(BUNDLE())).state;
|
@@ -298,7 +299,7 @@ contract BundleService is
|
|
298
299
|
)
|
299
300
|
external
|
300
301
|
virtual
|
301
|
-
|
302
|
+
restricted
|
302
303
|
{
|
303
304
|
// udpate bundle state
|
304
305
|
instance.getInstanceStore().updateBundleState(bundleNftId, CLOSED());
|
@@ -321,7 +322,7 @@ contract BundleService is
|
|
321
322
|
Amount premiumAmount
|
322
323
|
)
|
323
324
|
external
|
324
|
-
|
325
|
+
restricted
|
325
326
|
{
|
326
327
|
InstanceReader instanceReader = instance.getInstanceReader();
|
327
328
|
IBundle.BundleInfo memory bundleInfo = instanceReader.getBundleInfo(bundleNftId);
|
@@ -338,7 +339,7 @@ contract BundleService is
|
|
338
339
|
Amount collateralAmount
|
339
340
|
)
|
340
341
|
external
|
341
|
-
|
342
|
+
restricted
|
342
343
|
{
|
343
344
|
InstanceReader instanceReader = instance.getInstanceReader();
|
344
345
|
IBundle.BundleInfo memory bundleInfo = instanceReader.getBundleInfo(bundleNftId);
|
@@ -371,6 +372,7 @@ contract BundleService is
|
|
371
372
|
)
|
372
373
|
external
|
373
374
|
virtual
|
375
|
+
restricted
|
374
376
|
{
|
375
377
|
// ensure policy is closeable
|
376
378
|
if (!instance.getInstanceReader().policyIsCloseable(policyNftId)) {
|
@@ -14,29 +14,20 @@ contract BundleServiceManager is ProxyManager {
|
|
14
14
|
|
15
15
|
/// @dev initializes proxy manager with pool service implementation
|
16
16
|
constructor(
|
17
|
-
address
|
18
|
-
|
17
|
+
address authority,
|
18
|
+
address registryAddress,
|
19
|
+
bytes32 salt
|
20
|
+
)
|
19
21
|
ProxyManager(registryAddress)
|
20
22
|
{
|
21
|
-
BundleService bundleSrv = new BundleService();
|
22
|
-
bytes memory data = abi.encode(registryAddress, address(this));
|
23
|
-
IVersionable versionable =
|
23
|
+
BundleService bundleSrv = new BundleService{salt: salt}();
|
24
|
+
bytes memory data = abi.encode(registryAddress, address(this), authority);
|
25
|
+
IVersionable versionable = deployDetermenistic(
|
24
26
|
address(bundleSrv),
|
25
|
-
data
|
27
|
+
data,
|
28
|
+
salt);
|
26
29
|
|
27
30
|
_bundleService = BundleService(address(versionable));
|
28
|
-
|
29
|
-
// TODO `this` must have a role or own nft to register service
|
30
|
-
//Registry registry = Registry(registryAddress);
|
31
|
-
//address registryServiceAddress = registry.getServiceAddress(REGISTRY(), _bundleService.getMajorVersion());
|
32
|
-
//RegistryService registryService = RegistryService(registryServiceAddress);
|
33
|
-
//registryService.registerService(_poolService);
|
34
|
-
|
35
|
-
// TODO no nft to link yet
|
36
|
-
// link ownership of instance service manager ot nft owner of instance service
|
37
|
-
//_linkToNftOwnable(
|
38
|
-
// address(registryAddress),
|
39
|
-
// address(_poolService));
|
40
31
|
}
|
41
32
|
|
42
33
|
//--- view functions ----------------------------------------------------//
|
@@ -56,15 +56,14 @@ contract PoolService is
|
|
56
56
|
initializer
|
57
57
|
virtual override
|
58
58
|
{
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
initializeService(registryAddress, address(0), owner);
|
59
|
+
(
|
60
|
+
address registryAddress,,
|
61
|
+
//address managerAddress
|
62
|
+
address authority
|
63
|
+
) = abi.decode(data, (address, address, address));
|
65
64
|
|
65
|
+
initializeService(registryAddress, authority, owner);
|
66
66
|
_bundleService = IBundleService(getRegistry().getServiceAddress(BUNDLE(), getVersion().toMajorPart()));
|
67
|
-
|
68
67
|
registerInterface(type(IPoolService).interfaceId);
|
69
68
|
}
|
70
69
|
|
@@ -122,6 +121,7 @@ contract PoolService is
|
|
122
121
|
external
|
123
122
|
virtual
|
124
123
|
{
|
124
|
+
/*
|
125
125
|
(NftId poolNftId,, IInstance instance) = _getAndVerifyCallingComponentAndInstance(POOL());
|
126
126
|
InstanceReader instanceReader = instance.getInstanceReader();
|
127
127
|
|
@@ -134,6 +134,7 @@ contract PoolService is
|
|
134
134
|
instance.getInstanceStore().updatePoolSetup(poolNftId, componentInfo, KEEP_STATE());
|
135
135
|
|
136
136
|
emit LogPoolServiceMaxCapitalAmountUpdated(poolNftId, previousMaxCapitalAmount, maxCapitalAmount);
|
137
|
+
*/
|
137
138
|
}
|
138
139
|
|
139
140
|
function setBundleOwnerRole(RoleId bundleOwnerRole)
|
@@ -182,7 +183,6 @@ contract PoolService is
|
|
182
183
|
// TODO add logging
|
183
184
|
}
|
184
185
|
|
185
|
-
|
186
186
|
function createBundle(
|
187
187
|
address owner, // initial bundle owner
|
188
188
|
Fee memory fee, // fees deducted from premium that go to bundle owner
|
@@ -240,6 +240,7 @@ contract PoolService is
|
|
240
240
|
)
|
241
241
|
external
|
242
242
|
virtual
|
243
|
+
restricted
|
243
244
|
{
|
244
245
|
IRegistry registry = getRegistry();
|
245
246
|
IRegistry.ObjectInfo memory bundleObjectInfo = registry.getObjectInfo(bundleNftId);
|
@@ -275,7 +276,7 @@ contract PoolService is
|
|
275
276
|
)
|
276
277
|
external
|
277
278
|
virtual
|
278
|
-
|
279
|
+
restricted
|
279
280
|
{
|
280
281
|
InstanceReader instanceReader = instance.getInstanceReader();
|
281
282
|
NftId poolNftId = instanceReader.getProductSetupInfo(productNftId).poolNftId;
|
@@ -326,7 +327,7 @@ contract PoolService is
|
|
326
327
|
)
|
327
328
|
external
|
328
329
|
virtual
|
329
|
-
|
330
|
+
restricted
|
330
331
|
{
|
331
332
|
_bundleService.releaseCollateral(
|
332
333
|
instance,
|
@@ -345,7 +346,7 @@ contract PoolService is
|
|
345
346
|
)
|
346
347
|
external
|
347
348
|
virtual
|
348
|
-
|
349
|
+
restricted
|
349
350
|
{
|
350
351
|
_bundleService.releaseCollateral(
|
351
352
|
instance,
|
@@ -14,29 +14,20 @@ contract PoolServiceManager is ProxyManager {
|
|
14
14
|
|
15
15
|
/// @dev initializes proxy manager with pool service implementation
|
16
16
|
constructor(
|
17
|
-
address
|
18
|
-
|
17
|
+
address authority,
|
18
|
+
address registryAddress,
|
19
|
+
bytes32 salt
|
20
|
+
)
|
19
21
|
ProxyManager(registryAddress)
|
20
22
|
{
|
21
|
-
PoolService poolSrv = new PoolService();
|
22
|
-
bytes memory data = abi.encode(registryAddress, address(this));
|
23
|
-
IVersionable versionable =
|
23
|
+
PoolService poolSrv = new PoolService{salt: salt}();
|
24
|
+
bytes memory data = abi.encode(registryAddress, address(this), authority);
|
25
|
+
IVersionable versionable = deployDetermenistic(
|
24
26
|
address(poolSrv),
|
25
|
-
data
|
27
|
+
data,
|
28
|
+
salt);
|
26
29
|
|
27
30
|
_poolService = PoolService(address(versionable));
|
28
|
-
|
29
|
-
// TODO `this` must have a role or own nft to register service
|
30
|
-
//Registry registry = Registry(registryAddress);
|
31
|
-
//address registryServiceAddress = registry.getServiceAddress(REGISTRY(), _poolService.getMajorVersion());
|
32
|
-
//RegistryService registryService = RegistryService(registryServiceAddress);
|
33
|
-
//registryService.registerService(_poolService);
|
34
|
-
|
35
|
-
// TODO no nft to link yet
|
36
|
-
// link ownership of instance service manager ot nft owner of instance service
|
37
|
-
//_linkToNftOwnable(
|
38
|
-
// address(registryAddress),
|
39
|
-
// address(_poolService));
|
40
31
|
}
|
41
32
|
|
42
33
|
//--- view functions ----------------------------------------------------//
|
@@ -64,12 +64,13 @@ contract ApplicationService is
|
|
64
64
|
virtual override
|
65
65
|
initializer()
|
66
66
|
{
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
(
|
68
|
+
address registryAddress,,
|
69
|
+
//address managerAddress
|
70
|
+
address authority
|
71
|
+
) = abi.decode(data, (address, address, address));
|
71
72
|
|
72
|
-
initializeService(registryAddress,
|
73
|
+
initializeService(registryAddress, authority, owner);
|
73
74
|
registerInterface(type(IApplicationService).interfaceId);
|
74
75
|
|
75
76
|
_distributionService = IDistributionService(_getServiceAddress(DISTRIBUTION()));
|
@@ -11,15 +11,18 @@ contract ApplicationServiceManager is ProxyManager {
|
|
11
11
|
|
12
12
|
/// @dev initializes proxy manager with service implementation
|
13
13
|
constructor(
|
14
|
-
address
|
15
|
-
|
14
|
+
address authority,
|
15
|
+
address registryAddress,
|
16
|
+
bytes32 salt
|
17
|
+
)
|
16
18
|
ProxyManager(registryAddress)
|
17
19
|
{
|
18
|
-
ApplicationService svc = new ApplicationService();
|
19
|
-
bytes memory data = abi.encode(registryAddress, address(this));
|
20
|
-
IVersionable versionable =
|
20
|
+
ApplicationService svc = new ApplicationService{salt: salt}();
|
21
|
+
bytes memory data = abi.encode(registryAddress, address(this), authority);
|
22
|
+
IVersionable versionable = deployDetermenistic(
|
21
23
|
address(svc),
|
22
|
-
data
|
24
|
+
data,
|
25
|
+
salt);
|
23
26
|
|
24
27
|
_applicationService = ApplicationService(address(versionable));
|
25
28
|
}
|
@@ -62,12 +62,13 @@ contract ClaimService is
|
|
62
62
|
virtual override
|
63
63
|
initializer()
|
64
64
|
{
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
(
|
66
|
+
address registryAddress,,
|
67
|
+
//address managerAddress
|
68
|
+
address authority
|
69
|
+
) = abi.decode(data, (address, address, address));
|
69
70
|
|
70
|
-
initializeService(registryAddress,
|
71
|
+
initializeService(registryAddress, authority, owner);
|
71
72
|
|
72
73
|
_poolService = IPoolService(getRegistry().getServiceAddress(POOL(), getVersion().toMajorPart()));
|
73
74
|
|