@etherisc/gif-next 0.0.2-f752d2a-551 → 0.0.2-f79a517-071
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +175 -1
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +166 -39
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +557 -0
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +119 -39
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +177 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +108 -156
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +67 -139
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +417 -88
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +360 -51
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +4 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.json +66 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +4 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.json +24 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +4 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.json +42 -0
- 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/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
- 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 +768 -694
- package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +954 -816
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +224 -43
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +1 -1
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +51 -1
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +49 -0
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/instance/base/IService.sol/IService.json +174 -53
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +1 -1
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +263 -45
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +41 -23
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +4 -4
- package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +220 -52
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +55 -54
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +56 -55
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +22 -93
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +22 -93
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
- package/artifacts/contracts/instance/module/{compensation/ICompensation.sol/ICompensation.json → distribution/IDistribution.sol/IDistribution.json} +2 -2
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/{compensation/ICompensation.sol/ICompensationModule.json → distribution/IDistribution.sol/IDistributionModule.json} +2 -2
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +61 -51
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +61 -51
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +29 -14
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +28 -13
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +104 -1
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +126 -5
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +326 -221
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +2 -2
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +326 -221
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +374 -70
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +630 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +176 -74
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +446 -0
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +235 -50
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +325 -51
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +335 -53
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +468 -73
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +186 -12
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +190 -51
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +872 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +380 -139
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1245 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +496 -0
- package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +2 -2
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +127 -0
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +117 -37
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +55 -14
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +158 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +349 -0
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +190 -37
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +78 -14
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +557 -0
- package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
- package/artifacts/contracts/test/TestFee.sol/TestFee.json +4 -4
- package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
- package/artifacts/contracts/test/TestPool.sol/TestPool.json +417 -88
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +407 -56
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +204 -36
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
- package/artifacts/contracts/test/TestService.sol/TestService.json +267 -62
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +91 -53
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +89 -25
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
- package/artifacts/contracts/test/Usdc.sol/USDC.json +91 -53
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- 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 +1 -1
- package/artifacts/contracts/types/Fee.sol/FeeLib.json +52 -13
- package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
- 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/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
- 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 +1 -1
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +4 -0
- package/artifacts/contracts/types/UFixed.sol/MathLib.json +10 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +4 -0
- package/artifacts/contracts/types/UFixed.sol/{UFixedMathLib.json → UFixedLib.json} +3 -3
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionLib.json +40 -2
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
- package/contracts/components/BaseComponent.sol +11 -20
- package/contracts/components/Distribution.sol +155 -0
- package/contracts/components/IBaseComponent.sol +1 -1
- package/contracts/components/IDistributionComponent.sol +46 -0
- package/contracts/components/IPoolComponent.sol +15 -8
- package/contracts/components/IProductComponent.sol +26 -8
- package/contracts/components/Pool.sol +99 -27
- package/contracts/components/Product.sol +204 -22
- package/contracts/experiment/cloning/Cloner.sol +47 -0
- package/contracts/instance/IInstance.sol +11 -11
- package/contracts/instance/Instance.sol +28 -13
- package/contracts/instance/base/ComponentServiceBase.sol +13 -6
- package/contracts/instance/base/IInstanceBase.sol +11 -2
- package/contracts/instance/base/IKeyValueStore.sol +4 -3
- package/contracts/instance/base/InstanceBase.sol +19 -10
- package/contracts/instance/base/KeyValueStore.sol +12 -7
- package/contracts/instance/base/Lifecycle.sol +15 -10
- package/contracts/instance/base/ModuleBase.sol +22 -17
- package/contracts/instance/base/ServiceBase.sol +20 -13
- package/contracts/instance/module/bundle/BundleModule.sol +10 -12
- package/contracts/instance/module/bundle/IBundle.sol +6 -11
- package/contracts/instance/module/component/ComponentModule.sol +33 -57
- package/contracts/instance/module/component/IComponent.sol +6 -31
- package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
- package/contracts/instance/module/distribution/IDistribution.sol +10 -0
- package/contracts/instance/module/policy/IPolicy.sol +13 -10
- package/contracts/instance/module/policy/PolicyModule.sol +35 -20
- package/contracts/instance/module/pool/IPoolModule.sol +4 -4
- package/contracts/instance/module/pool/PoolModule.sol +23 -15
- package/contracts/instance/module/risk/IRisk.sol +18 -2
- package/contracts/instance/module/risk/RiskModule.sol +56 -2
- package/contracts/instance/module/treasury/ITreasury.sol +31 -50
- package/contracts/instance/module/treasury/TokenHandler.sol +1 -1
- package/contracts/instance/module/treasury/TreasuryModule.sol +70 -91
- package/contracts/instance/service/ComponentOwnerService.sol +238 -93
- package/contracts/instance/service/DistributionService.sol +54 -0
- package/contracts/instance/service/IComponentOwnerService.sol +0 -2
- package/contracts/instance/service/IDistributionService.sol +12 -0
- package/contracts/instance/service/IPoolService.sol +7 -0
- package/contracts/instance/service/IProductService.sol +56 -7
- package/contracts/instance/service/PoolService.sol +49 -23
- package/contracts/instance/service/ProductService.sol +250 -94
- package/contracts/registry/ChainNft.sol +80 -37
- package/contracts/registry/IRegistry.sol +28 -28
- package/contracts/registry/IRegistryService.sol +35 -0
- package/contracts/registry/ITransferInterceptor.sol +6 -0
- package/contracts/registry/Registry.sol +314 -272
- package/contracts/registry/RegistryService.sol +441 -0
- package/contracts/registry/RegistryServiceManager.sol +64 -0
- package/contracts/shared/ContractDeployerLib.sol +72 -0
- package/contracts/shared/INftOwnable.sol +22 -0
- package/contracts/shared/IRegisterable.sol +8 -15
- package/contracts/shared/IVersionable.sol +55 -11
- package/contracts/shared/NftOwnable.sol +136 -0
- package/contracts/shared/ProxyManager.sol +94 -0
- package/contracts/shared/Registerable.sol +62 -59
- package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
- package/contracts/shared/Versionable.sol +112 -54
- package/contracts/test/TestDistribution.sol +22 -0
- package/contracts/test/TestFee.sol +2 -2
- package/contracts/test/TestPool.sol +7 -2
- package/contracts/test/TestProduct.sol +37 -7
- package/contracts/test/TestRegisterable.sol +5 -6
- package/contracts/test/TestService.sol +5 -11
- package/contracts/types/Fee.sol +10 -5
- package/contracts/types/ObjectType.sol +24 -8
- package/contracts/types/ReferralId.sol +48 -0
- package/contracts/types/RiskId.sol +43 -0
- package/contracts/types/RoleId.sol +9 -2
- package/contracts/types/UFixed.sol +128 -12
- package/contracts/types/Version.sol +9 -0
- package/package.json +4 -3
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.json +0 -333
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +0 -4
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.json +0 -10
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.json +0 -333
- package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +0 -452
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +0 -24
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.json +0 -24
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
- package/contracts/experiment/statemachine/README.md +0 -112
- package/contracts/instance/module/access/Access.sol +0 -149
- package/contracts/instance/module/access/IAccess.sol +0 -53
- package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
- package/contracts/instance/module/compensation/ICompensation.sol +0 -10
- package/contracts/registry/IChainNft.sol +0 -21
- package/contracts/registry/IRegistryLinked.sol +0 -8
- package/contracts/shared/IOwnable.sol +0 -6
@@ -1,7 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
|
-
pragma solidity ^0.8.
|
3
|
-
|
4
|
-
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
|
2
|
+
pragma solidity ^0.8.20;
|
5
3
|
|
6
4
|
/// @dev UFixed is a fixed point number with 18 decimals precision.
|
7
5
|
type UFixed is uint256;
|
@@ -16,9 +14,15 @@ using {
|
|
16
14
|
ltUFixed as <,
|
17
15
|
lteUFixed as <=,
|
18
16
|
eqUFixed as ==,
|
19
|
-
|
17
|
+
neUFixed as !=,
|
18
|
+
UFixedLib.toInt,
|
19
|
+
UFixedLib.gtz
|
20
20
|
} for UFixed global;
|
21
21
|
|
22
|
+
function zeroUFixed() pure returns (UFixed zero) {
|
23
|
+
return UFixed.wrap(0);
|
24
|
+
}
|
25
|
+
|
22
26
|
function addUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
23
27
|
return UFixed.wrap(UFixed.unwrap(a) + UFixed.unwrap(b));
|
24
28
|
}
|
@@ -30,14 +34,14 @@ function subUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
|
30
34
|
|
31
35
|
function mulUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
32
36
|
return
|
33
|
-
UFixed.wrap(
|
37
|
+
UFixed.wrap(MathLib.mulDiv(UFixed.unwrap(a), UFixed.unwrap(b), 10 ** 18));
|
34
38
|
}
|
35
39
|
|
36
40
|
function divUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
37
41
|
require(UFixed.unwrap(b) > 0, "ERROR:UFM-020:DIVISOR_ZERO");
|
38
42
|
|
39
43
|
return
|
40
|
-
UFixed.wrap(
|
44
|
+
UFixed.wrap(MathLib.mulDiv(UFixed.unwrap(a), 10 ** 18, UFixed.unwrap(b)));
|
41
45
|
}
|
42
46
|
|
43
47
|
function gtUFixed(UFixed a, UFixed b) pure returns (bool isGreaterThan) {
|
@@ -60,6 +64,10 @@ function eqUFixed(UFixed a, UFixed b) pure returns (bool isEqual) {
|
|
60
64
|
return UFixed.unwrap(a) == UFixed.unwrap(b);
|
61
65
|
}
|
62
66
|
|
67
|
+
function neUFixed(UFixed a, UFixed b) pure returns (bool isEqual) {
|
68
|
+
return UFixed.unwrap(a) != UFixed.unwrap(b);
|
69
|
+
}
|
70
|
+
|
63
71
|
function gtzUFixed(UFixed a) pure returns (bool isZero) {
|
64
72
|
return UFixed.unwrap(a) > 0;
|
65
73
|
}
|
@@ -76,7 +84,115 @@ function deltaUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
|
76
84
|
return b - a;
|
77
85
|
}
|
78
86
|
|
79
|
-
|
87
|
+
/// @dev copied from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/utils/math/Math.sol
|
88
|
+
library MathLib {
|
89
|
+
|
90
|
+
enum Rounding {
|
91
|
+
Down, // Toward negative infinity
|
92
|
+
Up, // Toward infinity
|
93
|
+
Zero // Toward zero
|
94
|
+
}
|
95
|
+
|
96
|
+
/**
|
97
|
+
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
|
98
|
+
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
|
99
|
+
* with further edits by Uniswap Labs also under MIT license.
|
100
|
+
*/
|
101
|
+
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
|
102
|
+
unchecked {
|
103
|
+
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
|
104
|
+
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
|
105
|
+
// variables such that product = prod1 * 2^256 + prod0.
|
106
|
+
uint256 prod0; // Least significant 256 bits of the product
|
107
|
+
uint256 prod1; // Most significant 256 bits of the product
|
108
|
+
assembly {
|
109
|
+
let mm := mulmod(x, y, not(0))
|
110
|
+
prod0 := mul(x, y)
|
111
|
+
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
|
112
|
+
}
|
113
|
+
|
114
|
+
// Handle non-overflow cases, 256 by 256 division.
|
115
|
+
if (prod1 == 0) {
|
116
|
+
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
|
117
|
+
// The surrounding unchecked block does not change this fact.
|
118
|
+
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
|
119
|
+
return prod0 / denominator;
|
120
|
+
}
|
121
|
+
|
122
|
+
// Make sure the result is less than 2^256. Also prevents denominator == 0.
|
123
|
+
require(denominator > prod1, "Math: mulDiv overflow");
|
124
|
+
|
125
|
+
///////////////////////////////////////////////
|
126
|
+
// 512 by 256 division.
|
127
|
+
///////////////////////////////////////////////
|
128
|
+
|
129
|
+
// Make division exact by subtracting the remainder from [prod1 prod0].
|
130
|
+
uint256 remainder;
|
131
|
+
assembly {
|
132
|
+
// Compute remainder using mulmod.
|
133
|
+
remainder := mulmod(x, y, denominator)
|
134
|
+
|
135
|
+
// Subtract 256 bit number from 512 bit number.
|
136
|
+
prod1 := sub(prod1, gt(remainder, prod0))
|
137
|
+
prod0 := sub(prod0, remainder)
|
138
|
+
}
|
139
|
+
|
140
|
+
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
|
141
|
+
// See https://cs.stackexchange.com/q/138556/92363.
|
142
|
+
|
143
|
+
// Does not overflow because the denominator cannot be zero at this stage in the function.
|
144
|
+
uint256 twos = denominator & (~denominator + 1);
|
145
|
+
assembly {
|
146
|
+
// Divide denominator by twos.
|
147
|
+
denominator := div(denominator, twos)
|
148
|
+
|
149
|
+
// Divide [prod1 prod0] by twos.
|
150
|
+
prod0 := div(prod0, twos)
|
151
|
+
|
152
|
+
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
|
153
|
+
twos := add(div(sub(0, twos), twos), 1)
|
154
|
+
}
|
155
|
+
|
156
|
+
// Shift in bits from prod1 into prod0.
|
157
|
+
prod0 |= prod1 * twos;
|
158
|
+
|
159
|
+
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
|
160
|
+
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
|
161
|
+
// four bits. That is, denominator * inv = 1 mod 2^4.
|
162
|
+
uint256 inverse = (3 * denominator) ^ 2;
|
163
|
+
|
164
|
+
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
|
165
|
+
// in modular arithmetic, doubling the correct bits in each step.
|
166
|
+
inverse *= 2 - denominator * inverse; // inverse mod 2^8
|
167
|
+
inverse *= 2 - denominator * inverse; // inverse mod 2^16
|
168
|
+
inverse *= 2 - denominator * inverse; // inverse mod 2^32
|
169
|
+
inverse *= 2 - denominator * inverse; // inverse mod 2^64
|
170
|
+
inverse *= 2 - denominator * inverse; // inverse mod 2^128
|
171
|
+
inverse *= 2 - denominator * inverse; // inverse mod 2^256
|
172
|
+
|
173
|
+
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
|
174
|
+
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
|
175
|
+
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
|
176
|
+
// is no longer required.
|
177
|
+
result = prod0 * inverse;
|
178
|
+
return result;
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
182
|
+
/**
|
183
|
+
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
|
184
|
+
*/
|
185
|
+
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
|
186
|
+
uint256 result = mulDiv(x, y, denominator);
|
187
|
+
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
|
188
|
+
result += 1;
|
189
|
+
}
|
190
|
+
return result;
|
191
|
+
}
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
library UFixedLib {
|
80
196
|
int8 public constant EXP = 18;
|
81
197
|
uint256 public constant MULTIPLIER = 10 ** uint256(int256(EXP));
|
82
198
|
uint256 public constant MULTIPLIER_HALF = MULTIPLIER / 2;
|
@@ -123,23 +239,23 @@ library UFixedMathLib {
|
|
123
239
|
function toIntWithRounding(UFixed a, uint8 rounding) public pure returns (uint256) {
|
124
240
|
if (rounding == ROUNDING_HALF_UP()) {
|
125
241
|
return
|
126
|
-
|
242
|
+
MathLib.mulDiv(
|
127
243
|
UFixed.unwrap(a) + MULTIPLIER_HALF,
|
128
244
|
1,
|
129
245
|
MULTIPLIER,
|
130
|
-
|
246
|
+
MathLib.Rounding.Down
|
131
247
|
);
|
132
248
|
} else if (rounding == ROUNDING_DOWN()) {
|
133
249
|
return
|
134
|
-
|
250
|
+
MathLib.mulDiv(
|
135
251
|
UFixed.unwrap(a),
|
136
252
|
1,
|
137
253
|
MULTIPLIER,
|
138
|
-
|
254
|
+
MathLib.Rounding.Down
|
139
255
|
);
|
140
256
|
} else {
|
141
257
|
return
|
142
|
-
|
258
|
+
MathLib.mulDiv(UFixed.unwrap(a), 1, MULTIPLIER, MathLib.Rounding.Up);
|
143
259
|
}
|
144
260
|
}
|
145
261
|
|
@@ -23,6 +23,7 @@ using {
|
|
23
23
|
versionGt as >,
|
24
24
|
versionEq as ==,
|
25
25
|
VersionLib.toInt,
|
26
|
+
VersionLib.toUint64,
|
26
27
|
VersionLib.toMajorPart,
|
27
28
|
VersionLib.toVersionParts
|
28
29
|
}
|
@@ -34,6 +35,8 @@ function versionEq(Version a, Version b) pure returns(bool isSame) { return Vers
|
|
34
35
|
library VersionLib {
|
35
36
|
function toInt(Version version) external pure returns(uint) { return Version.unwrap(version); }
|
36
37
|
|
38
|
+
function toUint64(Version version) external pure returns(uint64) { return Version.unwrap(version); }
|
39
|
+
|
37
40
|
function toMajorPart(Version version)
|
38
41
|
external
|
39
42
|
pure
|
@@ -89,6 +92,12 @@ library VersionLib {
|
|
89
92
|
(major << 16) + (minor << 8) + patch));
|
90
93
|
}
|
91
94
|
|
95
|
+
// TODO check for overflow?
|
96
|
+
function toVersion(uint64 versionNumber) external pure returns(Version) {
|
97
|
+
//assert(versionNumber <= type(Version).max);
|
98
|
+
return Version.wrap(uint24(versionNumber));
|
99
|
+
}
|
100
|
+
|
92
101
|
function zeroVersion() external pure returns(Version) {
|
93
102
|
return Version.wrap(0);
|
94
103
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@etherisc/gif-next",
|
3
|
-
"version": "0.0.2-
|
3
|
+
"version": "0.0.2-f79a517-071",
|
4
4
|
"description": "This is the repository for the next version of the Generic Insurance Framework (GIF) smart contracts. ",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -42,10 +42,11 @@
|
|
42
42
|
"typescript": "^5"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@openzeppelin/contracts": "
|
46
|
-
"@openzeppelin/contracts-upgradeable": "
|
45
|
+
"@openzeppelin/contracts": "5.0.0",
|
46
|
+
"@openzeppelin/contracts-upgradeable": "5.0.0",
|
47
47
|
"abi-coder": "^5.0.0",
|
48
48
|
"ethers": "^6.7.1",
|
49
|
+
"solidity-docgen": "^0.6.0-beta.36",
|
49
50
|
"winston": "^3.10.0"
|
50
51
|
}
|
51
52
|
}
|
@@ -1,333 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"_format": "hh-sol-artifact-1",
|
3
|
-
"contractName": "AccessModule",
|
4
|
-
"sourceName": "contracts/instance/module/access/Access.sol",
|
5
|
-
"abi": [
|
6
|
-
{
|
7
|
-
"anonymous": false,
|
8
|
-
"inputs": [
|
9
|
-
{
|
10
|
-
"indexed": false,
|
11
|
-
"internalType": "RoleId",
|
12
|
-
"name": "role",
|
13
|
-
"type": "bytes8"
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"indexed": false,
|
17
|
-
"internalType": "string",
|
18
|
-
"name": "roleName",
|
19
|
-
"type": "string"
|
20
|
-
}
|
21
|
-
],
|
22
|
-
"name": "LogAccessRoleCreated",
|
23
|
-
"type": "event"
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"anonymous": false,
|
27
|
-
"inputs": [
|
28
|
-
{
|
29
|
-
"indexed": false,
|
30
|
-
"internalType": "RoleId",
|
31
|
-
"name": "role",
|
32
|
-
"type": "bytes8"
|
33
|
-
},
|
34
|
-
{
|
35
|
-
"indexed": false,
|
36
|
-
"internalType": "address",
|
37
|
-
"name": "member",
|
38
|
-
"type": "address"
|
39
|
-
},
|
40
|
-
{
|
41
|
-
"indexed": false,
|
42
|
-
"internalType": "bool",
|
43
|
-
"name": "isMember",
|
44
|
-
"type": "bool"
|
45
|
-
}
|
46
|
-
],
|
47
|
-
"name": "LogAccessRoleGranted",
|
48
|
-
"type": "event"
|
49
|
-
},
|
50
|
-
{
|
51
|
-
"anonymous": false,
|
52
|
-
"inputs": [
|
53
|
-
{
|
54
|
-
"indexed": false,
|
55
|
-
"internalType": "RoleId",
|
56
|
-
"name": "role",
|
57
|
-
"type": "bytes8"
|
58
|
-
},
|
59
|
-
{
|
60
|
-
"indexed": false,
|
61
|
-
"internalType": "bool",
|
62
|
-
"name": "active",
|
63
|
-
"type": "bool"
|
64
|
-
}
|
65
|
-
],
|
66
|
-
"name": "LogAccessRoleStateSet",
|
67
|
-
"type": "event"
|
68
|
-
},
|
69
|
-
{
|
70
|
-
"inputs": [
|
71
|
-
{
|
72
|
-
"internalType": "string",
|
73
|
-
"name": "roleName",
|
74
|
-
"type": "string"
|
75
|
-
}
|
76
|
-
],
|
77
|
-
"name": "createRole",
|
78
|
-
"outputs": [
|
79
|
-
{
|
80
|
-
"internalType": "RoleId",
|
81
|
-
"name": "role",
|
82
|
-
"type": "bytes8"
|
83
|
-
}
|
84
|
-
],
|
85
|
-
"stateMutability": "nonpayable",
|
86
|
-
"type": "function"
|
87
|
-
},
|
88
|
-
{
|
89
|
-
"inputs": [],
|
90
|
-
"name": "getOwner",
|
91
|
-
"outputs": [
|
92
|
-
{
|
93
|
-
"internalType": "address",
|
94
|
-
"name": "owner",
|
95
|
-
"type": "address"
|
96
|
-
}
|
97
|
-
],
|
98
|
-
"stateMutability": "view",
|
99
|
-
"type": "function"
|
100
|
-
},
|
101
|
-
{
|
102
|
-
"inputs": [
|
103
|
-
{
|
104
|
-
"internalType": "uint256",
|
105
|
-
"name": "idx",
|
106
|
-
"type": "uint256"
|
107
|
-
}
|
108
|
-
],
|
109
|
-
"name": "getRole",
|
110
|
-
"outputs": [
|
111
|
-
{
|
112
|
-
"internalType": "RoleId",
|
113
|
-
"name": "role",
|
114
|
-
"type": "bytes8"
|
115
|
-
}
|
116
|
-
],
|
117
|
-
"stateMutability": "view",
|
118
|
-
"type": "function"
|
119
|
-
},
|
120
|
-
{
|
121
|
-
"inputs": [],
|
122
|
-
"name": "getRoleCount",
|
123
|
-
"outputs": [
|
124
|
-
{
|
125
|
-
"internalType": "uint256",
|
126
|
-
"name": "roles",
|
127
|
-
"type": "uint256"
|
128
|
-
}
|
129
|
-
],
|
130
|
-
"stateMutability": "view",
|
131
|
-
"type": "function"
|
132
|
-
},
|
133
|
-
{
|
134
|
-
"inputs": [
|
135
|
-
{
|
136
|
-
"internalType": "string",
|
137
|
-
"name": "roleName",
|
138
|
-
"type": "string"
|
139
|
-
}
|
140
|
-
],
|
141
|
-
"name": "getRoleId",
|
142
|
-
"outputs": [
|
143
|
-
{
|
144
|
-
"internalType": "RoleId",
|
145
|
-
"name": "role",
|
146
|
-
"type": "bytes8"
|
147
|
-
}
|
148
|
-
],
|
149
|
-
"stateMutability": "pure",
|
150
|
-
"type": "function"
|
151
|
-
},
|
152
|
-
{
|
153
|
-
"inputs": [
|
154
|
-
{
|
155
|
-
"internalType": "RoleId",
|
156
|
-
"name": "role",
|
157
|
-
"type": "bytes8"
|
158
|
-
}
|
159
|
-
],
|
160
|
-
"name": "getRoleInfo",
|
161
|
-
"outputs": [
|
162
|
-
{
|
163
|
-
"components": [
|
164
|
-
{
|
165
|
-
"internalType": "RoleId",
|
166
|
-
"name": "id",
|
167
|
-
"type": "bytes8"
|
168
|
-
},
|
169
|
-
{
|
170
|
-
"internalType": "string",
|
171
|
-
"name": "name",
|
172
|
-
"type": "string"
|
173
|
-
},
|
174
|
-
{
|
175
|
-
"internalType": "bool",
|
176
|
-
"name": "isActive",
|
177
|
-
"type": "bool"
|
178
|
-
}
|
179
|
-
],
|
180
|
-
"internalType": "struct IAccess.RoleInfo",
|
181
|
-
"name": "info",
|
182
|
-
"type": "tuple"
|
183
|
-
}
|
184
|
-
],
|
185
|
-
"stateMutability": "view",
|
186
|
-
"type": "function"
|
187
|
-
},
|
188
|
-
{
|
189
|
-
"inputs": [
|
190
|
-
{
|
191
|
-
"internalType": "RoleId",
|
192
|
-
"name": "role",
|
193
|
-
"type": "bytes8"
|
194
|
-
},
|
195
|
-
{
|
196
|
-
"internalType": "uint256",
|
197
|
-
"name": "idx",
|
198
|
-
"type": "uint256"
|
199
|
-
}
|
200
|
-
],
|
201
|
-
"name": "getRoleMember",
|
202
|
-
"outputs": [
|
203
|
-
{
|
204
|
-
"internalType": "address",
|
205
|
-
"name": "roleMembers",
|
206
|
-
"type": "address"
|
207
|
-
}
|
208
|
-
],
|
209
|
-
"stateMutability": "view",
|
210
|
-
"type": "function"
|
211
|
-
},
|
212
|
-
{
|
213
|
-
"inputs": [
|
214
|
-
{
|
215
|
-
"internalType": "RoleId",
|
216
|
-
"name": "role",
|
217
|
-
"type": "bytes8"
|
218
|
-
}
|
219
|
-
],
|
220
|
-
"name": "getRoleMemberCount",
|
221
|
-
"outputs": [
|
222
|
-
{
|
223
|
-
"internalType": "uint256",
|
224
|
-
"name": "roleMembers",
|
225
|
-
"type": "uint256"
|
226
|
-
}
|
227
|
-
],
|
228
|
-
"stateMutability": "view",
|
229
|
-
"type": "function"
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"inputs": [
|
233
|
-
{
|
234
|
-
"internalType": "RoleId",
|
235
|
-
"name": "role",
|
236
|
-
"type": "bytes8"
|
237
|
-
},
|
238
|
-
{
|
239
|
-
"internalType": "address",
|
240
|
-
"name": "member",
|
241
|
-
"type": "address"
|
242
|
-
}
|
243
|
-
],
|
244
|
-
"name": "grantRole",
|
245
|
-
"outputs": [],
|
246
|
-
"stateMutability": "nonpayable",
|
247
|
-
"type": "function"
|
248
|
-
},
|
249
|
-
{
|
250
|
-
"inputs": [
|
251
|
-
{
|
252
|
-
"internalType": "RoleId",
|
253
|
-
"name": "role",
|
254
|
-
"type": "bytes8"
|
255
|
-
},
|
256
|
-
{
|
257
|
-
"internalType": "address",
|
258
|
-
"name": "member",
|
259
|
-
"type": "address"
|
260
|
-
}
|
261
|
-
],
|
262
|
-
"name": "hasRole",
|
263
|
-
"outputs": [
|
264
|
-
{
|
265
|
-
"internalType": "bool",
|
266
|
-
"name": "",
|
267
|
-
"type": "bool"
|
268
|
-
}
|
269
|
-
],
|
270
|
-
"stateMutability": "view",
|
271
|
-
"type": "function"
|
272
|
-
},
|
273
|
-
{
|
274
|
-
"inputs": [
|
275
|
-
{
|
276
|
-
"internalType": "RoleId",
|
277
|
-
"name": "role",
|
278
|
-
"type": "bytes8"
|
279
|
-
},
|
280
|
-
{
|
281
|
-
"internalType": "address",
|
282
|
-
"name": "member",
|
283
|
-
"type": "address"
|
284
|
-
}
|
285
|
-
],
|
286
|
-
"name": "revokeRole",
|
287
|
-
"outputs": [],
|
288
|
-
"stateMutability": "nonpayable",
|
289
|
-
"type": "function"
|
290
|
-
},
|
291
|
-
{
|
292
|
-
"inputs": [
|
293
|
-
{
|
294
|
-
"internalType": "RoleId",
|
295
|
-
"name": "role",
|
296
|
-
"type": "bytes8"
|
297
|
-
}
|
298
|
-
],
|
299
|
-
"name": "roleExists",
|
300
|
-
"outputs": [
|
301
|
-
{
|
302
|
-
"internalType": "bool",
|
303
|
-
"name": "",
|
304
|
-
"type": "bool"
|
305
|
-
}
|
306
|
-
],
|
307
|
-
"stateMutability": "view",
|
308
|
-
"type": "function"
|
309
|
-
},
|
310
|
-
{
|
311
|
-
"inputs": [
|
312
|
-
{
|
313
|
-
"internalType": "RoleId",
|
314
|
-
"name": "role",
|
315
|
-
"type": "bytes8"
|
316
|
-
},
|
317
|
-
{
|
318
|
-
"internalType": "bool",
|
319
|
-
"name": "active",
|
320
|
-
"type": "bool"
|
321
|
-
}
|
322
|
-
],
|
323
|
-
"name": "setRoleState",
|
324
|
-
"outputs": [],
|
325
|
-
"stateMutability": "nonpayable",
|
326
|
-
"type": "function"
|
327
|
-
}
|
328
|
-
],
|
329
|
-
"bytecode": "0x",
|
330
|
-
"deployedBytecode": "0x",
|
331
|
-
"linkReferences": {},
|
332
|
-
"deployedLinkReferences": {}
|
333
|
-
}
|