@coti-io/coti-contracts 0.1.0 → 1.0.2
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/.github/workflows/npm-publish.yml +2 -1
- package/CONTRIBUTING.md +2 -2
- package/LICENSE +1 -1
- package/README.md +18 -35
- package/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.sol +3 -115
- package/contracts/mocks/README.md +1 -1
- package/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol +257 -280
- package/contracts/mocks/utils/mpc/BitwiseTestsContract.sol +93 -187
- package/contracts/mocks/utils/mpc/{Comparison1Tests.Contract.sol → Comparison1TestsContract.sol} +67 -115
- package/contracts/mocks/utils/mpc/Comparison2TestsContract.sol +76 -116
- package/contracts/mocks/utils/mpc/MinMaxTestsContract.sol +69 -164
- package/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.sol +103 -56
- package/contracts/mocks/utils/mpc/MiscellaneousTestsContract.sol +270 -0
- package/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract.sol +127 -0
- package/contracts/mocks/utils/mpc/README.md +12 -12
- package/contracts/mocks/utils/mpc/TransferScalarTestsContract.sol +54 -211
- package/contracts/mocks/utils/mpc/TransferTestsContract.sol +165 -640
- package/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract.sol +222 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract.sol +222 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol +223 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract.sol +222 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract.sol +265 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol +281 -0
- package/contracts/onboard/AccountOnboard.sol +3 -3
- package/contracts/token/PrivateERC20/PrivateERC20.sol +1 -1
- package/contracts/token/PrivateERC721/IERC721Errors.sol +57 -0
- package/contracts/token/PrivateERC721/PrivateERC721.sol +1 -1
- package/contracts/utils/mpc/MpcCore.sol +2835 -988
- package/contracts/utils/mpc/MpcInterface.sol +6 -4
- package/hardhat.config.ts +17 -6
- package/package.json +20 -4
- package/test/token/PrivateERC20/PrivateERC20.test.ts +2 -2
- package/test/utils/accounts.ts +1 -1
- package/test/utils/mpc/Precompile.test.ts +42 -39
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/ArithmeticTestsContract.ts +374 -0
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/PrecompilesArythmeticTestsContract.ts +374 -0
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.ts +96 -10
- package/typechain-types/contracts/mocks/utils/mpc/BitwiseTestsContract.ts +45 -5
- package/typechain-types/contracts/mocks/utils/mpc/Comparison1TestsContract.ts +374 -0
- package/typechain-types/contracts/mocks/utils/mpc/Comparison2TestsContract.ts +45 -5
- package/typechain-types/contracts/mocks/utils/mpc/MinMaxTestsContract.ts +25 -5
- package/typechain-types/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.ts +62 -0
- package/typechain-types/contracts/mocks/utils/mpc/MiscellaneousTestsContract.ts +396 -0
- package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract.ts +251 -0
- package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract.ts +11 -8
- package/typechain-types/contracts/mocks/utils/mpc/TransferScalarTestsContract.ts +15 -15
- package/typechain-types/contracts/mocks/utils/mpc/TransferTestsContract.ts +15 -15
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowance64TestsContract.ts +251 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowanceTestsContract.ts +250 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.ts +389 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_64TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_8TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract.ts +306 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferTestsContract.ts +125 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferWithAllowanceTestsContract.ts +125 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.ts +296 -0
- package/typechain-types/contracts/mocks/utils/mpc/index.ts +9 -6
- package/typechain-types/contracts/onboard/AccountOnboard.ts +9 -4
- package/typechain-types/contracts/token/PrivateERC721/IERC721Errors.ts +69 -0
- package/typechain-types/contracts/token/PrivateERC721/index.ts +1 -0
- package/typechain-types/contracts/utils/mpc/MpcCore.ts +84 -0
- package/typechain-types/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations.ts +81 -40
- package/typechain-types/contracts/utils/mpc/index.ts +1 -0
- package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/token/PrivateERC20/PrivateERC20Mock__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/ArithmeticTestsContract__factory.ts +387 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/PrecompilesArythmeticTestsContract__factory.ts +388 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory.ts +92 -7
- package/typechain-types/factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory.ts +38 -2
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/Comparison1TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1TestsContract__factory.ts +387 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory.ts +38 -2
- package/typechain-types/factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory.ts +15 -2
- package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory.ts +66 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous2TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/MiscellaneousTestsContract__factory.ts +424 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract__factory.ts +285 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract__factory.ts +19 -3
- package/typechain-types/factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/StringTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory.ts +4 -4
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferTestsContract__factory.ts +4 -4
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowance64TestsContract__factory.ts +294 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowanceTestsContract__factory.ts +292 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract__factory.ts +720 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_64TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_8TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract__factory.ts +507 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferTestsContract__factory.ts +150 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferWithAllowanceTestsContract__factory.ts +150 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract__factory.ts +434 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/index.ts +9 -4
- package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory.ts +1 -1
- package/typechain-types/factories/contracts/onboard/AccountOnboard__factory.ts +8 -2
- package/typechain-types/factories/contracts/token/PrivateERC721/IERC721Errors__factory.ts +128 -0
- package/typechain-types/factories/contracts/token/PrivateERC721/index.ts +1 -0
- package/typechain-types/factories/contracts/utils/mpc/MpcCore__factory.ts +77 -0
- package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory.ts +124 -61
- package/typechain-types/factories/contracts/utils/mpc/index.ts +1 -0
- package/typechain-types/hardhat.d.ts +152 -26
- package/typechain-types/index.ts +20 -8
- package/contracts/access/DataPrivacyFramework/README.md +0 -68
- package/contracts/mocks/utils/mpc/Miscellaneous2TestsContract.sol +0 -448
- package/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol +0 -81
- package/contracts/mocks/utils/mpc/ShiftTestsContract.sol +0 -311
- package/contracts/token/PrivateERC20/README.md +0 -104
- package/contracts/token/PrivateERC721/README.md +0 -282
- package/contracts/utils/mpc/README.md +0 -82
|
@@ -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
|
+
}
|
package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/index.ts
ADDED
|
@@ -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";
|
|
@@ -0,0 +1,389 @@
|
|
|
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_16_8"
|
|
105
|
+
| "computeAndCheckTransfer64_32_8"
|
|
106
|
+
| "computeAndCheckTransfer64_64_8"
|
|
107
|
+
| "computeAndCheckTransfer64_8_8"
|
|
108
|
+
| "getResults"
|
|
109
|
+
| "transferWithAllowance64Test"
|
|
110
|
+
): FunctionFragment;
|
|
111
|
+
|
|
112
|
+
encodeFunctionData(
|
|
113
|
+
functionFragment: "computeAndCheckTransfer64_16_8",
|
|
114
|
+
values: [
|
|
115
|
+
TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
116
|
+
TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
117
|
+
TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
118
|
+
BigNumberish,
|
|
119
|
+
BigNumberish,
|
|
120
|
+
boolean,
|
|
121
|
+
BigNumberish
|
|
122
|
+
]
|
|
123
|
+
): string;
|
|
124
|
+
encodeFunctionData(
|
|
125
|
+
functionFragment: "computeAndCheckTransfer64_32_8",
|
|
126
|
+
values: [
|
|
127
|
+
TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
128
|
+
TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
129
|
+
TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
130
|
+
BigNumberish,
|
|
131
|
+
BigNumberish,
|
|
132
|
+
boolean,
|
|
133
|
+
BigNumberish
|
|
134
|
+
]
|
|
135
|
+
): string;
|
|
136
|
+
encodeFunctionData(
|
|
137
|
+
functionFragment: "computeAndCheckTransfer64_64_8",
|
|
138
|
+
values: [
|
|
139
|
+
TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
140
|
+
TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
141
|
+
TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
142
|
+
BigNumberish,
|
|
143
|
+
BigNumberish,
|
|
144
|
+
boolean,
|
|
145
|
+
BigNumberish
|
|
146
|
+
]
|
|
147
|
+
): string;
|
|
148
|
+
encodeFunctionData(
|
|
149
|
+
functionFragment: "computeAndCheckTransfer64_8_8",
|
|
150
|
+
values: [
|
|
151
|
+
TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
152
|
+
TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
153
|
+
TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
154
|
+
BigNumberish,
|
|
155
|
+
BigNumberish,
|
|
156
|
+
boolean,
|
|
157
|
+
BigNumberish
|
|
158
|
+
]
|
|
159
|
+
): string;
|
|
160
|
+
encodeFunctionData(
|
|
161
|
+
functionFragment: "getResults",
|
|
162
|
+
values?: undefined
|
|
163
|
+
): string;
|
|
164
|
+
encodeFunctionData(
|
|
165
|
+
functionFragment: "transferWithAllowance64Test",
|
|
166
|
+
values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]
|
|
167
|
+
): string;
|
|
168
|
+
|
|
169
|
+
decodeFunctionResult(
|
|
170
|
+
functionFragment: "computeAndCheckTransfer64_16_8",
|
|
171
|
+
data: BytesLike
|
|
172
|
+
): Result;
|
|
173
|
+
decodeFunctionResult(
|
|
174
|
+
functionFragment: "computeAndCheckTransfer64_32_8",
|
|
175
|
+
data: BytesLike
|
|
176
|
+
): Result;
|
|
177
|
+
decodeFunctionResult(
|
|
178
|
+
functionFragment: "computeAndCheckTransfer64_64_8",
|
|
179
|
+
data: BytesLike
|
|
180
|
+
): Result;
|
|
181
|
+
decodeFunctionResult(
|
|
182
|
+
functionFragment: "computeAndCheckTransfer64_8_8",
|
|
183
|
+
data: BytesLike
|
|
184
|
+
): Result;
|
|
185
|
+
decodeFunctionResult(functionFragment: "getResults", data: BytesLike): Result;
|
|
186
|
+
decodeFunctionResult(
|
|
187
|
+
functionFragment: "transferWithAllowance64Test",
|
|
188
|
+
data: BytesLike
|
|
189
|
+
): Result;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface TransferWithAllowance64TestsContract extends BaseContract {
|
|
193
|
+
connect(runner?: ContractRunner | null): TransferWithAllowance64TestsContract;
|
|
194
|
+
waitForDeployment(): Promise<this>;
|
|
195
|
+
|
|
196
|
+
interface: TransferWithAllowance64TestsContractInterface;
|
|
197
|
+
|
|
198
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
199
|
+
event: TCEvent,
|
|
200
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
201
|
+
toBlock?: string | number | undefined
|
|
202
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
203
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
204
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
205
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
206
|
+
toBlock?: string | number | undefined
|
|
207
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
208
|
+
|
|
209
|
+
on<TCEvent extends TypedContractEvent>(
|
|
210
|
+
event: TCEvent,
|
|
211
|
+
listener: TypedListener<TCEvent>
|
|
212
|
+
): Promise<this>;
|
|
213
|
+
on<TCEvent extends TypedContractEvent>(
|
|
214
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
215
|
+
listener: TypedListener<TCEvent>
|
|
216
|
+
): Promise<this>;
|
|
217
|
+
|
|
218
|
+
once<TCEvent extends TypedContractEvent>(
|
|
219
|
+
event: TCEvent,
|
|
220
|
+
listener: TypedListener<TCEvent>
|
|
221
|
+
): Promise<this>;
|
|
222
|
+
once<TCEvent extends TypedContractEvent>(
|
|
223
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
224
|
+
listener: TypedListener<TCEvent>
|
|
225
|
+
): Promise<this>;
|
|
226
|
+
|
|
227
|
+
listeners<TCEvent extends TypedContractEvent>(
|
|
228
|
+
event: TCEvent
|
|
229
|
+
): Promise<Array<TypedListener<TCEvent>>>;
|
|
230
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
231
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(
|
|
232
|
+
event?: TCEvent
|
|
233
|
+
): Promise<this>;
|
|
234
|
+
|
|
235
|
+
computeAndCheckTransfer64_16_8: TypedContractMethod<
|
|
236
|
+
[
|
|
237
|
+
allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
238
|
+
allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
239
|
+
allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
240
|
+
new_a: BigNumberish,
|
|
241
|
+
new_b: BigNumberish,
|
|
242
|
+
res: boolean,
|
|
243
|
+
new_allowance: BigNumberish
|
|
244
|
+
],
|
|
245
|
+
[void],
|
|
246
|
+
"nonpayable"
|
|
247
|
+
>;
|
|
248
|
+
|
|
249
|
+
computeAndCheckTransfer64_32_8: TypedContractMethod<
|
|
250
|
+
[
|
|
251
|
+
allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
252
|
+
allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
253
|
+
allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
254
|
+
new_a: BigNumberish,
|
|
255
|
+
new_b: BigNumberish,
|
|
256
|
+
res: boolean,
|
|
257
|
+
new_allowance: BigNumberish
|
|
258
|
+
],
|
|
259
|
+
[void],
|
|
260
|
+
"nonpayable"
|
|
261
|
+
>;
|
|
262
|
+
|
|
263
|
+
computeAndCheckTransfer64_64_8: TypedContractMethod<
|
|
264
|
+
[
|
|
265
|
+
allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
266
|
+
allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
267
|
+
allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
268
|
+
new_a: BigNumberish,
|
|
269
|
+
new_b: BigNumberish,
|
|
270
|
+
res: boolean,
|
|
271
|
+
new_allowance: BigNumberish
|
|
272
|
+
],
|
|
273
|
+
[void],
|
|
274
|
+
"nonpayable"
|
|
275
|
+
>;
|
|
276
|
+
|
|
277
|
+
computeAndCheckTransfer64_8_8: TypedContractMethod<
|
|
278
|
+
[
|
|
279
|
+
allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
280
|
+
allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
281
|
+
allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
282
|
+
new_a: BigNumberish,
|
|
283
|
+
new_b: BigNumberish,
|
|
284
|
+
res: boolean,
|
|
285
|
+
new_allowance: BigNumberish
|
|
286
|
+
],
|
|
287
|
+
[void],
|
|
288
|
+
"nonpayable"
|
|
289
|
+
>;
|
|
290
|
+
|
|
291
|
+
getResults: TypedContractMethod<
|
|
292
|
+
[],
|
|
293
|
+
[[bigint, bigint, boolean, bigint]],
|
|
294
|
+
"view"
|
|
295
|
+
>;
|
|
296
|
+
|
|
297
|
+
transferWithAllowance64Test: TypedContractMethod<
|
|
298
|
+
[
|
|
299
|
+
a: BigNumberish,
|
|
300
|
+
b: BigNumberish,
|
|
301
|
+
amount: BigNumberish,
|
|
302
|
+
allowance: BigNumberish
|
|
303
|
+
],
|
|
304
|
+
[[bigint, bigint, boolean, bigint]],
|
|
305
|
+
"nonpayable"
|
|
306
|
+
>;
|
|
307
|
+
|
|
308
|
+
getFunction<T extends ContractMethod = ContractMethod>(
|
|
309
|
+
key: string | FunctionFragment
|
|
310
|
+
): T;
|
|
311
|
+
|
|
312
|
+
getFunction(
|
|
313
|
+
nameOrSignature: "computeAndCheckTransfer64_16_8"
|
|
314
|
+
): TypedContractMethod<
|
|
315
|
+
[
|
|
316
|
+
allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
317
|
+
allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
318
|
+
allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
319
|
+
new_a: BigNumberish,
|
|
320
|
+
new_b: BigNumberish,
|
|
321
|
+
res: boolean,
|
|
322
|
+
new_allowance: BigNumberish
|
|
323
|
+
],
|
|
324
|
+
[void],
|
|
325
|
+
"nonpayable"
|
|
326
|
+
>;
|
|
327
|
+
getFunction(
|
|
328
|
+
nameOrSignature: "computeAndCheckTransfer64_32_8"
|
|
329
|
+
): TypedContractMethod<
|
|
330
|
+
[
|
|
331
|
+
allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
332
|
+
allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
333
|
+
allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
334
|
+
new_a: BigNumberish,
|
|
335
|
+
new_b: BigNumberish,
|
|
336
|
+
res: boolean,
|
|
337
|
+
new_allowance: BigNumberish
|
|
338
|
+
],
|
|
339
|
+
[void],
|
|
340
|
+
"nonpayable"
|
|
341
|
+
>;
|
|
342
|
+
getFunction(
|
|
343
|
+
nameOrSignature: "computeAndCheckTransfer64_64_8"
|
|
344
|
+
): TypedContractMethod<
|
|
345
|
+
[
|
|
346
|
+
allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
347
|
+
allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
348
|
+
allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
349
|
+
new_a: BigNumberish,
|
|
350
|
+
new_b: BigNumberish,
|
|
351
|
+
res: boolean,
|
|
352
|
+
new_allowance: BigNumberish
|
|
353
|
+
],
|
|
354
|
+
[void],
|
|
355
|
+
"nonpayable"
|
|
356
|
+
>;
|
|
357
|
+
getFunction(
|
|
358
|
+
nameOrSignature: "computeAndCheckTransfer64_8_8"
|
|
359
|
+
): TypedContractMethod<
|
|
360
|
+
[
|
|
361
|
+
allGTCastingValues: TransferWithAllowance64TestsContract.AllGTCastingValuesStruct,
|
|
362
|
+
allAmountValues: TransferWithAllowance64TestsContract.AllAmountValuesStruct,
|
|
363
|
+
allAllowanceValues: TransferWithAllowance64TestsContract.AllAllowanceValuesStruct,
|
|
364
|
+
new_a: BigNumberish,
|
|
365
|
+
new_b: BigNumberish,
|
|
366
|
+
res: boolean,
|
|
367
|
+
new_allowance: BigNumberish
|
|
368
|
+
],
|
|
369
|
+
[void],
|
|
370
|
+
"nonpayable"
|
|
371
|
+
>;
|
|
372
|
+
getFunction(
|
|
373
|
+
nameOrSignature: "getResults"
|
|
374
|
+
): TypedContractMethod<[], [[bigint, bigint, boolean, bigint]], "view">;
|
|
375
|
+
getFunction(
|
|
376
|
+
nameOrSignature: "transferWithAllowance64Test"
|
|
377
|
+
): TypedContractMethod<
|
|
378
|
+
[
|
|
379
|
+
a: BigNumberish,
|
|
380
|
+
b: BigNumberish,
|
|
381
|
+
amount: BigNumberish,
|
|
382
|
+
allowance: BigNumberish
|
|
383
|
+
],
|
|
384
|
+
[[bigint, bigint, boolean, bigint]],
|
|
385
|
+
"nonpayable"
|
|
386
|
+
>;
|
|
387
|
+
|
|
388
|
+
filters: {};
|
|
389
|
+
}
|