@coti-io/coti-contracts 1.0.0 → 1.0.3

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 (102) hide show
  1. package/.github/workflows/npm-publish.yml +2 -1
  2. package/CONTRIBUTING.md +2 -2
  3. package/LICENSE +1 -1
  4. package/README.md +18 -35
  5. package/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.sol +112 -0
  6. package/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol +152 -0
  7. package/contracts/mocks/utils/mpc/BitwiseTestsContract.sol +11 -1
  8. package/contracts/mocks/utils/mpc/Comparison2TestsContract.sol +8 -0
  9. package/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.sol +33 -4
  10. package/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract.sol +35 -10
  11. package/contracts/mocks/utils/mpc/ShiftTestsContract.sol +126 -0
  12. package/contracts/mocks/utils/mpc/TransferTestsContract.sol +3 -0
  13. package/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract.sol +222 -0
  14. package/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract.sol +222 -0
  15. package/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol +223 -0
  16. package/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract.sol +222 -0
  17. package/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract.sol +265 -0
  18. package/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol +281 -0
  19. package/contracts/token/PrivateERC20/PrivateERC20.sol +1 -1
  20. package/contracts/token/PrivateERC721/IERC721Errors.sol +57 -0
  21. package/contracts/token/PrivateERC721/PrivateERC721.sol +1 -1
  22. package/contracts/utils/mpc/MpcCore.sol +40 -0
  23. package/contracts/utils/mpc/MpcInterface.sol +2 -0
  24. package/hardhat.config.ts +9 -1
  25. package/package.json +20 -4
  26. package/test/onboard/AccountOnboard.test.ts +2 -2
  27. package/test/token/PrivateERC20/PrivateERC20.test.ts +2 -2
  28. package/test/utils/accounts.ts +2 -2
  29. package/test/utils/mpc/Precompile.test.ts +24 -2
  30. package/typechain-types/@openzeppelin/contracts/interfaces/index.ts +0 -2
  31. package/typechain-types/contracts/GasTest.ts +91 -0
  32. package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.ts +66 -0
  33. package/typechain-types/contracts/mocks/utils/mpc/BitwiseTestsContract.ts +6 -0
  34. package/typechain-types/contracts/mocks/utils/mpc/Comparison2TestsContract.ts +6 -0
  35. package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract.ts +36 -6
  36. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowance64TestsContract.ts +251 -0
  37. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowanceTestsContract.ts +250 -0
  38. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/index.ts +5 -0
  39. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.ts +389 -0
  40. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract.ts +391 -0
  41. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract.ts +391 -0
  42. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_64TestsContract.ts +391 -0
  43. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_8TestsContract.ts +391 -0
  44. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/index.ts +5 -0
  45. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.ts +391 -0
  46. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract.ts +391 -0
  47. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract.ts +306 -0
  48. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferTestsContract.ts +125 -0
  49. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferWithAllowanceTestsContract.ts +125 -0
  50. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/index.ts +5 -0
  51. package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.ts +296 -0
  52. package/typechain-types/contracts/mocks/utils/mpc/index.ts +7 -0
  53. package/typechain-types/contracts/token/PrivateERC721/IERC721Errors.ts +69 -0
  54. package/typechain-types/contracts/token/PrivateERC721/index.ts +1 -0
  55. package/typechain-types/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations.ts +38 -0
  56. package/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts +0 -1
  57. package/typechain-types/factories/contracts/GasTest__factory.ts +75 -0
  58. package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock__factory.ts +1 -1
  59. package/typechain-types/factories/contracts/mocks/token/PrivateERC20/PrivateERC20Mock__factory.ts +1 -1
  60. package/typechain-types/factories/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock__factory.ts +1 -1
  61. package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory.ts +73 -1
  62. package/typechain-types/factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory.ts +11 -1
  63. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1TestsContract__factory.ts +1 -1
  64. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory.ts +11 -1
  65. package/typechain-types/factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory.ts +1 -1
  66. package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory.ts +1 -1
  67. package/typechain-types/factories/contracts/mocks/utils/mpc/MiscellaneousTestsContract__factory.ts +1 -1
  68. package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract__factory.ts +26 -30
  69. package/typechain-types/factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory.ts +1 -1
  70. package/typechain-types/factories/contracts/mocks/utils/mpc/StringTestsContract__factory.ts +1 -1
  71. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory.ts +1 -1
  72. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferTestsContract__factory.ts +1 -1
  73. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowance64TestsContract__factory.ts +294 -0
  74. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowanceTestsContract__factory.ts +292 -0
  75. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/index.ts +5 -0
  76. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract__factory.ts +720 -0
  77. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract__factory.ts +724 -0
  78. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract__factory.ts +724 -0
  79. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_64TestsContract__factory.ts +724 -0
  80. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_8TestsContract__factory.ts +724 -0
  81. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/index.ts +5 -0
  82. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract__factory.ts +724 -0
  83. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract__factory.ts +724 -0
  84. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract__factory.ts +507 -0
  85. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferTestsContract__factory.ts +150 -0
  86. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferWithAllowanceTestsContract__factory.ts +150 -0
  87. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/index.ts +5 -0
  88. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract__factory.ts +434 -0
  89. package/typechain-types/factories/contracts/mocks/utils/mpc/index.ts +7 -0
  90. package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory.ts +1 -1
  91. package/typechain-types/factories/contracts/onboard/AccountOnboard__factory.ts +1 -1
  92. package/typechain-types/factories/contracts/token/PrivateERC721/IERC721Errors__factory.ts +128 -0
  93. package/typechain-types/factories/contracts/token/PrivateERC721/index.ts +1 -0
  94. package/typechain-types/factories/contracts/utils/mpc/MpcCore__factory.ts +1 -1
  95. package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory.ts +58 -0
  96. package/typechain-types/hardhat.d.ts +144 -54
  97. package/typechain-types/index.ts +16 -6
  98. package/contracts/access/DataPrivacyFramework/README.md +0 -68
  99. package/contracts/onboard/README.md +0 -65
  100. package/contracts/token/PrivateERC20/README.md +0 -104
  101. package/contracts/token/PrivateERC721/README.md +0 -282
  102. package/contracts/utils/mpc/README.md +0 -82
@@ -0,0 +1,251 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type {
5
+ BaseContract,
6
+ BigNumberish,
7
+ BytesLike,
8
+ FunctionFragment,
9
+ Result,
10
+ Interface,
11
+ ContractRunner,
12
+ ContractMethod,
13
+ Listener,
14
+ } from "ethers";
15
+ import type {
16
+ TypedContractEvent,
17
+ TypedDeferredTopicFilter,
18
+ TypedEventLog,
19
+ TypedListener,
20
+ TypedContractMethod,
21
+ } from "../../../../../common";
22
+
23
+ export declare namespace TransferWithAllowance64TestsContract {
24
+ export type AllGTCastingValuesStruct = {
25
+ a8_s: BigNumberish;
26
+ b8_s: BigNumberish;
27
+ a16_s: BigNumberish;
28
+ b16_s: BigNumberish;
29
+ a32_s: BigNumberish;
30
+ b32_s: BigNumberish;
31
+ a64_s: BigNumberish;
32
+ b64_s: BigNumberish;
33
+ };
34
+
35
+ export type AllGTCastingValuesStructOutput = [
36
+ a8_s: bigint,
37
+ b8_s: bigint,
38
+ a16_s: bigint,
39
+ b16_s: bigint,
40
+ a32_s: bigint,
41
+ b32_s: bigint,
42
+ a64_s: bigint,
43
+ b64_s: bigint
44
+ ] & {
45
+ a8_s: bigint;
46
+ b8_s: bigint;
47
+ a16_s: bigint;
48
+ b16_s: bigint;
49
+ a32_s: bigint;
50
+ b32_s: bigint;
51
+ a64_s: bigint;
52
+ b64_s: bigint;
53
+ };
54
+
55
+ export type AllAmountValuesStruct = {
56
+ amount8_s: BigNumberish;
57
+ amount16_s: BigNumberish;
58
+ amount32_s: BigNumberish;
59
+ amount64_s: BigNumberish;
60
+ amount: BigNumberish;
61
+ };
62
+
63
+ export type AllAmountValuesStructOutput = [
64
+ amount8_s: bigint,
65
+ amount16_s: bigint,
66
+ amount32_s: bigint,
67
+ amount64_s: bigint,
68
+ amount: bigint
69
+ ] & {
70
+ amount8_s: bigint;
71
+ amount16_s: bigint;
72
+ amount32_s: bigint;
73
+ amount64_s: bigint;
74
+ amount: bigint;
75
+ };
76
+
77
+ export type AllAllowanceValuesStruct = {
78
+ allowance8_s: BigNumberish;
79
+ allowance16_s: BigNumberish;
80
+ allowance32_s: BigNumberish;
81
+ allowance64_s: BigNumberish;
82
+ allowance: BigNumberish;
83
+ };
84
+
85
+ export type AllAllowanceValuesStructOutput = [
86
+ allowance8_s: bigint,
87
+ allowance16_s: bigint,
88
+ allowance32_s: bigint,
89
+ allowance64_s: bigint,
90
+ allowance: bigint
91
+ ] & {
92
+ allowance8_s: bigint;
93
+ allowance16_s: bigint;
94
+ allowance32_s: bigint;
95
+ allowance64_s: bigint;
96
+ allowance: bigint;
97
+ };
98
+ }
99
+
100
+ export interface TransferWithAllowance64TestsContractInterface
101
+ extends Interface {
102
+ getFunction(
103
+ nameOrSignature:
104
+ | "computeAndCheckTransfer64"
105
+ | "getResults"
106
+ | "transferWithAllowanceTest"
107
+ ): FunctionFragment;
108
+
109
+ encodeFunctionData(
110
+ functionFragment: "computeAndCheckTransfer64",
111
+ values: [
112
+ TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
113
+ TransferWithAllowance64TestsContract.AllAmountValuesStruct,
114
+ TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
115
+ BigNumberish,
116
+ BigNumberish,
117
+ boolean,
118
+ BigNumberish
119
+ ]
120
+ ): string;
121
+ encodeFunctionData(
122
+ functionFragment: "getResults",
123
+ values?: undefined
124
+ ): string;
125
+ encodeFunctionData(
126
+ functionFragment: "transferWithAllowanceTest",
127
+ values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]
128
+ ): string;
129
+
130
+ decodeFunctionResult(
131
+ functionFragment: "computeAndCheckTransfer64",
132
+ data: BytesLike
133
+ ): Result;
134
+ decodeFunctionResult(functionFragment: "getResults", data: BytesLike): Result;
135
+ decodeFunctionResult(
136
+ functionFragment: "transferWithAllowanceTest",
137
+ data: BytesLike
138
+ ): Result;
139
+ }
140
+
141
+ export interface TransferWithAllowance64TestsContract extends BaseContract {
142
+ connect(runner?: ContractRunner | null): TransferWithAllowance64TestsContract;
143
+ waitForDeployment(): Promise<this>;
144
+
145
+ interface: TransferWithAllowance64TestsContractInterface;
146
+
147
+ queryFilter<TCEvent extends TypedContractEvent>(
148
+ event: TCEvent,
149
+ fromBlockOrBlockhash?: string | number | undefined,
150
+ toBlock?: string | number | undefined
151
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
152
+ queryFilter<TCEvent extends TypedContractEvent>(
153
+ filter: TypedDeferredTopicFilter<TCEvent>,
154
+ fromBlockOrBlockhash?: string | number | undefined,
155
+ toBlock?: string | number | undefined
156
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
157
+
158
+ on<TCEvent extends TypedContractEvent>(
159
+ event: TCEvent,
160
+ listener: TypedListener<TCEvent>
161
+ ): Promise<this>;
162
+ on<TCEvent extends TypedContractEvent>(
163
+ filter: TypedDeferredTopicFilter<TCEvent>,
164
+ listener: TypedListener<TCEvent>
165
+ ): Promise<this>;
166
+
167
+ once<TCEvent extends TypedContractEvent>(
168
+ event: TCEvent,
169
+ listener: TypedListener<TCEvent>
170
+ ): Promise<this>;
171
+ once<TCEvent extends TypedContractEvent>(
172
+ filter: TypedDeferredTopicFilter<TCEvent>,
173
+ listener: TypedListener<TCEvent>
174
+ ): Promise<this>;
175
+
176
+ listeners<TCEvent extends TypedContractEvent>(
177
+ event: TCEvent
178
+ ): Promise<Array<TypedListener<TCEvent>>>;
179
+ listeners(eventName?: string): Promise<Array<Listener>>;
180
+ removeAllListeners<TCEvent extends TypedContractEvent>(
181
+ event?: TCEvent
182
+ ): Promise<this>;
183
+
184
+ computeAndCheckTransfer64: TypedContractMethod<
185
+ [
186
+ allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
187
+ allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
188
+ allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
189
+ new_a: BigNumberish,
190
+ new_b: BigNumberish,
191
+ res: boolean,
192
+ new_allowance: BigNumberish
193
+ ],
194
+ [void],
195
+ "nonpayable"
196
+ >;
197
+
198
+ getResults: TypedContractMethod<
199
+ [],
200
+ [[bigint, bigint, boolean, bigint]],
201
+ "view"
202
+ >;
203
+
204
+ transferWithAllowanceTest: TypedContractMethod<
205
+ [
206
+ a: BigNumberish,
207
+ b: BigNumberish,
208
+ amount: BigNumberish,
209
+ allowance: BigNumberish
210
+ ],
211
+ [[bigint, bigint, boolean, bigint]],
212
+ "nonpayable"
213
+ >;
214
+
215
+ getFunction<T extends ContractMethod = ContractMethod>(
216
+ key: string | FunctionFragment
217
+ ): T;
218
+
219
+ getFunction(
220
+ nameOrSignature: "computeAndCheckTransfer64"
221
+ ): TypedContractMethod<
222
+ [
223
+ allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
224
+ allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
225
+ allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
226
+ new_a: BigNumberish,
227
+ new_b: BigNumberish,
228
+ res: boolean,
229
+ new_allowance: BigNumberish
230
+ ],
231
+ [void],
232
+ "nonpayable"
233
+ >;
234
+ getFunction(
235
+ nameOrSignature: "getResults"
236
+ ): TypedContractMethod<[], [[bigint, bigint, boolean, bigint]], "view">;
237
+ getFunction(
238
+ nameOrSignature: "transferWithAllowanceTest"
239
+ ): TypedContractMethod<
240
+ [
241
+ a: BigNumberish,
242
+ b: BigNumberish,
243
+ amount: BigNumberish,
244
+ allowance: BigNumberish
245
+ ],
246
+ [[bigint, bigint, boolean, bigint]],
247
+ "nonpayable"
248
+ >;
249
+
250
+ filters: {};
251
+ }
@@ -0,0 +1,250 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type {
5
+ BaseContract,
6
+ BigNumberish,
7
+ BytesLike,
8
+ FunctionFragment,
9
+ Result,
10
+ Interface,
11
+ ContractRunner,
12
+ ContractMethod,
13
+ Listener,
14
+ } from "ethers";
15
+ import type {
16
+ TypedContractEvent,
17
+ TypedDeferredTopicFilter,
18
+ TypedEventLog,
19
+ TypedListener,
20
+ TypedContractMethod,
21
+ } from "../../../../../common";
22
+
23
+ export declare namespace TransferWithAllowanceTestsContract {
24
+ export type AllGTCastingValuesStruct = {
25
+ a8_s: BigNumberish;
26
+ b8_s: BigNumberish;
27
+ a16_s: BigNumberish;
28
+ b16_s: BigNumberish;
29
+ a32_s: BigNumberish;
30
+ b32_s: BigNumberish;
31
+ a64_s: BigNumberish;
32
+ b64_s: BigNumberish;
33
+ };
34
+
35
+ export type AllGTCastingValuesStructOutput = [
36
+ a8_s: bigint,
37
+ b8_s: bigint,
38
+ a16_s: bigint,
39
+ b16_s: bigint,
40
+ a32_s: bigint,
41
+ b32_s: bigint,
42
+ a64_s: bigint,
43
+ b64_s: bigint
44
+ ] & {
45
+ a8_s: bigint;
46
+ b8_s: bigint;
47
+ a16_s: bigint;
48
+ b16_s: bigint;
49
+ a32_s: bigint;
50
+ b32_s: bigint;
51
+ a64_s: bigint;
52
+ b64_s: bigint;
53
+ };
54
+
55
+ export type AllAmountValuesStruct = {
56
+ amount8_s: BigNumberish;
57
+ amount16_s: BigNumberish;
58
+ amount32_s: BigNumberish;
59
+ amount64_s: BigNumberish;
60
+ amount: BigNumberish;
61
+ };
62
+
63
+ export type AllAmountValuesStructOutput = [
64
+ amount8_s: bigint,
65
+ amount16_s: bigint,
66
+ amount32_s: bigint,
67
+ amount64_s: bigint,
68
+ amount: bigint
69
+ ] & {
70
+ amount8_s: bigint;
71
+ amount16_s: bigint;
72
+ amount32_s: bigint;
73
+ amount64_s: bigint;
74
+ amount: bigint;
75
+ };
76
+
77
+ export type AllAllowanceValuesStruct = {
78
+ allowance8_s: BigNumberish;
79
+ allowance16_s: BigNumberish;
80
+ allowance32_s: BigNumberish;
81
+ allowance64_s: BigNumberish;
82
+ allowance: BigNumberish;
83
+ };
84
+
85
+ export type AllAllowanceValuesStructOutput = [
86
+ allowance8_s: bigint,
87
+ allowance16_s: bigint,
88
+ allowance32_s: bigint,
89
+ allowance64_s: bigint,
90
+ allowance: bigint
91
+ ] & {
92
+ allowance8_s: bigint;
93
+ allowance16_s: bigint;
94
+ allowance32_s: bigint;
95
+ allowance64_s: bigint;
96
+ allowance: bigint;
97
+ };
98
+ }
99
+
100
+ export interface TransferWithAllowanceTestsContractInterface extends Interface {
101
+ getFunction(
102
+ nameOrSignature:
103
+ | "computeAndCheckTransfer64"
104
+ | "getResults"
105
+ | "transferWithAllowanceTest"
106
+ ): FunctionFragment;
107
+
108
+ encodeFunctionData(
109
+ functionFragment: "computeAndCheckTransfer64",
110
+ values: [
111
+ TransferWithAllowanceTestsContract.AllGTCastingValuesStruct,
112
+ TransferWithAllowanceTestsContract.AllAmountValuesStruct,
113
+ TransferWithAllowanceTestsContract.AllAllowanceValuesStruct,
114
+ BigNumberish,
115
+ BigNumberish,
116
+ boolean,
117
+ BigNumberish
118
+ ]
119
+ ): string;
120
+ encodeFunctionData(
121
+ functionFragment: "getResults",
122
+ values?: undefined
123
+ ): string;
124
+ encodeFunctionData(
125
+ functionFragment: "transferWithAllowanceTest",
126
+ values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]
127
+ ): string;
128
+
129
+ decodeFunctionResult(
130
+ functionFragment: "computeAndCheckTransfer64",
131
+ data: BytesLike
132
+ ): Result;
133
+ decodeFunctionResult(functionFragment: "getResults", data: BytesLike): Result;
134
+ decodeFunctionResult(
135
+ functionFragment: "transferWithAllowanceTest",
136
+ data: BytesLike
137
+ ): Result;
138
+ }
139
+
140
+ export interface TransferWithAllowanceTestsContract extends BaseContract {
141
+ connect(runner?: ContractRunner | null): TransferWithAllowanceTestsContract;
142
+ waitForDeployment(): Promise<this>;
143
+
144
+ interface: TransferWithAllowanceTestsContractInterface;
145
+
146
+ queryFilter<TCEvent extends TypedContractEvent>(
147
+ event: TCEvent,
148
+ fromBlockOrBlockhash?: string | number | undefined,
149
+ toBlock?: string | number | undefined
150
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
151
+ queryFilter<TCEvent extends TypedContractEvent>(
152
+ filter: TypedDeferredTopicFilter<TCEvent>,
153
+ fromBlockOrBlockhash?: string | number | undefined,
154
+ toBlock?: string | number | undefined
155
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
156
+
157
+ on<TCEvent extends TypedContractEvent>(
158
+ event: TCEvent,
159
+ listener: TypedListener<TCEvent>
160
+ ): Promise<this>;
161
+ on<TCEvent extends TypedContractEvent>(
162
+ filter: TypedDeferredTopicFilter<TCEvent>,
163
+ listener: TypedListener<TCEvent>
164
+ ): Promise<this>;
165
+
166
+ once<TCEvent extends TypedContractEvent>(
167
+ event: TCEvent,
168
+ listener: TypedListener<TCEvent>
169
+ ): Promise<this>;
170
+ once<TCEvent extends TypedContractEvent>(
171
+ filter: TypedDeferredTopicFilter<TCEvent>,
172
+ listener: TypedListener<TCEvent>
173
+ ): Promise<this>;
174
+
175
+ listeners<TCEvent extends TypedContractEvent>(
176
+ event: TCEvent
177
+ ): Promise<Array<TypedListener<TCEvent>>>;
178
+ listeners(eventName?: string): Promise<Array<Listener>>;
179
+ removeAllListeners<TCEvent extends TypedContractEvent>(
180
+ event?: TCEvent
181
+ ): Promise<this>;
182
+
183
+ computeAndCheckTransfer64: TypedContractMethod<
184
+ [
185
+ allGTCastingValues: TransferWithAllowanceTestsContract.AllGTCastingValuesStruct,
186
+ allAmountValues: TransferWithAllowanceTestsContract.AllAmountValuesStruct,
187
+ allAllowanceValues: TransferWithAllowanceTestsContract.AllAllowanceValuesStruct,
188
+ new_a: BigNumberish,
189
+ new_b: BigNumberish,
190
+ res: boolean,
191
+ new_allowance: BigNumberish
192
+ ],
193
+ [void],
194
+ "nonpayable"
195
+ >;
196
+
197
+ getResults: TypedContractMethod<
198
+ [],
199
+ [[bigint, bigint, boolean, bigint]],
200
+ "view"
201
+ >;
202
+
203
+ transferWithAllowanceTest: TypedContractMethod<
204
+ [
205
+ a: BigNumberish,
206
+ b: BigNumberish,
207
+ amount: BigNumberish,
208
+ allowance: BigNumberish
209
+ ],
210
+ [[bigint, bigint, boolean, bigint]],
211
+ "nonpayable"
212
+ >;
213
+
214
+ getFunction<T extends ContractMethod = ContractMethod>(
215
+ key: string | FunctionFragment
216
+ ): T;
217
+
218
+ getFunction(
219
+ nameOrSignature: "computeAndCheckTransfer64"
220
+ ): TypedContractMethod<
221
+ [
222
+ allGTCastingValues: TransferWithAllowanceTestsContract.AllGTCastingValuesStruct,
223
+ allAmountValues: TransferWithAllowanceTestsContract.AllAmountValuesStruct,
224
+ allAllowanceValues: TransferWithAllowanceTestsContract.AllAllowanceValuesStruct,
225
+ new_a: BigNumberish,
226
+ new_b: BigNumberish,
227
+ res: boolean,
228
+ new_allowance: BigNumberish
229
+ ],
230
+ [void],
231
+ "nonpayable"
232
+ >;
233
+ getFunction(
234
+ nameOrSignature: "getResults"
235
+ ): TypedContractMethod<[], [[bigint, bigint, boolean, bigint]], "view">;
236
+ getFunction(
237
+ nameOrSignature: "transferWithAllowanceTest"
238
+ ): TypedContractMethod<
239
+ [
240
+ a: BigNumberish,
241
+ b: BigNumberish,
242
+ amount: BigNumberish,
243
+ allowance: BigNumberish
244
+ ],
245
+ [[bigint, bigint, boolean, bigint]],
246
+ "nonpayable"
247
+ >;
248
+
249
+ filters: {};
250
+ }
@@ -0,0 +1,5 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export type { TransferWithAllowance64TestsContract } from "./TransferWithAllowance64TestsContract";
5
+ export type { TransferWithAllowanceTestsContract } from "./TransferWithAllowanceTestsContract";