@aztec/ethereum 0.0.1-commit.c80b6263 → 0.0.1-commit.cf93bcc56
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/dest/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +5 -3
- package/dest/contracts/empire_base.d.ts +3 -1
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_slashing_proposer.d.ts +3 -1
- package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/empire_slashing_proposer.js +22 -15
- package/dest/contracts/fee_asset_handler.d.ts +1 -1
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.js +2 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts +101 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -0
- package/dest/contracts/fee_asset_price_oracle.js +651 -0
- package/dest/contracts/governance.d.ts +1 -1
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +5 -3
- package/dest/contracts/governance_proposer.d.ts +3 -1
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +13 -1
- package/dest/contracts/index.d.ts +2 -1
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +1 -0
- package/dest/contracts/multicall.d.ts +1 -1
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +2 -1
- package/dest/contracts/rollup.d.ts +2 -1
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +9 -3
- package/dest/contracts/tally_slashing_proposer.d.ts +1 -1
- package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/tally_slashing_proposer.js +8 -1
- package/dest/deploy_aztec_l1_contracts.d.ts +2 -3
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_aztec_l1_contracts.js +37 -22
- package/dest/deploy_l1_contract.js +3 -3
- package/dest/l1_artifacts.d.ts +1051 -42
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_tx_utils/config.d.ts +7 -1
- package/dest/l1_tx_utils/config.d.ts.map +1 -1
- package/dest/l1_tx_utils/config.js +14 -1
- package/dest/l1_tx_utils/constants.d.ts +1 -1
- package/dest/l1_tx_utils/constants.js +2 -2
- package/dest/l1_tx_utils/factory.d.ts +18 -10
- package/dest/l1_tx_utils/factory.d.ts.map +1 -1
- package/dest/l1_tx_utils/factory.js +17 -7
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +1 -1
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +1 -1
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +15 -15
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +9 -15
- package/dest/l1_tx_utils/index-blobs.d.ts +3 -3
- package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -1
- package/dest/l1_tx_utils/index-blobs.js +2 -2
- package/dest/l1_tx_utils/index.d.ts +2 -1
- package/dest/l1_tx_utils/index.d.ts.map +1 -1
- package/dest/l1_tx_utils/index.js +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +15 -5
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +47 -13
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +3 -3
- package/dest/l1_tx_utils/tx_delayer.d.ts +56 -0
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -0
- package/dest/{test → l1_tx_utils}/tx_delayer.js +62 -34
- package/dest/test/index.d.ts +1 -3
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +0 -2
- package/dest/test/upgrade_utils.js +2 -2
- package/dest/utils.d.ts +2 -1
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +46 -0
- package/package.json +5 -5
- package/src/config.ts +3 -2
- package/src/contracts/empire_base.ts +2 -0
- package/src/contracts/empire_slashing_proposer.ts +22 -27
- package/src/contracts/fee_asset_handler.ts +2 -0
- package/src/contracts/fee_asset_price_oracle.ts +280 -0
- package/src/contracts/governance.ts +5 -3
- package/src/contracts/governance_proposer.ts +10 -1
- package/src/contracts/index.ts +1 -0
- package/src/contracts/multicall.ts +5 -2
- package/src/contracts/rollup.ts +15 -7
- package/src/contracts/tally_slashing_proposer.ts +5 -1
- package/src/deploy_aztec_l1_contracts.ts +60 -29
- package/src/deploy_l1_contract.ts +3 -3
- package/src/l1_tx_utils/config.ts +20 -0
- package/src/l1_tx_utils/constants.ts +2 -2
- package/src/l1_tx_utils/factory.ts +31 -31
- package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +1 -1
- package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +1 -1
- package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +43 -54
- package/src/l1_tx_utils/index-blobs.ts +2 -2
- package/src/l1_tx_utils/index.ts +1 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +52 -17
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +3 -3
- package/src/{test → l1_tx_utils}/tx_delayer.ts +78 -50
- package/src/test/index.ts +0 -2
- package/src/test/upgrade_utils.ts +2 -2
- package/src/utils.ts +53 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +0 -26
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +0 -26
- package/dest/test/delayed_tx_utils.d.ts +0 -13
- package/dest/test/delayed_tx_utils.d.ts.map +0 -1
- package/dest/test/delayed_tx_utils.js +0 -28
- package/dest/test/tx_delayer.d.ts +0 -36
- package/dest/test/tx_delayer.d.ts.map +0 -1
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +0 -77
- package/src/test/delayed_tx_utils.ts +0 -52
|
@@ -2,8 +2,7 @@ import { omit } from '@aztec/foundation/collection';
|
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
4
4
|
import { inspect } from 'util';
|
|
5
|
-
import { keccak256, parseTransaction, publicActions, serializeTransaction, walletActions } from 'viem';
|
|
6
|
-
import { isExtendedClient } from '../types.js';
|
|
5
|
+
import { keccak256, parseTransaction, publicActions, recoverTransactionAddress, serializeTransaction, walletActions } from 'viem';
|
|
7
6
|
const MAX_WAIT_TIME_SECONDS = 180;
|
|
8
7
|
export function waitUntilBlock(client, blockNumber, logger, timeout) {
|
|
9
8
|
const publicClient = 'getBlockNumber' in client && typeof client.getBlockNumber === 'function' ? client : client.extend(publicActions);
|
|
@@ -35,59 +34,78 @@ export function waitUntilL1Timestamp(client, timestamp, logger, timeout) {
|
|
|
35
34
|
return currentTs >= BigInt(timestamp);
|
|
36
35
|
}, `Wait until L1 timestamp ${timestamp}`, timeout ?? MAX_WAIT_TIME_SECONDS, 0.1);
|
|
37
36
|
}
|
|
38
|
-
class
|
|
37
|
+
/** Manages tx delaying for testing, intercepting sendRawTransaction calls to delay or cancel them. */ export class Delayer {
|
|
39
38
|
dateProvider;
|
|
40
39
|
logger;
|
|
41
|
-
|
|
40
|
+
maxInclusionTimeIntoSlot;
|
|
41
|
+
ethereumSlotDuration;
|
|
42
|
+
nextWait;
|
|
43
|
+
sentTxHashes;
|
|
44
|
+
cancelledTxs;
|
|
45
|
+
constructor(dateProvider, opts, bindings){
|
|
42
46
|
this.dateProvider = dateProvider;
|
|
43
|
-
this.logger = createLogger('ethereum:tx_delayer');
|
|
44
47
|
this.maxInclusionTimeIntoSlot = undefined;
|
|
45
48
|
this.nextWait = undefined;
|
|
46
49
|
this.sentTxHashes = [];
|
|
47
50
|
this.cancelledTxs = [];
|
|
48
51
|
this.ethereumSlotDuration = BigInt(opts.ethereumSlotDuration);
|
|
52
|
+
this.logger = createLogger('ethereum:tx_delayer', bindings);
|
|
49
53
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
cancelledTxs;
|
|
55
|
-
getSentTxHashes() {
|
|
54
|
+
/** Returns the logger instance used by this delayer. */ getLogger() {
|
|
55
|
+
return this.logger;
|
|
56
|
+
}
|
|
57
|
+
/** Returns the hashes of all effectively sent txs. */ getSentTxHashes() {
|
|
56
58
|
return this.sentTxHashes;
|
|
57
59
|
}
|
|
58
|
-
getCancelledTxs() {
|
|
60
|
+
/** Returns the raw hex for all cancelled txs. */ getCancelledTxs() {
|
|
59
61
|
return this.cancelledTxs;
|
|
60
62
|
}
|
|
61
|
-
pauseNextTxUntilBlock(l1BlockNumber) {
|
|
63
|
+
/** Delays the next tx to be sent so it lands on the given L1 block number. */ pauseNextTxUntilBlock(l1BlockNumber) {
|
|
62
64
|
this.nextWait = {
|
|
63
65
|
l1BlockNumber: BigInt(l1BlockNumber)
|
|
64
66
|
};
|
|
65
67
|
}
|
|
66
|
-
pauseNextTxUntilTimestamp(l1Timestamp) {
|
|
68
|
+
/** Delays the next tx to be sent so it lands on the given timestamp. */ pauseNextTxUntilTimestamp(l1Timestamp) {
|
|
67
69
|
this.nextWait = {
|
|
68
70
|
l1Timestamp: BigInt(l1Timestamp)
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
|
-
cancelNextTx() {
|
|
73
|
+
/** Delays the next tx to be sent indefinitely. */ cancelNextTx() {
|
|
72
74
|
this.nextWait = {
|
|
73
75
|
indefinitely: true
|
|
74
76
|
};
|
|
75
77
|
}
|
|
76
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Sets max inclusion time into slot. If more than this many seconds have passed
|
|
80
|
+
* since the last L1 block was mined, then any tx will not be mined in the current
|
|
81
|
+
* L1 slot but will be deferred for the next one.
|
|
82
|
+
*/ setMaxInclusionTimeIntoSlot(seconds) {
|
|
77
83
|
this.maxInclusionTimeIntoSlot = seconds;
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
86
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
* Creates a new Delayer instance. Exposed so callers can create a single shared delayer
|
|
88
|
+
* and pass it to multiple `wrapClientWithDelayer` calls.
|
|
89
|
+
*/ export function createDelayer(dateProvider, opts, bindings) {
|
|
90
|
+
return new Delayer(dateProvider, opts, bindings);
|
|
91
|
+
}
|
|
92
|
+
/** Tries to recover the sender address from a serialized signed transaction. */ async function tryRecoverSender(serializedTransaction) {
|
|
93
|
+
try {
|
|
94
|
+
return await recoverTransactionAddress({
|
|
95
|
+
serializedTransaction: serializedTransaction
|
|
96
|
+
});
|
|
97
|
+
} catch {
|
|
98
|
+
return undefined;
|
|
87
99
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Wraps a viem client with tx delaying logic. Returns the wrapped client.
|
|
103
|
+
* The delayer intercepts sendRawTransaction calls and delays them based on the delayer's state.
|
|
104
|
+
*/ export function wrapClientWithDelayer(client, delayer) {
|
|
105
|
+
const logger = delayer.getLogger();
|
|
106
|
+
// Cast to ExtendedViemWalletClient for the extend chain since it has sendRawTransaction.
|
|
107
|
+
// The sendRawTransaction override is applied to all clients regardless of type.
|
|
108
|
+
const withRawTx = client// Tweak sendRawTransaction so it uses the delay defined in the delayer.
|
|
91
109
|
// Note that this will only work with local accounts (ie accounts for which we have the private key).
|
|
92
110
|
// Transactions signed by the node will not be delayed since they use sendTransaction directly,
|
|
93
111
|
// but we do not use them in our codebase at all.
|
|
@@ -97,6 +115,7 @@ class DelayerImpl {
|
|
|
97
115
|
let txHash;
|
|
98
116
|
const { serializedTransaction } = args[0];
|
|
99
117
|
const publicClient = client;
|
|
118
|
+
const sender = await tryRecoverSender(serializedTransaction);
|
|
100
119
|
if (delayer.nextWait !== undefined) {
|
|
101
120
|
// Check if we have been instructed to delay the next tx.
|
|
102
121
|
const waitUntil = delayer.nextWait;
|
|
@@ -105,13 +124,16 @@ class DelayerImpl {
|
|
|
105
124
|
txHash = computeTxHash(serializedTransaction);
|
|
106
125
|
// Cancel tx outright if instructed
|
|
107
126
|
if ('indefinitely' in waitUntil && waitUntil.indefinitely) {
|
|
108
|
-
logger.info(`Cancelling tx ${txHash}
|
|
127
|
+
logger.info(`Cancelling tx ${txHash}`, {
|
|
128
|
+
sender
|
|
129
|
+
});
|
|
109
130
|
delayer.cancelledTxs.push(serializedTransaction);
|
|
110
131
|
return Promise.resolve(txHash);
|
|
111
132
|
}
|
|
112
133
|
// Or wait until the desired block number or timestamp
|
|
113
134
|
wait = 'l1BlockNumber' in waitUntil ? waitUntilBlock(publicClient, waitUntil.l1BlockNumber - 1n, logger) : 'l1Timestamp' in waitUntil ? waitUntilL1Timestamp(publicClient, waitUntil.l1Timestamp - delayer.ethereumSlotDuration, logger) : undefined;
|
|
114
135
|
logger.info(`Delaying tx ${txHash} until ${inspect(waitUntil)}`, {
|
|
136
|
+
sender,
|
|
115
137
|
argsLen: args.length,
|
|
116
138
|
...omit(parseTransaction(serializedTransaction), 'data', 'sidecars')
|
|
117
139
|
});
|
|
@@ -124,6 +146,7 @@ class DelayerImpl {
|
|
|
124
146
|
const now = delayer.dateProvider.now();
|
|
125
147
|
txHash = computeTxHash(serializedTransaction);
|
|
126
148
|
const logData = {
|
|
149
|
+
sender,
|
|
127
150
|
...omit(parseTransaction(serializedTransaction), 'data', 'sidecars'),
|
|
128
151
|
lastBlockTimestamp,
|
|
129
152
|
now,
|
|
@@ -150,29 +173,34 @@ class DelayerImpl {
|
|
|
150
173
|
computedTxHash: txHash
|
|
151
174
|
});
|
|
152
175
|
}
|
|
153
|
-
logger.info(`Sent previously delayed tx ${clientTxHash}
|
|
176
|
+
logger.info(`Sent previously delayed tx ${clientTxHash}`, {
|
|
177
|
+
sender
|
|
178
|
+
});
|
|
154
179
|
delayer.sentTxHashes.push(clientTxHash);
|
|
155
180
|
}).catch((err)=>logger.error(`Error sending tx after delay`, err));
|
|
156
181
|
return Promise.resolve(txHash);
|
|
157
182
|
} else {
|
|
158
183
|
const txHash = await client.sendRawTransaction(...args);
|
|
159
|
-
logger.debug(`Sent tx immediately ${txHash}
|
|
184
|
+
logger.debug(`Sent tx immediately ${txHash}`, {
|
|
185
|
+
sender
|
|
186
|
+
});
|
|
160
187
|
delayer.sentTxHashes.push(txHash);
|
|
161
188
|
return txHash;
|
|
162
189
|
}
|
|
163
190
|
}
|
|
164
|
-
}))
|
|
191
|
+
}));
|
|
192
|
+
// Only re-bind wallet actions (sendTransaction, writeContract, deployContract) for wallet clients.
|
|
193
|
+
// This is needed for tests that use wallet actions directly rather than sendRawTransaction.
|
|
194
|
+
const isWalletClient = 'account' in client && client.account !== undefined;
|
|
195
|
+
const extended = isWalletClient ? withRawTx// Re-extend with sendTransaction so it uses the modified sendRawTransaction.
|
|
165
196
|
.extend((client)=>({
|
|
166
197
|
sendTransaction: walletActions(client).sendTransaction
|
|
167
198
|
}))// And with the actions that depend on the modified sendTransaction
|
|
168
199
|
.extend((client)=>({
|
|
169
200
|
writeContract: walletActions(client).writeContract,
|
|
170
201
|
deployContract: walletActions(client).deployContract
|
|
171
|
-
}));
|
|
172
|
-
return
|
|
173
|
-
client: extended,
|
|
174
|
-
delayer
|
|
175
|
-
};
|
|
202
|
+
})) : withRawTx;
|
|
203
|
+
return extended;
|
|
176
204
|
}
|
|
177
205
|
/**
|
|
178
206
|
* Compute the tx hash given the serialized tx. Note that if this is a blob tx, we need to
|
package/dest/test/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
export * from './delayed_tx_utils.js';
|
|
2
1
|
export * from './eth_cheat_codes.js';
|
|
3
2
|
export * from './eth_cheat_codes_with_state.js';
|
|
4
3
|
export * from './start_anvil.js';
|
|
5
|
-
export * from './tx_delayer.js';
|
|
6
4
|
export * from './upgrade_utils.js';
|
|
7
5
|
export * from './chain_monitor.js';
|
|
8
6
|
export * from './rollup_cheat_codes.js';
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLHlCQUF5QixDQUFDIn0=
|
package/dest/test/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
package/dest/test/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export * from './delayed_tx_utils.js';
|
|
2
1
|
export * from './eth_cheat_codes.js';
|
|
3
2
|
export * from './eth_cheat_codes_with_state.js';
|
|
4
3
|
export * from './start_anvil.js';
|
|
5
|
-
export * from './tx_delayer.js';
|
|
6
4
|
export * from './upgrade_utils.js';
|
|
7
5
|
export * from './chain_monitor.js';
|
|
8
6
|
export * from './rollup_cheat_codes.js';
|
|
@@ -3,13 +3,13 @@ import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
|
3
3
|
import { TestERC20Abi as StakingAssetAbi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
4
4
|
import { getContract } from 'viem';
|
|
5
5
|
import { extractProposalIdFromLogs } from '../contracts/governance.js';
|
|
6
|
-
import {
|
|
6
|
+
import { createL1TxUtils } from '../l1_tx_utils/index.js';
|
|
7
7
|
import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
8
8
|
export async function executeGovernanceProposal(proposalId, governance, voteAmount, privateKey, l1Client, rpcUrls, logger) {
|
|
9
9
|
const proposal = await governance.read.getProposal([
|
|
10
10
|
proposalId
|
|
11
11
|
]);
|
|
12
|
-
const l1TxUtils =
|
|
12
|
+
const l1TxUtils = createL1TxUtils(l1Client);
|
|
13
13
|
const waitL1Block = async ()=>{
|
|
14
14
|
await l1TxUtils.sendAndMonitorTransaction({
|
|
15
15
|
to: l1Client.account.address,
|
package/dest/utils.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare class FormattedViemError extends Error {
|
|
|
14
14
|
export declare function extractEvent<const TAbi extends Abi | readonly unknown[], TEventName extends ContractEventName<TAbi>, TEventType = DecodeEventLogReturnType<TAbi, TEventName, Hex[], undefined, true>>(logs: Log[], address: Hex, abi: TAbi, eventName: TEventName, filter?: (log: TEventType) => boolean, logger?: Logger): TEventType;
|
|
15
15
|
export declare function tryExtractEvent<const TAbi extends Abi | readonly unknown[], TEventName extends ContractEventName<TAbi>, TEventType = DecodeEventLogReturnType<TAbi, TEventName, Hex[], undefined, true>>(logs: Log[], address: Hex, abi: TAbi, eventName: TEventName, filter?: (log: TEventType) => boolean, logger?: Logger): TEventType | undefined;
|
|
16
16
|
export declare function prettyLogViemErrorMsg(err: any): any;
|
|
17
|
+
export declare function mergeAbis(abis: Abi[]): Abi;
|
|
17
18
|
/**
|
|
18
19
|
* Formats a Viem error into a FormattedViemError instance.
|
|
19
20
|
* @param error - The error to format.
|
|
@@ -34,4 +35,4 @@ export declare function isBlobTransaction(tx: FormattedTransaction): tx is Forma
|
|
|
34
35
|
* Calculates a percentile from an array of bigints
|
|
35
36
|
*/
|
|
36
37
|
export declare function calculatePercentile(values: bigint[], percentile: number): bigint;
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN6RCxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUdwRCxPQUFPLEVBQ0wsS0FBSyxHQUFHLEVBR1IsS0FBSyxpQkFBaUIsRUFFdEIsS0FBSyx3QkFBd0IsRUFDN0IsS0FBSyxvQkFBb0IsRUFDekIsS0FBSyxHQUFHLEVBQ1IsS0FBSyxHQUFHLEVBR1QsTUFBTSxNQUFNLENBQUM7QUFHZCxNQUFNLFdBQVcsT0FBTztJQUN0QixXQUFXLEVBQUUsRUFBRSxDQUFDO0lBQ2hCLFdBQVcsRUFBRSxFQUFFLENBQUM7SUFDaEIsV0FBVyxFQUFFLEdBQUcsQ0FBQztJQUNqQixnQkFBZ0IsRUFBRSxNQUFNLENBQUM7Q0FDMUI7QUFFRCxxQkFBYSxrQkFBbUIsU0FBUSxLQUFLO0lBQzNDLFlBQVksQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDO0lBRXJCLFlBQVksT0FBTyxFQUFFLE1BQU0sRUFBRSxZQUFZLENBQUMsRUFBRSxHQUFHLEVBQUUsRUFJaEQ7Q0FDRjtBQUVELHdCQUFnQixZQUFZLENBQzFCLEtBQUssQ0FBQyxJQUFJLFNBQVMsR0FBRyxHQUFHLFNBQVMsT0FBTyxFQUFFLEVBQzNDLFVBQVUsU0FBUyxpQkFBaUIsQ0FBQyxJQUFJLENBQUMsRUFDMUMsVUFBVSxHQUFHLHdCQUF3QixDQUFDLElBQUksRUFBRSxVQUFVLEVBQUUsR0FBRyxFQUFFLEVBQUUsU0FBUyxFQUFFLElBQUksQ0FBQyxFQUUvRSxJQUFJLEVBQUUsR0FBRyxFQUFFLEVBQ1gsT0FBTyxFQUFFLEdBQUcsRUFDWixHQUFHLEVBQUUsSUFBSSxFQUNULFNBQVMsRUFBRSxVQUFVLEVBQ3JCLE1BQU0sQ0FBQyxFQUFFLENBQUMsR0FBRyxFQUFFLFVBQVUsS0FBSyxPQUFPLEVBQ3JDLE1BQU0sQ0FBQyxFQUFFLE1BQU0sR0FDZCxVQUFVLENBTVo7QUFFRCx3QkFBZ0IsZUFBZSxDQUM3QixLQUFLLENBQUMsSUFBSSxTQUFTLEdBQUcsR0FBRyxTQUFTLE9BQU8sRUFBRSxFQUMzQyxVQUFVLFNBQVMsaUJBQWlCLENBQUMsSUFBSSxDQUFDLEVBQzFDLFVBQVUsR0FBRyx3QkFBd0IsQ0FBQyxJQUFJLEVBQUUsVUFBVSxFQUFFLEdBQUcsRUFBRSxFQUFFLFNBQVMsRUFBRSxJQUFJLENBQUMsRUFFL0UsSUFBSSxFQUFFLEdBQUcsRUFBRSxFQUNYLE9BQU8sRUFBRSxHQUFHLEVBQ1osR0FBRyxFQUFFLElBQUksRUFDVCxTQUFTLEVBQUUsVUFBVSxFQUNyQixNQUFNLENBQUMsRUFBRSxDQUFDLEdBQUcsRUFBRSxVQUFVLEtBQUssT0FBTyxFQUNyQyxNQUFNLENBQUMsRUFBRSxNQUFNLEdBQ2QsVUFBVSxHQUFHLFNBQVMsQ0FnQnhCO0FBRUQsd0JBQWdCLHFCQUFxQixDQUFDLEdBQUcsRUFBRSxHQUFHLE9BVzdDO0FBRUQsd0JBQWdCLFNBQVMsQ0FBQyxJQUFJLEVBQUUsR0FBRyxFQUFFLEdBQUcsR0FBRyxDQWUxQztBQTRERDs7Ozs7R0FLRztBQUNILHdCQUFnQixlQUFlLENBQUMsS0FBSyxFQUFFLEdBQUcsRUFBRSxHQUFHLEdBQUUsR0FBZSxHQUFHLGtCQUFrQixDQXdFcEY7QUF5QkQsd0JBQWdCLHFCQUFxQixDQUFDLEdBQUcsRUFBRSxHQUFHLHNCQWE3QztBQUVEOzs7R0FHRztBQUNILHdCQUFnQixpQkFBaUIsQ0FBQyxFQUFFLEVBQUUsb0JBQW9CLEdBQUcsRUFBRSxJQUFJLG9CQUFvQixHQUFHO0lBQ3hGLGdCQUFnQixFQUFFLE1BQU0sQ0FBQztJQUN6QixtQkFBbUIsRUFBRSxTQUFTLEdBQUcsRUFBRSxDQUFDO0NBQ3JDLENBT0E7QUFFRDs7R0FFRztBQUNILHdCQUFnQixtQkFBbUIsQ0FBQyxNQUFNLEVBQUUsTUFBTSxFQUFFLEVBQUUsVUFBVSxFQUFFLE1BQU0sR0FBRyxNQUFNLENBT2hGIn0=
|
package/dest/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,GAAG,EAGR,KAAK,iBAAiB,EAEtB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,GAAG,EACR,KAAK,GAAG,EAGT,MAAM,MAAM,CAAC;AAGd,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,EAAE,CAAC;IAChB,WAAW,EAAE,EAAE,CAAC;IAChB,WAAW,EAAE,GAAG,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IAErB,YAAY,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,EAAE,EAIhD;CACF;AAED,wBAAgB,YAAY,CAC1B,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,UAAU,SAAS,iBAAiB,CAAC,IAAI,CAAC,EAC1C,UAAU,GAAG,wBAAwB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,EAE/E,IAAI,EAAE,GAAG,EAAE,EACX,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,UAAU,EACrB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,EACrC,MAAM,CAAC,EAAE,MAAM,GACd,UAAU,CAMZ;AAED,wBAAgB,eAAe,CAC7B,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,UAAU,SAAS,iBAAiB,CAAC,IAAI,CAAC,EAC1C,UAAU,GAAG,wBAAwB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,EAE/E,IAAI,EAAE,GAAG,EAAE,EACX,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,UAAU,EACrB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,EACrC,MAAM,CAAC,EAAE,MAAM,GACd,UAAU,GAAG,SAAS,CAgBxB;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,OAW7C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAe1C;AA4DD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,GAAE,GAAe,GAAG,kBAAkB,CAwEpF;AAyBD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,sBAa7C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,oBAAoB,GAAG,EAAE,IAAI,oBAAoB,GAAG;IACxF,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,SAAS,GAAG,EAAE,CAAC;CACrC,CAOA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAOhF"}
|
package/dest/utils.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ErrorsAbi } from '@aztec/l1-artifacts/ErrorsAbi';
|
|
2
2
|
import { BaseError, ContractFunctionRevertedError, decodeErrorResult, decodeEventLog } from 'viem';
|
|
3
|
+
import { formatAbiItem, formatAbiParams } from 'viem/utils';
|
|
3
4
|
export class FormattedViemError extends Error {
|
|
4
5
|
metaMessages;
|
|
5
6
|
constructor(message, metaMessages){
|
|
@@ -46,6 +47,51 @@ export function prettyLogViemErrorMsg(err) {
|
|
|
46
47
|
}
|
|
47
48
|
return err?.message ?? err;
|
|
48
49
|
}
|
|
50
|
+
export function mergeAbis(abis) {
|
|
51
|
+
let merged = [];
|
|
52
|
+
const seen = new Set();
|
|
53
|
+
for (const abi of abis){
|
|
54
|
+
for (const item of abi){
|
|
55
|
+
const key = getAbiItemKey(item);
|
|
56
|
+
if (!seen.has(key)) {
|
|
57
|
+
seen.add(key);
|
|
58
|
+
merged = [
|
|
59
|
+
...merged,
|
|
60
|
+
item
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return merged;
|
|
66
|
+
}
|
|
67
|
+
function getAbiItemKey(item) {
|
|
68
|
+
if (item.type === 'function') {
|
|
69
|
+
const signature = formatAbiItem(item);
|
|
70
|
+
const outputs = formatAbiParams(item.outputs);
|
|
71
|
+
const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
|
|
72
|
+
return `function:${signature}:${outputs}:${stateMutability}`;
|
|
73
|
+
}
|
|
74
|
+
if (item.type === 'event') {
|
|
75
|
+
const signature = formatAbiItem(item);
|
|
76
|
+
const indexed = (item.inputs ?? []).map((input)=>input.indexed ? '1' : '0').join('');
|
|
77
|
+
const anonymous = item.anonymous ? 'anonymous' : 'not-anonymous';
|
|
78
|
+
return `event:${signature}:${indexed}:${anonymous}`;
|
|
79
|
+
}
|
|
80
|
+
if (item.type === 'error') {
|
|
81
|
+
const signature = formatAbiItem(item);
|
|
82
|
+
return `error:${signature}`;
|
|
83
|
+
}
|
|
84
|
+
if (item.type === 'constructor') {
|
|
85
|
+
const inputs = formatAbiParams(item.inputs);
|
|
86
|
+
const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
|
|
87
|
+
return `constructor::${inputs}:${stateMutability}`;
|
|
88
|
+
}
|
|
89
|
+
if (item.type === 'fallback' || item.type === 'receive') {
|
|
90
|
+
const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
|
|
91
|
+
return `${item.type}:::${stateMutability}`;
|
|
92
|
+
}
|
|
93
|
+
return 'unknown';
|
|
94
|
+
}
|
|
49
95
|
function getNestedErrorData(error) {
|
|
50
96
|
// If nothing, bail
|
|
51
97
|
if (!error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/ethereum",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.cf93bcc56",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./account": "./dest/account.js",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"../package.common.json"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
54
|
-
"@aztec/constants": "0.0.1-commit.
|
|
55
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
56
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
53
|
+
"@aztec/blob-lib": "0.0.1-commit.cf93bcc56",
|
|
54
|
+
"@aztec/constants": "0.0.1-commit.cf93bcc56",
|
|
55
|
+
"@aztec/foundation": "0.0.1-commit.cf93bcc56",
|
|
56
|
+
"@aztec/l1-artifacts": "0.0.1-commit.cf93bcc56",
|
|
57
57
|
"@viem/anvil": "^0.0.10",
|
|
58
58
|
"dotenv": "^16.0.3",
|
|
59
59
|
"lodash.chunk": "^4.2.0",
|
package/src/config.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
getConfigFromMappings,
|
|
7
7
|
getDefaultConfig,
|
|
8
8
|
numberConfigHelper,
|
|
9
|
+
omitConfigMappings,
|
|
9
10
|
optionalNumberConfigHelper,
|
|
10
11
|
} from '@aztec/foundation/config';
|
|
11
12
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
@@ -99,7 +100,7 @@ export const l1ContractsConfigMappings: ConfigMappingsType<L1ContractsConfig> =
|
|
|
99
100
|
},
|
|
100
101
|
aztecEpochDuration: {
|
|
101
102
|
env: 'AZTEC_EPOCH_DURATION',
|
|
102
|
-
description: `How many L2 slots an epoch lasts (maximum
|
|
103
|
+
description: `How many L2 slots an epoch lasts (maximum MAX_CHECKPOINTS_PER_EPOCH).`,
|
|
103
104
|
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_EPOCH_DURATION),
|
|
104
105
|
},
|
|
105
106
|
aztecTargetCommitteeSize: {
|
|
@@ -238,7 +239,7 @@ export const l1ContractsConfigMappings: ConfigMappingsType<L1ContractsConfig> =
|
|
|
238
239
|
description: 'The delay before a validator can exit the set',
|
|
239
240
|
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_EXIT_DELAY_SECONDS),
|
|
240
241
|
},
|
|
241
|
-
...l1TxUtilsConfigMappings,
|
|
242
|
+
...omitConfigMappings(l1TxUtilsConfigMappings, ['ethereumSlotDuration']),
|
|
242
243
|
};
|
|
243
244
|
|
|
244
245
|
/**
|
|
@@ -22,6 +22,8 @@ export interface IEmpireBase {
|
|
|
22
22
|
signerAddress: Hex,
|
|
23
23
|
signer: (msg: TypedDataDefinition) => Promise<Hex>,
|
|
24
24
|
): Promise<L1TxRequest>;
|
|
25
|
+
/** Checks if a payload was ever submitted to governance via submitRoundWinner. */
|
|
26
|
+
hasPayloadBeenProposed(payload: Hex, fromBlock: bigint): Promise<boolean>;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export function encodeSignal(payload: Hex): Hex {
|
|
@@ -6,7 +6,6 @@ import { EmpireSlashingProposerAbi } from '@aztec/l1-artifacts/EmpireSlashingPro
|
|
|
6
6
|
|
|
7
7
|
import EventEmitter from 'events';
|
|
8
8
|
import {
|
|
9
|
-
type EncodeFunctionDataParameters,
|
|
10
9
|
type GetContractReturnType,
|
|
11
10
|
type Hex,
|
|
12
11
|
type Log,
|
|
@@ -100,6 +99,7 @@ export class EmpireSlashingProposerContract extends EventEmitter implements IEmp
|
|
|
100
99
|
public createSignalRequest(payload: Hex): L1TxRequest {
|
|
101
100
|
return {
|
|
102
101
|
to: this.address.toString(),
|
|
102
|
+
abi: EmpireSlashingProposerAbi,
|
|
103
103
|
data: encodeSignal(payload),
|
|
104
104
|
};
|
|
105
105
|
}
|
|
@@ -121,10 +121,17 @@ export class EmpireSlashingProposerContract extends EventEmitter implements IEmp
|
|
|
121
121
|
);
|
|
122
122
|
return {
|
|
123
123
|
to: this.address.toString(),
|
|
124
|
+
abi: EmpireSlashingProposerAbi,
|
|
124
125
|
data: encodeSignalWithSignature(payload, signature),
|
|
125
126
|
};
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
/** Checks if a payload was ever submitted to governance via submitRoundWinner. */
|
|
130
|
+
public async hasPayloadBeenProposed(payload: Hex, fromBlock: bigint): Promise<boolean> {
|
|
131
|
+
const events = await this.proposer.getEvents.PayloadSubmitted({ payload }, { fromBlock, strict: true });
|
|
132
|
+
return events.length > 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
128
135
|
public listenToSubmittablePayloads(callback: (args: { payload: `0x${string}`; round: bigint }) => unknown) {
|
|
129
136
|
return this.proposer.watchEvent.PayloadSubmittable(
|
|
130
137
|
{},
|
|
@@ -180,6 +187,7 @@ export class EmpireSlashingProposerContract extends EventEmitter implements IEmp
|
|
|
180
187
|
public buildExecuteRoundRequest(round: bigint): L1TxRequest {
|
|
181
188
|
return {
|
|
182
189
|
to: this.address.toString(),
|
|
190
|
+
abi: EmpireSlashingProposerAbi,
|
|
183
191
|
data: encodeFunctionData({
|
|
184
192
|
abi: EmpireSlashingProposerAbi,
|
|
185
193
|
functionName: 'submitRoundWinner',
|
|
@@ -222,24 +230,13 @@ export class EmpireSlashingProposerContract extends EventEmitter implements IEmp
|
|
|
222
230
|
if (typeof round === 'number') {
|
|
223
231
|
round = BigInt(round);
|
|
224
232
|
}
|
|
225
|
-
const
|
|
226
|
-
abi: EmpireSlashingProposerAbi,
|
|
227
|
-
functionName: 'submitRoundWinner',
|
|
228
|
-
args: [round],
|
|
229
|
-
};
|
|
230
|
-
const data = encodeFunctionData(args);
|
|
233
|
+
const request = this.buildExecuteRoundRequest(round);
|
|
231
234
|
const response = await txUtils
|
|
232
|
-
.sendAndMonitorTransaction(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
{
|
|
238
|
-
// Gas estimation is way off for this, likely because we are creating the contract/selector to call
|
|
239
|
-
// for the actual slashing dynamically.
|
|
240
|
-
gasLimitBufferPercentage: 50, // +50% gas
|
|
241
|
-
},
|
|
242
|
-
)
|
|
235
|
+
.sendAndMonitorTransaction(request, {
|
|
236
|
+
// Gas estimation is way off for this, likely because we are creating the contract/selector to call
|
|
237
|
+
// for the actual slashing dynamically.
|
|
238
|
+
gasLimitBufferPercentage: 50, // +50% gas
|
|
239
|
+
})
|
|
243
240
|
.catch(err => {
|
|
244
241
|
if (err instanceof FormattedViemError && err.message.includes('ProposalAlreadyExecuted')) {
|
|
245
242
|
throw new ProposalAlreadyExecutedError(round);
|
|
@@ -248,15 +245,13 @@ export class EmpireSlashingProposerContract extends EventEmitter implements IEmp
|
|
|
248
245
|
});
|
|
249
246
|
|
|
250
247
|
if (response.receipt.status === 'reverted') {
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
[],
|
|
259
|
-
);
|
|
248
|
+
const args = {
|
|
249
|
+
abi: EmpireSlashingProposerAbi,
|
|
250
|
+
functionName: 'submitRoundWinner' as const,
|
|
251
|
+
args: [round] as const,
|
|
252
|
+
address: this.address.toString(),
|
|
253
|
+
};
|
|
254
|
+
const error = await txUtils.tryGetErrorFromRevertedTx(request.data!, args, undefined, []);
|
|
260
255
|
if (error?.includes('ProposalAlreadyExecuted')) {
|
|
261
256
|
throw new ProposalAlreadyExecutedError(round);
|
|
262
257
|
}
|
|
@@ -43,6 +43,7 @@ export class FeeAssetHandlerContract {
|
|
|
43
43
|
}
|
|
44
44
|
return txUtils.sendAndMonitorTransaction({
|
|
45
45
|
to: this.address.toString(),
|
|
46
|
+
abi: FeeAssetHandlerAbi,
|
|
46
47
|
data: encodeFunctionData({
|
|
47
48
|
abi: FeeAssetHandlerAbi,
|
|
48
49
|
functionName: 'mint',
|
|
@@ -54,6 +55,7 @@ export class FeeAssetHandlerContract {
|
|
|
54
55
|
public setMintAmount(txUtils: L1TxUtils, amount: bigint) {
|
|
55
56
|
return txUtils.sendAndMonitorTransaction({
|
|
56
57
|
to: this.address.toString(),
|
|
58
|
+
abi: FeeAssetHandlerAbi,
|
|
57
59
|
data: encodeFunctionData({
|
|
58
60
|
abi: FeeAssetHandlerAbi,
|
|
59
61
|
functionName: 'setMintAmount',
|