@gooddollar/goodcollective-contracts 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/contracts/DirectPayments/DirectPaymentsFactory.sol/DirectPaymentsFactory.dbg.json +4 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsFactory.sol/DirectPaymentsFactory.json +995 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsLibrary.sol/DirectPaymentsLibrary.dbg.json +4 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsLibrary.sol/DirectPaymentsLibrary.json +113 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsPool.sol/DirectPaymentsPool.dbg.json +4 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsPool.sol/DirectPaymentsPool.json +2210 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsPool.sol/IIdentityV2.dbg.json +4 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsPool.sol/IIdentityV2.json +30 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsPool.sol/IMembersValidator.dbg.json +4 -0
- package/artifacts/contracts/DirectPayments/DirectPaymentsPool.sol/IMembersValidator.json +45 -0
- package/artifacts/contracts/DirectPayments/ProvableNFT.sol/ProvableNFT.dbg.json +4 -0
- package/artifacts/contracts/DirectPayments/ProvableNFT.sol/ProvableNFT.json +1187 -0
- package/artifacts/contracts/GoodCollective/GoodCollectiveSuperApp.sol/GoodCollectiveSuperApp.dbg.json +4 -0
- package/artifacts/contracts/GoodCollective/GoodCollectiveSuperApp.sol/GoodCollectiveSuperApp.json +831 -0
- package/artifacts/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IGoodCollectiveSuperApp.dbg.json +4 -0
- package/artifacts/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IGoodCollectiveSuperApp.json +42 -0
- package/artifacts/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IRegistry.dbg.json +4 -0
- package/artifacts/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IRegistry.json +61 -0
- package/artifacts/contracts/GoodCollective/SuperAppBaseFlow.sol/IRegisterSuperapp.dbg.json +4 -0
- package/artifacts/contracts/GoodCollective/SuperAppBaseFlow.sol/IRegisterSuperapp.json +47 -0
- package/artifacts/contracts/GoodCollective/SuperAppBaseFlow.sol/SuperAppBaseFlow.dbg.json +4 -0
- package/artifacts/contracts/GoodCollective/SuperAppBaseFlow.sol/SuperAppBaseFlow.json +320 -0
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +4 -0
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.json +30 -0
- package/artifacts/contracts/Interfaces.sol/IMembersValidator.dbg.json +4 -0
- package/artifacts/contracts/Interfaces.sol/IMembersValidator.json +45 -0
- package/artifacts/contracts/UBI/UBIPool.sol/UBIPool.dbg.json +4 -0
- package/artifacts/contracts/UBI/UBIPool.sol/UBIPool.json +2078 -0
- package/artifacts/contracts/UBI/UBIPoolFactory.sol/UBIPoolFactory.dbg.json +4 -0
- package/artifacts/contracts/UBI/UBIPoolFactory.sol/UBIPoolFactory.json +1011 -0
- package/artifacts/contracts/test/HelperLibraryTest.sol/HelperLibraryTest.dbg.json +4 -0
- package/artifacts/contracts/test/HelperLibraryTest.sol/HelperLibraryTest.json +90 -0
- package/artifacts/contracts/utils/HelperLibrary.sol/HelperLibrary.dbg.json +4 -0
- package/artifacts/contracts/utils/HelperLibrary.sol/HelperLibrary.json +117 -0
- package/artifacts/contracts/utils/SwapRouterMock.sol/SwapRouterMock.dbg.json +4 -0
- package/artifacts/contracts/utils/SwapRouterMock.sol/SwapRouterMock.json +119 -0
- package/contracts/DirectPayments/DirectPaymentsFactory.sol +32 -6
- package/contracts/DirectPayments/DirectPaymentsLibrary.sol +168 -14
- package/contracts/DirectPayments/DirectPaymentsPool.sol +31 -116
- package/contracts/GoodCollective/GoodCollectiveSuperApp.sol +7 -6
- package/contracts/GoodCollective/IGoodCollectiveSuperApp.sol +4 -0
- package/contracts/GoodCollective/SuperAppBaseFlow.sol +6 -0
- package/contracts/UBI/UBIPool.sol +62 -18
- package/contracts/UBI/UBIPoolFactory.sol +32 -4
- package/contracts/utils/HelperLibrary.sol +10 -0
- package/contracts/utils/Recover.sol +16 -0
- package/package.json +4 -4
- package/releases/deployment.json +7417 -30724
- package/typechain-types/contracts/DirectPayments/DirectPaymentsFactory.ts +54 -0
- package/typechain-types/contracts/DirectPayments/DirectPaymentsLibrary.sol/DirectPayemntsLibrary.ts +77 -0
- package/typechain-types/contracts/DirectPayments/DirectPaymentsLibrary.sol/DirectPaymentsLibrary.ts +77 -0
- package/typechain-types/contracts/DirectPayments/DirectPaymentsLibrary.sol/index.ts +5 -0
- package/typechain-types/contracts/DirectPayments/DirectPaymentsLibrary.ts +146 -0
- package/typechain-types/contracts/DirectPayments/DirectPaymentsPool.sol/DirectPaymentsPool.ts +90 -11
- package/typechain-types/contracts/DirectPayments/DirectPaymentsPool.sol/IMembersValidator.ts +6 -8
- package/typechain-types/contracts/DirectPayments/index.ts +1 -0
- package/typechain-types/contracts/GoodCollective/GoodCollectiveSuperApp.ts +40 -0
- package/typechain-types/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IGoodCollectiveSuperApp.ts +22 -1
- package/typechain-types/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IRegistry.ts +38 -1
- package/typechain-types/contracts/GoodCollective/SuperAppBaseFlow.sol/IRegisterSuperapp.ts +152 -0
- package/typechain-types/contracts/GoodCollective/SuperAppBaseFlow.sol/SuperAppBaseFlow.ts +523 -0
- package/typechain-types/contracts/GoodCollective/SuperAppBaseFlow.sol/index.ts +5 -0
- package/typechain-types/contracts/GoodCollective/index.ts +2 -1
- package/typechain-types/contracts/UBI/MultiClaimModule.sol/IClaimable.ts +92 -0
- package/typechain-types/contracts/UBI/MultiClaimModule.sol/IModule.ts +196 -0
- package/typechain-types/contracts/UBI/MultiClaimModule.sol/MultiClaimModule.ts +242 -0
- package/typechain-types/contracts/UBI/MultiClaimModule.sol/index.ts +6 -0
- package/typechain-types/contracts/UBI/UBIPool.ts +77 -0
- package/typechain-types/contracts/UBI/UBIPoolFactory.ts +54 -0
- package/typechain-types/contracts/utils/Recover.ts +263 -0
- package/typechain-types/contracts/utils/index.ts +1 -0
- package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsFactory__factory.ts +38 -1
- package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsLibrary.sol/DirectPayemntsLibrary__factory.ts +96 -0
- package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsLibrary.sol/DirectPaymentsLibrary__factory.ts +96 -0
- package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsLibrary.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsLibrary__factory.ts +169 -0
- package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsPool.sol/DirectPaymentsPool__factory.ts +53 -2
- package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsPool.sol/IMembersValidator__factory.ts +1 -1
- package/typechain-types/factories/contracts/DirectPayments/index.ts +1 -0
- package/typechain-types/factories/contracts/GoodCollective/GoodCollectiveSuperApp__factory.ts +18 -0
- package/typechain-types/factories/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IGoodCollectiveSuperApp__factory.ts +13 -0
- package/typechain-types/factories/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IRegistry__factory.ts +24 -0
- package/typechain-types/factories/contracts/GoodCollective/SuperAppBaseFlow.sol/IRegisterSuperapp__factory.ts +62 -0
- package/typechain-types/factories/contracts/GoodCollective/SuperAppBaseFlow.sol/SuperAppBaseFlow__factory.ts +335 -0
- package/typechain-types/factories/contracts/GoodCollective/SuperAppBaseFlow.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/GoodCollective/index.ts +1 -1
- package/typechain-types/factories/contracts/UBI/MultiClaimModule.sol/IClaimable__factory.ts +33 -0
- package/typechain-types/factories/contracts/UBI/MultiClaimModule.sol/IModule__factory.ts +84 -0
- package/typechain-types/factories/contracts/UBI/MultiClaimModule.sol/MultiClaimModule__factory.ts +150 -0
- package/typechain-types/factories/contracts/UBI/MultiClaimModule.sol/index.ts +6 -0
- package/typechain-types/factories/contracts/UBI/UBIPoolFactory__factory.ts +38 -1
- package/typechain-types/factories/contracts/UBI/UBIPool__factory.ts +42 -1
- package/typechain-types/factories/contracts/test/HelperLibraryTest__factory.ts +1 -1
- package/typechain-types/factories/contracts/utils/HelperLibrary__factory.ts +11 -1
- package/typechain-types/factories/contracts/utils/Recover__factory.ts +172 -0
- package/typechain-types/factories/contracts/utils/index.ts +1 -0
- package/typechain-types/hardhat.d.ts +27 -0
- package/typechain-types/index.ts +8 -2
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "HelperLibraryTest",
|
|
4
|
+
"sourceName": "contracts/test/HelperLibraryTest.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "contract IV3SwapRouter",
|
|
10
|
+
"name": "swapRouter",
|
|
11
|
+
"type": "address"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"components": [
|
|
15
|
+
{
|
|
16
|
+
"internalType": "address",
|
|
17
|
+
"name": "swapFrom",
|
|
18
|
+
"type": "address"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"internalType": "uint256",
|
|
22
|
+
"name": "amount",
|
|
23
|
+
"type": "uint256"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"internalType": "uint256",
|
|
27
|
+
"name": "minReturn",
|
|
28
|
+
"type": "uint256"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"internalType": "uint256",
|
|
32
|
+
"name": "deadline",
|
|
33
|
+
"type": "uint256"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"internalType": "bytes",
|
|
37
|
+
"name": "path",
|
|
38
|
+
"type": "bytes"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"internalType": "struct HelperLibrary.SwapData",
|
|
42
|
+
"name": "_customData",
|
|
43
|
+
"type": "tuple"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"internalType": "address",
|
|
47
|
+
"name": "outTokenIfNoPath",
|
|
48
|
+
"type": "address"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"internalType": "address",
|
|
52
|
+
"name": "_sender",
|
|
53
|
+
"type": "address"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"name": "handleSwap",
|
|
57
|
+
"outputs": [
|
|
58
|
+
{
|
|
59
|
+
"internalType": "uint256",
|
|
60
|
+
"name": "amountOut",
|
|
61
|
+
"type": "uint256"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"stateMutability": "nonpayable",
|
|
65
|
+
"type": "function"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"bytecode": "0x608060405234801561001057600080fd5b506103bf806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80630f39b88814610030575b600080fd5b61004361003e366004610177565b610055565b60405190815260200160405180910390f35b6040516321437a5360e01b815260009073__$0d78a42341742155da77b97d7f993534c7$__906321437a539061009790889088908890889081906004016102ab565b602060405180830381865af41580156100b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d89190610370565b95945050505050565b6001600160a01b03811681146100f657600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b0381118282101715610131576101316100f9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561015f5761015f6100f9565b604052919050565b8035610172816100e1565b919050565b6000806000806080858703121561018d57600080fd5b8435610198816100e1565b93506020858101356001600160401b03808211156101b557600080fd5b9087019060a0828a0312156101c957600080fd5b6101d161010f565b82356101dc816100e1565b808252508383013584820152604083013560408201526060830135606082015260808301358281111561020e57600080fd5b80840193505089601f84011261022357600080fd5b823582811115610235576102356100f9565b610247601f8201601f19168601610137565b92508083528a8582860101111561025d57600080fd5b8085850186850137600090830190940193909352608083015250925061028560408601610167565b915061029360608601610167565b905092959194509250565b6001600160a01b03169052565b600060018060a01b038088168352602060a0818501528188511660a08501528088015160c0850152604088015160e085015260608801516101008501526080880151915060a061012085015281518061014086015260005b818110156103205783810183015186820161016001528201610303565b506101609250600083828701015282601f19601f830116860101935050505061034c604083018661029e565b610359606083018561029e565b610366608083018461029e565b9695505050505050565b60006020828403121561038257600080fd5b505191905056fea264697066735822122039444bbd61eb357adfc4f3599c9b345fb9bd0d6086effe992eb98fe902f4883264736f6c63430008130033",
|
|
69
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80630f39b88814610030575b600080fd5b61004361003e366004610177565b610055565b60405190815260200160405180910390f35b6040516321437a5360e01b815260009073__$0d78a42341742155da77b97d7f993534c7$__906321437a539061009790889088908890889081906004016102ab565b602060405180830381865af41580156100b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d89190610370565b95945050505050565b6001600160a01b03811681146100f657600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b0381118282101715610131576101316100f9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561015f5761015f6100f9565b604052919050565b8035610172816100e1565b919050565b6000806000806080858703121561018d57600080fd5b8435610198816100e1565b93506020858101356001600160401b03808211156101b557600080fd5b9087019060a0828a0312156101c957600080fd5b6101d161010f565b82356101dc816100e1565b808252508383013584820152604083013560408201526060830135606082015260808301358281111561020e57600080fd5b80840193505089601f84011261022357600080fd5b823582811115610235576102356100f9565b610247601f8201601f19168601610137565b92508083528a8582860101111561025d57600080fd5b8085850186850137600090830190940193909352608083015250925061028560408601610167565b915061029360608601610167565b905092959194509250565b6001600160a01b03169052565b600060018060a01b038088168352602060a0818501528188511660a08501528088015160c0850152604088015160e085015260608801516101008501526080880151915060a061012085015281518061014086015260005b818110156103205783810183015186820161016001528201610303565b506101609250600083828701015282601f19601f830116860101935050505061034c604083018661029e565b610359606083018561029e565b610366608083018461029e565b9695505050505050565b60006020828403121561038257600080fd5b505191905056fea264697066735822122039444bbd61eb357adfc4f3599c9b345fb9bd0d6086effe992eb98fe902f4883264736f6c63430008130033",
|
|
70
|
+
"linkReferences": {
|
|
71
|
+
"contracts/utils/HelperLibrary.sol": {
|
|
72
|
+
"HelperLibrary": [
|
|
73
|
+
{
|
|
74
|
+
"length": 20,
|
|
75
|
+
"start": 135
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"deployedLinkReferences": {
|
|
81
|
+
"contracts/utils/HelperLibrary.sol": {
|
|
82
|
+
"HelperLibrary": [
|
|
83
|
+
{
|
|
84
|
+
"length": 20,
|
|
85
|
+
"start": 103
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "HelperLibrary",
|
|
4
|
+
"sourceName": "contracts/utils/HelperLibrary.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [],
|
|
8
|
+
"name": "ZERO_ADDRESS",
|
|
9
|
+
"type": "error"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"inputs": [],
|
|
13
|
+
"name": "ZERO_AMOUNT",
|
|
14
|
+
"type": "error"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"inputs": [
|
|
18
|
+
{
|
|
19
|
+
"components": [
|
|
20
|
+
{
|
|
21
|
+
"internalType": "uint256",
|
|
22
|
+
"name": "netIncome",
|
|
23
|
+
"type": "uint256"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"internalType": "uint256",
|
|
27
|
+
"name": "totalFees",
|
|
28
|
+
"type": "uint256"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"internalType": "uint256",
|
|
32
|
+
"name": "lastUpdate",
|
|
33
|
+
"type": "uint256"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"internalType": "address",
|
|
37
|
+
"name": "lastFeeRecipient",
|
|
38
|
+
"type": "address"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"internalType": "int96",
|
|
42
|
+
"name": "lastIncomeRate",
|
|
43
|
+
"type": "int96"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"internalType": "address",
|
|
47
|
+
"name": "lastManagerFeeRecipient",
|
|
48
|
+
"type": "address"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"internalType": "uint256",
|
|
52
|
+
"name": "protocolFees",
|
|
53
|
+
"type": "uint256"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"internalType": "uint256",
|
|
57
|
+
"name": "managerFees",
|
|
58
|
+
"type": "uint256"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"internalType": "struct IGoodCollectiveSuperApp.Stats",
|
|
62
|
+
"name": "stats",
|
|
63
|
+
"type": "tuple"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"internalType": "contract ISuperToken",
|
|
67
|
+
"name": "superToken",
|
|
68
|
+
"type": "ISuperToken"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"name": "getRealtimeStats",
|
|
72
|
+
"outputs": [
|
|
73
|
+
{
|
|
74
|
+
"internalType": "uint256",
|
|
75
|
+
"name": "netIncome",
|
|
76
|
+
"type": "uint256"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"internalType": "uint256",
|
|
80
|
+
"name": "totalFees",
|
|
81
|
+
"type": "uint256"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"internalType": "uint256",
|
|
85
|
+
"name": "protocolFees",
|
|
86
|
+
"type": "uint256"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"internalType": "uint256",
|
|
90
|
+
"name": "managerFees",
|
|
91
|
+
"type": "uint256"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"internalType": "int96",
|
|
95
|
+
"name": "incomeFlowRate",
|
|
96
|
+
"type": "int96"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"internalType": "int96",
|
|
100
|
+
"name": "feeRate",
|
|
101
|
+
"type": "int96"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"internalType": "int96",
|
|
105
|
+
"name": "managerFeeRate",
|
|
106
|
+
"type": "int96"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"stateMutability": "view",
|
|
110
|
+
"type": "function"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"bytecode": "0x61191661003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806321437a53146100715780634d167a90146100a457806358c0dacb146100d157806365a99a06146100f1578063934e2cce14610113578063b2f918a114610133575b600080fd5b81801561007d57600080fd5b5061009161008c3660046111a0565b610184565b6040519081526020015b60405180910390f35b8180156100b057600080fd5b506100c46100bf366004611255565b610318565b60405161009b9190611348565b8180156100dd57600080fd5b506100916100ec366004611362565b610434565b8180156100fd57600080fd5b5061011161010c3660046113d6565b610443565b005b81801561011f57600080fd5b5061011161012e366004611417565b610612565b610146610141366004611472565b61088b565b604080519788526020880196909652948601939093526060850191909152600b90810b608085015290810b60a08401520b60c082015260e00161009b565b600061019a8560000151843088602001516109d1565b6101ad8560000151878760200151610adb565b6080850151511561025c57604080516080808201835287015181526001600160a01b0380851660208084019190915288015182840152878301516060830152915163b858183f60e01b8152909188169063b858183f9061021190849060040161151b565b6020604051808303816000875af1158015610230573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102549190611569565b91505061030f565b6040805160e08101825286516001600160a01b039081168252868116602080840191825261271084860190815287841660608601908152918b0151608086019081528b87015160a08701908152600060c0880190815297516304e45aaf60e01b8152875187166004820152945186166024860152915162ffffff166044850152915184166064840152905160848301525160a48201529251811660c48401529091908816906304e45aaf9060e401610211565b95945050505050565b806001600160a01b0385161561042957600061033e6001600160a01b0389163089610be5565b90506000876001600160a01b0316876001600160a01b031614610389575060016001600160a01b0388161561038957600082600b0b1315610389576103868a84308b8d610c7d565b92505b6001600160a01b03871661039e575050610429565b60006127106103b1600389900b88611598565b6103bb91906115d5565b6103c59084611613565b9050811580156103d85750600083600b0b135b1561040957600081600b0b136103fc576103f58b85308b8e610c7d565b9350610425565b6103f58b858a8d85610cac565b600081600b0b1315610425576104228b858a8d85610cd1565b93505b5050505b979650505050505050565b600061030f8585858586610184565b306001600160a01b0316635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a59190611646565b604051632474521560e21b8152600060048201523360248201526001600160a01b0391909116906391d1485490604401602060405180830381865afa1580156104f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105169190611663565b6105535760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b60448201526064015b60405180910390fd5b8060000361057457604051630f6fa54560e41b815260040160405180910390fd5b6001600160a01b03821661059b5760405163538ba4f960e01b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb906105c99085908590600401611685565b6020604051808303816000875af11580156105e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060c9190611663565b50505050565b60006001600160a01b0384161561068e57836001600160a01b03166324a9d8536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610661573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610685919061169e565b63ffffffff1690505b600286015461069d90426116bb565b60038701546106bc9190600160a01b90046001600160601b03166116ce565b8660000160008282546106cf91906116e5565b909155505060038601546001600160a01b03161561073f5760028601546106f690426116bb565b6003870154610713906001600160a01b0388811691309116610be5565b6001600160601b031661072691906116ce565b86600501600082825461073991906116e5565b90915550505b60048601546001600160a01b0316156107aa57600286015461076190426116bb565b600487015461077e906001600160a01b0388811691309116610be5565b6001600160601b031661079191906116ce565b8660060160008282546107a491906116e5565b90915550505b81156108615761271063ffffffff84166107c483836116bb565b6107ce91906116bb565b6107d890846116ce565b6107e291906116f8565b8660000160008282546107f591906116e5565b90915550612710905061080882846116ce565b61081291906116f8565b86600501600082825461082591906116e5565b90915550612710905061083e63ffffffff8516846116ce565b61084891906116f8565b86600601600082825461085b91906116e5565b90915550505b8560050154866006015461087591906116e5565b6001870155505042600290940193909355505050565b6000806000806000806000886080015192508860400151426108ad91906116bb565b89608001516001600160601b03166108c591906116ce565b89516108d191906116e5565b96506108f5308a606001518a6001600160a01b0316610be59092919063ffffffff16565b9150610919308a60a001518a6001600160a01b0316610be59092919063ffffffff16565b905088604001514261092b91906116bb565b60608a0151610946906001600160a01b038b16903090610be5565b6001600160601b031661095991906116ce565b8960c0015161096891906116e5565b945088604001514261097a91906116bb565b60a08a0151610995906001600160a01b038b16903090610be5565b6001600160601b03166109a891906116ce565b8960e001516109b791906116e5565b93506109c384866116e5565b955092959891949750929550565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691610a35919061170c565b6000604051808303816000865af19150503d8060008114610a72576040519150601f19603f3d011682016040523d82523d6000602084013e610a77565b606091505b5091509150818015610aa1575080511580610aa1575080806020019051810190610aa19190611663565b610ad35760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b604482015260640161054a565b505050505050565b600080846001600160a01b031663095ea7b360e01b8585604051602401610b03929190611685565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610b41919061170c565b6000604051808303816000865af19150503d8060008114610b7e576040519150601f19603f3d011682016040523d82523d6000602084013e610b83565b606091505b5091509150818015610bad575080511580610bad575080806020019051810190610bad9190611663565b610bde5760405162461bcd60e51b8152602060048201526002602482015261534160f01b604482015260640161054a565b5050505050565b600080610bf185610cf6565b604051631cd43d1160e31b81526001600160a01b03888116600483015287811660248301528681166044830152919350908316915063e6a1e88890606401608060405180830381865afa158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c709190611728565b5090979650505050505050565b604080516000815260208101909152606090610ca29087908790879087908790610e77565b9695505050505050565b604080516000815260208101909152606090610ca29087908790879087908790610f60565b604080516000815260208101909152606090610ca29087908790879087908790610fc7565b7f65599bf746e17a00ea62e3610586992d88101b78eec3cf380706621fb97ea837547fb969d79d88acd02d04ed7ee7d43b949e7daf093d363abcfbbc43dfdfd1ce969a546001600160a01b038116610e46576001600160a01b038216610dbb57826001600160a01b03166320bc44256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db89190611646565b91505b604051635b69006f60e11b81527fa9214cc96615e0085d3bb077758db69497dc2dce3b2b1e97bc93c3d18d83efd360048201526001600160a01b0383169063b6d200de90602401602060405180830381865afa158015610e1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e439190611646565b90505b6001600160a01b038216610e5c57610e5c611766565b6001600160a01b038116610e7257610e72611766565b915091565b855460018701546040805160008152602081019091526060926001600160a01b0390811692634329d29392911690819063b4b333c690610ec09089908c908c906044810161177c565b60408051808303601f1901815291815260208201805160e094851b6001600160e01b03909116179052519185901b6001600160e01b0319168252610f0d9392509087908c906004016117b0565b6000604051808303816000875af1158015610f2c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f549190810190611847565b50979650505050505050565b855460018701546060916001600160a01b0390811691634329d2939116806350209a62888a8960005b6040519080825280601f01601f191660200182016040528015610fb3576020820181803683370190505b50604051602401610ec094939291906118aa565b855460018701546060916001600160a01b0390811691634329d2939116806362fc305e888a896000610f89565b6001600160a01b038116811461100957600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b03811182821017156110455761104561100c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156110735761107361100c565b604052919050565b803561108681610ff4565b919050565b60006001600160401b038211156110a4576110a461100c565b50601f01601f191660200190565b600082601f8301126110c357600080fd5b81356110d66110d18261108b565b61104b565b8181528460208386010111156110eb57600080fd5b816020850160208301376000918101602001919091529392505050565b600060a0828403121561111a57600080fd5b60405160a081016001600160401b03808211838310171561113d5761113d61100c565b816040528293508435915061115182610ff4565b818352602085013560208401526040850135604084015260608501356060840152608085013591508082111561118657600080fd5b50611193858286016110b2565b6080830152505092915050565b600080600080600060a086880312156111b857600080fd5b85356111c381610ff4565b945060208601356001600160401b038111156111de57600080fd5b6111ea88828901611108565b94505060408601356111fb81610ff4565b9250606086013561120b81610ff4565b9150608086013561121b81610ff4565b809150509295509295909350565b63ffffffff8116811461100957600080fd5b80600b0b811461100957600080fd5b80356110868161123b565b600080600080600080600060e0888a03121561127057600080fd5b87359650602088013561128281610ff4565b9550604088013561129281610ff4565b945060608801356112a281610ff4565b935060808801356112b281611229565b925060a08801356112c28161123b565b915060c08801356001600160401b038111156112dd57600080fd5b6112e98a828b016110b2565b91505092959891949750929550565b60005b838110156113135781810151838201526020016112fb565b50506000910152565b600081518084526113348160208601602086016112f8565b601f01601f19169290920160200192915050565b60208152600061135b602083018461131c565b9392505050565b6000806000806080858703121561137857600080fd5b843561138381610ff4565b935060208501356001600160401b0381111561139e57600080fd5b6113aa87828801611108565b93505060408501356113bb81610ff4565b915060608501356113cb81610ff4565b939692955090935050565b6000806000606084860312156113eb57600080fd5b83356113f681610ff4565b9250602084013561140681610ff4565b929592945050506040919091013590565b600080600080600060a0868803121561142f57600080fd5b85359450602086013561144181610ff4565b9350604086013561145181610ff4565b9250606086013561146181611229565b949793965091946080013592915050565b60008082840361012081121561148757600080fd5b6101008082121561149757600080fd5b61149f611022565b915084358252602085013560208301526040850135604083015260608501356114c781610ff4565b60608301526114d86080860161124a565b60808301526114e960a0860161107b565b60a083015260c085013560c083015260e085013560e083015281935061151081860161107b565b925050509250929050565b60208152600082516080602084015261153760a084018261131c565b905060018060a01b03602085015116604084015260408401516060840152606084015160808401528091505092915050565b60006020828403121561157b57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082600b0b82600b0b0280600b0b91508082146115b8576115b8611582565b5092915050565b634e487b7160e01b600052601260045260246000fd5b600081600b0b83600b0b806115ec576115ec6115bf565b60016001605f1b031982146000198214161561160a5761160a611582565b90059392505050565b600b81810b9083900b0160016001605f1b03811360016001605f1b03198212171561164057611640611582565b92915050565b60006020828403121561165857600080fd5b815161135b81610ff4565b60006020828403121561167557600080fd5b8151801515811461135b57600080fd5b6001600160a01b03929092168252602082015260400190565b6000602082840312156116b057600080fd5b815161135b81611229565b8181038181111561164057611640611582565b808202811582820484141761164057611640611582565b8082018082111561164057611640611582565b600082611707576117076115bf565b500490565b6000825161171e8184602087016112f8565b9190910192915050565b6000806000806080858703121561173e57600080fd5b8451935060208501516117508161123b565b6040860151606090960151949790965092505050565b634e487b7160e01b600052600160045260246000fd5b6001600160a01b038581168252848116602083015283166040820152608060608201819052600090610ca29083018461131c565b6001600160a01b03851681526080602082018190526000906117d49083018661131c565b82810360408401526117e6818661131c565b90508281036060840152610429818561131c565b600082601f83011261180b57600080fd5b81516118196110d18261108b565b81815284602083860101111561182e57600080fd5b61183f8260208301602087016112f8565b949350505050565b6000806040838503121561185a57600080fd5b82516001600160401b038082111561187157600080fd5b61187d868387016117fa565b9350602085015191508082111561189357600080fd5b506118a0858286016117fa565b9150509250929050565b6001600160a01b03858116825284166020820152600b83900b6040820152608060608201819052600090610ca29083018461131c56fea2646970667358221220e739c45f68397b23574712a5795db305f86359225ffc9500481c7ed7ed7f406064736f6c63430008130033",
|
|
114
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806321437a53146100715780634d167a90146100a457806358c0dacb146100d157806365a99a06146100f1578063934e2cce14610113578063b2f918a114610133575b600080fd5b81801561007d57600080fd5b5061009161008c3660046111a0565b610184565b6040519081526020015b60405180910390f35b8180156100b057600080fd5b506100c46100bf366004611255565b610318565b60405161009b9190611348565b8180156100dd57600080fd5b506100916100ec366004611362565b610434565b8180156100fd57600080fd5b5061011161010c3660046113d6565b610443565b005b81801561011f57600080fd5b5061011161012e366004611417565b610612565b610146610141366004611472565b61088b565b604080519788526020880196909652948601939093526060850191909152600b90810b608085015290810b60a08401520b60c082015260e00161009b565b600061019a8560000151843088602001516109d1565b6101ad8560000151878760200151610adb565b6080850151511561025c57604080516080808201835287015181526001600160a01b0380851660208084019190915288015182840152878301516060830152915163b858183f60e01b8152909188169063b858183f9061021190849060040161151b565b6020604051808303816000875af1158015610230573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102549190611569565b91505061030f565b6040805160e08101825286516001600160a01b039081168252868116602080840191825261271084860190815287841660608601908152918b0151608086019081528b87015160a08701908152600060c0880190815297516304e45aaf60e01b8152875187166004820152945186166024860152915162ffffff166044850152915184166064840152905160848301525160a48201529251811660c48401529091908816906304e45aaf9060e401610211565b95945050505050565b806001600160a01b0385161561042957600061033e6001600160a01b0389163089610be5565b90506000876001600160a01b0316876001600160a01b031614610389575060016001600160a01b0388161561038957600082600b0b1315610389576103868a84308b8d610c7d565b92505b6001600160a01b03871661039e575050610429565b60006127106103b1600389900b88611598565b6103bb91906115d5565b6103c59084611613565b9050811580156103d85750600083600b0b135b1561040957600081600b0b136103fc576103f58b85308b8e610c7d565b9350610425565b6103f58b858a8d85610cac565b600081600b0b1315610425576104228b858a8d85610cd1565b93505b5050505b979650505050505050565b600061030f8585858586610184565b306001600160a01b0316635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a59190611646565b604051632474521560e21b8152600060048201523360248201526001600160a01b0391909116906391d1485490604401602060405180830381865afa1580156104f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105169190611663565b6105535760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b60448201526064015b60405180910390fd5b8060000361057457604051630f6fa54560e41b815260040160405180910390fd5b6001600160a01b03821661059b5760405163538ba4f960e01b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb906105c99085908590600401611685565b6020604051808303816000875af11580156105e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060c9190611663565b50505050565b60006001600160a01b0384161561068e57836001600160a01b03166324a9d8536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610661573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610685919061169e565b63ffffffff1690505b600286015461069d90426116bb565b60038701546106bc9190600160a01b90046001600160601b03166116ce565b8660000160008282546106cf91906116e5565b909155505060038601546001600160a01b03161561073f5760028601546106f690426116bb565b6003870154610713906001600160a01b0388811691309116610be5565b6001600160601b031661072691906116ce565b86600501600082825461073991906116e5565b90915550505b60048601546001600160a01b0316156107aa57600286015461076190426116bb565b600487015461077e906001600160a01b0388811691309116610be5565b6001600160601b031661079191906116ce565b8660060160008282546107a491906116e5565b90915550505b81156108615761271063ffffffff84166107c483836116bb565b6107ce91906116bb565b6107d890846116ce565b6107e291906116f8565b8660000160008282546107f591906116e5565b90915550612710905061080882846116ce565b61081291906116f8565b86600501600082825461082591906116e5565b90915550612710905061083e63ffffffff8516846116ce565b61084891906116f8565b86600601600082825461085b91906116e5565b90915550505b8560050154866006015461087591906116e5565b6001870155505042600290940193909355505050565b6000806000806000806000886080015192508860400151426108ad91906116bb565b89608001516001600160601b03166108c591906116ce565b89516108d191906116e5565b96506108f5308a606001518a6001600160a01b0316610be59092919063ffffffff16565b9150610919308a60a001518a6001600160a01b0316610be59092919063ffffffff16565b905088604001514261092b91906116bb565b60608a0151610946906001600160a01b038b16903090610be5565b6001600160601b031661095991906116ce565b8960c0015161096891906116e5565b945088604001514261097a91906116bb565b60a08a0151610995906001600160a01b038b16903090610be5565b6001600160601b03166109a891906116ce565b8960e001516109b791906116e5565b93506109c384866116e5565b955092959891949750929550565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691610a35919061170c565b6000604051808303816000865af19150503d8060008114610a72576040519150601f19603f3d011682016040523d82523d6000602084013e610a77565b606091505b5091509150818015610aa1575080511580610aa1575080806020019051810190610aa19190611663565b610ad35760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b604482015260640161054a565b505050505050565b600080846001600160a01b031663095ea7b360e01b8585604051602401610b03929190611685565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610b41919061170c565b6000604051808303816000865af19150503d8060008114610b7e576040519150601f19603f3d011682016040523d82523d6000602084013e610b83565b606091505b5091509150818015610bad575080511580610bad575080806020019051810190610bad9190611663565b610bde5760405162461bcd60e51b8152602060048201526002602482015261534160f01b604482015260640161054a565b5050505050565b600080610bf185610cf6565b604051631cd43d1160e31b81526001600160a01b03888116600483015287811660248301528681166044830152919350908316915063e6a1e88890606401608060405180830381865afa158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c709190611728565b5090979650505050505050565b604080516000815260208101909152606090610ca29087908790879087908790610e77565b9695505050505050565b604080516000815260208101909152606090610ca29087908790879087908790610f60565b604080516000815260208101909152606090610ca29087908790879087908790610fc7565b7f65599bf746e17a00ea62e3610586992d88101b78eec3cf380706621fb97ea837547fb969d79d88acd02d04ed7ee7d43b949e7daf093d363abcfbbc43dfdfd1ce969a546001600160a01b038116610e46576001600160a01b038216610dbb57826001600160a01b03166320bc44256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db89190611646565b91505b604051635b69006f60e11b81527fa9214cc96615e0085d3bb077758db69497dc2dce3b2b1e97bc93c3d18d83efd360048201526001600160a01b0383169063b6d200de90602401602060405180830381865afa158015610e1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e439190611646565b90505b6001600160a01b038216610e5c57610e5c611766565b6001600160a01b038116610e7257610e72611766565b915091565b855460018701546040805160008152602081019091526060926001600160a01b0390811692634329d29392911690819063b4b333c690610ec09089908c908c906044810161177c565b60408051808303601f1901815291815260208201805160e094851b6001600160e01b03909116179052519185901b6001600160e01b0319168252610f0d9392509087908c906004016117b0565b6000604051808303816000875af1158015610f2c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f549190810190611847565b50979650505050505050565b855460018701546060916001600160a01b0390811691634329d2939116806350209a62888a8960005b6040519080825280601f01601f191660200182016040528015610fb3576020820181803683370190505b50604051602401610ec094939291906118aa565b855460018701546060916001600160a01b0390811691634329d2939116806362fc305e888a896000610f89565b6001600160a01b038116811461100957600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b03811182821017156110455761104561100c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156110735761107361100c565b604052919050565b803561108681610ff4565b919050565b60006001600160401b038211156110a4576110a461100c565b50601f01601f191660200190565b600082601f8301126110c357600080fd5b81356110d66110d18261108b565b61104b565b8181528460208386010111156110eb57600080fd5b816020850160208301376000918101602001919091529392505050565b600060a0828403121561111a57600080fd5b60405160a081016001600160401b03808211838310171561113d5761113d61100c565b816040528293508435915061115182610ff4565b818352602085013560208401526040850135604084015260608501356060840152608085013591508082111561118657600080fd5b50611193858286016110b2565b6080830152505092915050565b600080600080600060a086880312156111b857600080fd5b85356111c381610ff4565b945060208601356001600160401b038111156111de57600080fd5b6111ea88828901611108565b94505060408601356111fb81610ff4565b9250606086013561120b81610ff4565b9150608086013561121b81610ff4565b809150509295509295909350565b63ffffffff8116811461100957600080fd5b80600b0b811461100957600080fd5b80356110868161123b565b600080600080600080600060e0888a03121561127057600080fd5b87359650602088013561128281610ff4565b9550604088013561129281610ff4565b945060608801356112a281610ff4565b935060808801356112b281611229565b925060a08801356112c28161123b565b915060c08801356001600160401b038111156112dd57600080fd5b6112e98a828b016110b2565b91505092959891949750929550565b60005b838110156113135781810151838201526020016112fb565b50506000910152565b600081518084526113348160208601602086016112f8565b601f01601f19169290920160200192915050565b60208152600061135b602083018461131c565b9392505050565b6000806000806080858703121561137857600080fd5b843561138381610ff4565b935060208501356001600160401b0381111561139e57600080fd5b6113aa87828801611108565b93505060408501356113bb81610ff4565b915060608501356113cb81610ff4565b939692955090935050565b6000806000606084860312156113eb57600080fd5b83356113f681610ff4565b9250602084013561140681610ff4565b929592945050506040919091013590565b600080600080600060a0868803121561142f57600080fd5b85359450602086013561144181610ff4565b9350604086013561145181610ff4565b9250606086013561146181611229565b949793965091946080013592915050565b60008082840361012081121561148757600080fd5b6101008082121561149757600080fd5b61149f611022565b915084358252602085013560208301526040850135604083015260608501356114c781610ff4565b60608301526114d86080860161124a565b60808301526114e960a0860161107b565b60a083015260c085013560c083015260e085013560e083015281935061151081860161107b565b925050509250929050565b60208152600082516080602084015261153760a084018261131c565b905060018060a01b03602085015116604084015260408401516060840152606084015160808401528091505092915050565b60006020828403121561157b57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082600b0b82600b0b0280600b0b91508082146115b8576115b8611582565b5092915050565b634e487b7160e01b600052601260045260246000fd5b600081600b0b83600b0b806115ec576115ec6115bf565b60016001605f1b031982146000198214161561160a5761160a611582565b90059392505050565b600b81810b9083900b0160016001605f1b03811360016001605f1b03198212171561164057611640611582565b92915050565b60006020828403121561165857600080fd5b815161135b81610ff4565b60006020828403121561167557600080fd5b8151801515811461135b57600080fd5b6001600160a01b03929092168252602082015260400190565b6000602082840312156116b057600080fd5b815161135b81611229565b8181038181111561164057611640611582565b808202811582820484141761164057611640611582565b8082018082111561164057611640611582565b600082611707576117076115bf565b500490565b6000825161171e8184602087016112f8565b9190910192915050565b6000806000806080858703121561173e57600080fd5b8451935060208501516117508161123b565b6040860151606090960151949790965092505050565b634e487b7160e01b600052600160045260246000fd5b6001600160a01b038581168252848116602083015283166040820152608060608201819052600090610ca29083018461131c565b6001600160a01b03851681526080602082018190526000906117d49083018661131c565b82810360408401526117e6818661131c565b90508281036060840152610429818561131c565b600082601f83011261180b57600080fd5b81516118196110d18261108b565b81815284602083860101111561182e57600080fd5b61183f8260208301602087016112f8565b949350505050565b6000806040838503121561185a57600080fd5b82516001600160401b038082111561187157600080fd5b61187d868387016117fa565b9350602085015191508082111561189357600080fd5b506118a0858286016117fa565b9150509250929050565b6001600160a01b03858116825284166020820152600b83900b6040820152608060608201819052600090610ca29083018461131c56fea2646970667358221220e739c45f68397b23574712a5795db305f86359225ffc9500481c7ed7ed7f406064736f6c63430008130033",
|
|
115
|
+
"linkReferences": {},
|
|
116
|
+
"deployedLinkReferences": {}
|
|
117
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "SwapRouterMock",
|
|
4
|
+
"sourceName": "contracts/utils/SwapRouterMock.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "address",
|
|
10
|
+
"name": "token",
|
|
11
|
+
"type": "address"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"stateMutability": "nonpayable",
|
|
15
|
+
"type": "constructor"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"inputs": [
|
|
19
|
+
{
|
|
20
|
+
"components": [
|
|
21
|
+
{
|
|
22
|
+
"internalType": "bytes",
|
|
23
|
+
"name": "path",
|
|
24
|
+
"type": "bytes"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"internalType": "address",
|
|
28
|
+
"name": "recipient",
|
|
29
|
+
"type": "address"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"internalType": "uint256",
|
|
33
|
+
"name": "amountIn",
|
|
34
|
+
"type": "uint256"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"internalType": "uint256",
|
|
38
|
+
"name": "amountOutMinimum",
|
|
39
|
+
"type": "uint256"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"internalType": "struct IV3SwapRouter.ExactInputParams",
|
|
43
|
+
"name": "params",
|
|
44
|
+
"type": "tuple"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"name": "exactInput",
|
|
48
|
+
"outputs": [
|
|
49
|
+
{
|
|
50
|
+
"internalType": "uint256",
|
|
51
|
+
"name": "amountOut",
|
|
52
|
+
"type": "uint256"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"stateMutability": "payable",
|
|
56
|
+
"type": "function"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"inputs": [
|
|
60
|
+
{
|
|
61
|
+
"components": [
|
|
62
|
+
{
|
|
63
|
+
"internalType": "address",
|
|
64
|
+
"name": "tokenIn",
|
|
65
|
+
"type": "address"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"internalType": "address",
|
|
69
|
+
"name": "tokenOut",
|
|
70
|
+
"type": "address"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"internalType": "uint24",
|
|
74
|
+
"name": "fee",
|
|
75
|
+
"type": "uint24"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"internalType": "address",
|
|
79
|
+
"name": "recipient",
|
|
80
|
+
"type": "address"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"internalType": "uint256",
|
|
84
|
+
"name": "amountIn",
|
|
85
|
+
"type": "uint256"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"internalType": "uint256",
|
|
89
|
+
"name": "amountOutMinimum",
|
|
90
|
+
"type": "uint256"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"internalType": "uint160",
|
|
94
|
+
"name": "sqrtPriceLimitX96",
|
|
95
|
+
"type": "uint160"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"internalType": "struct IV3SwapRouter.ExactInputSingleParams",
|
|
99
|
+
"name": "params",
|
|
100
|
+
"type": "tuple"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"name": "exactInputSingle",
|
|
104
|
+
"outputs": [
|
|
105
|
+
{
|
|
106
|
+
"internalType": "uint256",
|
|
107
|
+
"name": "amountOut",
|
|
108
|
+
"type": "uint256"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"stateMutability": "payable",
|
|
112
|
+
"type": "function"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"bytecode": "0x60a060405234801561001057600080fd5b506040516103b23803806103b283398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610321610091600039600081816087015261011501526103216000f3fe6080604052600436106100295760003560e01c806304e45aaf1461002e578063b858183f14610053575b600080fd5b61004161003c3660046101a3565b610066565b60405190815260200160405180910390f35b610041610061366004610252565b610106565b60a0810151606082015160405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb916100bd91908590600401610293565b6020604051808303816000875af11580156100dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010091906102ac565b50919050565b60608101356001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61014a60408501602086016102ce565b836040518363ffffffff1660e01b81526004016100bd929190610293565b6001600160a01b038116811461017d57600080fd5b50565b803561018b81610168565b919050565b803562ffffff8116811461018b57600080fd5b600060e082840312156101b557600080fd5b60405160e081016001600160401b03811182821017156101e557634e487b7160e01b600052604160045260246000fd5b6040526101f183610180565b81526101ff60208401610180565b602082015261021060408401610190565b604082015261022160608401610180565b60608201526080830135608082015260a083013560a082015261024660c08401610180565b60c08201529392505050565b60006020828403121561026457600080fd5b81356001600160401b0381111561027a57600080fd5b82016080818503121561028c57600080fd5b9392505050565b6001600160a01b03929092168252602082015260400190565b6000602082840312156102be57600080fd5b8151801515811461028c57600080fd5b6000602082840312156102e057600080fd5b813561028c8161016856fea2646970667358221220e8ecaec777181ab94fe74ff6c90f098d477099f35d471c9f7cf6aae39be1cf8764736f6c63430008130033",
|
|
116
|
+
"deployedBytecode": "0x6080604052600436106100295760003560e01c806304e45aaf1461002e578063b858183f14610053575b600080fd5b61004161003c3660046101a3565b610066565b60405190815260200160405180910390f35b610041610061366004610252565b610106565b60a0810151606082015160405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb916100bd91908590600401610293565b6020604051808303816000875af11580156100dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010091906102ac565b50919050565b60608101356001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61014a60408501602086016102ce565b836040518363ffffffff1660e01b81526004016100bd929190610293565b6001600160a01b038116811461017d57600080fd5b50565b803561018b81610168565b919050565b803562ffffff8116811461018b57600080fd5b600060e082840312156101b557600080fd5b60405160e081016001600160401b03811182821017156101e557634e487b7160e01b600052604160045260246000fd5b6040526101f183610180565b81526101ff60208401610180565b602082015261021060408401610190565b604082015261022160608401610180565b60608201526080830135608082015260a083013560a082015261024660c08401610180565b60c08201529392505050565b60006020828403121561026457600080fd5b81356001600160401b0381111561027a57600080fd5b82016080818503121561028c57600080fd5b9392505050565b6001600160a01b03929092168252602082015260400190565b6000602082840312156102be57600080fd5b8151801515811461028c57600080fd5b6000602082840312156102e057600080fd5b813561028c8161016856fea2646970667358221220e8ecaec777181ab94fe74ff6c90f098d477099f35d471c9f7cf6aae39be1cf8764736f6c63430008130033",
|
|
117
|
+
"linkReferences": {},
|
|
118
|
+
"deployedLinkReferences": {}
|
|
119
|
+
}
|
|
@@ -4,10 +4,10 @@ pragma solidity >=0.8.0;
|
|
|
4
4
|
// import the DirectPayments contract
|
|
5
5
|
import "./DirectPaymentsPool.sol";
|
|
6
6
|
import "./ProvableNFT.sol";
|
|
7
|
+
import "../GoodCollective/SuperAppBaseFlow.sol";
|
|
7
8
|
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
|
|
8
9
|
import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol";
|
|
9
10
|
import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
|
|
10
|
-
|
|
11
11
|
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
|
|
12
12
|
import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
|
13
13
|
|
|
@@ -15,6 +15,7 @@ import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils
|
|
|
15
15
|
|
|
16
16
|
contract DirectPaymentsFactory is AccessControlUpgradeable, UUPSUpgradeable {
|
|
17
17
|
error NOT_PROJECT_OWNER();
|
|
18
|
+
error NOT_PROJECT_MANAGER();
|
|
18
19
|
error NOT_POOL();
|
|
19
20
|
|
|
20
21
|
event PoolCreated(
|
|
@@ -29,6 +30,7 @@ contract DirectPaymentsFactory is AccessControlUpgradeable, UUPSUpgradeable {
|
|
|
29
30
|
event PoolDetailsChanged(address indexed pool, string ipfs);
|
|
30
31
|
event PoolVerifiedChanged(address indexed pool, bool isVerified);
|
|
31
32
|
event UpdatedImpl(address indexed impl);
|
|
33
|
+
event MemberAdded(address indexed member, address indexed pool);
|
|
32
34
|
|
|
33
35
|
struct PoolRegistry {
|
|
34
36
|
string ipfs;
|
|
@@ -60,9 +62,9 @@ contract DirectPaymentsFactory is AccessControlUpgradeable, UUPSUpgradeable {
|
|
|
60
62
|
_;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
modifier
|
|
64
|
-
if (pool.hasRole(pool.
|
|
65
|
-
revert
|
|
65
|
+
modifier onlyPoolManager(DirectPaymentsPool pool) {
|
|
66
|
+
if (pool.hasRole(pool.MANAGER_ROLE(), msg.sender) == false) {
|
|
67
|
+
revert NOT_PROJECT_MANAGER();
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
_;
|
|
@@ -136,6 +138,19 @@ contract DirectPaymentsFactory is AccessControlUpgradeable, UUPSUpgradeable {
|
|
|
136
138
|
pool = DirectPaymentsPool(address(new ERC1967Proxy(impl.implementation(), initCall)));
|
|
137
139
|
}
|
|
138
140
|
|
|
141
|
+
// Register the app with the host
|
|
142
|
+
if (pool.host().isApp(pool) == false) {
|
|
143
|
+
try
|
|
144
|
+
IRegisterSuperapp(address(pool.host())).registerApp(address(pool), SuperAppDefinitions.APP_LEVEL_FINAL)
|
|
145
|
+
{} catch {
|
|
146
|
+
//fallback for older versions of superfluid used in unit tests
|
|
147
|
+
IRegisterSuperapp(address(pool.host())).registerAppByFactory(
|
|
148
|
+
address(pool),
|
|
149
|
+
SuperAppDefinitions.APP_LEVEL_FINAL
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
139
154
|
nft.grantRole(nft.getManagerRole(nextNftType), address(pool));
|
|
140
155
|
|
|
141
156
|
//access control to project is determinted by the first pool access control rules
|
|
@@ -153,7 +168,7 @@ contract DirectPaymentsFactory is AccessControlUpgradeable, UUPSUpgradeable {
|
|
|
153
168
|
nextNftType++;
|
|
154
169
|
}
|
|
155
170
|
|
|
156
|
-
function changePoolDetails(DirectPaymentsPool _pool, string memory _ipfs) external
|
|
171
|
+
function changePoolDetails(DirectPaymentsPool _pool, string memory _ipfs) external onlyPoolManager(_pool) {
|
|
157
172
|
registry[address(_pool)].ipfs = _ipfs;
|
|
158
173
|
emit PoolDetailsChanged(address(_pool), _ipfs);
|
|
159
174
|
}
|
|
@@ -173,8 +188,19 @@ contract DirectPaymentsFactory is AccessControlUpgradeable, UUPSUpgradeable {
|
|
|
173
188
|
feeRecipient = _feeRecipient;
|
|
174
189
|
}
|
|
175
190
|
|
|
176
|
-
function addMember(address member)
|
|
191
|
+
function addMember(address member) public onlyPool {
|
|
192
|
+
_addMemberToRegistry(member);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function _addMemberToRegistry(address member) internal {
|
|
177
196
|
memberPools[member].push(msg.sender);
|
|
197
|
+
emit MemberAdded(member, msg.sender);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function addMembers(address[] calldata members) external onlyPool {
|
|
201
|
+
for (uint i = 0; i < members.length; i++) {
|
|
202
|
+
_addMemberToRegistry(members[i]);
|
|
203
|
+
}
|
|
178
204
|
}
|
|
179
205
|
|
|
180
206
|
function removeMember(address member) external onlyPool {
|