@etherisc/gif-next 0.0.2-ebbe63d → 0.0.2-efdb520-159
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +220 -1
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +174 -0
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +174 -0
- 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/IProductComponent.sol/IProductComponent.json +279 -0
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +4 -0
- package/artifacts/contracts/components/Pool.sol/Pool.json +387 -0
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +4 -0
- package/artifacts/contracts/components/Product.sol/Product.json +305 -0
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +4 -0
- package/artifacts/contracts/experiment/errors/Require.sol/Require.json +105 -0
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +4 -0
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +105 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/A.json +128 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +42 -0
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/B.sol/B.json +76 -0
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/C.sol/C.json +89 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +128 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +37 -0
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.json +50 -0
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +63 -0
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +59 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +124 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +74 -0
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +124 -0
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +207 -0
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +4 -0
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +10 -0
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +4 -0
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +10 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +4 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +2022 -0
- package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +4 -0
- package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.json +24 -0
- package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +4 -0
- package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.json +50 -0
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +4 -0
- package/artifacts/contracts/instance/Instance.sol/Instance.json +2288 -0
- package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.json +313 -0
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.json +333 -0
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.json +10 -0
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.json +333 -0
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +276 -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 +276 -0
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +188 -0
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +4 -0
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.json +10 -0
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +188 -0
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.json +134 -0
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.json +182 -0
- package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.json +221 -0
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +4 -0
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.json +10 -0
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +261 -0
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +261 -0
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +4 -0
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.json +10 -0
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +149 -0
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +149 -0
- package/artifacts/contracts/instance/module/product/IProductModule.sol/IProductModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/product/IProductModule.sol/IProductModule.json +10 -0
- package/artifacts/contracts/instance/module/product/ProductModule.sol/ProductModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/product/ProductModule.sol/ProductModule.json +10 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.json +10 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +538 -0
- 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/module/treasury/TreasuryModule.sol/TreasuryModule.json +538 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +519 -0
- package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.json +300 -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 +477 -0
- package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IService.sol/IService.json +300 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +499 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +685 -0
- package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.json +300 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +4 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +597 -0
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +4 -0
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +452 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +305 -0
- 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 +4 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.json +472 -0
- 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/shared/IOwnable.sol/IOwnable.json +24 -0
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +121 -0
- 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/shared/Registerable.sol/Registerable.json +121 -0
- 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 +95 -0
- package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +4 -0
- package/artifacts/contracts/test/TestPool.sol/TestPool.json +387 -0
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +4 -0
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +393 -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 +82 -0
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +4 -0
- package/artifacts/contracts/test/TestService.sol/TestService.json +407 -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 +222 -0
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +4 -0
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +230 -0
- 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 +4 -0
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +174 -0
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +10 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +92 -0
- 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 +4 -0
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +92 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.json +92 -0
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +4 -0
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +236 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +4 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +453 -0
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
- package/artifacts/contracts/types/Version.sol/VersionLib.json +78 -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 +89 -0
- package/contracts/components/IBaseComponent.sol +19 -0
- package/contracts/components/IPoolComponent.sol +57 -0
- package/contracts/components/IProductComponent.sol +19 -0
- package/contracts/components/Pool.sol +174 -0
- package/contracts/components/Product.sol +117 -0
- package/contracts/experiment/errors/Require.sol +38 -0
- package/contracts/experiment/errors/Revert.sol +44 -0
- package/contracts/experiment/inheritance/A.sol +53 -0
- package/contracts/experiment/inheritance/B.sol +28 -0
- package/contracts/experiment/inheritance/C.sol +34 -0
- package/contracts/experiment/inheritance/IA.sol +13 -0
- package/contracts/experiment/inheritance/IB.sol +10 -0
- package/contracts/experiment/inheritance/IC.sol +12 -0
- package/contracts/experiment/statemachine/Dummy.sol +27 -0
- package/contracts/experiment/statemachine/ISM.sol +25 -0
- package/contracts/experiment/statemachine/README.md +112 -0
- package/contracts/experiment/statemachine/SM.sol +57 -0
- package/contracts/experiment/statemachine/SimpleStateMachine.sol +31 -0
- package/contracts/experiment/types/TypeA.sol +47 -0
- package/contracts/experiment/types/TypeB.sol +29 -0
- package/contracts/instance/IInstance.sol +50 -0
- package/contracts/instance/IInstanceLinked.sol +8 -0
- package/contracts/instance/IServiceLinked.sol +12 -0
- package/contracts/instance/Instance.sol +62 -0
- package/contracts/instance/InstanceBase.sol +74 -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 +228 -0
- package/contracts/instance/module/bundle/IBundle.sol +53 -0
- package/contracts/instance/module/component/ComponentModule.sol +104 -0
- package/contracts/instance/module/component/IComponent.sol +53 -0
- package/contracts/instance/module/lifecycle/ILifecycle.sol +47 -0
- package/contracts/instance/module/lifecycle/LifecycleModule.sol +89 -0
- package/contracts/instance/module/policy/IPolicy.sol +60 -0
- package/contracts/instance/module/policy/PolicyModule.sol +84 -0
- package/contracts/instance/module/pool/IPoolModule.sol +41 -0
- package/contracts/instance/module/pool/PoolModule.sol +87 -0
- package/contracts/instance/module/product/IProductModule.sol +6 -0
- package/contracts/instance/module/product/ProductModule.sol +8 -0
- package/contracts/instance/module/treasury/ITreasury.sol +104 -0
- package/contracts/instance/module/treasury/TokenHandler.sol +48 -0
- package/contracts/instance/module/treasury/TreasuryModule.sol +148 -0
- package/contracts/instance/service/ComponentOwnerService.sol +174 -0
- package/contracts/instance/service/ComponentServiceBase.sol +41 -0
- package/contracts/instance/service/IComponentOwnerService.sol +22 -0
- package/contracts/instance/service/IPoolService.sol +30 -0
- package/contracts/instance/service/IProductService.sol +58 -0
- package/contracts/instance/service/IService.sol +15 -0
- package/contracts/instance/service/PoolService.sol +98 -0
- package/contracts/instance/service/ProductService.sol +358 -0
- package/contracts/instance/service/ServiceBase.sol +39 -0
- package/contracts/registry/ChainNft.sol +159 -0
- package/contracts/registry/IChainNft.sol +21 -0
- package/contracts/registry/IRegistry.sol +57 -0
- package/contracts/registry/IRegistryLinked.sol +8 -0
- package/contracts/registry/Registry.sol +381 -0
- 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 +92 -0
- package/contracts/test/TestFee.sol +25 -0
- package/contracts/test/TestPool.sol +22 -0
- package/contracts/test/TestProduct.sol +44 -0
- package/contracts/test/TestRegisterable.sol +19 -0
- package/contracts/test/TestRoleId.sol +14 -0
- package/contracts/test/TestService.sol +35 -0
- package/contracts/{Dip.sol → test/TestToken.sol} +5 -5
- package/contracts/test/TestVersion.sol +47 -0
- package/contracts/test/TestVersionable.sol +20 -0
- package/contracts/types/AddressSet.sol +58 -0
- package/contracts/types/Blocknumber.sol +118 -0
- package/contracts/types/ChainId.sol +38 -0
- package/contracts/types/Fee.sol +32 -0
- package/contracts/types/NftId.sol +57 -0
- package/contracts/types/NftIdSet.sol +60 -0
- package/contracts/types/ObjectType.sol +115 -0
- package/contracts/types/RoleId.sol +36 -0
- package/contracts/types/StateId.sol +95 -0
- package/contracts/types/Timestamp.sol +123 -0
- package/contracts/types/UFixed.sol +206 -0
- package/contracts/types/Version.sol +91 -0
- package/package.json +24 -9
- package/artifacts/contracts/Dip.sol/DIP.dbg.json +0 -4
- package/artifacts/contracts/Dip.sol/DIP.json +0 -338
- package/artifacts/contracts/Lock.sol/Lock.dbg.json +0 -4
- package/artifacts/contracts/Lock.sol/Lock.json +0 -74
- package/contracts/Lock.sol +0 -34
@@ -0,0 +1,453 @@
|
|
1
|
+
{
|
2
|
+
"_format": "hh-sol-artifact-1",
|
3
|
+
"contractName": "UFixedMathLib",
|
4
|
+
"sourceName": "contracts/types/UFixed.sol",
|
5
|
+
"abi": [
|
6
|
+
{
|
7
|
+
"inputs": [],
|
8
|
+
"name": "EXP",
|
9
|
+
"outputs": [
|
10
|
+
{
|
11
|
+
"internalType": "int8",
|
12
|
+
"name": "",
|
13
|
+
"type": "int8"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"stateMutability": "view",
|
17
|
+
"type": "function"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"inputs": [],
|
21
|
+
"name": "MULTIPLIER",
|
22
|
+
"outputs": [
|
23
|
+
{
|
24
|
+
"internalType": "uint256",
|
25
|
+
"name": "",
|
26
|
+
"type": "uint256"
|
27
|
+
}
|
28
|
+
],
|
29
|
+
"stateMutability": "view",
|
30
|
+
"type": "function"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"inputs": [],
|
34
|
+
"name": "MULTIPLIER_HALF",
|
35
|
+
"outputs": [
|
36
|
+
{
|
37
|
+
"internalType": "uint256",
|
38
|
+
"name": "",
|
39
|
+
"type": "uint256"
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"stateMutability": "view",
|
43
|
+
"type": "function"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"inputs": [],
|
47
|
+
"name": "ROUNDING_DEFAULT",
|
48
|
+
"outputs": [
|
49
|
+
{
|
50
|
+
"internalType": "enum UFixedMathLib.Rounding",
|
51
|
+
"name": "",
|
52
|
+
"type": "UFixedMathLib.Rounding"
|
53
|
+
}
|
54
|
+
],
|
55
|
+
"stateMutability": "view",
|
56
|
+
"type": "function"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"inputs": [
|
60
|
+
{
|
61
|
+
"internalType": "UFixed",
|
62
|
+
"name": "a",
|
63
|
+
"type": "uint256"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"internalType": "UFixed",
|
67
|
+
"name": "b",
|
68
|
+
"type": "uint256"
|
69
|
+
}
|
70
|
+
],
|
71
|
+
"name": "add",
|
72
|
+
"outputs": [
|
73
|
+
{
|
74
|
+
"internalType": "UFixed",
|
75
|
+
"name": "",
|
76
|
+
"type": "uint256"
|
77
|
+
}
|
78
|
+
],
|
79
|
+
"stateMutability": "pure",
|
80
|
+
"type": "function"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"inputs": [],
|
84
|
+
"name": "decimals",
|
85
|
+
"outputs": [
|
86
|
+
{
|
87
|
+
"internalType": "uint256",
|
88
|
+
"name": "",
|
89
|
+
"type": "uint256"
|
90
|
+
}
|
91
|
+
],
|
92
|
+
"stateMutability": "pure",
|
93
|
+
"type": "function"
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"inputs": [
|
97
|
+
{
|
98
|
+
"internalType": "UFixed",
|
99
|
+
"name": "a",
|
100
|
+
"type": "uint256"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"internalType": "UFixed",
|
104
|
+
"name": "b",
|
105
|
+
"type": "uint256"
|
106
|
+
}
|
107
|
+
],
|
108
|
+
"name": "delta",
|
109
|
+
"outputs": [
|
110
|
+
{
|
111
|
+
"internalType": "UFixed",
|
112
|
+
"name": "",
|
113
|
+
"type": "uint256"
|
114
|
+
}
|
115
|
+
],
|
116
|
+
"stateMutability": "pure",
|
117
|
+
"type": "function"
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"inputs": [
|
121
|
+
{
|
122
|
+
"internalType": "UFixed",
|
123
|
+
"name": "a",
|
124
|
+
"type": "uint256"
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"internalType": "UFixed",
|
128
|
+
"name": "b",
|
129
|
+
"type": "uint256"
|
130
|
+
}
|
131
|
+
],
|
132
|
+
"name": "div",
|
133
|
+
"outputs": [
|
134
|
+
{
|
135
|
+
"internalType": "UFixed",
|
136
|
+
"name": "",
|
137
|
+
"type": "uint256"
|
138
|
+
}
|
139
|
+
],
|
140
|
+
"stateMutability": "pure",
|
141
|
+
"type": "function"
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"inputs": [
|
145
|
+
{
|
146
|
+
"internalType": "UFixed",
|
147
|
+
"name": "a",
|
148
|
+
"type": "uint256"
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"internalType": "UFixed",
|
152
|
+
"name": "b",
|
153
|
+
"type": "uint256"
|
154
|
+
}
|
155
|
+
],
|
156
|
+
"name": "eq",
|
157
|
+
"outputs": [
|
158
|
+
{
|
159
|
+
"internalType": "bool",
|
160
|
+
"name": "isEqual",
|
161
|
+
"type": "bool"
|
162
|
+
}
|
163
|
+
],
|
164
|
+
"stateMutability": "pure",
|
165
|
+
"type": "function"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"inputs": [
|
169
|
+
{
|
170
|
+
"internalType": "UFixed",
|
171
|
+
"name": "a",
|
172
|
+
"type": "uint256"
|
173
|
+
}
|
174
|
+
],
|
175
|
+
"name": "eqz",
|
176
|
+
"outputs": [
|
177
|
+
{
|
178
|
+
"internalType": "bool",
|
179
|
+
"name": "isZero",
|
180
|
+
"type": "bool"
|
181
|
+
}
|
182
|
+
],
|
183
|
+
"stateMutability": "pure",
|
184
|
+
"type": "function"
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"inputs": [
|
188
|
+
{
|
189
|
+
"internalType": "UFixed",
|
190
|
+
"name": "a",
|
191
|
+
"type": "uint256"
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"internalType": "UFixed",
|
195
|
+
"name": "b",
|
196
|
+
"type": "uint256"
|
197
|
+
}
|
198
|
+
],
|
199
|
+
"name": "gt",
|
200
|
+
"outputs": [
|
201
|
+
{
|
202
|
+
"internalType": "bool",
|
203
|
+
"name": "isGreaterThan",
|
204
|
+
"type": "bool"
|
205
|
+
}
|
206
|
+
],
|
207
|
+
"stateMutability": "pure",
|
208
|
+
"type": "function"
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"inputs": [
|
212
|
+
{
|
213
|
+
"internalType": "UFixed",
|
214
|
+
"name": "a",
|
215
|
+
"type": "uint256"
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"internalType": "UFixed",
|
219
|
+
"name": "b",
|
220
|
+
"type": "uint256"
|
221
|
+
}
|
222
|
+
],
|
223
|
+
"name": "gte",
|
224
|
+
"outputs": [
|
225
|
+
{
|
226
|
+
"internalType": "bool",
|
227
|
+
"name": "isGreaterThan",
|
228
|
+
"type": "bool"
|
229
|
+
}
|
230
|
+
],
|
231
|
+
"stateMutability": "pure",
|
232
|
+
"type": "function"
|
233
|
+
},
|
234
|
+
{
|
235
|
+
"inputs": [
|
236
|
+
{
|
237
|
+
"internalType": "UFixed",
|
238
|
+
"name": "a",
|
239
|
+
"type": "uint256"
|
240
|
+
}
|
241
|
+
],
|
242
|
+
"name": "gtz",
|
243
|
+
"outputs": [
|
244
|
+
{
|
245
|
+
"internalType": "bool",
|
246
|
+
"name": "isZero",
|
247
|
+
"type": "bool"
|
248
|
+
}
|
249
|
+
],
|
250
|
+
"stateMutability": "pure",
|
251
|
+
"type": "function"
|
252
|
+
},
|
253
|
+
{
|
254
|
+
"inputs": [
|
255
|
+
{
|
256
|
+
"internalType": "UFixed",
|
257
|
+
"name": "a",
|
258
|
+
"type": "uint256"
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"internalType": "UFixed",
|
262
|
+
"name": "b",
|
263
|
+
"type": "uint256"
|
264
|
+
}
|
265
|
+
],
|
266
|
+
"name": "lt",
|
267
|
+
"outputs": [
|
268
|
+
{
|
269
|
+
"internalType": "bool",
|
270
|
+
"name": "isGreaterThan",
|
271
|
+
"type": "bool"
|
272
|
+
}
|
273
|
+
],
|
274
|
+
"stateMutability": "pure",
|
275
|
+
"type": "function"
|
276
|
+
},
|
277
|
+
{
|
278
|
+
"inputs": [
|
279
|
+
{
|
280
|
+
"internalType": "UFixed",
|
281
|
+
"name": "a",
|
282
|
+
"type": "uint256"
|
283
|
+
},
|
284
|
+
{
|
285
|
+
"internalType": "UFixed",
|
286
|
+
"name": "b",
|
287
|
+
"type": "uint256"
|
288
|
+
}
|
289
|
+
],
|
290
|
+
"name": "lte",
|
291
|
+
"outputs": [
|
292
|
+
{
|
293
|
+
"internalType": "bool",
|
294
|
+
"name": "isGreaterThan",
|
295
|
+
"type": "bool"
|
296
|
+
}
|
297
|
+
],
|
298
|
+
"stateMutability": "pure",
|
299
|
+
"type": "function"
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"inputs": [
|
303
|
+
{
|
304
|
+
"internalType": "UFixed",
|
305
|
+
"name": "a",
|
306
|
+
"type": "uint256"
|
307
|
+
},
|
308
|
+
{
|
309
|
+
"internalType": "UFixed",
|
310
|
+
"name": "b",
|
311
|
+
"type": "uint256"
|
312
|
+
}
|
313
|
+
],
|
314
|
+
"name": "mul",
|
315
|
+
"outputs": [
|
316
|
+
{
|
317
|
+
"internalType": "UFixed",
|
318
|
+
"name": "",
|
319
|
+
"type": "uint256"
|
320
|
+
}
|
321
|
+
],
|
322
|
+
"stateMutability": "pure",
|
323
|
+
"type": "function"
|
324
|
+
},
|
325
|
+
{
|
326
|
+
"inputs": [
|
327
|
+
{
|
328
|
+
"internalType": "UFixed",
|
329
|
+
"name": "a",
|
330
|
+
"type": "uint256"
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"internalType": "UFixed",
|
334
|
+
"name": "b",
|
335
|
+
"type": "uint256"
|
336
|
+
}
|
337
|
+
],
|
338
|
+
"name": "sub",
|
339
|
+
"outputs": [
|
340
|
+
{
|
341
|
+
"internalType": "UFixed",
|
342
|
+
"name": "",
|
343
|
+
"type": "uint256"
|
344
|
+
}
|
345
|
+
],
|
346
|
+
"stateMutability": "pure",
|
347
|
+
"type": "function"
|
348
|
+
},
|
349
|
+
{
|
350
|
+
"inputs": [
|
351
|
+
{
|
352
|
+
"internalType": "UFixed",
|
353
|
+
"name": "a",
|
354
|
+
"type": "uint256"
|
355
|
+
}
|
356
|
+
],
|
357
|
+
"name": "toInt",
|
358
|
+
"outputs": [
|
359
|
+
{
|
360
|
+
"internalType": "uint256",
|
361
|
+
"name": "",
|
362
|
+
"type": "uint256"
|
363
|
+
}
|
364
|
+
],
|
365
|
+
"stateMutability": "pure",
|
366
|
+
"type": "function"
|
367
|
+
},
|
368
|
+
{
|
369
|
+
"inputs": [
|
370
|
+
{
|
371
|
+
"internalType": "UFixed",
|
372
|
+
"name": "a",
|
373
|
+
"type": "uint256"
|
374
|
+
},
|
375
|
+
{
|
376
|
+
"internalType": "enum UFixedMathLib.Rounding",
|
377
|
+
"name": "rounding",
|
378
|
+
"type": "UFixedMathLib.Rounding"
|
379
|
+
}
|
380
|
+
],
|
381
|
+
"name": "toIntWithRounding",
|
382
|
+
"outputs": [
|
383
|
+
{
|
384
|
+
"internalType": "uint256",
|
385
|
+
"name": "",
|
386
|
+
"type": "uint256"
|
387
|
+
}
|
388
|
+
],
|
389
|
+
"stateMutability": "pure",
|
390
|
+
"type": "function"
|
391
|
+
},
|
392
|
+
{
|
393
|
+
"inputs": [
|
394
|
+
{
|
395
|
+
"internalType": "uint256",
|
396
|
+
"name": "a",
|
397
|
+
"type": "uint256"
|
398
|
+
},
|
399
|
+
{
|
400
|
+
"internalType": "int8",
|
401
|
+
"name": "exp",
|
402
|
+
"type": "int8"
|
403
|
+
}
|
404
|
+
],
|
405
|
+
"name": "toUFixed",
|
406
|
+
"outputs": [
|
407
|
+
{
|
408
|
+
"internalType": "UFixed",
|
409
|
+
"name": "",
|
410
|
+
"type": "uint256"
|
411
|
+
}
|
412
|
+
],
|
413
|
+
"stateMutability": "pure",
|
414
|
+
"type": "function"
|
415
|
+
},
|
416
|
+
{
|
417
|
+
"inputs": [
|
418
|
+
{
|
419
|
+
"internalType": "uint256",
|
420
|
+
"name": "a",
|
421
|
+
"type": "uint256"
|
422
|
+
}
|
423
|
+
],
|
424
|
+
"name": "toUFixed",
|
425
|
+
"outputs": [
|
426
|
+
{
|
427
|
+
"internalType": "UFixed",
|
428
|
+
"name": "",
|
429
|
+
"type": "uint256"
|
430
|
+
}
|
431
|
+
],
|
432
|
+
"stateMutability": "pure",
|
433
|
+
"type": "function"
|
434
|
+
},
|
435
|
+
{
|
436
|
+
"inputs": [],
|
437
|
+
"name": "zero",
|
438
|
+
"outputs": [
|
439
|
+
{
|
440
|
+
"internalType": "UFixed",
|
441
|
+
"name": "",
|
442
|
+
"type": "uint256"
|
443
|
+
}
|
444
|
+
],
|
445
|
+
"stateMutability": "pure",
|
446
|
+
"type": "function"
|
447
|
+
}
|
448
|
+
],
|
449
|
+
"bytecode": "0x610a4d61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061014c5760003560e01c80637a858b97116100c2578063c8a4ac9c11610086578063c8a4ac9c14610289578063cc8b7b731461029c578063df739011146102af578063ea6515c4146102c2578063eb646d71146102d5578063f30ed598146102dd57600080fd5b80637a858b9714610236578063a391c15b14610249578063b47733291461025c578063b67d77c51461026f578063bc1b392d1461028257600080fd5b8063313ce56711610114578063313ce567146101d057806332148d73146101d757806344aa6836146101ea57806345ebb61e146101fd578063753b14a514610210578063771602f71461022357600080fd5b8063059f8b1614610151578063118fc88c1461016c5780631488c8451461018f5780631a12cd47146101a257806321e5749b146101bd575b600080fd5b6101596102f2565b6040519081526020015b60405180910390f35b61017f61017a366004610794565b610301565b6040519015158152602001610163565b61015961019d3660046107b6565b610310565b6101aa601281565b60405160009190910b8152602001610163565b61017f6101cb366004610794565b6103f2565b6012610159565b61017f6101e5366004610794565b6103fc565b6101596101f83660046107ec565b610406565b61015961020b3660046107ec565b610413565b61017f61021e3660046107ec565b61042b565b610159610231366004610794565b610434565b61017f6102443660046107ec565b610440565b610159610257366004610794565b61044a565b61017f61026a366004610794565b610456565b61015961027d366004610794565b610461565b6000610159565b610159610297366004610794565b61046d565b6101596102aa366004610794565b610479565b6101596102bd366004610805565b610485565b61017f6102d0366004610794565b610525565b610159610530565b6102e5600281565b6040516101639190610844565b6102fe6012600a610966565b81565b60008282115b90505b92915050565b60008061031e836012610972565b60000b12156103745760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c0060448201526064015b60405180910390fd5b6040610381836012610972565b60000b13156103d25760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c4152474500604482015260640161036b565b6103dd826012610972565b6103e890600a610993565b61030790846109a2565b6000828210610307565b6000818314610307565b600061030a826002610485565b60006104216012600a610966565b61030a90836109a2565b6000811561030a565b60006103078383610548565b600081151561030a565b60006103078383610554565b600082821115610307565b600061030783836105b8565b60006103078383610614565b60006103078383610629565b6000600282600281111561049b5761049b61082e565b036104e1576104da60026104b16012600a610966565b6104bb91906109cf565b6104c590856109f1565b60016104d36012600a610966565b6000610647565b905061030a565b60008260028111156104f5576104f561082e565b0361050c576104da8360016104d36012600a610966565b6104da83600161051e6012600a610966565b6001610647565b600082821015610307565b600261053e6012600a610966565b6102fe91906109cf565b600061030782846109f1565b60008082116105a55760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a55464d2d3032303a44495649534f525f5a45524f000000000000604482015260640161036b565b61030783670de0b6b3a7640000846106a4565b60008282111561060a5760405162461bcd60e51b815260206004820152601d60248201527f4552524f523a55464d2d3031303a4e454741544956455f524553554c54000000604482015260640161036b565b6103078284610a04565b60006103078383670de0b6b3a76400006106a4565b60008282101561063d576104da83836105b8565b61030782846105b8565b6000806106558686866106a4565b9050600183600281111561066b5761066b61082e565b148015610688575060008480610683576106836109b9565b868809115b1561069b576106986001826109f1565b90505b95945050505050565b60008080600019858709858702925082811083820303915050806000036106de578382816106d4576106d46109b9565b049250505061078d565b8084116107255760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161036b565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b600080604083850312156107a757600080fd5b50508035926020909101359150565b600080604083850312156107c957600080fd5b8235915060208301358060000b81146107e157600080fd5b809150509250929050565b6000602082840312156107fe57600080fd5b5035919050565b6000806040838503121561081857600080fd5b823591506020830135600381106107e157600080fd5b634e487b7160e01b600052602160045260246000fd5b602081016003831061086657634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156108bd5781600019048211156108a3576108a361086c565b808516156108b057918102915b93841c9390800290610887565b509250929050565b6000826108d45750600161030a565b816108e15750600061030a565b81600181146108f757600281146109015761091d565b600191505061030a565b60ff8411156109125761091261086c565b50506001821b61030a565b5060208310610133831016604e8410600b8410161715610940575081810a61030a565b61094a8383610882565b806000190482111561095e5761095e61086c565b029392505050565b600061030783836108c5565b600081810b9083900b01607f8113607f198212171561030a5761030a61086c565b600061030760ff8416836108c5565b808202811582820484141761030a5761030a61086c565b634e487b7160e01b600052601260045260246000fd5b6000826109ec57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561030a5761030a61086c565b8181038181111561030a5761030a61086c56fea26469706673582212203e54f48eab75437862b6140e654746538ce5d107025fea2883a132e04e5d771c64736f6c63430008140033",
|
450
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061014c5760003560e01c80637a858b97116100c2578063c8a4ac9c11610086578063c8a4ac9c14610289578063cc8b7b731461029c578063df739011146102af578063ea6515c4146102c2578063eb646d71146102d5578063f30ed598146102dd57600080fd5b80637a858b9714610236578063a391c15b14610249578063b47733291461025c578063b67d77c51461026f578063bc1b392d1461028257600080fd5b8063313ce56711610114578063313ce567146101d057806332148d73146101d757806344aa6836146101ea57806345ebb61e146101fd578063753b14a514610210578063771602f71461022357600080fd5b8063059f8b1614610151578063118fc88c1461016c5780631488c8451461018f5780631a12cd47146101a257806321e5749b146101bd575b600080fd5b6101596102f2565b6040519081526020015b60405180910390f35b61017f61017a366004610794565b610301565b6040519015158152602001610163565b61015961019d3660046107b6565b610310565b6101aa601281565b60405160009190910b8152602001610163565b61017f6101cb366004610794565b6103f2565b6012610159565b61017f6101e5366004610794565b6103fc565b6101596101f83660046107ec565b610406565b61015961020b3660046107ec565b610413565b61017f61021e3660046107ec565b61042b565b610159610231366004610794565b610434565b61017f6102443660046107ec565b610440565b610159610257366004610794565b61044a565b61017f61026a366004610794565b610456565b61015961027d366004610794565b610461565b6000610159565b610159610297366004610794565b61046d565b6101596102aa366004610794565b610479565b6101596102bd366004610805565b610485565b61017f6102d0366004610794565b610525565b610159610530565b6102e5600281565b6040516101639190610844565b6102fe6012600a610966565b81565b60008282115b90505b92915050565b60008061031e836012610972565b60000b12156103745760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c0060448201526064015b60405180910390fd5b6040610381836012610972565b60000b13156103d25760405162461bcd60e51b815260206004820152601f60248201527f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c4152474500604482015260640161036b565b6103dd826012610972565b6103e890600a610993565b61030790846109a2565b6000828210610307565b6000818314610307565b600061030a826002610485565b60006104216012600a610966565b61030a90836109a2565b6000811561030a565b60006103078383610548565b600081151561030a565b60006103078383610554565b600082821115610307565b600061030783836105b8565b60006103078383610614565b60006103078383610629565b6000600282600281111561049b5761049b61082e565b036104e1576104da60026104b16012600a610966565b6104bb91906109cf565b6104c590856109f1565b60016104d36012600a610966565b6000610647565b905061030a565b60008260028111156104f5576104f561082e565b0361050c576104da8360016104d36012600a610966565b6104da83600161051e6012600a610966565b6001610647565b600082821015610307565b600261053e6012600a610966565b6102fe91906109cf565b600061030782846109f1565b60008082116105a55760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a55464d2d3032303a44495649534f525f5a45524f000000000000604482015260640161036b565b61030783670de0b6b3a7640000846106a4565b60008282111561060a5760405162461bcd60e51b815260206004820152601d60248201527f4552524f523a55464d2d3031303a4e454741544956455f524553554c54000000604482015260640161036b565b6103078284610a04565b60006103078383670de0b6b3a76400006106a4565b60008282101561063d576104da83836105b8565b61030782846105b8565b6000806106558686866106a4565b9050600183600281111561066b5761066b61082e565b148015610688575060008480610683576106836109b9565b868809115b1561069b576106986001826109f1565b90505b95945050505050565b60008080600019858709858702925082811083820303915050806000036106de578382816106d4576106d46109b9565b049250505061078d565b8084116107255760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161036b565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b600080604083850312156107a757600080fd5b50508035926020909101359150565b600080604083850312156107c957600080fd5b8235915060208301358060000b81146107e157600080fd5b809150509250929050565b6000602082840312156107fe57600080fd5b5035919050565b6000806040838503121561081857600080fd5b823591506020830135600381106107e157600080fd5b634e487b7160e01b600052602160045260246000fd5b602081016003831061086657634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156108bd5781600019048211156108a3576108a361086c565b808516156108b057918102915b93841c9390800290610887565b509250929050565b6000826108d45750600161030a565b816108e15750600061030a565b81600181146108f757600281146109015761091d565b600191505061030a565b60ff8411156109125761091261086c565b50506001821b61030a565b5060208310610133831016604e8410600b8410161715610940575081810a61030a565b61094a8383610882565b806000190482111561095e5761095e61086c565b029392505050565b600061030783836108c5565b600081810b9083900b01607f8113607f198212171561030a5761030a61086c565b600061030760ff8416836108c5565b808202811582820484141761030a5761030a61086c565b634e487b7160e01b600052601260045260246000fd5b6000826109ec57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561030a5761030a61086c565b8181038181111561030a5761030a61086c56fea26469706673582212203e54f48eab75437862b6140e654746538ce5d107025fea2883a132e04e5d771c64736f6c63430008140033",
|
451
|
+
"linkReferences": {},
|
452
|
+
"deployedLinkReferences": {}
|
453
|
+
}
|
@@ -0,0 +1,78 @@
|
|
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": "Version",
|
48
|
+
"name": "version",
|
49
|
+
"type": "uint24"
|
50
|
+
}
|
51
|
+
],
|
52
|
+
"name": "toVersionParts",
|
53
|
+
"outputs": [
|
54
|
+
{
|
55
|
+
"internalType": "VersionPart",
|
56
|
+
"name": "major",
|
57
|
+
"type": "uint8"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"internalType": "VersionPart",
|
61
|
+
"name": "minor",
|
62
|
+
"type": "uint8"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"internalType": "VersionPart",
|
66
|
+
"name": "patch",
|
67
|
+
"type": "uint8"
|
68
|
+
}
|
69
|
+
],
|
70
|
+
"stateMutability": "pure",
|
71
|
+
"type": "function"
|
72
|
+
}
|
73
|
+
],
|
74
|
+
"bytecode": "0x6101a961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806349a7111a14610050578063556010071461008c578063c9e66e29146100b0575b600080fd5b61006361005e366004610116565b6100d9565b6040805160ff948516815292841660208401529216918101919091526060015b60405180910390f35b6100a261009a366004610116565b62ffffff1690565b604051908152602001610083565b6100c76100be366004610116565b60101c60ff1690565b60405160ff9091168152602001610083565b600080808360ff601082901c166100f08383610142565b915061ffff600883901c1660006101078185610142565b92989197509195509350505050565b60006020828403121561012857600080fd5b813562ffffff8116811461013b57600080fd5b9392505050565b62ffffff82811682821603908082111561016c57634e487b7160e01b600052601160045260246000fd5b509291505056fea26469706673582212200bd4c7b26105f56f3e5ca7e3e58f905d9e6d04e631e2e84ea5ff0d590ca4399f64736f6c63430008140033",
|
75
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806349a7111a14610050578063556010071461008c578063c9e66e29146100b0575b600080fd5b61006361005e366004610116565b6100d9565b6040805160ff948516815292841660208401529216918101919091526060015b60405180910390f35b6100a261009a366004610116565b62ffffff1690565b604051908152602001610083565b6100c76100be366004610116565b60101c60ff1690565b60405160ff9091168152602001610083565b600080808360ff601082901c166100f08383610142565b915061ffff600883901c1660006101078185610142565b92989197509195509350505050565b60006020828403121561012857600080fd5b813562ffffff8116811461013b57600080fd5b9392505050565b62ffffff82811682821603908082111561016c57634e487b7160e01b600052601160045260246000fd5b509291505056fea26469706673582212200bd4c7b26105f56f3e5ca7e3e58f905d9e6d04e631e2e84ea5ff0d590ca4399f64736f6c63430008140033",
|
76
|
+
"linkReferences": {},
|
77
|
+
"deployedLinkReferences": {}
|
78
|
+
}
|
@@ -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": "0x60b9610039600b82828239805160001a60731461002c57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063ac43d834146038575b600080fd5b60496043366004605b565b60ff1690565b60405190815260200160405180910390f35b600060208284031215606c57600080fd5b813560ff81168114607c57600080fd5b939250505056fea26469706673582212203ebb69088f45515ad3bf7d61298feea5dae8d24b3fbf854881fdd75e3046518764736f6c63430008140033",
|
27
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063ac43d834146038575b600080fd5b60496043366004605b565b60ff1690565b60405190815260200160405180910390f35b600060208284031215606c57600080fd5b813560ff81168114607c57600080fd5b939250505056fea26469706673582212203ebb69088f45515ad3bf7d61298feea5dae8d24b3fbf854881fdd75e3046518764736f6c63430008140033",
|
28
|
+
"linkReferences": {},
|
29
|
+
"deployedLinkReferences": {}
|
30
|
+
}
|
@@ -0,0 +1,89 @@
|
|
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
|
+
import {IServiceLinked} from "../instance/IServiceLinked.sol";
|
12
|
+
|
13
|
+
import {IInstance} from "../instance/IInstance.sol";
|
14
|
+
import {IComponent, IComponentModule} from "../instance/module/component/IComponent.sol";
|
15
|
+
import {IComponentOwnerService} from "../instance/service/IComponentOwnerService.sol";
|
16
|
+
import {IBaseComponent} from "./IBaseComponent.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
|
+
|
30
|
+
constructor(
|
31
|
+
address registry,
|
32
|
+
NftId instanceNftId,
|
33
|
+
address token
|
34
|
+
)
|
35
|
+
Registerable(registry, instanceNftId)
|
36
|
+
{
|
37
|
+
IRegistry.ObjectInfo memory instanceInfo = _registry.getObjectInfo(instanceNftId);
|
38
|
+
_instance = IInstance(instanceInfo.objectAddress);
|
39
|
+
require(
|
40
|
+
_instance.supportsInterface(type(IInstance).interfaceId),
|
41
|
+
""
|
42
|
+
);
|
43
|
+
|
44
|
+
_componentOwnerService = _instance.getComponentOwnerService();
|
45
|
+
_wallet = address(this);
|
46
|
+
_token = IERC20Metadata(token);
|
47
|
+
}
|
48
|
+
|
49
|
+
// from registerable
|
50
|
+
function register() public override(IRegisterable, Registerable) returns (NftId componentId) {
|
51
|
+
require(msg.sender == getOwner(), "");
|
52
|
+
require(
|
53
|
+
address(_registry) != address(0),
|
54
|
+
"ERROR:COB-001:REGISTRY_ZERO"
|
55
|
+
);
|
56
|
+
require(
|
57
|
+
_registry.isRegistered(address(_instance)),
|
58
|
+
"ERROR:COB:INSTANCE_NOT_REGISTERED"
|
59
|
+
);
|
60
|
+
|
61
|
+
componentId = _componentOwnerService.register(this);
|
62
|
+
}
|
63
|
+
|
64
|
+
// from component contract
|
65
|
+
function lock() external onlyOwner override {
|
66
|
+
_componentOwnerService.lock(this);
|
67
|
+
}
|
68
|
+
|
69
|
+
function unlock() external onlyOwner override {
|
70
|
+
_componentOwnerService.unlock(this);
|
71
|
+
}
|
72
|
+
|
73
|
+
function getWallet()
|
74
|
+
external
|
75
|
+
view
|
76
|
+
override
|
77
|
+
returns (address walletAddress)
|
78
|
+
{
|
79
|
+
return _wallet;
|
80
|
+
}
|
81
|
+
|
82
|
+
function getToken() external view override returns (IERC20Metadata token) {
|
83
|
+
return _token;
|
84
|
+
}
|
85
|
+
|
86
|
+
function getInstance() external view override returns (IInstance instance) {
|
87
|
+
return _instance;
|
88
|
+
}
|
89
|
+
}
|