@matterlabs/zksync-js 0.0.1
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/LICENSE +21 -0
- package/README.md +124 -0
- package/dist/adapters/ethers/client.cjs +4548 -0
- package/dist/adapters/ethers/client.cjs.map +1 -0
- package/dist/adapters/ethers/client.d.ts +61 -0
- package/dist/adapters/ethers/client.js +5 -0
- package/dist/adapters/ethers/errors/error-ops.d.ts +20 -0
- package/dist/adapters/ethers/errors/revert.d.ts +28 -0
- package/dist/adapters/ethers/index.cjs +7537 -0
- package/dist/adapters/ethers/index.cjs.map +1 -0
- package/dist/adapters/ethers/index.d.ts +12 -0
- package/dist/adapters/ethers/index.js +8 -0
- package/dist/adapters/ethers/resources/deposits/context.d.ts +27 -0
- package/dist/adapters/ethers/resources/deposits/index.d.ts +46 -0
- package/dist/adapters/ethers/resources/deposits/routes/erc20-base.d.ts +2 -0
- package/dist/adapters/ethers/resources/deposits/routes/erc20-nonbase.d.ts +2 -0
- package/dist/adapters/ethers/resources/deposits/routes/eth-nonbase.d.ts +2 -0
- package/dist/adapters/ethers/resources/deposits/routes/eth.d.ts +2 -0
- package/dist/adapters/ethers/resources/deposits/routes/types.d.ts +10 -0
- package/dist/adapters/ethers/resources/deposits/services/verification.d.ts +9 -0
- package/dist/adapters/ethers/resources/token-info.d.ts +31 -0
- package/dist/adapters/ethers/resources/utils.d.ts +39 -0
- package/dist/adapters/ethers/resources/withdrawals/context.d.ts +19 -0
- package/dist/adapters/ethers/resources/withdrawals/index.d.ts +56 -0
- package/dist/adapters/ethers/resources/withdrawals/routes/erc20-nonbase.d.ts +2 -0
- package/dist/adapters/ethers/resources/withdrawals/routes/eth-nonbase.d.ts +2 -0
- package/dist/adapters/ethers/resources/withdrawals/routes/eth.d.ts +2 -0
- package/dist/adapters/ethers/resources/withdrawals/routes/types.d.ts +18 -0
- package/dist/adapters/ethers/resources/withdrawals/services/finalization.d.ts +33 -0
- package/dist/adapters/ethers/rpc.d.ts +4 -0
- package/dist/adapters/ethers/sdk.cjs +6245 -0
- package/dist/adapters/ethers/sdk.cjs.map +1 -0
- package/dist/adapters/ethers/sdk.d.ts +29 -0
- package/dist/adapters/ethers/sdk.js +6 -0
- package/dist/adapters/ethers/typechain/IAssetRouterBase.d.ts +198 -0
- package/dist/adapters/ethers/typechain/IBridgehub.d.ts +731 -0
- package/dist/adapters/ethers/typechain/IERC20.d.ts +108 -0
- package/dist/adapters/ethers/typechain/IL1AssetRouter.d.ts +570 -0
- package/dist/adapters/ethers/typechain/IL1NativeTokenVault.d.ts +154 -0
- package/dist/adapters/ethers/typechain/IL1Nullifier.d.ts +305 -0
- package/dist/adapters/ethers/typechain/IL2AssetRouter.d.ts +288 -0
- package/dist/adapters/ethers/typechain/IL2NativeTokenVault.d.ts +380 -0
- package/dist/adapters/ethers/typechain/common.d.ts +46 -0
- package/dist/adapters/ethers/typechain/factories/IAssetRouterBase__factory.d.ts +203 -0
- package/dist/adapters/ethers/typechain/factories/IBridgehub__factory.d.ts +998 -0
- package/dist/adapters/ethers/typechain/factories/IERC20__factory.d.ts +177 -0
- package/dist/adapters/ethers/typechain/factories/IL1AssetRouter__factory.d.ts +666 -0
- package/dist/adapters/ethers/typechain/factories/IL1NativeTokenVault__factory.d.ts +234 -0
- package/dist/adapters/ethers/typechain/factories/IL1Nullifier__factory.d.ts +382 -0
- package/dist/adapters/ethers/typechain/factories/IL2AssetRouter__factory.d.ts +327 -0
- package/dist/adapters/ethers/typechain/factories/IL2NativeTokenVault__factory.d.ts +696 -0
- package/dist/adapters/ethers/typechain/factories/index.d.ts +8 -0
- package/dist/adapters/ethers/typechain/index.d.ts +17 -0
- package/dist/adapters/viem/client.cjs +4534 -0
- package/dist/adapters/viem/client.cjs.map +1 -0
- package/dist/adapters/viem/client.d.ts +44 -0
- package/dist/adapters/viem/client.js +5 -0
- package/dist/adapters/viem/errors/error-ops.d.ts +20 -0
- package/dist/adapters/viem/errors/revert.d.ts +25 -0
- package/dist/adapters/viem/index.cjs +7772 -0
- package/dist/adapters/viem/index.cjs.map +1 -0
- package/dist/adapters/viem/index.d.ts +11 -0
- package/dist/adapters/viem/index.js +8 -0
- package/dist/adapters/viem/resources/deposits/context.d.ts +27 -0
- package/dist/adapters/viem/resources/deposits/index.d.ts +46 -0
- package/dist/adapters/viem/resources/deposits/routes/erc20-base.d.ts +2 -0
- package/dist/adapters/viem/resources/deposits/routes/erc20-nonbase.d.ts +2 -0
- package/dist/adapters/viem/resources/deposits/routes/eth-nonbase.d.ts +2 -0
- package/dist/adapters/viem/resources/deposits/routes/eth.d.ts +2 -0
- package/dist/adapters/viem/resources/deposits/routes/types.d.ts +20 -0
- package/dist/adapters/viem/resources/deposits/services/verification.d.ts +7 -0
- package/dist/adapters/viem/resources/token-info.d.ts +34 -0
- package/dist/adapters/viem/resources/utils.d.ts +42 -0
- package/dist/adapters/viem/resources/withdrawals/context.d.ts +22 -0
- package/dist/adapters/viem/resources/withdrawals/index.d.ts +56 -0
- package/dist/adapters/viem/resources/withdrawals/routes/erc20-nonbase.d.ts +2 -0
- package/dist/adapters/viem/resources/withdrawals/routes/eth-nonbase.d.ts +2 -0
- package/dist/adapters/viem/resources/withdrawals/routes/eth.d.ts +2 -0
- package/dist/adapters/viem/resources/withdrawals/routes/types.d.ts +19 -0
- package/dist/adapters/viem/resources/withdrawals/services/finalization.d.ts +33 -0
- package/dist/adapters/viem/rpc.d.ts +2 -0
- package/dist/adapters/viem/sdk.cjs +6481 -0
- package/dist/adapters/viem/sdk.cjs.map +1 -0
- package/dist/adapters/viem/sdk.d.ts +32 -0
- package/dist/adapters/viem/sdk.js +6 -0
- package/dist/chunk-263G6636.js +36 -0
- package/dist/chunk-3LALBFFE.js +138 -0
- package/dist/chunk-4HLJJKIY.js +262 -0
- package/dist/chunk-6GCT6TLS.js +45 -0
- package/dist/chunk-7M4V3FMT.js +2444 -0
- package/dist/chunk-B77GWPO5.js +339 -0
- package/dist/chunk-BD2LUO5T.js +123 -0
- package/dist/chunk-CGO27P7F.js +2187 -0
- package/dist/chunk-DI2CJDPZ.js +76 -0
- package/dist/chunk-Y75OMFK6.js +4489 -0
- package/dist/core/constants.cjs +39 -0
- package/dist/core/constants.cjs.map +1 -0
- package/dist/core/constants.d.ts +36 -0
- package/dist/core/constants.js +1 -0
- package/dist/core/errors/factory.d.ts +10 -0
- package/dist/core/errors/formatter.d.ts +2 -0
- package/dist/core/errors/rpc.d.ts +4 -0
- package/dist/core/errors/withdrawal-revert-map.d.ts +3 -0
- package/dist/core/index.cjs +552 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.ts +18 -0
- package/dist/core/index.js +4 -0
- package/dist/core/internal/abi-registry.d.ts +9 -0
- package/dist/core/internal/abis/IAssetRouterBase.d.ts +198 -0
- package/dist/core/internal/abis/IBaseToken.d.ts +162 -0
- package/dist/core/internal/abis/IBridgehub.d.ts +994 -0
- package/dist/core/internal/abis/IERC20.d.ts +224 -0
- package/dist/core/internal/abis/IL1AssetRouter.d.ts +661 -0
- package/dist/core/internal/abis/IL1Nullifier.d.ts +377 -0
- package/dist/core/internal/abis/IL2AssetRouter.d.ts +690 -0
- package/dist/core/internal/abis/L1NativeTokenVault.d.ts +719 -0
- package/dist/core/internal/abis/L2NativeTokenVault.d.ts +735 -0
- package/dist/core/internal/abis/Mailbox.d.ts +779 -0
- package/dist/core/resources/deposits/route.d.ts +6 -0
- package/dist/core/resources/withdrawals/events.d.ts +9 -0
- package/dist/core/resources/withdrawals/logs.d.ts +5 -0
- package/dist/core/resources/withdrawals/route.d.ts +6 -0
- package/dist/core/rpc/transport.d.ts +10 -0
- package/dist/core/rpc/types.d.ts +40 -0
- package/dist/core/rpc/zks.d.ts +12 -0
- package/dist/core/types/errors.d.ts +177 -0
- package/dist/core/types/flows/base.d.ts +51 -0
- package/dist/core/types/flows/deposits.d.ts +43 -0
- package/dist/core/types/flows/route.d.ts +12 -0
- package/dist/core/types/flows/withdrawals.d.ts +83 -0
- package/dist/core/types/index.d.ts +2 -0
- package/dist/core/types/primitives.d.ts +3 -0
- package/dist/core/utils/addr.d.ts +5 -0
- package/dist/core/utils/gas.d.ts +13 -0
- package/dist/index.cjs +571 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +4 -0
- package/package.json +177 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from 'ethers';
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from './common';
|
|
3
|
+
export interface IL2NativeTokenVaultInterface extends Interface {
|
|
4
|
+
getFunction(nameOrSignature: 'ASSET_ROUTER' | 'BASE_TOKEN_ASSET_ID' | 'L1_CHAIN_ID' | 'L2_LEGACY_SHARED_BRIDGE' | 'WETH_TOKEN' | 'acceptOwnership' | 'assetId' | 'bridgeBurn' | 'bridgeMint' | 'bridgedTokenBeacon' | 'calculateCreate2TokenAddress' | 'ensureTokenIsRegistered' | 'getERC20Getters' | 'l2TokenAddress' | 'originChainId' | 'owner' | 'pause' | 'paused' | 'pendingOwner' | 'registerToken' | 'renounceOwnership' | 'setLegacyTokenAssetId' | 'tokenAddress' | 'tokenDataOriginChainId' | 'transferOwnership' | 'tryRegisterTokenFromBurnData' | 'unpause'): FunctionFragment;
|
|
5
|
+
getEvent(nameOrSignatureOrTopic: 'BridgeBurn' | 'BridgeMint' | 'BridgedTokenBeaconUpdated' | 'FinalizeDeposit' | 'Initialized' | 'L2TokenBeaconUpdated' | 'OwnershipTransferStarted' | 'OwnershipTransferred' | 'Paused' | 'Unpaused' | 'WithdrawalInitiated'): EventFragment;
|
|
6
|
+
encodeFunctionData(functionFragment: 'ASSET_ROUTER', values?: undefined): string;
|
|
7
|
+
encodeFunctionData(functionFragment: 'BASE_TOKEN_ASSET_ID', values?: undefined): string;
|
|
8
|
+
encodeFunctionData(functionFragment: 'L1_CHAIN_ID', values?: undefined): string;
|
|
9
|
+
encodeFunctionData(functionFragment: 'L2_LEGACY_SHARED_BRIDGE', values?: undefined): string;
|
|
10
|
+
encodeFunctionData(functionFragment: 'WETH_TOKEN', values?: undefined): string;
|
|
11
|
+
encodeFunctionData(functionFragment: 'acceptOwnership', values?: undefined): string;
|
|
12
|
+
encodeFunctionData(functionFragment: 'assetId', values: [AddressLike]): string;
|
|
13
|
+
encodeFunctionData(functionFragment: 'bridgeBurn', values: [BigNumberish, BigNumberish, BytesLike, AddressLike, BytesLike]): string;
|
|
14
|
+
encodeFunctionData(functionFragment: 'bridgeMint', values: [BigNumberish, BytesLike, BytesLike]): string;
|
|
15
|
+
encodeFunctionData(functionFragment: 'bridgedTokenBeacon', values?: undefined): string;
|
|
16
|
+
encodeFunctionData(functionFragment: 'calculateCreate2TokenAddress', values: [BigNumberish, AddressLike]): string;
|
|
17
|
+
encodeFunctionData(functionFragment: 'ensureTokenIsRegistered', values: [AddressLike]): string;
|
|
18
|
+
encodeFunctionData(functionFragment: 'getERC20Getters', values: [AddressLike, BigNumberish]): string;
|
|
19
|
+
encodeFunctionData(functionFragment: 'l2TokenAddress', values: [AddressLike]): string;
|
|
20
|
+
encodeFunctionData(functionFragment: 'originChainId', values: [BytesLike]): string;
|
|
21
|
+
encodeFunctionData(functionFragment: 'owner', values?: undefined): string;
|
|
22
|
+
encodeFunctionData(functionFragment: 'pause', values?: undefined): string;
|
|
23
|
+
encodeFunctionData(functionFragment: 'paused', values?: undefined): string;
|
|
24
|
+
encodeFunctionData(functionFragment: 'pendingOwner', values?: undefined): string;
|
|
25
|
+
encodeFunctionData(functionFragment: 'registerToken', values: [AddressLike]): string;
|
|
26
|
+
encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string;
|
|
27
|
+
encodeFunctionData(functionFragment: 'setLegacyTokenAssetId', values: [AddressLike]): string;
|
|
28
|
+
encodeFunctionData(functionFragment: 'tokenAddress', values: [BytesLike]): string;
|
|
29
|
+
encodeFunctionData(functionFragment: 'tokenDataOriginChainId', values: [BytesLike]): string;
|
|
30
|
+
encodeFunctionData(functionFragment: 'transferOwnership', values: [AddressLike]): string;
|
|
31
|
+
encodeFunctionData(functionFragment: 'tryRegisterTokenFromBurnData', values: [BytesLike, BytesLike]): string;
|
|
32
|
+
encodeFunctionData(functionFragment: 'unpause', values?: undefined): string;
|
|
33
|
+
decodeFunctionResult(functionFragment: 'ASSET_ROUTER', data: BytesLike): Result;
|
|
34
|
+
decodeFunctionResult(functionFragment: 'BASE_TOKEN_ASSET_ID', data: BytesLike): Result;
|
|
35
|
+
decodeFunctionResult(functionFragment: 'L1_CHAIN_ID', data: BytesLike): Result;
|
|
36
|
+
decodeFunctionResult(functionFragment: 'L2_LEGACY_SHARED_BRIDGE', data: BytesLike): Result;
|
|
37
|
+
decodeFunctionResult(functionFragment: 'WETH_TOKEN', data: BytesLike): Result;
|
|
38
|
+
decodeFunctionResult(functionFragment: 'acceptOwnership', data: BytesLike): Result;
|
|
39
|
+
decodeFunctionResult(functionFragment: 'assetId', data: BytesLike): Result;
|
|
40
|
+
decodeFunctionResult(functionFragment: 'bridgeBurn', data: BytesLike): Result;
|
|
41
|
+
decodeFunctionResult(functionFragment: 'bridgeMint', data: BytesLike): Result;
|
|
42
|
+
decodeFunctionResult(functionFragment: 'bridgedTokenBeacon', data: BytesLike): Result;
|
|
43
|
+
decodeFunctionResult(functionFragment: 'calculateCreate2TokenAddress', data: BytesLike): Result;
|
|
44
|
+
decodeFunctionResult(functionFragment: 'ensureTokenIsRegistered', data: BytesLike): Result;
|
|
45
|
+
decodeFunctionResult(functionFragment: 'getERC20Getters', data: BytesLike): Result;
|
|
46
|
+
decodeFunctionResult(functionFragment: 'l2TokenAddress', data: BytesLike): Result;
|
|
47
|
+
decodeFunctionResult(functionFragment: 'originChainId', data: BytesLike): Result;
|
|
48
|
+
decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result;
|
|
49
|
+
decodeFunctionResult(functionFragment: 'pause', data: BytesLike): Result;
|
|
50
|
+
decodeFunctionResult(functionFragment: 'paused', data: BytesLike): Result;
|
|
51
|
+
decodeFunctionResult(functionFragment: 'pendingOwner', data: BytesLike): Result;
|
|
52
|
+
decodeFunctionResult(functionFragment: 'registerToken', data: BytesLike): Result;
|
|
53
|
+
decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result;
|
|
54
|
+
decodeFunctionResult(functionFragment: 'setLegacyTokenAssetId', data: BytesLike): Result;
|
|
55
|
+
decodeFunctionResult(functionFragment: 'tokenAddress', data: BytesLike): Result;
|
|
56
|
+
decodeFunctionResult(functionFragment: 'tokenDataOriginChainId', data: BytesLike): Result;
|
|
57
|
+
decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result;
|
|
58
|
+
decodeFunctionResult(functionFragment: 'tryRegisterTokenFromBurnData', data: BytesLike): Result;
|
|
59
|
+
decodeFunctionResult(functionFragment: 'unpause', data: BytesLike): Result;
|
|
60
|
+
}
|
|
61
|
+
export declare namespace BridgeBurnEvent {
|
|
62
|
+
type InputTuple = [
|
|
63
|
+
chainId: BigNumberish,
|
|
64
|
+
assetId: BytesLike,
|
|
65
|
+
sender: AddressLike,
|
|
66
|
+
receiver: AddressLike,
|
|
67
|
+
amount: BigNumberish
|
|
68
|
+
];
|
|
69
|
+
type OutputTuple = [
|
|
70
|
+
chainId: bigint,
|
|
71
|
+
assetId: string,
|
|
72
|
+
sender: string,
|
|
73
|
+
receiver: string,
|
|
74
|
+
amount: bigint
|
|
75
|
+
];
|
|
76
|
+
interface OutputObject {
|
|
77
|
+
chainId: bigint;
|
|
78
|
+
assetId: string;
|
|
79
|
+
sender: string;
|
|
80
|
+
receiver: string;
|
|
81
|
+
amount: bigint;
|
|
82
|
+
}
|
|
83
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
84
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
85
|
+
type Log = TypedEventLog<Event>;
|
|
86
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
87
|
+
}
|
|
88
|
+
export declare namespace BridgeMintEvent {
|
|
89
|
+
type InputTuple = [
|
|
90
|
+
chainId: BigNumberish,
|
|
91
|
+
assetId: BytesLike,
|
|
92
|
+
receiver: AddressLike,
|
|
93
|
+
amount: BigNumberish
|
|
94
|
+
];
|
|
95
|
+
type OutputTuple = [chainId: bigint, assetId: string, receiver: string, amount: bigint];
|
|
96
|
+
interface OutputObject {
|
|
97
|
+
chainId: bigint;
|
|
98
|
+
assetId: string;
|
|
99
|
+
receiver: string;
|
|
100
|
+
amount: bigint;
|
|
101
|
+
}
|
|
102
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
103
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
104
|
+
type Log = TypedEventLog<Event>;
|
|
105
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
106
|
+
}
|
|
107
|
+
export declare namespace BridgedTokenBeaconUpdatedEvent {
|
|
108
|
+
type InputTuple = [
|
|
109
|
+
bridgedTokenBeacon: AddressLike,
|
|
110
|
+
bridgedTokenProxyBytecodeHash: BytesLike
|
|
111
|
+
];
|
|
112
|
+
type OutputTuple = [bridgedTokenBeacon: string, bridgedTokenProxyBytecodeHash: string];
|
|
113
|
+
interface OutputObject {
|
|
114
|
+
bridgedTokenBeacon: string;
|
|
115
|
+
bridgedTokenProxyBytecodeHash: string;
|
|
116
|
+
}
|
|
117
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
118
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
119
|
+
type Log = TypedEventLog<Event>;
|
|
120
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
121
|
+
}
|
|
122
|
+
export declare namespace FinalizeDepositEvent {
|
|
123
|
+
type InputTuple = [
|
|
124
|
+
l1Sender: AddressLike,
|
|
125
|
+
l2Receiver: AddressLike,
|
|
126
|
+
l2Token: AddressLike,
|
|
127
|
+
amount: BigNumberish
|
|
128
|
+
];
|
|
129
|
+
type OutputTuple = [l1Sender: string, l2Receiver: string, l2Token: string, amount: bigint];
|
|
130
|
+
interface OutputObject {
|
|
131
|
+
l1Sender: string;
|
|
132
|
+
l2Receiver: string;
|
|
133
|
+
l2Token: string;
|
|
134
|
+
amount: bigint;
|
|
135
|
+
}
|
|
136
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
137
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
138
|
+
type Log = TypedEventLog<Event>;
|
|
139
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
140
|
+
}
|
|
141
|
+
export declare namespace InitializedEvent {
|
|
142
|
+
type InputTuple = [version: BigNumberish];
|
|
143
|
+
type OutputTuple = [version: bigint];
|
|
144
|
+
interface OutputObject {
|
|
145
|
+
version: bigint;
|
|
146
|
+
}
|
|
147
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
148
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
149
|
+
type Log = TypedEventLog<Event>;
|
|
150
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
151
|
+
}
|
|
152
|
+
export declare namespace L2TokenBeaconUpdatedEvent {
|
|
153
|
+
type InputTuple = [l2TokenBeacon: AddressLike, l2TokenProxyBytecodeHash: BytesLike];
|
|
154
|
+
type OutputTuple = [l2TokenBeacon: string, l2TokenProxyBytecodeHash: string];
|
|
155
|
+
interface OutputObject {
|
|
156
|
+
l2TokenBeacon: string;
|
|
157
|
+
l2TokenProxyBytecodeHash: string;
|
|
158
|
+
}
|
|
159
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
160
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
161
|
+
type Log = TypedEventLog<Event>;
|
|
162
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
163
|
+
}
|
|
164
|
+
export declare namespace OwnershipTransferStartedEvent {
|
|
165
|
+
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
|
|
166
|
+
type OutputTuple = [previousOwner: string, newOwner: string];
|
|
167
|
+
interface OutputObject {
|
|
168
|
+
previousOwner: string;
|
|
169
|
+
newOwner: string;
|
|
170
|
+
}
|
|
171
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
172
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
173
|
+
type Log = TypedEventLog<Event>;
|
|
174
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
175
|
+
}
|
|
176
|
+
export declare namespace OwnershipTransferredEvent {
|
|
177
|
+
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
|
|
178
|
+
type OutputTuple = [previousOwner: string, newOwner: string];
|
|
179
|
+
interface OutputObject {
|
|
180
|
+
previousOwner: string;
|
|
181
|
+
newOwner: string;
|
|
182
|
+
}
|
|
183
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
184
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
185
|
+
type Log = TypedEventLog<Event>;
|
|
186
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
187
|
+
}
|
|
188
|
+
export declare namespace PausedEvent {
|
|
189
|
+
type InputTuple = [account: AddressLike];
|
|
190
|
+
type OutputTuple = [account: string];
|
|
191
|
+
interface OutputObject {
|
|
192
|
+
account: string;
|
|
193
|
+
}
|
|
194
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
195
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
196
|
+
type Log = TypedEventLog<Event>;
|
|
197
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
198
|
+
}
|
|
199
|
+
export declare namespace UnpausedEvent {
|
|
200
|
+
type InputTuple = [account: AddressLike];
|
|
201
|
+
type OutputTuple = [account: string];
|
|
202
|
+
interface OutputObject {
|
|
203
|
+
account: string;
|
|
204
|
+
}
|
|
205
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
206
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
207
|
+
type Log = TypedEventLog<Event>;
|
|
208
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
209
|
+
}
|
|
210
|
+
export declare namespace WithdrawalInitiatedEvent {
|
|
211
|
+
type InputTuple = [
|
|
212
|
+
l2Sender: AddressLike,
|
|
213
|
+
l1Receiver: AddressLike,
|
|
214
|
+
l2Token: AddressLike,
|
|
215
|
+
amount: BigNumberish
|
|
216
|
+
];
|
|
217
|
+
type OutputTuple = [l2Sender: string, l1Receiver: string, l2Token: string, amount: bigint];
|
|
218
|
+
interface OutputObject {
|
|
219
|
+
l2Sender: string;
|
|
220
|
+
l1Receiver: string;
|
|
221
|
+
l2Token: string;
|
|
222
|
+
amount: bigint;
|
|
223
|
+
}
|
|
224
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
225
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
226
|
+
type Log = TypedEventLog<Event>;
|
|
227
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
228
|
+
}
|
|
229
|
+
export interface IL2NativeTokenVault extends BaseContract {
|
|
230
|
+
connect(runner?: ContractRunner | null): IL2NativeTokenVault;
|
|
231
|
+
waitForDeployment(): Promise<this>;
|
|
232
|
+
interface: IL2NativeTokenVaultInterface;
|
|
233
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
234
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
235
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
236
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
237
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
238
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
239
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
240
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
241
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
242
|
+
ASSET_ROUTER: TypedContractMethod<[], [string], 'view'>;
|
|
243
|
+
BASE_TOKEN_ASSET_ID: TypedContractMethod<[], [string], 'view'>;
|
|
244
|
+
L1_CHAIN_ID: TypedContractMethod<[], [bigint], 'view'>;
|
|
245
|
+
L2_LEGACY_SHARED_BRIDGE: TypedContractMethod<[], [string], 'view'>;
|
|
246
|
+
WETH_TOKEN: TypedContractMethod<[], [string], 'view'>;
|
|
247
|
+
acceptOwnership: TypedContractMethod<[], [void], 'nonpayable'>;
|
|
248
|
+
assetId: TypedContractMethod<[tokenAddress: AddressLike], [string], 'view'>;
|
|
249
|
+
bridgeBurn: TypedContractMethod<[
|
|
250
|
+
_chainId: BigNumberish,
|
|
251
|
+
_l2MsgValue: BigNumberish,
|
|
252
|
+
_assetId: BytesLike,
|
|
253
|
+
_originalCaller: AddressLike,
|
|
254
|
+
_data: BytesLike
|
|
255
|
+
], [
|
|
256
|
+
string
|
|
257
|
+
], 'payable'>;
|
|
258
|
+
bridgeMint: TypedContractMethod<[
|
|
259
|
+
_chainId: BigNumberish,
|
|
260
|
+
_assetId: BytesLike,
|
|
261
|
+
_data: BytesLike
|
|
262
|
+
], [
|
|
263
|
+
void
|
|
264
|
+
], 'payable'>;
|
|
265
|
+
bridgedTokenBeacon: TypedContractMethod<[], [string], 'view'>;
|
|
266
|
+
calculateCreate2TokenAddress: TypedContractMethod<[
|
|
267
|
+
_tokenOriginChainId: BigNumberish,
|
|
268
|
+
_nonNativeToken: AddressLike
|
|
269
|
+
], [
|
|
270
|
+
string
|
|
271
|
+
], 'view'>;
|
|
272
|
+
ensureTokenIsRegistered: TypedContractMethod<[_nativeToken: AddressLike], [string], 'nonpayable'>;
|
|
273
|
+
getERC20Getters: TypedContractMethod<[
|
|
274
|
+
_token: AddressLike,
|
|
275
|
+
_originChainId: BigNumberish
|
|
276
|
+
], [
|
|
277
|
+
string
|
|
278
|
+
], 'view'>;
|
|
279
|
+
l2TokenAddress: TypedContractMethod<[_l1Token: AddressLike], [string], 'view'>;
|
|
280
|
+
originChainId: TypedContractMethod<[assetId: BytesLike], [bigint], 'view'>;
|
|
281
|
+
owner: TypedContractMethod<[], [string], 'view'>;
|
|
282
|
+
pause: TypedContractMethod<[], [void], 'nonpayable'>;
|
|
283
|
+
paused: TypedContractMethod<[], [boolean], 'view'>;
|
|
284
|
+
pendingOwner: TypedContractMethod<[], [string], 'view'>;
|
|
285
|
+
registerToken: TypedContractMethod<[_nativeToken: AddressLike], [void], 'nonpayable'>;
|
|
286
|
+
renounceOwnership: TypedContractMethod<[], [void], 'nonpayable'>;
|
|
287
|
+
setLegacyTokenAssetId: TypedContractMethod<[_l2TokenAddress: AddressLike], [void], 'nonpayable'>;
|
|
288
|
+
tokenAddress: TypedContractMethod<[assetId: BytesLike], [string], 'view'>;
|
|
289
|
+
tokenDataOriginChainId: TypedContractMethod<[_erc20Data: BytesLike], [bigint], 'view'>;
|
|
290
|
+
transferOwnership: TypedContractMethod<[newOwner: AddressLike], [void], 'nonpayable'>;
|
|
291
|
+
tryRegisterTokenFromBurnData: TypedContractMethod<[
|
|
292
|
+
_burnData: BytesLike,
|
|
293
|
+
_expectedAssetId: BytesLike
|
|
294
|
+
], [
|
|
295
|
+
void
|
|
296
|
+
], 'nonpayable'>;
|
|
297
|
+
unpause: TypedContractMethod<[], [void], 'nonpayable'>;
|
|
298
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
299
|
+
getFunction(nameOrSignature: 'ASSET_ROUTER'): TypedContractMethod<[], [string], 'view'>;
|
|
300
|
+
getFunction(nameOrSignature: 'BASE_TOKEN_ASSET_ID'): TypedContractMethod<[], [string], 'view'>;
|
|
301
|
+
getFunction(nameOrSignature: 'L1_CHAIN_ID'): TypedContractMethod<[], [bigint], 'view'>;
|
|
302
|
+
getFunction(nameOrSignature: 'L2_LEGACY_SHARED_BRIDGE'): TypedContractMethod<[], [string], 'view'>;
|
|
303
|
+
getFunction(nameOrSignature: 'WETH_TOKEN'): TypedContractMethod<[], [string], 'view'>;
|
|
304
|
+
getFunction(nameOrSignature: 'acceptOwnership'): TypedContractMethod<[], [void], 'nonpayable'>;
|
|
305
|
+
getFunction(nameOrSignature: 'assetId'): TypedContractMethod<[tokenAddress: AddressLike], [string], 'view'>;
|
|
306
|
+
getFunction(nameOrSignature: 'bridgeBurn'): TypedContractMethod<[
|
|
307
|
+
_chainId: BigNumberish,
|
|
308
|
+
_l2MsgValue: BigNumberish,
|
|
309
|
+
_assetId: BytesLike,
|
|
310
|
+
_originalCaller: AddressLike,
|
|
311
|
+
_data: BytesLike
|
|
312
|
+
], [
|
|
313
|
+
string
|
|
314
|
+
], 'payable'>;
|
|
315
|
+
getFunction(nameOrSignature: 'bridgeMint'): TypedContractMethod<[
|
|
316
|
+
_chainId: BigNumberish,
|
|
317
|
+
_assetId: BytesLike,
|
|
318
|
+
_data: BytesLike
|
|
319
|
+
], [
|
|
320
|
+
void
|
|
321
|
+
], 'payable'>;
|
|
322
|
+
getFunction(nameOrSignature: 'bridgedTokenBeacon'): TypedContractMethod<[], [string], 'view'>;
|
|
323
|
+
getFunction(nameOrSignature: 'calculateCreate2TokenAddress'): TypedContractMethod<[
|
|
324
|
+
_tokenOriginChainId: BigNumberish,
|
|
325
|
+
_nonNativeToken: AddressLike
|
|
326
|
+
], [
|
|
327
|
+
string
|
|
328
|
+
], 'view'>;
|
|
329
|
+
getFunction(nameOrSignature: 'ensureTokenIsRegistered'): TypedContractMethod<[_nativeToken: AddressLike], [string], 'nonpayable'>;
|
|
330
|
+
getFunction(nameOrSignature: 'getERC20Getters'): TypedContractMethod<[_token: AddressLike, _originChainId: BigNumberish], [string], 'view'>;
|
|
331
|
+
getFunction(nameOrSignature: 'l2TokenAddress'): TypedContractMethod<[_l1Token: AddressLike], [string], 'view'>;
|
|
332
|
+
getFunction(nameOrSignature: 'originChainId'): TypedContractMethod<[assetId: BytesLike], [bigint], 'view'>;
|
|
333
|
+
getFunction(nameOrSignature: 'owner'): TypedContractMethod<[], [string], 'view'>;
|
|
334
|
+
getFunction(nameOrSignature: 'pause'): TypedContractMethod<[], [void], 'nonpayable'>;
|
|
335
|
+
getFunction(nameOrSignature: 'paused'): TypedContractMethod<[], [boolean], 'view'>;
|
|
336
|
+
getFunction(nameOrSignature: 'pendingOwner'): TypedContractMethod<[], [string], 'view'>;
|
|
337
|
+
getFunction(nameOrSignature: 'registerToken'): TypedContractMethod<[_nativeToken: AddressLike], [void], 'nonpayable'>;
|
|
338
|
+
getFunction(nameOrSignature: 'renounceOwnership'): TypedContractMethod<[], [void], 'nonpayable'>;
|
|
339
|
+
getFunction(nameOrSignature: 'setLegacyTokenAssetId'): TypedContractMethod<[_l2TokenAddress: AddressLike], [void], 'nonpayable'>;
|
|
340
|
+
getFunction(nameOrSignature: 'tokenAddress'): TypedContractMethod<[assetId: BytesLike], [string], 'view'>;
|
|
341
|
+
getFunction(nameOrSignature: 'tokenDataOriginChainId'): TypedContractMethod<[_erc20Data: BytesLike], [bigint], 'view'>;
|
|
342
|
+
getFunction(nameOrSignature: 'transferOwnership'): TypedContractMethod<[newOwner: AddressLike], [void], 'nonpayable'>;
|
|
343
|
+
getFunction(nameOrSignature: 'tryRegisterTokenFromBurnData'): TypedContractMethod<[_burnData: BytesLike, _expectedAssetId: BytesLike], [void], 'nonpayable'>;
|
|
344
|
+
getFunction(nameOrSignature: 'unpause'): TypedContractMethod<[], [void], 'nonpayable'>;
|
|
345
|
+
getEvent(key: 'BridgeBurn'): TypedContractEvent<BridgeBurnEvent.InputTuple, BridgeBurnEvent.OutputTuple, BridgeBurnEvent.OutputObject>;
|
|
346
|
+
getEvent(key: 'BridgeMint'): TypedContractEvent<BridgeMintEvent.InputTuple, BridgeMintEvent.OutputTuple, BridgeMintEvent.OutputObject>;
|
|
347
|
+
getEvent(key: 'BridgedTokenBeaconUpdated'): TypedContractEvent<BridgedTokenBeaconUpdatedEvent.InputTuple, BridgedTokenBeaconUpdatedEvent.OutputTuple, BridgedTokenBeaconUpdatedEvent.OutputObject>;
|
|
348
|
+
getEvent(key: 'FinalizeDeposit'): TypedContractEvent<FinalizeDepositEvent.InputTuple, FinalizeDepositEvent.OutputTuple, FinalizeDepositEvent.OutputObject>;
|
|
349
|
+
getEvent(key: 'Initialized'): TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
350
|
+
getEvent(key: 'L2TokenBeaconUpdated'): TypedContractEvent<L2TokenBeaconUpdatedEvent.InputTuple, L2TokenBeaconUpdatedEvent.OutputTuple, L2TokenBeaconUpdatedEvent.OutputObject>;
|
|
351
|
+
getEvent(key: 'OwnershipTransferStarted'): TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
352
|
+
getEvent(key: 'OwnershipTransferred'): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
353
|
+
getEvent(key: 'Paused'): TypedContractEvent<PausedEvent.InputTuple, PausedEvent.OutputTuple, PausedEvent.OutputObject>;
|
|
354
|
+
getEvent(key: 'Unpaused'): TypedContractEvent<UnpausedEvent.InputTuple, UnpausedEvent.OutputTuple, UnpausedEvent.OutputObject>;
|
|
355
|
+
getEvent(key: 'WithdrawalInitiated'): TypedContractEvent<WithdrawalInitiatedEvent.InputTuple, WithdrawalInitiatedEvent.OutputTuple, WithdrawalInitiatedEvent.OutputObject>;
|
|
356
|
+
filters: {
|
|
357
|
+
'BridgeBurn(uint256,bytes32,address,address,uint256)': TypedContractEvent<BridgeBurnEvent.InputTuple, BridgeBurnEvent.OutputTuple, BridgeBurnEvent.OutputObject>;
|
|
358
|
+
BridgeBurn: TypedContractEvent<BridgeBurnEvent.InputTuple, BridgeBurnEvent.OutputTuple, BridgeBurnEvent.OutputObject>;
|
|
359
|
+
'BridgeMint(uint256,bytes32,address,uint256)': TypedContractEvent<BridgeMintEvent.InputTuple, BridgeMintEvent.OutputTuple, BridgeMintEvent.OutputObject>;
|
|
360
|
+
BridgeMint: TypedContractEvent<BridgeMintEvent.InputTuple, BridgeMintEvent.OutputTuple, BridgeMintEvent.OutputObject>;
|
|
361
|
+
'BridgedTokenBeaconUpdated(address,bytes32)': TypedContractEvent<BridgedTokenBeaconUpdatedEvent.InputTuple, BridgedTokenBeaconUpdatedEvent.OutputTuple, BridgedTokenBeaconUpdatedEvent.OutputObject>;
|
|
362
|
+
BridgedTokenBeaconUpdated: TypedContractEvent<BridgedTokenBeaconUpdatedEvent.InputTuple, BridgedTokenBeaconUpdatedEvent.OutputTuple, BridgedTokenBeaconUpdatedEvent.OutputObject>;
|
|
363
|
+
'FinalizeDeposit(address,address,address,uint256)': TypedContractEvent<FinalizeDepositEvent.InputTuple, FinalizeDepositEvent.OutputTuple, FinalizeDepositEvent.OutputObject>;
|
|
364
|
+
FinalizeDeposit: TypedContractEvent<FinalizeDepositEvent.InputTuple, FinalizeDepositEvent.OutputTuple, FinalizeDepositEvent.OutputObject>;
|
|
365
|
+
'Initialized(uint8)': TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
366
|
+
Initialized: TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
367
|
+
'L2TokenBeaconUpdated(address,bytes32)': TypedContractEvent<L2TokenBeaconUpdatedEvent.InputTuple, L2TokenBeaconUpdatedEvent.OutputTuple, L2TokenBeaconUpdatedEvent.OutputObject>;
|
|
368
|
+
L2TokenBeaconUpdated: TypedContractEvent<L2TokenBeaconUpdatedEvent.InputTuple, L2TokenBeaconUpdatedEvent.OutputTuple, L2TokenBeaconUpdatedEvent.OutputObject>;
|
|
369
|
+
'OwnershipTransferStarted(address,address)': TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
370
|
+
OwnershipTransferStarted: TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
371
|
+
'OwnershipTransferred(address,address)': TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
372
|
+
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
373
|
+
'Paused(address)': TypedContractEvent<PausedEvent.InputTuple, PausedEvent.OutputTuple, PausedEvent.OutputObject>;
|
|
374
|
+
Paused: TypedContractEvent<PausedEvent.InputTuple, PausedEvent.OutputTuple, PausedEvent.OutputObject>;
|
|
375
|
+
'Unpaused(address)': TypedContractEvent<UnpausedEvent.InputTuple, UnpausedEvent.OutputTuple, UnpausedEvent.OutputObject>;
|
|
376
|
+
Unpaused: TypedContractEvent<UnpausedEvent.InputTuple, UnpausedEvent.OutputTuple, UnpausedEvent.OutputObject>;
|
|
377
|
+
'WithdrawalInitiated(address,address,address,uint256)': TypedContractEvent<WithdrawalInitiatedEvent.InputTuple, WithdrawalInitiatedEvent.OutputTuple, WithdrawalInitiatedEvent.OutputObject>;
|
|
378
|
+
WithdrawalInitiated: TypedContractEvent<WithdrawalInitiatedEvent.InputTuple, WithdrawalInitiatedEvent.OutputTuple, WithdrawalInitiatedEvent.OutputObject>;
|
|
379
|
+
};
|
|
380
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { FunctionFragment, Typed, EventFragment, ContractTransaction, ContractTransactionResponse, DeferredTopicFilter, EventLog, TransactionRequest, LogDescription } from 'ethers';
|
|
2
|
+
export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {
|
|
3
|
+
}
|
|
4
|
+
export interface TypedContractEvent<InputTuple extends Array<any> = any, OutputTuple extends Array<any> = any, OutputObject = any> {
|
|
5
|
+
(...args: Partial<InputTuple>): TypedDeferredTopicFilter<TypedContractEvent<InputTuple, OutputTuple, OutputObject>>;
|
|
6
|
+
name: string;
|
|
7
|
+
fragment: EventFragment;
|
|
8
|
+
getFragment(...args: Partial<InputTuple>): EventFragment;
|
|
9
|
+
}
|
|
10
|
+
type __TypechainAOutputTuple<T> = T extends TypedContractEvent<infer _U, infer W> ? W : never;
|
|
11
|
+
type __TypechainOutputObject<T> = T extends TypedContractEvent<infer _U, infer _W, infer V> ? V : never;
|
|
12
|
+
export interface TypedEventLog<TCEvent extends TypedContractEvent> extends Omit<EventLog, 'args'> {
|
|
13
|
+
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
|
|
14
|
+
}
|
|
15
|
+
export interface TypedLogDescription<TCEvent extends TypedContractEvent> extends Omit<LogDescription, 'args'> {
|
|
16
|
+
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
|
|
17
|
+
}
|
|
18
|
+
export type TypedListener<TCEvent extends TypedContractEvent> = (...listenerArg: [...__TypechainAOutputTuple<TCEvent>, TypedEventLog<TCEvent>, ...undefined[]]) => void;
|
|
19
|
+
export type MinEthersFactory<C, ARGS> = {
|
|
20
|
+
deploy(...a: ARGS[]): Promise<C>;
|
|
21
|
+
};
|
|
22
|
+
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
|
|
23
|
+
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F['deploy']> : never;
|
|
24
|
+
export type StateMutability = 'nonpayable' | 'payable' | 'view';
|
|
25
|
+
export type BaseOverrides = Omit<TransactionRequest, 'to' | 'data'>;
|
|
26
|
+
export type NonPayableOverrides = Omit<BaseOverrides, 'value' | 'blockTag' | 'enableCcipRead'>;
|
|
27
|
+
export type PayableOverrides = Omit<BaseOverrides, 'blockTag' | 'enableCcipRead'>;
|
|
28
|
+
export type ViewOverrides = Omit<TransactionRequest, 'to' | 'data'>;
|
|
29
|
+
export type Overrides<S extends StateMutability> = S extends 'nonpayable' ? NonPayableOverrides : S extends 'payable' ? PayableOverrides : ViewOverrides;
|
|
30
|
+
export type PostfixOverrides<A extends Array<any>, S extends StateMutability> = A | [...A, Overrides<S>];
|
|
31
|
+
export type ContractMethodArgs<A extends Array<any>, S extends StateMutability> = PostfixOverrides<{
|
|
32
|
+
[I in keyof A]-?: A[I] | Typed;
|
|
33
|
+
}, S>;
|
|
34
|
+
export type DefaultReturnType<R> = R extends Array<any> ? R[0] : R;
|
|
35
|
+
export interface TypedContractMethod<A extends Array<any> = Array<any>, R = any, S extends StateMutability = 'payable'> {
|
|
36
|
+
(...args: ContractMethodArgs<A, S>): S extends 'view' ? Promise<DefaultReturnType<R>> : Promise<ContractTransactionResponse>;
|
|
37
|
+
name: string;
|
|
38
|
+
fragment: FunctionFragment;
|
|
39
|
+
getFragment(...args: ContractMethodArgs<A, S>): FunctionFragment;
|
|
40
|
+
populateTransaction(...args: ContractMethodArgs<A, S>): Promise<ContractTransaction>;
|
|
41
|
+
staticCall(...args: ContractMethodArgs<A, 'view'>): Promise<DefaultReturnType<R>>;
|
|
42
|
+
send(...args: ContractMethodArgs<A, S>): Promise<ContractTransactionResponse>;
|
|
43
|
+
estimateGas(...args: ContractMethodArgs<A, S>): Promise<bigint>;
|
|
44
|
+
staticCallResult(...args: ContractMethodArgs<A, 'view'>): Promise<R>;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { type ContractRunner } from 'ethers';
|
|
2
|
+
import type { IAssetRouterBase, IAssetRouterBaseInterface } from '../IAssetRouterBase';
|
|
3
|
+
export declare class IAssetRouterBase__factory {
|
|
4
|
+
static readonly abi: readonly [{
|
|
5
|
+
readonly anonymous: false;
|
|
6
|
+
readonly inputs: readonly [{
|
|
7
|
+
readonly indexed: true;
|
|
8
|
+
readonly internalType: "bytes32";
|
|
9
|
+
readonly name: "assetId";
|
|
10
|
+
readonly type: "bytes32";
|
|
11
|
+
}, {
|
|
12
|
+
readonly indexed: true;
|
|
13
|
+
readonly internalType: "address";
|
|
14
|
+
readonly name: "_assetAddress";
|
|
15
|
+
readonly type: "address";
|
|
16
|
+
}];
|
|
17
|
+
readonly name: "AssetHandlerRegistered";
|
|
18
|
+
readonly type: "event";
|
|
19
|
+
}, {
|
|
20
|
+
readonly anonymous: false;
|
|
21
|
+
readonly inputs: readonly [{
|
|
22
|
+
readonly indexed: true;
|
|
23
|
+
readonly internalType: "bytes32";
|
|
24
|
+
readonly name: "assetId";
|
|
25
|
+
readonly type: "bytes32";
|
|
26
|
+
}, {
|
|
27
|
+
readonly indexed: true;
|
|
28
|
+
readonly internalType: "address";
|
|
29
|
+
readonly name: "assetHandlerAddress";
|
|
30
|
+
readonly type: "address";
|
|
31
|
+
}, {
|
|
32
|
+
readonly indexed: true;
|
|
33
|
+
readonly internalType: "bytes32";
|
|
34
|
+
readonly name: "additionalData";
|
|
35
|
+
readonly type: "bytes32";
|
|
36
|
+
}, {
|
|
37
|
+
readonly indexed: false;
|
|
38
|
+
readonly internalType: "address";
|
|
39
|
+
readonly name: "assetDeploymentTracker";
|
|
40
|
+
readonly type: "address";
|
|
41
|
+
}];
|
|
42
|
+
readonly name: "AssetHandlerRegisteredInitial";
|
|
43
|
+
readonly type: "event";
|
|
44
|
+
}, {
|
|
45
|
+
readonly anonymous: false;
|
|
46
|
+
readonly inputs: readonly [{
|
|
47
|
+
readonly indexed: true;
|
|
48
|
+
readonly internalType: "uint256";
|
|
49
|
+
readonly name: "chainId";
|
|
50
|
+
readonly type: "uint256";
|
|
51
|
+
}, {
|
|
52
|
+
readonly indexed: true;
|
|
53
|
+
readonly internalType: "address";
|
|
54
|
+
readonly name: "from";
|
|
55
|
+
readonly type: "address";
|
|
56
|
+
}, {
|
|
57
|
+
readonly indexed: false;
|
|
58
|
+
readonly internalType: "bytes32";
|
|
59
|
+
readonly name: "assetId";
|
|
60
|
+
readonly type: "bytes32";
|
|
61
|
+
}, {
|
|
62
|
+
readonly indexed: false;
|
|
63
|
+
readonly internalType: "uint256";
|
|
64
|
+
readonly name: "amount";
|
|
65
|
+
readonly type: "uint256";
|
|
66
|
+
}];
|
|
67
|
+
readonly name: "BridgehubDepositBaseTokenInitiated";
|
|
68
|
+
readonly type: "event";
|
|
69
|
+
}, {
|
|
70
|
+
readonly anonymous: false;
|
|
71
|
+
readonly inputs: readonly [{
|
|
72
|
+
readonly indexed: true;
|
|
73
|
+
readonly internalType: "uint256";
|
|
74
|
+
readonly name: "chainId";
|
|
75
|
+
readonly type: "uint256";
|
|
76
|
+
}, {
|
|
77
|
+
readonly indexed: true;
|
|
78
|
+
readonly internalType: "bytes32";
|
|
79
|
+
readonly name: "txDataHash";
|
|
80
|
+
readonly type: "bytes32";
|
|
81
|
+
}, {
|
|
82
|
+
readonly indexed: true;
|
|
83
|
+
readonly internalType: "address";
|
|
84
|
+
readonly name: "from";
|
|
85
|
+
readonly type: "address";
|
|
86
|
+
}, {
|
|
87
|
+
readonly indexed: false;
|
|
88
|
+
readonly internalType: "bytes32";
|
|
89
|
+
readonly name: "assetId";
|
|
90
|
+
readonly type: "bytes32";
|
|
91
|
+
}, {
|
|
92
|
+
readonly indexed: false;
|
|
93
|
+
readonly internalType: "bytes";
|
|
94
|
+
readonly name: "bridgeMintCalldata";
|
|
95
|
+
readonly type: "bytes";
|
|
96
|
+
}];
|
|
97
|
+
readonly name: "BridgehubDepositInitiated";
|
|
98
|
+
readonly type: "event";
|
|
99
|
+
}, {
|
|
100
|
+
readonly anonymous: false;
|
|
101
|
+
readonly inputs: readonly [{
|
|
102
|
+
readonly indexed: false;
|
|
103
|
+
readonly internalType: "uint256";
|
|
104
|
+
readonly name: "chainId";
|
|
105
|
+
readonly type: "uint256";
|
|
106
|
+
}, {
|
|
107
|
+
readonly indexed: true;
|
|
108
|
+
readonly internalType: "address";
|
|
109
|
+
readonly name: "sender";
|
|
110
|
+
readonly type: "address";
|
|
111
|
+
}, {
|
|
112
|
+
readonly indexed: true;
|
|
113
|
+
readonly internalType: "bytes32";
|
|
114
|
+
readonly name: "assetId";
|
|
115
|
+
readonly type: "bytes32";
|
|
116
|
+
}, {
|
|
117
|
+
readonly indexed: false;
|
|
118
|
+
readonly internalType: "bytes32";
|
|
119
|
+
readonly name: "assetDataHash";
|
|
120
|
+
readonly type: "bytes32";
|
|
121
|
+
}];
|
|
122
|
+
readonly name: "BridgehubWithdrawalInitiated";
|
|
123
|
+
readonly type: "event";
|
|
124
|
+
}, {
|
|
125
|
+
readonly anonymous: false;
|
|
126
|
+
readonly inputs: readonly [{
|
|
127
|
+
readonly indexed: true;
|
|
128
|
+
readonly internalType: "uint256";
|
|
129
|
+
readonly name: "chainId";
|
|
130
|
+
readonly type: "uint256";
|
|
131
|
+
}, {
|
|
132
|
+
readonly indexed: true;
|
|
133
|
+
readonly internalType: "bytes32";
|
|
134
|
+
readonly name: "assetId";
|
|
135
|
+
readonly type: "bytes32";
|
|
136
|
+
}, {
|
|
137
|
+
readonly indexed: false;
|
|
138
|
+
readonly internalType: "bytes";
|
|
139
|
+
readonly name: "assetData";
|
|
140
|
+
readonly type: "bytes";
|
|
141
|
+
}];
|
|
142
|
+
readonly name: "DepositFinalizedAssetRouter";
|
|
143
|
+
readonly type: "event";
|
|
144
|
+
}, {
|
|
145
|
+
readonly inputs: readonly [];
|
|
146
|
+
readonly name: "BRIDGE_HUB";
|
|
147
|
+
readonly outputs: readonly [{
|
|
148
|
+
readonly internalType: "contract IBridgehub";
|
|
149
|
+
readonly name: "";
|
|
150
|
+
readonly type: "address";
|
|
151
|
+
}];
|
|
152
|
+
readonly stateMutability: "view";
|
|
153
|
+
readonly type: "function";
|
|
154
|
+
}, {
|
|
155
|
+
readonly inputs: readonly [{
|
|
156
|
+
readonly internalType: "bytes32";
|
|
157
|
+
readonly name: "_assetId";
|
|
158
|
+
readonly type: "bytes32";
|
|
159
|
+
}];
|
|
160
|
+
readonly name: "assetHandlerAddress";
|
|
161
|
+
readonly outputs: readonly [{
|
|
162
|
+
readonly internalType: "address";
|
|
163
|
+
readonly name: "";
|
|
164
|
+
readonly type: "address";
|
|
165
|
+
}];
|
|
166
|
+
readonly stateMutability: "view";
|
|
167
|
+
readonly type: "function";
|
|
168
|
+
}, {
|
|
169
|
+
readonly inputs: readonly [{
|
|
170
|
+
readonly internalType: "uint256";
|
|
171
|
+
readonly name: "_chainId";
|
|
172
|
+
readonly type: "uint256";
|
|
173
|
+
}, {
|
|
174
|
+
readonly internalType: "bytes32";
|
|
175
|
+
readonly name: "_assetId";
|
|
176
|
+
readonly type: "bytes32";
|
|
177
|
+
}, {
|
|
178
|
+
readonly internalType: "bytes";
|
|
179
|
+
readonly name: "_transferData";
|
|
180
|
+
readonly type: "bytes";
|
|
181
|
+
}];
|
|
182
|
+
readonly name: "finalizeDeposit";
|
|
183
|
+
readonly outputs: readonly [];
|
|
184
|
+
readonly stateMutability: "nonpayable";
|
|
185
|
+
readonly type: "function";
|
|
186
|
+
}, {
|
|
187
|
+
readonly inputs: readonly [{
|
|
188
|
+
readonly internalType: "bytes32";
|
|
189
|
+
readonly name: "_assetRegistrationData";
|
|
190
|
+
readonly type: "bytes32";
|
|
191
|
+
}, {
|
|
192
|
+
readonly internalType: "address";
|
|
193
|
+
readonly name: "_assetHandlerAddress";
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
}];
|
|
196
|
+
readonly name: "setAssetHandlerAddressThisChain";
|
|
197
|
+
readonly outputs: readonly [];
|
|
198
|
+
readonly stateMutability: "nonpayable";
|
|
199
|
+
readonly type: "function";
|
|
200
|
+
}];
|
|
201
|
+
static createInterface(): IAssetRouterBaseInterface;
|
|
202
|
+
static connect(address: string, runner?: ContractRunner | null): IAssetRouterBase;
|
|
203
|
+
}
|