dequanto 0.1.80 → 0.1.84
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/lib/cjs/blocks/BlockDateResolver.js +59 -23
- package/lib/cjs/blocks/BlockDateResolver.js.map +1 -1
- package/lib/cjs/contracts/deploy/Deployments.js +2 -1
- package/lib/cjs/contracts/deploy/Deployments.js.map +1 -1
- package/lib/cjs/contracts/deploy/proxy/ProxyDeployment.js +1 -1
- package/lib/cjs/contracts/deploy/proxy/ProxyDeployment.js.map +1 -1
- package/lib/cjs/erc4337/Erc4337Factory.js +0 -1
- package/lib/cjs/erc4337/Erc4337Factory.js.map +1 -1
- package/lib/cjs/indexer/EventsIndexer.js +14 -2
- package/lib/cjs/indexer/EventsIndexer.js.map +1 -1
- package/lib/cjs/prebuilt-factories/TimelockControllerFactory.js +251 -0
- package/lib/cjs/prebuilt-factories/TimelockControllerFactory.js.map +1 -0
- package/lib/cjs/services/TimelockService/TimelockService.js +52 -2
- package/lib/cjs/services/TimelockService/TimelockService.js.map +1 -1
- package/lib/cjs/txs/TxWriter.js +1 -1
- package/lib/cjs/txs/TxWriter.js.map +1 -1
- package/lib/cjs/txs/agents/TimelockAgent.js +90 -0
- package/lib/cjs/txs/agents/TimelockAgent.js.map +1 -0
- package/lib/cjs/txs/agents/TxWriterAccountAgents.js +2 -0
- package/lib/cjs/txs/agents/TxWriterAccountAgents.js.map +1 -1
- package/lib/cjs/utils/$account.js +17 -1
- package/lib/cjs/utils/$account.js.map +1 -1
- package/lib/cjs/utils/$bigint.js +19 -2
- package/lib/cjs/utils/$bigint.js.map +1 -1
- package/lib/cjs/utils/$date.js +11 -0
- package/lib/cjs/utils/$date.js.map +1 -1
- package/lib/esm/blocks/BlockDateResolver.js.map +1 -1
- package/lib/esm/blocks/BlockDateResolver.mjs +59 -23
- package/lib/esm/contracts/deploy/Deployments.js.map +1 -1
- package/lib/esm/contracts/deploy/Deployments.mjs +2 -1
- package/lib/esm/contracts/deploy/proxy/ProxyDeployment.js.map +1 -1
- package/lib/esm/contracts/deploy/proxy/ProxyDeployment.mjs +1 -1
- package/lib/esm/erc4337/Erc4337Factory.js.map +1 -1
- package/lib/esm/erc4337/Erc4337Factory.mjs +0 -1
- package/lib/esm/indexer/EventsIndexer.js.map +1 -1
- package/lib/esm/indexer/EventsIndexer.mjs +14 -2
- package/lib/esm/prebuilt-factories/TimelockControllerFactory.js.map +1 -0
- package/lib/esm/prebuilt-factories/TimelockControllerFactory.mjs +244 -0
- package/lib/esm/services/TimelockService/TimelockService.js.map +1 -1
- package/lib/esm/services/TimelockService/TimelockService.mjs +52 -2
- package/lib/esm/txs/TxWriter.js.map +1 -1
- package/lib/esm/txs/TxWriter.mjs +1 -1
- package/lib/esm/txs/agents/TimelockAgent.js.map +1 -0
- package/lib/esm/txs/agents/TimelockAgent.mjs +85 -0
- package/lib/esm/txs/agents/TxWriterAccountAgents.js.map +1 -1
- package/lib/esm/txs/agents/TxWriterAccountAgents.mjs +2 -0
- package/lib/esm/utils/$account.js.map +1 -1
- package/lib/esm/utils/$account.mjs +17 -1
- package/lib/esm/utils/$bigint.js.map +1 -1
- package/lib/esm/utils/$bigint.mjs +19 -2
- package/lib/esm/utils/$date.js.map +1 -1
- package/lib/esm/utils/$date.mjs +11 -0
- package/lib/types/blocks/BlockDateResolver.d.ts +7 -5
- package/lib/types/contracts/deploy/Deployments.d.ts +3 -0
- package/lib/types/contracts/deploy/proxy/ProxyDeployment.d.ts +1 -0
- package/lib/types/models/TAccount.d.ts +7 -1
- package/lib/types/prebuilt-factories/TimelockControllerFactory.d.ts +188 -0
- package/lib/types/services/TimelockService/TimelockService.d.ts +18 -3
- package/lib/types/txs/TxWriter.d.ts +20 -13
- package/lib/types/txs/agents/TimelockAgent.d.ts +26 -0
- package/lib/types/txs/agents/TxWriterAccountAgents.d.ts +2 -2
- package/lib/types/utils/$account.d.ts +2 -1
- package/lib/types/utils/$bigint.d.ts +2 -1
- package/lib/types/utils/$date.d.ts +1 -0
- package/package.json +1 -1
- package/src/blocks/BlockDateResolver.ts +61 -28
- package/src/contracts/deploy/Deployments.ts +5 -1
- package/src/contracts/deploy/proxy/ProxyDeployment.ts +2 -1
- package/src/erc4337/Erc4337Factory.ts +0 -2
- package/src/indexer/EventsIndexer.ts +18 -3
- package/src/models/TAccount.ts +11 -1
- package/src/prebuilt-factories/TimelockControllerFactory.ts +582 -0
- package/src/services/TimelockService/TimelockService.ts +83 -7
- package/src/txs/TxWriter.ts +29 -17
- package/src/txs/agents/TimelockAgent.ts +116 -0
- package/src/txs/agents/TxWriterAccountAgents.ts +4 -2
- package/src/utils/$account.ts +18 -2
- package/src/utils/$bigint.ts +19 -2
- package/src/utils/$date.ts +11 -1
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-Generated Class: 2024-05-17 00:25
|
|
3
|
+
* Implementation: https://etherscan.io/address/undefined#code
|
|
4
|
+
*/
|
|
5
|
+
import di from 'a-di';
|
|
6
|
+
import { TAddress } from '@dequanto/models/TAddress';
|
|
7
|
+
import { TAccount } from '@dequanto/models/TAccount';
|
|
8
|
+
import { TBufferLike } from '@dequanto/models/TBufferLike';
|
|
9
|
+
import { ClientEventsStream, TClientEventsStreamData } from '@dequanto/clients/ClientEventsStream';
|
|
10
|
+
import { ContractBase } from '@dequanto/contracts/ContractBase';
|
|
11
|
+
import { ContractBaseUtils } from '@dequanto/contracts/utils/ContractBaseUtils';
|
|
12
|
+
import { ContractStorageReaderBase } from '@dequanto/contracts/ContractStorageReaderBase';
|
|
13
|
+
import { TxWriter } from '@dequanto/txs/TxWriter';
|
|
14
|
+
import { ITxLogItem } from '@dequanto/txs/receipt/ITxLogItem';
|
|
15
|
+
import { Web3Client } from '@dequanto/clients/Web3Client';
|
|
16
|
+
import { IBlockchainExplorer } from '@dequanto/explorer/IBlockchainExplorer';
|
|
17
|
+
import { SubjectStream } from '@dequanto/class/SubjectStream';
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
import type { ContractWriter } from '@dequanto/contracts/ContractWriter';
|
|
21
|
+
import type { TAbiItem } from '@dequanto/types/TAbi';
|
|
22
|
+
import type { TEth } from '@dequanto/models/TEth';
|
|
23
|
+
import type { TOverrideReturns } from '@dequanto/utils/types';
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
import { Etherscan } from '@dequanto/explorer/Etherscan'
|
|
27
|
+
import { EthWeb3Client } from '@dequanto/clients/EthWeb3Client'
|
|
28
|
+
|
|
29
|
+
import type { TimelockController as TimelockControllerType } from '../prebuilt/openzeppelin/TimelockController';
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export function TimelockControllerFactory (): typeof TimelockControllerType {
|
|
33
|
+
|
|
34
|
+
class TimelockController extends ContractBase {
|
|
35
|
+
constructor(
|
|
36
|
+
public address: TEth.Address = null,
|
|
37
|
+
public client: Web3Client = di.resolve(EthWeb3Client,),
|
|
38
|
+
public explorer: IBlockchainExplorer = di.resolve(Etherscan,),
|
|
39
|
+
) {
|
|
40
|
+
super(address, client, explorer)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
Types: TTimelockControllerTypes;
|
|
46
|
+
|
|
47
|
+
$meta = {
|
|
48
|
+
"class": "./src/prebuilt/openzeppelin/TimelockController.ts"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async $constructor(deployer: TSender, minDelay: bigint, proposers: TAddress[], executors: TAddress[], admin: TAddress): Promise<TxWriter> {
|
|
52
|
+
throw new Error('Not implemented. Typing purpose. Use the ContractDeployer class to deploy the contract');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 0xb08e51c0
|
|
56
|
+
async CANCELLER_ROLE(): Promise<TEth.Hex> {
|
|
57
|
+
return this.$read(this.$getAbiItem('function', 'CANCELLER_ROLE'));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 0xa217fddf
|
|
61
|
+
async DEFAULT_ADMIN_ROLE(): Promise<TEth.Hex> {
|
|
62
|
+
return this.$read(this.$getAbiItem('function', 'DEFAULT_ADMIN_ROLE'));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 0x07bd0265
|
|
66
|
+
async EXECUTOR_ROLE(): Promise<TEth.Hex> {
|
|
67
|
+
return this.$read(this.$getAbiItem('function', 'EXECUTOR_ROLE'));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 0x8f61f4f5
|
|
71
|
+
async PROPOSER_ROLE(): Promise<TEth.Hex> {
|
|
72
|
+
return this.$read(this.$getAbiItem('function', 'PROPOSER_ROLE'));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// 0x0d3cf6fc
|
|
76
|
+
async TIMELOCK_ADMIN_ROLE(): Promise<TEth.Hex> {
|
|
77
|
+
return this.$read(this.$getAbiItem('function', 'TIMELOCK_ADMIN_ROLE'));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// 0xc4d252f5
|
|
81
|
+
async cancel(sender: TSender, id: TEth.Hex): Promise<TxWriter> {
|
|
82
|
+
return this.$write(this.$getAbiItem('function', 'cancel'), sender, id);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// 0x134008d3
|
|
86
|
+
async execute(sender: TSender, target: TAddress, value: bigint, payload: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex): Promise<TxWriter> {
|
|
87
|
+
return this.$write(this.$getAbiItem('function', 'execute'), sender, target, value, payload, predecessor, salt);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 0xe38335e5
|
|
91
|
+
async executeBatch(sender: TSender, targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex): Promise<TxWriter> {
|
|
92
|
+
return this.$write(this.$getAbiItem('function', 'executeBatch'), sender, targets, values, payloads, predecessor, salt);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// 0xf27a0c92
|
|
96
|
+
async getMinDelay(): Promise<bigint> {
|
|
97
|
+
return this.$read(this.$getAbiItem('function', 'getMinDelay'));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// 0x248a9ca3
|
|
101
|
+
async getRoleAdmin(role: TEth.Hex): Promise<TEth.Hex> {
|
|
102
|
+
return this.$read(this.$getAbiItem('function', 'getRoleAdmin'), role);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 0xd45c4435
|
|
106
|
+
async getTimestamp(id: TEth.Hex): Promise<bigint> {
|
|
107
|
+
return this.$read(this.$getAbiItem('function', 'getTimestamp'), id);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// 0x2f2ff15d
|
|
111
|
+
async grantRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<TxWriter> {
|
|
112
|
+
return this.$write(this.$getAbiItem('function', 'grantRole'), sender, role, account);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 0x91d14854
|
|
116
|
+
async hasRole(role: TEth.Hex, account: TAddress): Promise<boolean> {
|
|
117
|
+
return this.$read(this.$getAbiItem('function', 'hasRole'), role, account);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// 0x8065657f
|
|
121
|
+
async hashOperation(target: TAddress, value: bigint, data: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex): Promise<TEth.Hex> {
|
|
122
|
+
return this.$read(this.$getAbiItem('function', 'hashOperation'), target, value, data, predecessor, salt);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// 0xb1c5f427
|
|
126
|
+
async hashOperationBatch(targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex): Promise<TEth.Hex> {
|
|
127
|
+
return this.$read(this.$getAbiItem('function', 'hashOperationBatch'), targets, values, payloads, predecessor, salt);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 0x31d50750
|
|
131
|
+
async isOperation(id: TEth.Hex): Promise<boolean> {
|
|
132
|
+
return this.$read(this.$getAbiItem('function', 'isOperation'), id);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// 0x2ab0f529
|
|
136
|
+
async isOperationDone(id: TEth.Hex): Promise<boolean> {
|
|
137
|
+
return this.$read(this.$getAbiItem('function', 'isOperationDone'), id);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// 0x584b153e
|
|
141
|
+
async isOperationPending(id: TEth.Hex): Promise<boolean> {
|
|
142
|
+
return this.$read(this.$getAbiItem('function', 'isOperationPending'), id);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// 0x13bc9f20
|
|
146
|
+
async isOperationReady(id: TEth.Hex): Promise<boolean> {
|
|
147
|
+
return this.$read(this.$getAbiItem('function', 'isOperationReady'), id);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 0xbc197c81
|
|
151
|
+
async onERC1155BatchReceived(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint[], input3: bigint[], input4: TEth.Hex): Promise<TxWriter> {
|
|
152
|
+
return this.$write(this.$getAbiItem('function', 'onERC1155BatchReceived'), sender, input0, input1, input2, input3, input4);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// 0xf23a6e61
|
|
156
|
+
async onERC1155Received(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint, input3: bigint, input4: TEth.Hex): Promise<TxWriter> {
|
|
157
|
+
return this.$write(this.$getAbiItem('function', 'onERC1155Received'), sender, input0, input1, input2, input3, input4);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// 0x150b7a02
|
|
161
|
+
async onERC721Received(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint, input3: TEth.Hex): Promise<TxWriter> {
|
|
162
|
+
return this.$write(this.$getAbiItem('function', 'onERC721Received'), sender, input0, input1, input2, input3);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// 0x36568abe
|
|
166
|
+
async renounceRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<TxWriter> {
|
|
167
|
+
return this.$write(this.$getAbiItem('function', 'renounceRole'), sender, role, account);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// 0xd547741f
|
|
171
|
+
async revokeRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<TxWriter> {
|
|
172
|
+
return this.$write(this.$getAbiItem('function', 'revokeRole'), sender, role, account);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// 0x01d5062a
|
|
176
|
+
async schedule(sender: TSender, target: TAddress, value: bigint, data: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex, delay: bigint): Promise<TxWriter> {
|
|
177
|
+
return this.$write(this.$getAbiItem('function', 'schedule'), sender, target, value, data, predecessor, salt, delay);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// 0x8f2a0bb0
|
|
181
|
+
async scheduleBatch(sender: TSender, targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex, delay: bigint): Promise<TxWriter> {
|
|
182
|
+
return this.$write(this.$getAbiItem('function', 'scheduleBatch'), sender, targets, values, payloads, predecessor, salt, delay);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// 0x01ffc9a7
|
|
186
|
+
async supportsInterface(interfaceId: TEth.Hex): Promise<boolean> {
|
|
187
|
+
return this.$read(this.$getAbiItem('function', 'supportsInterface'), interfaceId);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// 0x64d62353
|
|
191
|
+
async updateDelay(sender: TSender, newDelay: bigint): Promise<TxWriter> {
|
|
192
|
+
return this.$write(this.$getAbiItem('function', 'updateDelay'), sender, newDelay);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
$call() {
|
|
196
|
+
return super.$call() as ITimelockControllerTxCaller;
|
|
197
|
+
}
|
|
198
|
+
$signed(): TOverrideReturns<ITimelockControllerTxCaller, Promise<{ signed: TEth.Hex, error?: Error & { data?: { type: string, params } } }>> {
|
|
199
|
+
return super.$signed() as any;
|
|
200
|
+
}
|
|
201
|
+
$data(): ITimelockControllerTxData {
|
|
202
|
+
return super.$data() as ITimelockControllerTxData;
|
|
203
|
+
}
|
|
204
|
+
$gas(): TOverrideReturns<ITimelockControllerTxCaller, Promise<{ gas?: bigint, price?: bigint, error?: Error & { data?: { type: string, params } } }>> {
|
|
205
|
+
return super.$gas() as any;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
onTransaction<TMethod extends keyof TTimelockControllerTypes['Methods']>(method: TMethod, options: Parameters<ContractBase['$onTransaction']>[0]): SubjectStream<{
|
|
209
|
+
tx: TEth.Tx
|
|
210
|
+
block: TEth.Block<TEth.Hex>
|
|
211
|
+
calldata: {
|
|
212
|
+
method: TMethod
|
|
213
|
+
arguments: TTimelockControllerTypes['Methods'][TMethod]['arguments']
|
|
214
|
+
}
|
|
215
|
+
}> {
|
|
216
|
+
options ??= {};
|
|
217
|
+
options.filter ??= {};
|
|
218
|
+
options.filter.method = method;
|
|
219
|
+
return <any>this.$onTransaction(options);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
onLog(event: keyof TEvents, cb?: (event: TClientEventsStreamData) => void): ClientEventsStream<TClientEventsStreamData> {
|
|
223
|
+
return this.$onLog(event, cb);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
async getPastLogs<TEventName extends keyof TEvents>(
|
|
227
|
+
events: TEventName[]
|
|
228
|
+
, options?: TEventLogOptions<TEventParams<TEventName>>
|
|
229
|
+
): Promise<ITxLogItem<TEventParams<TEventName>, TEventName>[]>
|
|
230
|
+
async getPastLogs<TEventName extends keyof TEvents>(
|
|
231
|
+
event: TEventName
|
|
232
|
+
, options?: TEventLogOptions<TEventParams<TEventName>>
|
|
233
|
+
): Promise<ITxLogItem<TEventParams<TEventName>, TEventName>[]>
|
|
234
|
+
async getPastLogs(mix: any, options?): Promise<any> {
|
|
235
|
+
return await super.getPastLogs(mix, options) as any;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
onCallExecuted(fn?: (event: TClientEventsStreamData<TEventArguments<'CallExecuted'>>) => void): ClientEventsStream<TClientEventsStreamData<TEventArguments<'CallExecuted'>>> {
|
|
239
|
+
return this.$onLog('CallExecuted', fn);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
onCallSalt(fn?: (event: TClientEventsStreamData<TEventArguments<'CallSalt'>>) => void): ClientEventsStream<TClientEventsStreamData<TEventArguments<'CallSalt'>>> {
|
|
243
|
+
return this.$onLog('CallSalt', fn);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
onCallScheduled(fn?: (event: TClientEventsStreamData<TEventArguments<'CallScheduled'>>) => void): ClientEventsStream<TClientEventsStreamData<TEventArguments<'CallScheduled'>>> {
|
|
247
|
+
return this.$onLog('CallScheduled', fn);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
onCancelled(fn?: (event: TClientEventsStreamData<TEventArguments<'Cancelled'>>) => void): ClientEventsStream<TClientEventsStreamData<TEventArguments<'Cancelled'>>> {
|
|
251
|
+
return this.$onLog('Cancelled', fn);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
onMinDelayChange(fn?: (event: TClientEventsStreamData<TEventArguments<'MinDelayChange'>>) => void): ClientEventsStream<TClientEventsStreamData<TEventArguments<'MinDelayChange'>>> {
|
|
255
|
+
return this.$onLog('MinDelayChange', fn);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
onRoleAdminChanged(fn?: (event: TClientEventsStreamData<TEventArguments<'RoleAdminChanged'>>) => void): ClientEventsStream<TClientEventsStreamData<TEventArguments<'RoleAdminChanged'>>> {
|
|
259
|
+
return this.$onLog('RoleAdminChanged', fn);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
onRoleGranted(fn?: (event: TClientEventsStreamData<TEventArguments<'RoleGranted'>>) => void): ClientEventsStream<TClientEventsStreamData<TEventArguments<'RoleGranted'>>> {
|
|
263
|
+
return this.$onLog('RoleGranted', fn);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
onRoleRevoked(fn?: (event: TClientEventsStreamData<TEventArguments<'RoleRevoked'>>) => void): ClientEventsStream<TClientEventsStreamData<TEventArguments<'RoleRevoked'>>> {
|
|
267
|
+
return this.$onLog('RoleRevoked', fn);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
extractLogsCallExecuted(tx: TEth.TxReceipt): ITxLogItem<TEventParams<'CallExecuted'>>[] {
|
|
271
|
+
let abi = this.$getAbiItem('event', 'CallExecuted');
|
|
272
|
+
return this.$extractLogs(tx, abi) as any as ITxLogItem<TEventParams<'CallExecuted'>>[];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
extractLogsCallSalt(tx: TEth.TxReceipt): ITxLogItem<TEventParams<'CallSalt'>>[] {
|
|
276
|
+
let abi = this.$getAbiItem('event', 'CallSalt');
|
|
277
|
+
return this.$extractLogs(tx, abi) as any as ITxLogItem<TEventParams<'CallSalt'>>[];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
extractLogsCallScheduled(tx: TEth.TxReceipt): ITxLogItem<TEventParams<'CallScheduled'>>[] {
|
|
281
|
+
let abi = this.$getAbiItem('event', 'CallScheduled');
|
|
282
|
+
return this.$extractLogs(tx, abi) as any as ITxLogItem<TEventParams<'CallScheduled'>>[];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
extractLogsCancelled(tx: TEth.TxReceipt): ITxLogItem<TEventParams<'Cancelled'>>[] {
|
|
286
|
+
let abi = this.$getAbiItem('event', 'Cancelled');
|
|
287
|
+
return this.$extractLogs(tx, abi) as any as ITxLogItem<TEventParams<'Cancelled'>>[];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
extractLogsMinDelayChange(tx: TEth.TxReceipt): ITxLogItem<TEventParams<'MinDelayChange'>>[] {
|
|
291
|
+
let abi = this.$getAbiItem('event', 'MinDelayChange');
|
|
292
|
+
return this.$extractLogs(tx, abi) as any as ITxLogItem<TEventParams<'MinDelayChange'>>[];
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
extractLogsRoleAdminChanged(tx: TEth.TxReceipt): ITxLogItem<TEventParams<'RoleAdminChanged'>>[] {
|
|
296
|
+
let abi = this.$getAbiItem('event', 'RoleAdminChanged');
|
|
297
|
+
return this.$extractLogs(tx, abi) as any as ITxLogItem<TEventParams<'RoleAdminChanged'>>[];
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
extractLogsRoleGranted(tx: TEth.TxReceipt): ITxLogItem<TEventParams<'RoleGranted'>>[] {
|
|
301
|
+
let abi = this.$getAbiItem('event', 'RoleGranted');
|
|
302
|
+
return this.$extractLogs(tx, abi) as any as ITxLogItem<TEventParams<'RoleGranted'>>[];
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
extractLogsRoleRevoked(tx: TEth.TxReceipt): ITxLogItem<TEventParams<'RoleRevoked'>>[] {
|
|
306
|
+
let abi = this.$getAbiItem('event', 'RoleRevoked');
|
|
307
|
+
return this.$extractLogs(tx, abi) as any as ITxLogItem<TEventParams<'RoleRevoked'>>[];
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
async getPastLogsCallExecuted(options?: {
|
|
311
|
+
fromBlock?: number | Date
|
|
312
|
+
toBlock?: number | Date
|
|
313
|
+
params?: { id?: TEth.Hex, index?: bigint }
|
|
314
|
+
}): Promise<ITxLogItem<TEventParams<'CallExecuted'>>[]> {
|
|
315
|
+
return await this.$getPastLogsParsed('CallExecuted', options) as any;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
async getPastLogsCallSalt(options?: {
|
|
319
|
+
fromBlock?: number | Date
|
|
320
|
+
toBlock?: number | Date
|
|
321
|
+
params?: { id?: TEth.Hex }
|
|
322
|
+
}): Promise<ITxLogItem<TEventParams<'CallSalt'>>[]> {
|
|
323
|
+
return await this.$getPastLogsParsed('CallSalt', options) as any;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
async getPastLogsCallScheduled(options?: {
|
|
327
|
+
fromBlock?: number | Date
|
|
328
|
+
toBlock?: number | Date
|
|
329
|
+
params?: { id?: TEth.Hex, index?: bigint }
|
|
330
|
+
}): Promise<ITxLogItem<TEventParams<'CallScheduled'>>[]> {
|
|
331
|
+
return await this.$getPastLogsParsed('CallScheduled', options) as any;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
async getPastLogsCancelled(options?: {
|
|
335
|
+
fromBlock?: number | Date
|
|
336
|
+
toBlock?: number | Date
|
|
337
|
+
params?: { id?: TEth.Hex }
|
|
338
|
+
}): Promise<ITxLogItem<TEventParams<'Cancelled'>>[]> {
|
|
339
|
+
return await this.$getPastLogsParsed('Cancelled', options) as any;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
async getPastLogsMinDelayChange(options?: {
|
|
343
|
+
fromBlock?: number | Date
|
|
344
|
+
toBlock?: number | Date
|
|
345
|
+
params?: {}
|
|
346
|
+
}): Promise<ITxLogItem<TEventParams<'MinDelayChange'>>[]> {
|
|
347
|
+
return await this.$getPastLogsParsed('MinDelayChange', options) as any;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
async getPastLogsRoleAdminChanged(options?: {
|
|
351
|
+
fromBlock?: number | Date
|
|
352
|
+
toBlock?: number | Date
|
|
353
|
+
params?: { role?: TEth.Hex, previousAdminRole?: TEth.Hex, newAdminRole?: TEth.Hex }
|
|
354
|
+
}): Promise<ITxLogItem<TEventParams<'RoleAdminChanged'>>[]> {
|
|
355
|
+
return await this.$getPastLogsParsed('RoleAdminChanged', options) as any;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
async getPastLogsRoleGranted(options?: {
|
|
359
|
+
fromBlock?: number | Date
|
|
360
|
+
toBlock?: number | Date
|
|
361
|
+
params?: { role?: TEth.Hex, account?: TAddress, sender?: TAddress }
|
|
362
|
+
}): Promise<ITxLogItem<TEventParams<'RoleGranted'>>[]> {
|
|
363
|
+
return await this.$getPastLogsParsed('RoleGranted', options) as any;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
async getPastLogsRoleRevoked(options?: {
|
|
367
|
+
fromBlock?: number | Date
|
|
368
|
+
toBlock?: number | Date
|
|
369
|
+
params?: { role?: TEth.Hex, account?: TAddress, sender?: TAddress }
|
|
370
|
+
}): Promise<ITxLogItem<TEventParams<'RoleRevoked'>>[]> {
|
|
371
|
+
return await this.$getPastLogsParsed('RoleRevoked', options) as any;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
abi: TAbiItem[] = [{ "inputs": [{ "internalType": "uint256", "name": "minDelay", "type": "uint256" }, { "internalType": "address[]", "name": "proposers", "type": "address[]" }, { "internalType": "address[]", "name": "executors", "type": "address[]" }, { "internalType": "address", "name": "admin", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "indexed": true, "internalType": "uint256", "name": "index", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "target", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "CallExecuted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "indexed": false, "internalType": "bytes32", "name": "salt", "type": "bytes32" }], "name": "CallSalt", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "indexed": true, "internalType": "uint256", "name": "index", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "target", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" }, { "indexed": false, "internalType": "bytes32", "name": "predecessor", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "delay", "type": "uint256" }], "name": "CallScheduled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "id", "type": "bytes32" }], "name": "Cancelled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "oldDuration", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "newDuration", "type": "uint256" }], "name": "MinDelayChange", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" }], "name": "RoleAdminChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }], "name": "RoleGranted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }], "name": "RoleRevoked", "type": "event" }, { "inputs": [], "name": "CANCELLER_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DEFAULT_ADMIN_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "EXECUTOR_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "PROPOSER_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "TIMELOCK_ADMIN_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "name": "cancel", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "target", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "bytes", "name": "payload", "type": "bytes" }, { "internalType": "bytes32", "name": "predecessor", "type": "bytes32" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }], "name": "execute", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "targets", "type": "address[]" }, { "internalType": "uint256[]", "name": "values", "type": "uint256[]" }, { "internalType": "bytes[]", "name": "payloads", "type": "bytes[]" }, { "internalType": "bytes32", "name": "predecessor", "type": "bytes32" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }], "name": "executeBatch", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "getMinDelay", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], "name": "getRoleAdmin", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "name": "getTimestamp", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "grantRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "hasRole", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "target", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "bytes32", "name": "predecessor", "type": "bytes32" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }], "name": "hashOperation", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "targets", "type": "address[]" }, { "internalType": "uint256[]", "name": "values", "type": "uint256[]" }, { "internalType": "bytes[]", "name": "payloads", "type": "bytes[]" }, { "internalType": "bytes32", "name": "predecessor", "type": "bytes32" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }], "name": "hashOperationBatch", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "name": "isOperation", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "name": "isOperationDone", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "name": "isOperationPending", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "name": "isOperationReady", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, { "internalType": "bytes", "name": "", "type": "bytes" }], "name": "onERC1155BatchReceived", "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "bytes", "name": "", "type": "bytes" }], "name": "onERC1155Received", "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "bytes", "name": "", "type": "bytes" }], "name": "onERC721Received", "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "renounceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "revokeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "target", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "bytes32", "name": "predecessor", "type": "bytes32" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }, { "internalType": "uint256", "name": "delay", "type": "uint256" }], "name": "schedule", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "targets", "type": "address[]" }, { "internalType": "uint256[]", "name": "values", "type": "uint256[]" }, { "internalType": "bytes[]", "name": "payloads", "type": "bytes[]" }, { "internalType": "bytes32", "name": "predecessor", "type": "bytes32" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }, { "internalType": "uint256", "name": "delay", "type": "uint256" }], "name": "scheduleBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], "name": "supportsInterface", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "newDelay", "type": "uint256" }], "name": "updateDelay", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "stateMutability": "payable", "type": "receive" }]
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
return TimelockController as any;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
type TSender = TAccount & {
|
|
383
|
+
value?: string | number | bigint
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
type TEventLogOptions<TParams> = {
|
|
387
|
+
fromBlock?: number | Date
|
|
388
|
+
toBlock?: number | Date
|
|
389
|
+
params?: TParams
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export type TTimelockControllerTypes = {
|
|
393
|
+
Events: {
|
|
394
|
+
CallExecuted: {
|
|
395
|
+
outputParams: { id: TEth.Hex, index: bigint, target: TAddress, value: bigint, data: TEth.Hex },
|
|
396
|
+
outputArgs: [id: TEth.Hex, index: bigint, target: TAddress, value: bigint, data: TEth.Hex],
|
|
397
|
+
}
|
|
398
|
+
CallSalt: {
|
|
399
|
+
outputParams: { id: TEth.Hex, salt: TEth.Hex },
|
|
400
|
+
outputArgs: [id: TEth.Hex, salt: TEth.Hex],
|
|
401
|
+
}
|
|
402
|
+
CallScheduled: {
|
|
403
|
+
outputParams: { id: TEth.Hex, index: bigint, target: TAddress, value: bigint, data: TEth.Hex, predecessor: TEth.Hex, delay: bigint },
|
|
404
|
+
outputArgs: [id: TEth.Hex, index: bigint, target: TAddress, value: bigint, data: TEth.Hex, predecessor: TEth.Hex, delay: bigint],
|
|
405
|
+
}
|
|
406
|
+
Cancelled: {
|
|
407
|
+
outputParams: { id: TEth.Hex },
|
|
408
|
+
outputArgs: [id: TEth.Hex],
|
|
409
|
+
}
|
|
410
|
+
MinDelayChange: {
|
|
411
|
+
outputParams: { oldDuration: bigint, newDuration: bigint },
|
|
412
|
+
outputArgs: [oldDuration: bigint, newDuration: bigint],
|
|
413
|
+
}
|
|
414
|
+
RoleAdminChanged: {
|
|
415
|
+
outputParams: { role: TEth.Hex, previousAdminRole: TEth.Hex, newAdminRole: TEth.Hex },
|
|
416
|
+
outputArgs: [role: TEth.Hex, previousAdminRole: TEth.Hex, newAdminRole: TEth.Hex],
|
|
417
|
+
}
|
|
418
|
+
RoleGranted: {
|
|
419
|
+
outputParams: { role: TEth.Hex, account: TAddress, _sender: TAddress },
|
|
420
|
+
outputArgs: [role: TEth.Hex, account: TAddress, _sender: TAddress],
|
|
421
|
+
}
|
|
422
|
+
RoleRevoked: {
|
|
423
|
+
outputParams: { role: TEth.Hex, account: TAddress, _sender: TAddress },
|
|
424
|
+
outputArgs: [role: TEth.Hex, account: TAddress, _sender: TAddress],
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
Methods: {
|
|
428
|
+
CANCELLER_ROLE: {
|
|
429
|
+
method: "CANCELLER_ROLE"
|
|
430
|
+
arguments: []
|
|
431
|
+
}
|
|
432
|
+
DEFAULT_ADMIN_ROLE: {
|
|
433
|
+
method: "DEFAULT_ADMIN_ROLE"
|
|
434
|
+
arguments: []
|
|
435
|
+
}
|
|
436
|
+
EXECUTOR_ROLE: {
|
|
437
|
+
method: "EXECUTOR_ROLE"
|
|
438
|
+
arguments: []
|
|
439
|
+
}
|
|
440
|
+
PROPOSER_ROLE: {
|
|
441
|
+
method: "PROPOSER_ROLE"
|
|
442
|
+
arguments: []
|
|
443
|
+
}
|
|
444
|
+
TIMELOCK_ADMIN_ROLE: {
|
|
445
|
+
method: "TIMELOCK_ADMIN_ROLE"
|
|
446
|
+
arguments: []
|
|
447
|
+
}
|
|
448
|
+
cancel: {
|
|
449
|
+
method: "cancel"
|
|
450
|
+
arguments: [id: TEth.Hex]
|
|
451
|
+
}
|
|
452
|
+
execute: {
|
|
453
|
+
method: "execute"
|
|
454
|
+
arguments: [target: TAddress, value: bigint, payload: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex]
|
|
455
|
+
}
|
|
456
|
+
executeBatch: {
|
|
457
|
+
method: "executeBatch"
|
|
458
|
+
arguments: [targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex]
|
|
459
|
+
}
|
|
460
|
+
getMinDelay: {
|
|
461
|
+
method: "getMinDelay"
|
|
462
|
+
arguments: []
|
|
463
|
+
}
|
|
464
|
+
getRoleAdmin: {
|
|
465
|
+
method: "getRoleAdmin"
|
|
466
|
+
arguments: [role: TEth.Hex]
|
|
467
|
+
}
|
|
468
|
+
getTimestamp: {
|
|
469
|
+
method: "getTimestamp"
|
|
470
|
+
arguments: [id: TEth.Hex]
|
|
471
|
+
}
|
|
472
|
+
grantRole: {
|
|
473
|
+
method: "grantRole"
|
|
474
|
+
arguments: [role: TEth.Hex, account: TAddress]
|
|
475
|
+
}
|
|
476
|
+
hasRole: {
|
|
477
|
+
method: "hasRole"
|
|
478
|
+
arguments: [role: TEth.Hex, account: TAddress]
|
|
479
|
+
}
|
|
480
|
+
hashOperation: {
|
|
481
|
+
method: "hashOperation"
|
|
482
|
+
arguments: [target: TAddress, value: bigint, data: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex]
|
|
483
|
+
}
|
|
484
|
+
hashOperationBatch: {
|
|
485
|
+
method: "hashOperationBatch"
|
|
486
|
+
arguments: [targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex]
|
|
487
|
+
}
|
|
488
|
+
isOperation: {
|
|
489
|
+
method: "isOperation"
|
|
490
|
+
arguments: [id: TEth.Hex]
|
|
491
|
+
}
|
|
492
|
+
isOperationDone: {
|
|
493
|
+
method: "isOperationDone"
|
|
494
|
+
arguments: [id: TEth.Hex]
|
|
495
|
+
}
|
|
496
|
+
isOperationPending: {
|
|
497
|
+
method: "isOperationPending"
|
|
498
|
+
arguments: [id: TEth.Hex]
|
|
499
|
+
}
|
|
500
|
+
isOperationReady: {
|
|
501
|
+
method: "isOperationReady"
|
|
502
|
+
arguments: [id: TEth.Hex]
|
|
503
|
+
}
|
|
504
|
+
onERC1155BatchReceived: {
|
|
505
|
+
method: "onERC1155BatchReceived"
|
|
506
|
+
arguments: [input0: TAddress, input1: TAddress, input2: bigint[], input3: bigint[], input4: TEth.Hex]
|
|
507
|
+
}
|
|
508
|
+
onERC1155Received: {
|
|
509
|
+
method: "onERC1155Received"
|
|
510
|
+
arguments: [input0: TAddress, input1: TAddress, input2: bigint, input3: bigint, input4: TEth.Hex]
|
|
511
|
+
}
|
|
512
|
+
onERC721Received: {
|
|
513
|
+
method: "onERC721Received"
|
|
514
|
+
arguments: [input0: TAddress, input1: TAddress, input2: bigint, input3: TEth.Hex]
|
|
515
|
+
}
|
|
516
|
+
renounceRole: {
|
|
517
|
+
method: "renounceRole"
|
|
518
|
+
arguments: [role: TEth.Hex, account: TAddress]
|
|
519
|
+
}
|
|
520
|
+
revokeRole: {
|
|
521
|
+
method: "revokeRole"
|
|
522
|
+
arguments: [role: TEth.Hex, account: TAddress]
|
|
523
|
+
}
|
|
524
|
+
schedule: {
|
|
525
|
+
method: "schedule"
|
|
526
|
+
arguments: [target: TAddress, value: bigint, data: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex, delay: bigint]
|
|
527
|
+
}
|
|
528
|
+
scheduleBatch: {
|
|
529
|
+
method: "scheduleBatch"
|
|
530
|
+
arguments: [targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex, delay: bigint]
|
|
531
|
+
}
|
|
532
|
+
supportsInterface: {
|
|
533
|
+
method: "supportsInterface"
|
|
534
|
+
arguments: [interfaceId: TEth.Hex]
|
|
535
|
+
}
|
|
536
|
+
updateDelay: {
|
|
537
|
+
method: "updateDelay"
|
|
538
|
+
arguments: [newDelay: bigint]
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
interface ITimelockControllerTxCaller {
|
|
546
|
+
cancel(sender: TSender, id: TEth.Hex): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
547
|
+
execute(sender: TSender, target: TAddress, value: bigint, payload: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
548
|
+
executeBatch(sender: TSender, targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
549
|
+
grantRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
550
|
+
onERC1155BatchReceived(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint[], input3: bigint[], input4: TEth.Hex): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
551
|
+
onERC1155Received(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint, input3: bigint, input4: TEth.Hex): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
552
|
+
onERC721Received(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint, input3: TEth.Hex): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
553
|
+
renounceRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
554
|
+
revokeRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
555
|
+
schedule(sender: TSender, target: TAddress, value: bigint, data: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex, delay: bigint): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
556
|
+
scheduleBatch(sender: TSender, targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex, delay: bigint): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
557
|
+
updateDelay(sender: TSender, newDelay: bigint): Promise<{ error?: Error & { data?: { type: string, params } }, result?}>
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
interface ITimelockControllerTxData {
|
|
562
|
+
cancel(sender: TSender, id: TEth.Hex): Promise<TEth.TxLike>
|
|
563
|
+
execute(sender: TSender, target: TAddress, value: bigint, payload: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex): Promise<TEth.TxLike>
|
|
564
|
+
executeBatch(sender: TSender, targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex): Promise<TEth.TxLike>
|
|
565
|
+
grantRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<TEth.TxLike>
|
|
566
|
+
onERC1155BatchReceived(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint[], input3: bigint[], input4: TEth.Hex): Promise<TEth.TxLike>
|
|
567
|
+
onERC1155Received(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint, input3: bigint, input4: TEth.Hex): Promise<TEth.TxLike>
|
|
568
|
+
onERC721Received(sender: TSender, input0: TAddress, input1: TAddress, input2: bigint, input3: TEth.Hex): Promise<TEth.TxLike>
|
|
569
|
+
renounceRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<TEth.TxLike>
|
|
570
|
+
revokeRole(sender: TSender, role: TEth.Hex, account: TAddress): Promise<TEth.TxLike>
|
|
571
|
+
schedule(sender: TSender, target: TAddress, value: bigint, data: TEth.Hex, predecessor: TEth.Hex, salt: TEth.Hex, delay: bigint): Promise<TEth.TxLike>
|
|
572
|
+
scheduleBatch(sender: TSender, targets: TAddress[], values: bigint[], payloads: TEth.Hex[], predecessor: TEth.Hex, salt: TEth.Hex, delay: bigint): Promise<TEth.TxLike>
|
|
573
|
+
updateDelay(sender: TSender, newDelay: bigint): Promise<TEth.TxLike>
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
type TEvents = TTimelockControllerTypes['Events'];
|
|
578
|
+
type TEventParams<TEventName extends keyof TEvents> = Partial<TEvents[TEventName]['outputParams']>;
|
|
579
|
+
type TEventArguments<TEventName extends keyof TEvents> = Partial<TEvents[TEventName]['outputArgs']>;
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|