@gooddollar/goodcollective-contracts 1.1.0 → 1.3.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.
Files changed (72) hide show
  1. package/README.md +14 -1
  2. package/contracts/DirectPayments/DirectPaymentsFactory.sol +23 -15
  3. package/contracts/DirectPayments/DirectPaymentsLibrary.sol +54 -0
  4. package/contracts/DirectPayments/DirectPaymentsPool.sol +25 -41
  5. package/contracts/GoodCollective/GoodCollectiveSuperApp.sol +89 -61
  6. package/contracts/GoodCollective/IGoodCollectiveSuperApp.sol +12 -0
  7. package/contracts/Interfaces.sol +25 -0
  8. package/contracts/UBI/UBIPool.sol +103 -90
  9. package/contracts/UBI/UBIPoolFactory.sol +24 -10
  10. package/contracts/test/HelperLibraryTest.sol +16 -0
  11. package/contracts/utils/HelperLibrary.sol +109 -8
  12. package/package.json +4 -3
  13. package/releases/deployment.json +22797 -431
  14. package/typechain-types/@uniswap/index.ts +0 -2
  15. package/typechain-types/contracts/DirectPayments/DirectPaymentsFactory.ts +56 -9
  16. package/typechain-types/contracts/DirectPayments/DirectPaymentsPool.sol/DirectPaymentsPool.ts +187 -9
  17. package/typechain-types/contracts/GoodCollective/GoodCollectiveSuperApp.ts +150 -6
  18. package/typechain-types/contracts/{UBI/MultiClaimModule.sol/IClaimable.ts → GoodCollective/IGoodCollectiveSuperApp.sol/IGoodCollectiveSuperApp.ts} +24 -23
  19. package/typechain-types/contracts/GoodCollective/{GoodCollectiveSuperApp.sol → IGoodCollectiveSuperApp.sol}/index.ts +1 -1
  20. package/typechain-types/contracts/GoodCollective/index.ts +3 -2
  21. package/typechain-types/contracts/{UBI/UBIPool.sol → Interfaces.sol}/IIdentityV2.ts +1 -1
  22. package/typechain-types/contracts/{UBI/UBIPool.sol → Interfaces.sol}/IMembersValidator.ts +1 -1
  23. package/typechain-types/contracts/{UBI/UBIPool.sol → Interfaces.sol}/index.ts +0 -1
  24. package/typechain-types/contracts/UBI/{UBIPool.sol/UBIPool.ts → UBIPool.ts} +325 -78
  25. package/typechain-types/contracts/UBI/UBIPoolFactory.ts +95 -33
  26. package/typechain-types/contracts/UBI/index.ts +1 -4
  27. package/typechain-types/contracts/index.ts +4 -0
  28. package/typechain-types/contracts/test/HelperLibraryTest.ts +147 -0
  29. package/typechain-types/{@uniswap/v3-periphery/contracts/interfaces → contracts/test}/index.ts +1 -1
  30. package/typechain-types/contracts/utils/HelperLibrary.ts +46 -4
  31. package/typechain-types/factories/@uniswap/index.ts +0 -1
  32. package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsFactory__factory.ts +25 -2
  33. package/typechain-types/factories/contracts/DirectPayments/DirectPaymentsPool.sol/DirectPaymentsPool__factory.ts +128 -1
  34. package/typechain-types/factories/contracts/GoodCollective/GoodCollectiveSuperApp__factory.ts +105 -1
  35. package/typechain-types/factories/contracts/GoodCollective/IGoodCollectiveSuperApp.sol/IGoodCollectiveSuperApp__factory.ts +48 -0
  36. package/typechain-types/factories/contracts/GoodCollective/{GoodCollectiveSuperApp.sol → IGoodCollectiveSuperApp.sol}/IRegistry__factory.ts +1 -1
  37. package/typechain-types/factories/contracts/GoodCollective/{GoodCollectiveSuperApp.sol → IGoodCollectiveSuperApp.sol}/index.ts +1 -1
  38. package/typechain-types/factories/contracts/GoodCollective/index.ts +2 -1
  39. package/typechain-types/factories/contracts/{UBI/UBIPool.sol → Interfaces.sol}/IIdentityV2__factory.ts +1 -1
  40. package/typechain-types/factories/contracts/{UBI/UBIPool.sol → Interfaces.sol}/IMembersValidator__factory.ts +1 -1
  41. package/typechain-types/factories/contracts/{UBI/UBIPool.sol → Interfaces.sol}/index.ts +0 -1
  42. package/typechain-types/factories/contracts/UBI/UBIPoolFactory__factory.ts +76 -4
  43. package/typechain-types/factories/contracts/UBI/UBIPool__factory.ts +2052 -0
  44. package/typechain-types/factories/contracts/UBI/index.ts +1 -2
  45. package/typechain-types/factories/contracts/index.ts +2 -0
  46. package/typechain-types/factories/contracts/test/HelperLibraryTest__factory.ts +154 -0
  47. package/typechain-types/{@uniswap/v3-periphery → factories/contracts/test}/index.ts +1 -2
  48. package/typechain-types/factories/contracts/utils/HelperLibrary__factory.ts +31 -1
  49. package/typechain-types/hardhat.d.ts +18 -36
  50. package/typechain-types/index.ts +10 -14
  51. package/contracts/UBI/MultiClaimModule.sol +0 -78
  52. package/typechain-types/@gooddollar/goodprotocol/contracts/token/FeesFormula.sol/IFeesFormula.ts +0 -115
  53. package/typechain-types/@gooddollar/goodprotocol/contracts/token/FeesFormula.sol/index.ts +0 -4
  54. package/typechain-types/@uniswap/v3-periphery/contracts/index.ts +0 -5
  55. package/typechain-types/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.ts +0 -369
  56. package/typechain-types/contracts/GoodCollective/GoodCollectiveSuperApp.sol/GoodCollectiveSuperApp.ts +0 -1000
  57. package/typechain-types/contracts/UBI/MultiClaimModule.sol/IModule.ts +0 -196
  58. package/typechain-types/contracts/UBI/MultiClaimModule.sol/MultiClaimModule.ts +0 -242
  59. package/typechain-types/contracts/UBI/MultiClaimModule.sol/index.ts +0 -6
  60. package/typechain-types/factories/@gooddollar/goodprotocol/contracts/token/FeesFormula.sol/IFeesFormula__factory.ts +0 -60
  61. package/typechain-types/factories/@gooddollar/goodprotocol/contracts/token/FeesFormula.sol/index.ts +0 -4
  62. package/typechain-types/factories/@uniswap/v3-periphery/contracts/index.ts +0 -4
  63. package/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/ISwapRouter__factory.ts +0 -263
  64. package/typechain-types/factories/@uniswap/v3-periphery/contracts/interfaces/index.ts +0 -4
  65. package/typechain-types/factories/@uniswap/v3-periphery/index.ts +0 -4
  66. package/typechain-types/factories/contracts/GoodCollective/GoodCollectiveSuperApp.sol/GoodCollectiveSuperApp__factory.ts +0 -728
  67. package/typechain-types/factories/contracts/UBI/MultiClaimModule.sol/IClaimable__factory.ts +0 -33
  68. package/typechain-types/factories/contracts/UBI/MultiClaimModule.sol/IModule__factory.ts +0 -84
  69. package/typechain-types/factories/contracts/UBI/MultiClaimModule.sol/MultiClaimModule__factory.ts +0 -150
  70. package/typechain-types/factories/contracts/UBI/MultiClaimModule.sol/index.ts +0 -6
  71. package/typechain-types/factories/contracts/UBI/UBIPool.sol/UBIPool__factory.ts +0 -1835
  72. /package/typechain-types/contracts/GoodCollective/{GoodCollectiveSuperApp.sol → IGoodCollectiveSuperApp.sol}/IRegistry.ts +0 -0
@@ -1,33 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import { Contract, Signer, utils } from "ethers";
6
- import type { Provider } from "@ethersproject/providers";
7
- import type {
8
- IClaimable,
9
- IClaimableInterface,
10
- } from "../../../../contracts/UBI/MultiClaimModule.sol/IClaimable";
11
-
12
- const _abi = [
13
- {
14
- inputs: [],
15
- name: "claim",
16
- outputs: [],
17
- stateMutability: "nonpayable",
18
- type: "function",
19
- },
20
- ] as const;
21
-
22
- export class IClaimable__factory {
23
- static readonly abi = _abi;
24
- static createInterface(): IClaimableInterface {
25
- return new utils.Interface(_abi) as IClaimableInterface;
26
- }
27
- static connect(
28
- address: string,
29
- signerOrProvider: Signer | Provider
30
- ): IClaimable {
31
- return new Contract(address, _abi, signerOrProvider) as IClaimable;
32
- }
33
- }
@@ -1,84 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import { Contract, Signer, utils } from "ethers";
6
- import type { Provider } from "@ethersproject/providers";
7
- import type {
8
- IModule,
9
- IModuleInterface,
10
- } from "../../../../contracts/UBI/MultiClaimModule.sol/IModule";
11
-
12
- const _abi = [
13
- {
14
- inputs: [],
15
- name: "getModuleTypes",
16
- outputs: [
17
- {
18
- internalType: "uint256",
19
- name: "",
20
- type: "uint256",
21
- },
22
- ],
23
- stateMutability: "view",
24
- type: "function",
25
- },
26
- {
27
- inputs: [
28
- {
29
- internalType: "uint256",
30
- name: "typeID",
31
- type: "uint256",
32
- },
33
- ],
34
- name: "isModuleType",
35
- outputs: [
36
- {
37
- internalType: "bool",
38
- name: "",
39
- type: "bool",
40
- },
41
- ],
42
- stateMutability: "view",
43
- type: "function",
44
- },
45
- {
46
- inputs: [
47
- {
48
- internalType: "bytes",
49
- name: "data",
50
- type: "bytes",
51
- },
52
- ],
53
- name: "onInstall",
54
- outputs: [],
55
- stateMutability: "nonpayable",
56
- type: "function",
57
- },
58
- {
59
- inputs: [
60
- {
61
- internalType: "bytes",
62
- name: "data",
63
- type: "bytes",
64
- },
65
- ],
66
- name: "onUninstall",
67
- outputs: [],
68
- stateMutability: "nonpayable",
69
- type: "function",
70
- },
71
- ] as const;
72
-
73
- export class IModule__factory {
74
- static readonly abi = _abi;
75
- static createInterface(): IModuleInterface {
76
- return new utils.Interface(_abi) as IModuleInterface;
77
- }
78
- static connect(
79
- address: string,
80
- signerOrProvider: Signer | Provider
81
- ): IModule {
82
- return new Contract(address, _abi, signerOrProvider) as IModule;
83
- }
84
- }
@@ -1,150 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
5
- import type { Provider, TransactionRequest } from "@ethersproject/providers";
6
- import type { PromiseOrValue } from "../../../../common";
7
- import type {
8
- MultiClaimModule,
9
- MultiClaimModuleInterface,
10
- } from "../../../../contracts/UBI/MultiClaimModule.sol/MultiClaimModule";
11
-
12
- const _abi = [
13
- {
14
- inputs: [],
15
- name: "getModuleTypes",
16
- outputs: [
17
- {
18
- internalType: "uint256",
19
- name: "",
20
- type: "uint256",
21
- },
22
- ],
23
- stateMutability: "view",
24
- type: "function",
25
- },
26
- {
27
- inputs: [
28
- {
29
- internalType: "uint256",
30
- name: "typeID",
31
- type: "uint256",
32
- },
33
- ],
34
- name: "isModuleType",
35
- outputs: [
36
- {
37
- internalType: "bool",
38
- name: "",
39
- type: "bool",
40
- },
41
- ],
42
- stateMutability: "view",
43
- type: "function",
44
- },
45
- {
46
- inputs: [
47
- {
48
- internalType: "address[]",
49
- name: "contracts",
50
- type: "address[]",
51
- },
52
- {
53
- internalType: "contract IERC20Upgradeable",
54
- name: "token",
55
- type: "address",
56
- },
57
- {
58
- internalType: "address",
59
- name: "recipient",
60
- type: "address",
61
- },
62
- ],
63
- name: "multiClaim",
64
- outputs: [
65
- {
66
- internalType: "bool[]",
67
- name: "success",
68
- type: "bool[]",
69
- },
70
- ],
71
- stateMutability: "nonpayable",
72
- type: "function",
73
- },
74
- {
75
- inputs: [
76
- {
77
- internalType: "bytes",
78
- name: "data",
79
- type: "bytes",
80
- },
81
- ],
82
- name: "onInstall",
83
- outputs: [],
84
- stateMutability: "nonpayable",
85
- type: "function",
86
- },
87
- {
88
- inputs: [
89
- {
90
- internalType: "bytes",
91
- name: "data",
92
- type: "bytes",
93
- },
94
- ],
95
- name: "onUninstall",
96
- outputs: [],
97
- stateMutability: "nonpayable",
98
- type: "function",
99
- },
100
- ] as const;
101
-
102
- const _bytecode =
103
- "0x608060405234801561001057600080fd5b506105d9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80630db1055e1461005c5780636d61fe70146100855780638a91b0e314610085578063d6cc1aa414610099578063ecd05961146100a8575b600080fd5b61006f61006a366004610356565b6100cc565b60405161007c91906103ec565b60405180910390f35b610097610093366004610432565b5050565b005b6040516002815260200161007c565b6100bc6100b63660046104a3565b50600190565b604051901515815260200161007c565b60606000836001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016100fc91906104bc565b602060405180830381865afa158015610119573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013d91906104d0565b9050846001600160401b03811115610157576101576104e9565b604051908082528060200260200182016040528015610180578160200160208202803683370190505b50915060005b8581101561023c578686828181106101a0576101a06104ff565b90506020020160208101906101b59190610515565b6001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156101ef57600080fd5b505af1925050508015610200575060015b1561022a576001838281518110610219576102196104ff565b911515602092830291909101909101525b806102348161054f565b915050610186565b50600081856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161026c91906104bc565b602060405180830381865afa158015610289573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ad91906104d0565b6102b79190610568565b905080156103345760405163a9059cbb60e01b81526001600160a01b0385811660048301526024820183905286169063a9059cbb906044016020604051808303816000875af115801561030e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103329190610581565b505b5050949350505050565b6001600160a01b038116811461035357600080fd5b50565b6000806000806060858703121561036c57600080fd5b84356001600160401b038082111561038357600080fd5b818701915087601f83011261039757600080fd5b8135818111156103a657600080fd5b8860208260051b85010111156103bb57600080fd5b602092830196509450508501356103d18161033e565b915060408501356103e18161033e565b939692955090935050565b6020808252825182820181905260009190848201906040850190845b81811015610426578351151583529284019291840191600101610408565b50909695505050505050565b6000806020838503121561044557600080fd5b82356001600160401b038082111561045c57600080fd5b818501915085601f83011261047057600080fd5b81358181111561047f57600080fd5b86602082850101111561049157600080fd5b60209290920196919550909350505050565b6000602082840312156104b557600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6000602082840312156104e257600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561052757600080fd5b81356105328161033e565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161056157610561610539565b5060010190565b8181038181111561057b5761057b610539565b92915050565b60006020828403121561059357600080fd5b8151801515811461053257600080fdfea2646970667358221220437015d73db0f805829cc2f1b4cf5a6a7c4bc8b44f640d0f9f6c29c784430b3c64736f6c63430008130033";
104
-
105
- type MultiClaimModuleConstructorParams =
106
- | [signer?: Signer]
107
- | ConstructorParameters<typeof ContractFactory>;
108
-
109
- const isSuperArgs = (
110
- xs: MultiClaimModuleConstructorParams
111
- ): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
112
-
113
- export class MultiClaimModule__factory extends ContractFactory {
114
- constructor(...args: MultiClaimModuleConstructorParams) {
115
- if (isSuperArgs(args)) {
116
- super(...args);
117
- } else {
118
- super(_abi, _bytecode, args[0]);
119
- }
120
- }
121
-
122
- override deploy(
123
- overrides?: Overrides & { from?: PromiseOrValue<string> }
124
- ): Promise<MultiClaimModule> {
125
- return super.deploy(overrides || {}) as Promise<MultiClaimModule>;
126
- }
127
- override getDeployTransaction(
128
- overrides?: Overrides & { from?: PromiseOrValue<string> }
129
- ): TransactionRequest {
130
- return super.getDeployTransaction(overrides || {});
131
- }
132
- override attach(address: string): MultiClaimModule {
133
- return super.attach(address) as MultiClaimModule;
134
- }
135
- override connect(signer: Signer): MultiClaimModule__factory {
136
- return super.connect(signer) as MultiClaimModule__factory;
137
- }
138
-
139
- static readonly bytecode = _bytecode;
140
- static readonly abi = _abi;
141
- static createInterface(): MultiClaimModuleInterface {
142
- return new utils.Interface(_abi) as MultiClaimModuleInterface;
143
- }
144
- static connect(
145
- address: string,
146
- signerOrProvider: Signer | Provider
147
- ): MultiClaimModule {
148
- return new Contract(address, _abi, signerOrProvider) as MultiClaimModule;
149
- }
150
- }
@@ -1,6 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- export { IClaimable__factory } from "./IClaimable__factory";
5
- export { IModule__factory } from "./IModule__factory";
6
- export { MultiClaimModule__factory } from "./MultiClaimModule__factory";