viem 2.43.4 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js +11 -1
- package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
- package/_cjs/actions/wallet/sendTransactionSync.js +1 -0
- package/_cjs/actions/wallet/sendTransactionSync.js.map +1 -1
- package/_cjs/chains/definitions/codex.js +47 -0
- package/_cjs/chains/definitions/codex.js.map +1 -0
- package/_cjs/chains/definitions/codexTestnet.js +47 -0
- package/_cjs/chains/definitions/codexTestnet.js.map +1 -0
- package/_cjs/chains/definitions/paseoPassetHub.js +26 -0
- package/_cjs/chains/definitions/paseoPassetHub.js.map +1 -0
- package/_cjs/chains/definitions/{tempoTestnet.js → tempoAndantino.js} +5 -5
- package/_cjs/chains/definitions/tempoAndantino.js.map +1 -0
- package/_cjs/chains/definitions/tempoDevnet.js +7 -1
- package/_cjs/chains/definitions/tempoDevnet.js.map +1 -1
- package/_cjs/chains/definitions/tempoModerato.js +28 -0
- package/_cjs/chains/definitions/tempoModerato.js.map +1 -0
- package/_cjs/chains/index.js +23 -14
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/tempo/Abis.js +610 -752
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Addresses.js +2 -2
- package/_cjs/tempo/Addresses.js.map +1 -1
- package/_cjs/tempo/Decorator.js +5 -5
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/actions/amm.js +4 -38
- package/_cjs/tempo/actions/amm.js.map +1 -1
- package/_cjs/tempo/actions/dex.js +98 -46
- package/_cjs/tempo/actions/dex.js.map +1 -1
- package/_cjs/tempo/actions/nonce.js +0 -35
- package/_cjs/tempo/actions/nonce.js.map +1 -1
- package/_cjs/tempo/actions/reward.js +81 -62
- package/_cjs/tempo/actions/reward.js.map +1 -1
- package/_cjs/tempo/actions/token.js +11 -2
- package/_cjs/tempo/actions/token.js.map +1 -1
- package/_cjs/tempo/chainConfig.js +5 -10
- package/_cjs/tempo/chainConfig.js.map +1 -1
- package/_cjs/tempo/index.js +2 -1
- package/_cjs/tempo/index.js.map +1 -1
- package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js +16 -2
- package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
- package/_esm/actions/wallet/sendTransactionSync.js +1 -0
- package/_esm/actions/wallet/sendTransactionSync.js.map +1 -1
- package/_esm/chains/definitions/codex.js +44 -0
- package/_esm/chains/definitions/codex.js.map +1 -0
- package/_esm/chains/definitions/codexTestnet.js +44 -0
- package/_esm/chains/definitions/codexTestnet.js.map +1 -0
- package/_esm/chains/definitions/paseoPassetHub.js +23 -0
- package/_esm/chains/definitions/paseoPassetHub.js.map +1 -0
- package/_esm/chains/definitions/{tempoTestnet.js → tempoAndantino.js} +4 -4
- package/_esm/chains/definitions/tempoAndantino.js.map +1 -0
- package/_esm/chains/definitions/tempoDevnet.js +7 -1
- package/_esm/chains/definitions/tempoDevnet.js.map +1 -1
- package/_esm/chains/definitions/tempoModerato.js +25 -0
- package/_esm/chains/definitions/tempoModerato.js.map +1 -0
- package/_esm/chains/index.js +9 -1
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/tempo/Abis.js +609 -751
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Addresses.js +1 -1
- package/_esm/tempo/Addresses.js.map +1 -1
- package/_esm/tempo/Decorator.js +5 -5
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/actions/amm.js +4 -62
- package/_esm/tempo/actions/amm.js.map +1 -1
- package/_esm/tempo/actions/dex.js +192 -48
- package/_esm/tempo/actions/dex.js.map +1 -1
- package/_esm/tempo/actions/nonce.js +0 -94
- package/_esm/tempo/actions/nonce.js.map +1 -1
- package/_esm/tempo/actions/reward.js +227 -189
- package/_esm/tempo/actions/reward.js.map +1 -1
- package/_esm/tempo/actions/token.js +11 -2
- package/_esm/tempo/actions/token.js.map +1 -1
- package/_esm/tempo/chainConfig.js +2 -7
- package/_esm/tempo/chainConfig.js.map +1 -1
- package/_esm/tempo/index.js +1 -1
- package/_esm/tempo/index.js.map +1 -1
- package/_types/account-abstraction/utils/userOperation/toPackedUserOperation.d.ts.map +1 -1
- package/_types/actions/wallet/sendTransactionSync.d.ts.map +1 -1
- package/_types/celo/chainConfig.d.ts +22 -22
- package/_types/celo/formatters.d.ts +11 -11
- package/_types/chains/definitions/abstract.d.ts +14 -14
- package/_types/chains/definitions/abstractTestnet.d.ts +14 -14
- package/_types/chains/definitions/ancient8.d.ts +3 -3
- package/_types/chains/definitions/ancient8Sepolia.d.ts +3 -3
- package/_types/chains/definitions/base.d.ts +6 -6
- package/_types/chains/definitions/baseGoerli.d.ts +3 -3
- package/_types/chains/definitions/baseSepolia.d.ts +6 -6
- package/_types/chains/definitions/blast.d.ts +3 -3
- package/_types/chains/definitions/bob.d.ts +3 -3
- package/_types/chains/definitions/bobSepolia.d.ts +3 -3
- package/_types/chains/definitions/celo.d.ts +22 -22
- package/_types/chains/definitions/celoAlfajores.d.ts +22 -22
- package/_types/chains/definitions/celoSepolia.d.ts +22 -22
- package/_types/chains/definitions/codex.d.ts +310 -0
- package/_types/chains/definitions/codex.d.ts.map +1 -0
- package/_types/chains/definitions/codexTestnet.d.ts +310 -0
- package/_types/chains/definitions/codexTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/dchain.d.ts +3 -3
- package/_types/chains/definitions/dchainTestnet.d.ts +3 -3
- package/_types/chains/definitions/elysiumTestnet.d.ts +3 -3
- package/_types/chains/definitions/fraxtal.d.ts +3 -3
- package/_types/chains/definitions/fraxtalTestnet.d.ts +3 -3
- package/_types/chains/definitions/funkiMainnet.d.ts +3 -3
- package/_types/chains/definitions/funkiSepolia.d.ts +3 -3
- package/_types/chains/definitions/garnet.d.ts +3 -3
- package/_types/chains/definitions/giwaSepolia.d.ts +6 -6
- package/_types/chains/definitions/ink.d.ts +3 -3
- package/_types/chains/definitions/inkSepolia.d.ts +3 -3
- package/_types/chains/definitions/lisk.d.ts +3 -3
- package/_types/chains/definitions/liskSepolia.d.ts +3 -3
- package/_types/chains/definitions/metalL2.d.ts +3 -3
- package/_types/chains/definitions/mode.d.ts +3 -3
- package/_types/chains/definitions/modeTestnet.d.ts +3 -3
- package/_types/chains/definitions/optimism.d.ts +3 -3
- package/_types/chains/definitions/optimismGoerli.d.ts +3 -3
- package/_types/chains/definitions/optimismSepolia.d.ts +3 -3
- package/_types/chains/definitions/paseoPassetHub.d.ts +48 -0
- package/_types/chains/definitions/paseoPassetHub.d.ts.map +1 -0
- package/_types/chains/definitions/pgn.d.ts +3 -3
- package/_types/chains/definitions/pgnTestnet.d.ts +3 -3
- package/_types/chains/definitions/playfiAlbireo.d.ts +14 -14
- package/_types/chains/definitions/pyrope.d.ts +3 -3
- package/_types/chains/definitions/redstone.d.ts +3 -3
- package/_types/chains/definitions/rss3.d.ts +3 -3
- package/_types/chains/definitions/rss3Sepolia.d.ts +3 -3
- package/_types/chains/definitions/shape.d.ts +3 -3
- package/_types/chains/definitions/shapeSepolia.d.ts +3 -3
- package/_types/chains/definitions/snax.d.ts +3 -3
- package/_types/chains/definitions/snaxTestnet.d.ts +3 -3
- package/_types/chains/definitions/soneium.d.ts +3 -3
- package/_types/chains/definitions/soneiumMinato.d.ts +3 -3
- package/_types/chains/definitions/sophon.d.ts +14 -14
- package/_types/chains/definitions/sophonTestnet.d.ts +14 -14
- package/_types/chains/definitions/superseed.d.ts +3 -3
- package/_types/chains/definitions/superseedSepolia.d.ts +3 -3
- package/_types/chains/definitions/swellchain.d.ts +3 -3
- package/_types/chains/definitions/swellchainTestnet.d.ts +3 -3
- package/_types/chains/definitions/{tempoTestnet.d.ts → tempoAndantino.d.ts} +36 -40
- package/_types/chains/definitions/{tempoTestnet.d.ts.map → tempoAndantino.d.ts.map} +1 -1
- package/_types/chains/definitions/tempoDevnet.d.ts +43 -47
- package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoLocalnet.d.ts +30 -34
- package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoModerato.d.ts +912 -0
- package/_types/chains/definitions/tempoModerato.d.ts.map +1 -0
- package/_types/chains/definitions/treasure.d.ts +14 -14
- package/_types/chains/definitions/treasureTopaz.d.ts +14 -14
- package/_types/chains/definitions/unichain.d.ts +3 -3
- package/_types/chains/definitions/unichainSepolia.d.ts +3 -3
- package/_types/chains/definitions/worldchain.d.ts +3 -3
- package/_types/chains/definitions/worldchainSepolia.d.ts +3 -3
- package/_types/chains/definitions/zircuit.d.ts +3 -3
- package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts +3 -3
- package/_types/chains/definitions/zircuitTestnet.d.ts +3 -3
- package/_types/chains/definitions/zksync.d.ts +14 -14
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts +14 -14
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts +14 -14
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts +14 -14
- package/_types/chains/definitions/zksyncLocalNode.d.ts +14 -14
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts +14 -14
- package/_types/chains/definitions/zora.d.ts +3 -3
- package/_types/chains/definitions/zoraSepolia.d.ts +3 -3
- package/_types/chains/definitions/zoraTestnet.d.ts +3 -3
- package/_types/chains/index.d.ts +9 -1
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +2 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/op-stack/chainConfig.d.ts +3 -3
- package/_types/op-stack/formatters.d.ts +3 -3
- package/_types/tempo/Abis.d.ts +937 -1194
- package/_types/tempo/Abis.d.ts.map +1 -1
- package/_types/tempo/Addresses.d.ts +1 -1
- package/_types/tempo/Addresses.d.ts.map +1 -1
- package/_types/tempo/Decorator.d.ts +91 -85
- package/_types/tempo/Decorator.d.ts.map +1 -1
- package/_types/tempo/actions/amm.d.ts +19 -360
- package/_types/tempo/actions/amm.d.ts.map +1 -1
- package/_types/tempo/actions/dex.d.ts +765 -237
- package/_types/tempo/actions/dex.d.ts.map +1 -1
- package/_types/tempo/actions/fee.d.ts +30 -11
- package/_types/tempo/actions/fee.d.ts.map +1 -1
- package/_types/tempo/actions/nonce.d.ts +0 -105
- package/_types/tempo/actions/nonce.d.ts.map +1 -1
- package/_types/tempo/actions/policy.d.ts +60 -0
- package/_types/tempo/actions/policy.d.ts.map +1 -1
- package/_types/tempo/actions/reward.d.ts +350 -526
- package/_types/tempo/actions/reward.d.ts.map +1 -1
- package/_types/tempo/actions/token.d.ts +368 -1984
- package/_types/tempo/actions/token.d.ts.map +1 -1
- package/_types/tempo/chainConfig.d.ts +16 -19
- package/_types/tempo/chainConfig.d.ts.map +1 -1
- package/_types/tempo/index.d.ts +1 -1
- package/_types/tempo/index.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/zksync/chainConfig.d.ts +14 -14
- package/_types/zksync/formatters.d.ts +14 -14
- package/account-abstraction/utils/userOperation/toPackedUserOperation.ts +17 -2
- package/actions/wallet/sendTransactionSync.ts +1 -0
- package/chains/definitions/codex.ts +45 -0
- package/chains/definitions/codexTestnet.ts +45 -0
- package/chains/definitions/paseoPassetHub.ts +23 -0
- package/chains/definitions/{tempoTestnet.ts → tempoAndantino.ts} +3 -3
- package/chains/definitions/tempoDevnet.ts +7 -1
- package/chains/definitions/tempoModerato.ts +25 -0
- package/chains/index.ts +10 -1
- package/errors/version.ts +1 -1
- package/index.ts +9 -0
- package/package.json +2 -2
- package/tempo/Abis.ts +607 -752
- package/tempo/Addresses.ts +1 -1
- package/tempo/Decorator.ts +115 -106
- package/tempo/actions/amm.ts +13 -115
- package/tempo/actions/dex.ts +274 -72
- package/tempo/actions/nonce.ts +0 -148
- package/tempo/actions/reward.ts +310 -257
- package/tempo/actions/token.ts +16 -2
- package/tempo/chainConfig.ts +2 -9
- package/tempo/index.ts +1 -1
- package/_cjs/chains/definitions/tempoTestnet.js.map +0 -1
- package/_esm/chains/definitions/tempoTestnet.js.map +0 -1
package/tempo/actions/nonce.ts
CHANGED
|
@@ -110,81 +110,6 @@ export namespace getNonce {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
/**
|
|
114
|
-
* @deprecated This function has been deprecated post-AllegroModerato. It will be removed in a future version.
|
|
115
|
-
*/
|
|
116
|
-
export async function getNonceKeyCount<
|
|
117
|
-
chain extends Chain | undefined,
|
|
118
|
-
account extends Account | undefined,
|
|
119
|
-
>(
|
|
120
|
-
client: Client<Transport, chain, account>,
|
|
121
|
-
parameters: getNonceKeyCount.Parameters,
|
|
122
|
-
): Promise<getNonceKeyCount.ReturnValue> {
|
|
123
|
-
const { account, ...rest } = parameters
|
|
124
|
-
return readContract(client, {
|
|
125
|
-
...rest,
|
|
126
|
-
...getNonceKeyCount.call({ account }),
|
|
127
|
-
})
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export namespace getNonceKeyCount {
|
|
131
|
-
export type Parameters = ReadParameters & Args
|
|
132
|
-
|
|
133
|
-
export type Args = {
|
|
134
|
-
/** Account address. */
|
|
135
|
-
account: Address
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export type ReturnValue = ReadContractReturnType<
|
|
139
|
-
typeof Abis.nonce,
|
|
140
|
-
'getActiveNonceKeyCount',
|
|
141
|
-
never
|
|
142
|
-
>
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Defines a call to the `getNonceKeyCount` function.
|
|
146
|
-
*
|
|
147
|
-
* Can be passed as a parameter to:
|
|
148
|
-
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
149
|
-
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
150
|
-
* - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* ```ts
|
|
154
|
-
* import { createClient, http } from 'viem'
|
|
155
|
-
* import { tempo } from 'tempo.ts/chains'
|
|
156
|
-
* import { Actions } from 'tempo.ts/viem'
|
|
157
|
-
*
|
|
158
|
-
* const client = createClient({
|
|
159
|
-
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
|
|
160
|
-
* transport: http(),
|
|
161
|
-
* })
|
|
162
|
-
*
|
|
163
|
-
* const result = await client.multicall({
|
|
164
|
-
* contracts: [
|
|
165
|
-
* Actions.nonce.getNonceKeyCount.call({ account: '0x...' }),
|
|
166
|
-
* Actions.nonce.getNonceKeyCount.call({ account: '0x...' }),
|
|
167
|
-
* ],
|
|
168
|
-
* })
|
|
169
|
-
* ```
|
|
170
|
-
*
|
|
171
|
-
* @param args - Arguments.
|
|
172
|
-
* @returns The call.
|
|
173
|
-
*/
|
|
174
|
-
export function call(args: Args) {
|
|
175
|
-
const { account } = args
|
|
176
|
-
return defineCall({
|
|
177
|
-
address: Addresses.nonceManager,
|
|
178
|
-
abi: Abis.nonce,
|
|
179
|
-
args: [account],
|
|
180
|
-
functionName: 'getActiveNonceKeyCount',
|
|
181
|
-
})
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @deprecated This function has been deprecated post-AllegroModerato. It will be removed in a future version.
|
|
187
|
-
*/
|
|
188
113
|
export function watchNonceIncremented<
|
|
189
114
|
chain extends Chain | undefined,
|
|
190
115
|
account extends Account | undefined,
|
|
@@ -228,76 +153,3 @@ export declare namespace watchNonceIncremented {
|
|
|
228
153
|
onNonceIncremented: (args: Args, log: Log) => void
|
|
229
154
|
}
|
|
230
155
|
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Watches for active key count changed events.
|
|
234
|
-
*
|
|
235
|
-
* @example
|
|
236
|
-
* ```ts
|
|
237
|
-
* import { createClient, http } from 'viem'
|
|
238
|
-
* import { tempo } from 'tempo.ts/chains'
|
|
239
|
-
* import { Actions } from 'tempo.ts/viem'
|
|
240
|
-
*
|
|
241
|
-
* const client = createClient({
|
|
242
|
-
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
|
|
243
|
-
* transport: http(),
|
|
244
|
-
* })
|
|
245
|
-
*
|
|
246
|
-
* const unwatch = Actions.nonce.watchActiveKeyCountChanged(client, {
|
|
247
|
-
* onActiveKeyCountChanged: (args, log) => {
|
|
248
|
-
* console.log('Active key count changed:', args)
|
|
249
|
-
* },
|
|
250
|
-
* })
|
|
251
|
-
* ```
|
|
252
|
-
*
|
|
253
|
-
* @param client - Client.
|
|
254
|
-
* @param parameters - Parameters.
|
|
255
|
-
* @returns A function to unsubscribe from the event.
|
|
256
|
-
*/
|
|
257
|
-
export function watchActiveKeyCountChanged<
|
|
258
|
-
chain extends Chain | undefined,
|
|
259
|
-
account extends Account | undefined,
|
|
260
|
-
>(
|
|
261
|
-
client: Client<Transport, chain, account>,
|
|
262
|
-
parameters: watchActiveKeyCountChanged.Parameters,
|
|
263
|
-
) {
|
|
264
|
-
const { onActiveKeyCountChanged, ...rest } = parameters
|
|
265
|
-
return watchContractEvent(client, {
|
|
266
|
-
...rest,
|
|
267
|
-
address: Addresses.nonceManager,
|
|
268
|
-
abi: Abis.nonce,
|
|
269
|
-
eventName: 'ActiveKeyCountChanged',
|
|
270
|
-
onLogs: (logs) => {
|
|
271
|
-
for (const log of logs) onActiveKeyCountChanged(log.args, log)
|
|
272
|
-
},
|
|
273
|
-
strict: true,
|
|
274
|
-
})
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
export declare namespace watchActiveKeyCountChanged {
|
|
278
|
-
export type Args = GetEventArgs<
|
|
279
|
-
typeof Abis.nonce,
|
|
280
|
-
'ActiveKeyCountChanged',
|
|
281
|
-
{ IndexedOnly: false; Required: true }
|
|
282
|
-
>
|
|
283
|
-
|
|
284
|
-
export type Log = viem_Log<
|
|
285
|
-
bigint,
|
|
286
|
-
number,
|
|
287
|
-
false,
|
|
288
|
-
ExtractAbiItem<typeof Abis.nonce, 'ActiveKeyCountChanged'>,
|
|
289
|
-
true
|
|
290
|
-
>
|
|
291
|
-
|
|
292
|
-
export type Parameters = UnionOmit<
|
|
293
|
-
WatchContractEventParameters<
|
|
294
|
-
typeof Abis.nonce,
|
|
295
|
-
'ActiveKeyCountChanged',
|
|
296
|
-
true
|
|
297
|
-
>,
|
|
298
|
-
'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'
|
|
299
|
-
> & {
|
|
300
|
-
/** Callback to invoke when the active key count changes. */
|
|
301
|
-
onActiveKeyCountChanged: (args: Args, log: Log) => void
|
|
302
|
-
}
|
|
303
|
-
}
|