@coti-io/coti-contracts 0.1.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/.github/workflows/npm-publish.yml +52 -0
- package/CODE_OF_CONDUCT.md +44 -0
- package/CONTRIBUTING.md +101 -0
- package/LICENSE +201 -0
- package/README.md +48 -0
- package/contracts/access/DataPrivacyFramework/DataPrivacyFramework.sol +480 -0
- package/contracts/access/DataPrivacyFramework/README.md +68 -0
- package/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.sol +1139 -0
- package/contracts/mocks/README.md +5 -0
- package/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock.sol +9 -0
- package/contracts/mocks/token/PrivateERC20/PrivateERC20Mock.sol +17 -0
- package/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock.sol +34 -0
- package/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol +431 -0
- package/contracts/mocks/utils/mpc/BitwiseTestsContract.sol +361 -0
- package/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol +307 -0
- package/contracts/mocks/utils/mpc/Comparison2TestsContract.sol +307 -0
- package/contracts/mocks/utils/mpc/MinMaxTestsContract.sol +297 -0
- package/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.sol +185 -0
- package/contracts/mocks/utils/mpc/Miscellaneous2TestsContract.sol +448 -0
- package/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol +81 -0
- package/contracts/mocks/utils/mpc/README.md +486 -0
- package/contracts/mocks/utils/mpc/ShiftTestsContract.sol +311 -0
- package/contracts/mocks/utils/mpc/StringTestsContract.sol +59 -0
- package/contracts/mocks/utils/mpc/TransferScalarTestsContract.sol +271 -0
- package/contracts/mocks/utils/mpc/TransferTestsContract.sol +715 -0
- package/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock.sol +25 -0
- package/contracts/onboard/AccountOnboard.sol +21 -0
- package/contracts/onboard/README.md +65 -0
- package/contracts/package.json +11 -0
- package/contracts/token/PrivateERC20/IPrivateERC20.sol +142 -0
- package/contracts/token/PrivateERC20/PrivateERC20.sol +478 -0
- package/contracts/token/PrivateERC20/README.md +104 -0
- package/contracts/token/PrivateERC721/PrivateERC721.sol +458 -0
- package/contracts/token/PrivateERC721/README.md +282 -0
- package/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage.sol +87 -0
- package/contracts/utils/mpc/MpcCore.sol +3215 -0
- package/contracts/utils/mpc/MpcInterface.sol +41 -0
- package/contracts/utils/mpc/README.md +82 -0
- package/hardhat.config.ts +18 -0
- package/package.json +14 -0
- package/test/access/DataPrivacyFramework/DataPrivacyFramework.test.ts +780 -0
- package/test/onboard/AccountOnboard.test.ts +45 -0
- package/test/token/PrivateERC20/PrivateERC20.test.ts +546 -0
- package/test/token/PrivateERC721/PrivateERC721.test.ts +223 -0
- package/test/utils/accounts.ts +55 -0
- package/test/utils/mpc/Precompile.test.ts +113 -0
- package/test/utils/mpc/String.test.ts +227 -0
- package/tsconfig.json +11 -0
- package/typechain-types/@openzeppelin/contracts/index.ts +9 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/IERC4906.ts +462 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts +69 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts +69 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts +69 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +6 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/index.ts +6 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721.ts +393 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts +110 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/index.ts +5 -0
- package/typechain-types/@openzeppelin/contracts/token/index.ts +5 -0
- package/typechain-types/@openzeppelin/contracts/utils/index.ts +5 -0
- package/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.ts +94 -0
- package/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.ts +94 -0
- package/typechain-types/@openzeppelin/contracts/utils/introspection/index.ts +5 -0
- package/typechain-types/@openzeppelin/index.ts +5 -0
- package/typechain-types/common.ts +131 -0
- package/typechain-types/contracts/access/DataPrivacyFramework/DataPrivacyFramework.ts +598 -0
- package/typechain-types/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.ts +598 -0
- package/typechain-types/contracts/access/DataPrivacyFramework/extensions/index.ts +4 -0
- package/typechain-types/contracts/access/DataPrivacyFramework/index.ts +6 -0
- package/typechain-types/contracts/access/index.ts +5 -0
- package/typechain-types/contracts/index.ts +13 -0
- package/typechain-types/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock.ts +598 -0
- package/typechain-types/contracts/mocks/access/DataPrivacyFramework/index.ts +4 -0
- package/typechain-types/contracts/mocks/access/index.ts +5 -0
- package/typechain-types/contracts/mocks/index.ts +11 -0
- package/typechain-types/contracts/mocks/token/PrivateERC20/PrivateERC20Mock.ts +543 -0
- package/typechain-types/contracts/mocks/token/PrivateERC20/index.ts +4 -0
- package/typechain-types/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock.ts +576 -0
- package/typechain-types/contracts/mocks/token/PrivateERC721/index.ts +4 -0
- package/typechain-types/contracts/mocks/token/index.ts +7 -0
- package/typechain-types/contracts/mocks/utils/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.ts +354 -0
- package/typechain-types/contracts/mocks/utils/mpc/BitwiseTestsContract.ts +340 -0
- package/typechain-types/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/Comparison1TestsContract.ts +340 -0
- package/typechain-types/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/index.ts +4 -0
- package/typechain-types/contracts/mocks/utils/mpc/Comparison2TestsContract.ts +340 -0
- package/typechain-types/contracts/mocks/utils/mpc/MinMaxTestsContract.ts +321 -0
- package/typechain-types/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.ts +199 -0
- package/typechain-types/contracts/mocks/utils/mpc/Miscellaneous2TestsContract.ts +384 -0
- package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract.ts +218 -0
- package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/index.ts +4 -0
- package/typechain-types/contracts/mocks/utils/mpc/ShiftTestsContract.ts +339 -0
- package/typechain-types/contracts/mocks/utils/mpc/StringTestsContract.ts +211 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferScalarTestsContract.ts +266 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferTestsContract.ts +288 -0
- package/typechain-types/contracts/mocks/utils/mpc/index.ts +17 -0
- package/typechain-types/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock.ts +173 -0
- package/typechain-types/contracts/mocks/wallet/PrivateERC20Wallet/index.ts +4 -0
- package/typechain-types/contracts/mocks/wallet/index.ts +5 -0
- package/typechain-types/contracts/onboard/AccountOnboard.ts +135 -0
- package/typechain-types/contracts/onboard/index.ts +4 -0
- package/typechain-types/contracts/token/PrivateERC20/IPrivateERC20.ts +437 -0
- package/typechain-types/contracts/token/PrivateERC20/PrivateERC20.ts +505 -0
- package/typechain-types/contracts/token/PrivateERC20/index.ts +5 -0
- package/typechain-types/contracts/token/PrivateERC721/PrivateERC721.ts +409 -0
- package/typechain-types/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage.ts +501 -0
- package/typechain-types/contracts/token/PrivateERC721/extensions/index.ts +4 -0
- package/typechain-types/contracts/token/PrivateERC721/index.ts +6 -0
- package/typechain-types/contracts/token/index.ts +7 -0
- package/typechain-types/contracts/utils/index.ts +5 -0
- package/typechain-types/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations.ts +698 -0
- package/typechain-types/contracts/utils/mpc/MpcInterface.sol/index.ts +4 -0
- package/typechain-types/contracts/utils/mpc/index.ts +5 -0
- package/typechain-types/factories/@openzeppelin/contracts/index.ts +6 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC4906__factory.ts +339 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts +127 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts +111 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts +128 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +6 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts +5 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts +59 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts +307 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/index.ts +5 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/index.ts +4 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/index.ts +4 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.ts +41 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.ts +41 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.ts +5 -0
- package/typechain-types/factories/@openzeppelin/index.ts +4 -0
- package/typechain-types/factories/contracts/access/DataPrivacyFramework/DataPrivacyFramework__factory.ts +621 -0
- package/typechain-types/factories/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc__factory.ts +621 -0
- package/typechain-types/factories/contracts/access/DataPrivacyFramework/extensions/index.ts +4 -0
- package/typechain-types/factories/contracts/access/DataPrivacyFramework/index.ts +5 -0
- package/typechain-types/factories/contracts/access/index.ts +4 -0
- package/typechain-types/factories/contracts/index.ts +8 -0
- package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock__factory.ts +670 -0
- package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/index.ts +4 -0
- package/typechain-types/factories/contracts/mocks/access/index.ts +4 -0
- package/typechain-types/factories/contracts/mocks/index.ts +7 -0
- package/typechain-types/factories/contracts/mocks/token/PrivateERC20/PrivateERC20Mock__factory.ts +615 -0
- package/typechain-types/factories/contracts/mocks/token/PrivateERC20/index.ts +4 -0
- package/typechain-types/factories/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock__factory.ts +630 -0
- package/typechain-types/factories/contracts/mocks/token/PrivateERC721/index.ts +4 -0
- package/typechain-types/factories/contracts/mocks/token/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/index.ts +4 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory.ts +374 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory.ts +361 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/Comparison1TestsContract__factory.ts +361 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/index.ts +4 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory.ts +361 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory.ts +337 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory.ts +236 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous2TestsContract__factory.ts +432 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract__factory.ts +245 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/index.ts +4 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory.ts +374 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/StringTestsContract__factory.ts +264 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory.ts +360 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferTestsContract__factory.ts +441 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/index.ts +15 -0
- package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory.ts +194 -0
- package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/index.ts +4 -0
- package/typechain-types/factories/contracts/mocks/wallet/index.ts +4 -0
- package/typechain-types/factories/contracts/onboard/AccountOnboard__factory.ts +104 -0
- package/typechain-types/factories/contracts/onboard/index.ts +4 -0
- package/typechain-types/factories/contracts/token/PrivateERC20/IPrivateERC20__factory.ts +406 -0
- package/typechain-types/factories/contracts/token/PrivateERC20/PrivateERC20__factory.ts +532 -0
- package/typechain-types/factories/contracts/token/PrivateERC20/index.ts +5 -0
- package/typechain-types/factories/contracts/token/PrivateERC721/PrivateERC721__factory.ts +439 -0
- package/typechain-types/factories/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage__factory.ts +512 -0
- package/typechain-types/factories/contracts/token/PrivateERC721/extensions/index.ts +4 -0
- package/typechain-types/factories/contracts/token/PrivateERC721/index.ts +5 -0
- package/typechain-types/factories/contracts/token/index.ts +5 -0
- package/typechain-types/factories/contracts/utils/index.ts +4 -0
- package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory.ts +919 -0
- package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/index.ts +4 -0
- package/typechain-types/factories/contracts/utils/mpc/index.ts +4 -0
- package/typechain-types/factories/index.ts +5 -0
- package/typechain-types/hardhat.d.ts +621 -0
- package/typechain-types/index.ts +72 -0
|
@@ -0,0 +1,437 @@
|
|
|
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
|
+
EventFragment,
|
|
12
|
+
AddressLike,
|
|
13
|
+
ContractRunner,
|
|
14
|
+
ContractMethod,
|
|
15
|
+
Listener,
|
|
16
|
+
} from "ethers";
|
|
17
|
+
import type {
|
|
18
|
+
TypedContractEvent,
|
|
19
|
+
TypedDeferredTopicFilter,
|
|
20
|
+
TypedEventLog,
|
|
21
|
+
TypedLogDescription,
|
|
22
|
+
TypedListener,
|
|
23
|
+
TypedContractMethod,
|
|
24
|
+
} from "../../../common";
|
|
25
|
+
|
|
26
|
+
export type ItUint64Struct = { ciphertext: BigNumberish; signature: BytesLike };
|
|
27
|
+
|
|
28
|
+
export type ItUint64StructOutput = [ciphertext: bigint, signature: string] & {
|
|
29
|
+
ciphertext: bigint;
|
|
30
|
+
signature: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export declare namespace IPrivateERC20 {
|
|
34
|
+
export type AllowanceStruct = {
|
|
35
|
+
ciphertext: BigNumberish;
|
|
36
|
+
ownerCiphertext: BigNumberish;
|
|
37
|
+
spenderCiphertext: BigNumberish;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type AllowanceStructOutput = [
|
|
41
|
+
ciphertext: bigint,
|
|
42
|
+
ownerCiphertext: bigint,
|
|
43
|
+
spenderCiphertext: bigint
|
|
44
|
+
] & {
|
|
45
|
+
ciphertext: bigint;
|
|
46
|
+
ownerCiphertext: bigint;
|
|
47
|
+
spenderCiphertext: bigint;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface IPrivateERC20Interface extends Interface {
|
|
52
|
+
getFunction(
|
|
53
|
+
nameOrSignature:
|
|
54
|
+
| "allowance(address,bool)"
|
|
55
|
+
| "allowance(address,address)"
|
|
56
|
+
| "approve(address,uint256)"
|
|
57
|
+
| "approve(address,(uint256,bytes))"
|
|
58
|
+
| "balanceOf(address)"
|
|
59
|
+
| "balanceOf()"
|
|
60
|
+
| "setAccountEncryptionAddress"
|
|
61
|
+
| "totalSupply"
|
|
62
|
+
| "transfer(address,(uint256,bytes))"
|
|
63
|
+
| "transfer(address,uint256)"
|
|
64
|
+
| "transferFrom(address,address,(uint256,bytes))"
|
|
65
|
+
| "transferFrom(address,address,uint256)"
|
|
66
|
+
): FunctionFragment;
|
|
67
|
+
|
|
68
|
+
getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment;
|
|
69
|
+
|
|
70
|
+
encodeFunctionData(
|
|
71
|
+
functionFragment: "allowance(address,bool)",
|
|
72
|
+
values: [AddressLike, boolean]
|
|
73
|
+
): string;
|
|
74
|
+
encodeFunctionData(
|
|
75
|
+
functionFragment: "allowance(address,address)",
|
|
76
|
+
values: [AddressLike, AddressLike]
|
|
77
|
+
): string;
|
|
78
|
+
encodeFunctionData(
|
|
79
|
+
functionFragment: "approve(address,uint256)",
|
|
80
|
+
values: [AddressLike, BigNumberish]
|
|
81
|
+
): string;
|
|
82
|
+
encodeFunctionData(
|
|
83
|
+
functionFragment: "approve(address,(uint256,bytes))",
|
|
84
|
+
values: [AddressLike, ItUint64Struct]
|
|
85
|
+
): string;
|
|
86
|
+
encodeFunctionData(
|
|
87
|
+
functionFragment: "balanceOf(address)",
|
|
88
|
+
values: [AddressLike]
|
|
89
|
+
): string;
|
|
90
|
+
encodeFunctionData(
|
|
91
|
+
functionFragment: "balanceOf()",
|
|
92
|
+
values?: undefined
|
|
93
|
+
): string;
|
|
94
|
+
encodeFunctionData(
|
|
95
|
+
functionFragment: "setAccountEncryptionAddress",
|
|
96
|
+
values: [AddressLike]
|
|
97
|
+
): string;
|
|
98
|
+
encodeFunctionData(
|
|
99
|
+
functionFragment: "totalSupply",
|
|
100
|
+
values?: undefined
|
|
101
|
+
): string;
|
|
102
|
+
encodeFunctionData(
|
|
103
|
+
functionFragment: "transfer(address,(uint256,bytes))",
|
|
104
|
+
values: [AddressLike, ItUint64Struct]
|
|
105
|
+
): string;
|
|
106
|
+
encodeFunctionData(
|
|
107
|
+
functionFragment: "transfer(address,uint256)",
|
|
108
|
+
values: [AddressLike, BigNumberish]
|
|
109
|
+
): string;
|
|
110
|
+
encodeFunctionData(
|
|
111
|
+
functionFragment: "transferFrom(address,address,(uint256,bytes))",
|
|
112
|
+
values: [AddressLike, AddressLike, ItUint64Struct]
|
|
113
|
+
): string;
|
|
114
|
+
encodeFunctionData(
|
|
115
|
+
functionFragment: "transferFrom(address,address,uint256)",
|
|
116
|
+
values: [AddressLike, AddressLike, BigNumberish]
|
|
117
|
+
): string;
|
|
118
|
+
|
|
119
|
+
decodeFunctionResult(
|
|
120
|
+
functionFragment: "allowance(address,bool)",
|
|
121
|
+
data: BytesLike
|
|
122
|
+
): Result;
|
|
123
|
+
decodeFunctionResult(
|
|
124
|
+
functionFragment: "allowance(address,address)",
|
|
125
|
+
data: BytesLike
|
|
126
|
+
): Result;
|
|
127
|
+
decodeFunctionResult(
|
|
128
|
+
functionFragment: "approve(address,uint256)",
|
|
129
|
+
data: BytesLike
|
|
130
|
+
): Result;
|
|
131
|
+
decodeFunctionResult(
|
|
132
|
+
functionFragment: "approve(address,(uint256,bytes))",
|
|
133
|
+
data: BytesLike
|
|
134
|
+
): Result;
|
|
135
|
+
decodeFunctionResult(
|
|
136
|
+
functionFragment: "balanceOf(address)",
|
|
137
|
+
data: BytesLike
|
|
138
|
+
): Result;
|
|
139
|
+
decodeFunctionResult(
|
|
140
|
+
functionFragment: "balanceOf()",
|
|
141
|
+
data: BytesLike
|
|
142
|
+
): Result;
|
|
143
|
+
decodeFunctionResult(
|
|
144
|
+
functionFragment: "setAccountEncryptionAddress",
|
|
145
|
+
data: BytesLike
|
|
146
|
+
): Result;
|
|
147
|
+
decodeFunctionResult(
|
|
148
|
+
functionFragment: "totalSupply",
|
|
149
|
+
data: BytesLike
|
|
150
|
+
): Result;
|
|
151
|
+
decodeFunctionResult(
|
|
152
|
+
functionFragment: "transfer(address,(uint256,bytes))",
|
|
153
|
+
data: BytesLike
|
|
154
|
+
): Result;
|
|
155
|
+
decodeFunctionResult(
|
|
156
|
+
functionFragment: "transfer(address,uint256)",
|
|
157
|
+
data: BytesLike
|
|
158
|
+
): Result;
|
|
159
|
+
decodeFunctionResult(
|
|
160
|
+
functionFragment: "transferFrom(address,address,(uint256,bytes))",
|
|
161
|
+
data: BytesLike
|
|
162
|
+
): Result;
|
|
163
|
+
decodeFunctionResult(
|
|
164
|
+
functionFragment: "transferFrom(address,address,uint256)",
|
|
165
|
+
data: BytesLike
|
|
166
|
+
): Result;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export namespace ApprovalEvent {
|
|
170
|
+
export type InputTuple = [
|
|
171
|
+
owner: AddressLike,
|
|
172
|
+
spender: AddressLike,
|
|
173
|
+
ownerValue: BigNumberish,
|
|
174
|
+
spenderValue: BigNumberish
|
|
175
|
+
];
|
|
176
|
+
export type OutputTuple = [
|
|
177
|
+
owner: string,
|
|
178
|
+
spender: string,
|
|
179
|
+
ownerValue: bigint,
|
|
180
|
+
spenderValue: bigint
|
|
181
|
+
];
|
|
182
|
+
export interface OutputObject {
|
|
183
|
+
owner: string;
|
|
184
|
+
spender: string;
|
|
185
|
+
ownerValue: bigint;
|
|
186
|
+
spenderValue: bigint;
|
|
187
|
+
}
|
|
188
|
+
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
189
|
+
export type Filter = TypedDeferredTopicFilter<Event>;
|
|
190
|
+
export type Log = TypedEventLog<Event>;
|
|
191
|
+
export type LogDescription = TypedLogDescription<Event>;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export namespace TransferEvent {
|
|
195
|
+
export type InputTuple = [
|
|
196
|
+
from: AddressLike,
|
|
197
|
+
to: AddressLike,
|
|
198
|
+
senderValue: BigNumberish,
|
|
199
|
+
receiverValue: BigNumberish
|
|
200
|
+
];
|
|
201
|
+
export type OutputTuple = [
|
|
202
|
+
from: string,
|
|
203
|
+
to: string,
|
|
204
|
+
senderValue: bigint,
|
|
205
|
+
receiverValue: bigint
|
|
206
|
+
];
|
|
207
|
+
export interface OutputObject {
|
|
208
|
+
from: string;
|
|
209
|
+
to: string;
|
|
210
|
+
senderValue: bigint;
|
|
211
|
+
receiverValue: bigint;
|
|
212
|
+
}
|
|
213
|
+
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
214
|
+
export type Filter = TypedDeferredTopicFilter<Event>;
|
|
215
|
+
export type Log = TypedEventLog<Event>;
|
|
216
|
+
export type LogDescription = TypedLogDescription<Event>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface IPrivateERC20 extends BaseContract {
|
|
220
|
+
connect(runner?: ContractRunner | null): IPrivateERC20;
|
|
221
|
+
waitForDeployment(): Promise<this>;
|
|
222
|
+
|
|
223
|
+
interface: IPrivateERC20Interface;
|
|
224
|
+
|
|
225
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
226
|
+
event: TCEvent,
|
|
227
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
228
|
+
toBlock?: string | number | undefined
|
|
229
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
230
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
231
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
232
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
233
|
+
toBlock?: string | number | undefined
|
|
234
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
235
|
+
|
|
236
|
+
on<TCEvent extends TypedContractEvent>(
|
|
237
|
+
event: TCEvent,
|
|
238
|
+
listener: TypedListener<TCEvent>
|
|
239
|
+
): Promise<this>;
|
|
240
|
+
on<TCEvent extends TypedContractEvent>(
|
|
241
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
242
|
+
listener: TypedListener<TCEvent>
|
|
243
|
+
): Promise<this>;
|
|
244
|
+
|
|
245
|
+
once<TCEvent extends TypedContractEvent>(
|
|
246
|
+
event: TCEvent,
|
|
247
|
+
listener: TypedListener<TCEvent>
|
|
248
|
+
): Promise<this>;
|
|
249
|
+
once<TCEvent extends TypedContractEvent>(
|
|
250
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
251
|
+
listener: TypedListener<TCEvent>
|
|
252
|
+
): Promise<this>;
|
|
253
|
+
|
|
254
|
+
listeners<TCEvent extends TypedContractEvent>(
|
|
255
|
+
event: TCEvent
|
|
256
|
+
): Promise<Array<TypedListener<TCEvent>>>;
|
|
257
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
258
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(
|
|
259
|
+
event?: TCEvent
|
|
260
|
+
): Promise<this>;
|
|
261
|
+
|
|
262
|
+
"allowance(address,bool)": TypedContractMethod<
|
|
263
|
+
[account: AddressLike, isSpender: boolean],
|
|
264
|
+
[bigint],
|
|
265
|
+
"nonpayable"
|
|
266
|
+
>;
|
|
267
|
+
|
|
268
|
+
"allowance(address,address)": TypedContractMethod<
|
|
269
|
+
[owner: AddressLike, spender: AddressLike],
|
|
270
|
+
[IPrivateERC20.AllowanceStructOutput],
|
|
271
|
+
"view"
|
|
272
|
+
>;
|
|
273
|
+
|
|
274
|
+
"approve(address,uint256)": TypedContractMethod<
|
|
275
|
+
[spender: AddressLike, value: BigNumberish],
|
|
276
|
+
[boolean],
|
|
277
|
+
"nonpayable"
|
|
278
|
+
>;
|
|
279
|
+
|
|
280
|
+
"approve(address,(uint256,bytes))": TypedContractMethod<
|
|
281
|
+
[spender: AddressLike, value: ItUint64Struct],
|
|
282
|
+
[boolean],
|
|
283
|
+
"nonpayable"
|
|
284
|
+
>;
|
|
285
|
+
|
|
286
|
+
"balanceOf(address)": TypedContractMethod<
|
|
287
|
+
[account: AddressLike],
|
|
288
|
+
[bigint],
|
|
289
|
+
"view"
|
|
290
|
+
>;
|
|
291
|
+
|
|
292
|
+
"balanceOf()": TypedContractMethod<[], [bigint], "nonpayable">;
|
|
293
|
+
|
|
294
|
+
setAccountEncryptionAddress: TypedContractMethod<
|
|
295
|
+
[addr: AddressLike],
|
|
296
|
+
[boolean],
|
|
297
|
+
"nonpayable"
|
|
298
|
+
>;
|
|
299
|
+
|
|
300
|
+
totalSupply: TypedContractMethod<[], [bigint], "view">;
|
|
301
|
+
|
|
302
|
+
"transfer(address,(uint256,bytes))": TypedContractMethod<
|
|
303
|
+
[to: AddressLike, value: ItUint64Struct],
|
|
304
|
+
[bigint],
|
|
305
|
+
"nonpayable"
|
|
306
|
+
>;
|
|
307
|
+
|
|
308
|
+
"transfer(address,uint256)": TypedContractMethod<
|
|
309
|
+
[to: AddressLike, value: BigNumberish],
|
|
310
|
+
[bigint],
|
|
311
|
+
"nonpayable"
|
|
312
|
+
>;
|
|
313
|
+
|
|
314
|
+
"transferFrom(address,address,(uint256,bytes))": TypedContractMethod<
|
|
315
|
+
[from: AddressLike, to: AddressLike, value: ItUint64Struct],
|
|
316
|
+
[bigint],
|
|
317
|
+
"nonpayable"
|
|
318
|
+
>;
|
|
319
|
+
|
|
320
|
+
"transferFrom(address,address,uint256)": TypedContractMethod<
|
|
321
|
+
[from: AddressLike, to: AddressLike, value: BigNumberish],
|
|
322
|
+
[bigint],
|
|
323
|
+
"nonpayable"
|
|
324
|
+
>;
|
|
325
|
+
|
|
326
|
+
getFunction<T extends ContractMethod = ContractMethod>(
|
|
327
|
+
key: string | FunctionFragment
|
|
328
|
+
): T;
|
|
329
|
+
|
|
330
|
+
getFunction(
|
|
331
|
+
nameOrSignature: "allowance(address,bool)"
|
|
332
|
+
): TypedContractMethod<
|
|
333
|
+
[account: AddressLike, isSpender: boolean],
|
|
334
|
+
[bigint],
|
|
335
|
+
"nonpayable"
|
|
336
|
+
>;
|
|
337
|
+
getFunction(
|
|
338
|
+
nameOrSignature: "allowance(address,address)"
|
|
339
|
+
): TypedContractMethod<
|
|
340
|
+
[owner: AddressLike, spender: AddressLike],
|
|
341
|
+
[IPrivateERC20.AllowanceStructOutput],
|
|
342
|
+
"view"
|
|
343
|
+
>;
|
|
344
|
+
getFunction(
|
|
345
|
+
nameOrSignature: "approve(address,uint256)"
|
|
346
|
+
): TypedContractMethod<
|
|
347
|
+
[spender: AddressLike, value: BigNumberish],
|
|
348
|
+
[boolean],
|
|
349
|
+
"nonpayable"
|
|
350
|
+
>;
|
|
351
|
+
getFunction(
|
|
352
|
+
nameOrSignature: "approve(address,(uint256,bytes))"
|
|
353
|
+
): TypedContractMethod<
|
|
354
|
+
[spender: AddressLike, value: ItUint64Struct],
|
|
355
|
+
[boolean],
|
|
356
|
+
"nonpayable"
|
|
357
|
+
>;
|
|
358
|
+
getFunction(
|
|
359
|
+
nameOrSignature: "balanceOf(address)"
|
|
360
|
+
): TypedContractMethod<[account: AddressLike], [bigint], "view">;
|
|
361
|
+
getFunction(
|
|
362
|
+
nameOrSignature: "balanceOf()"
|
|
363
|
+
): TypedContractMethod<[], [bigint], "nonpayable">;
|
|
364
|
+
getFunction(
|
|
365
|
+
nameOrSignature: "setAccountEncryptionAddress"
|
|
366
|
+
): TypedContractMethod<[addr: AddressLike], [boolean], "nonpayable">;
|
|
367
|
+
getFunction(
|
|
368
|
+
nameOrSignature: "totalSupply"
|
|
369
|
+
): TypedContractMethod<[], [bigint], "view">;
|
|
370
|
+
getFunction(
|
|
371
|
+
nameOrSignature: "transfer(address,(uint256,bytes))"
|
|
372
|
+
): TypedContractMethod<
|
|
373
|
+
[to: AddressLike, value: ItUint64Struct],
|
|
374
|
+
[bigint],
|
|
375
|
+
"nonpayable"
|
|
376
|
+
>;
|
|
377
|
+
getFunction(
|
|
378
|
+
nameOrSignature: "transfer(address,uint256)"
|
|
379
|
+
): TypedContractMethod<
|
|
380
|
+
[to: AddressLike, value: BigNumberish],
|
|
381
|
+
[bigint],
|
|
382
|
+
"nonpayable"
|
|
383
|
+
>;
|
|
384
|
+
getFunction(
|
|
385
|
+
nameOrSignature: "transferFrom(address,address,(uint256,bytes))"
|
|
386
|
+
): TypedContractMethod<
|
|
387
|
+
[from: AddressLike, to: AddressLike, value: ItUint64Struct],
|
|
388
|
+
[bigint],
|
|
389
|
+
"nonpayable"
|
|
390
|
+
>;
|
|
391
|
+
getFunction(
|
|
392
|
+
nameOrSignature: "transferFrom(address,address,uint256)"
|
|
393
|
+
): TypedContractMethod<
|
|
394
|
+
[from: AddressLike, to: AddressLike, value: BigNumberish],
|
|
395
|
+
[bigint],
|
|
396
|
+
"nonpayable"
|
|
397
|
+
>;
|
|
398
|
+
|
|
399
|
+
getEvent(
|
|
400
|
+
key: "Approval"
|
|
401
|
+
): TypedContractEvent<
|
|
402
|
+
ApprovalEvent.InputTuple,
|
|
403
|
+
ApprovalEvent.OutputTuple,
|
|
404
|
+
ApprovalEvent.OutputObject
|
|
405
|
+
>;
|
|
406
|
+
getEvent(
|
|
407
|
+
key: "Transfer"
|
|
408
|
+
): TypedContractEvent<
|
|
409
|
+
TransferEvent.InputTuple,
|
|
410
|
+
TransferEvent.OutputTuple,
|
|
411
|
+
TransferEvent.OutputObject
|
|
412
|
+
>;
|
|
413
|
+
|
|
414
|
+
filters: {
|
|
415
|
+
"Approval(address,address,uint256,uint256)": TypedContractEvent<
|
|
416
|
+
ApprovalEvent.InputTuple,
|
|
417
|
+
ApprovalEvent.OutputTuple,
|
|
418
|
+
ApprovalEvent.OutputObject
|
|
419
|
+
>;
|
|
420
|
+
Approval: TypedContractEvent<
|
|
421
|
+
ApprovalEvent.InputTuple,
|
|
422
|
+
ApprovalEvent.OutputTuple,
|
|
423
|
+
ApprovalEvent.OutputObject
|
|
424
|
+
>;
|
|
425
|
+
|
|
426
|
+
"Transfer(address,address,uint256,uint256)": TypedContractEvent<
|
|
427
|
+
TransferEvent.InputTuple,
|
|
428
|
+
TransferEvent.OutputTuple,
|
|
429
|
+
TransferEvent.OutputObject
|
|
430
|
+
>;
|
|
431
|
+
Transfer: TypedContractEvent<
|
|
432
|
+
TransferEvent.InputTuple,
|
|
433
|
+
TransferEvent.OutputTuple,
|
|
434
|
+
TransferEvent.OutputObject
|
|
435
|
+
>;
|
|
436
|
+
};
|
|
437
|
+
}
|