@aztec/ethereum 2.1.0-rc.12 → 2.1.0-rc.14
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/account.js +1 -1
- package/dest/chain.d.ts +1 -1
- package/dest/chain.d.ts.map +1 -1
- package/dest/chain.js +1 -1
- package/dest/client.d.ts +1 -1
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +3 -3
- package/dest/constants.d.ts +1 -1
- package/dest/constants.d.ts.map +1 -1
- package/dest/contracts/empire_base.d.ts +1 -1
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +1 -1
- package/dest/contracts/empire_slashing_proposer.d.ts +4 -4
- package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/empire_slashing_proposer.js +1 -1
- package/dest/contracts/fee_asset_handler.d.ts +3 -3
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.js +1 -1
- package/dest/contracts/fee_juice.d.ts +1 -1
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/fee_juice.js +1 -1
- package/dest/contracts/governance.d.ts +1 -1
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +1 -1
- package/dest/contracts/governance_proposer.d.ts +1 -1
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +1 -1
- package/dest/contracts/gse.d.ts +1 -1
- package/dest/contracts/gse.d.ts.map +1 -1
- package/dest/contracts/gse.js +1 -1
- package/dest/contracts/inbox.d.ts +1 -1
- package/dest/contracts/inbox.d.ts.map +1 -1
- package/dest/contracts/inbox.js +1 -1
- package/dest/contracts/multicall.d.ts +3 -3
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +1 -1
- package/dest/contracts/registry.d.ts +1 -1
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +1 -1
- package/dest/contracts/rollup.d.ts +3 -3
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +1 -1
- package/dest/contracts/slasher_contract.js +1 -1
- 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 +1 -1
- package/dest/deploy_l1_contracts.d.ts +1 -1
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +2 -2
- package/dest/eth-signer/eth-signer.d.ts +1 -1
- package/dest/eth-signer/eth-signer.d.ts.map +1 -1
- package/dest/l1_artifacts.d.ts +1 -1
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +2 -2
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +9 -9
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +1 -1
- package/dest/l1_tx_utils/signer.d.ts +1 -1
- package/dest/l1_tx_utils/signer.d.ts.map +1 -1
- package/dest/l1_tx_utils/signer.js +1 -1
- package/dest/l1_tx_utils/types.d.ts +1 -1
- package/dest/l1_tx_utils/types.d.ts.map +1 -1
- package/dest/l1_tx_utils/utils.d.ts +1 -1
- package/dest/l1_tx_utils/utils.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.d.ts +1 -1
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +1 -1
- package/dest/test/rollup_cheat_codes.d.ts +1 -1
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +2 -2
- package/dest/test/tx_delayer.d.ts +1 -1
- package/dest/test/tx_delayer.d.ts.map +1 -1
- package/dest/test/tx_delayer.js +1 -1
- package/dest/test/upgrade_utils.d.ts +1 -1
- package/dest/test/upgrade_utils.d.ts.map +1 -1
- package/dest/test/upgrade_utils.js +1 -1
- package/dest/types.d.ts +1 -1
- package/dest/types.d.ts.map +1 -1
- package/dest/utils.d.ts +1 -1
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +1 -1
- package/package.json +6 -6
- package/src/account.ts +1 -1
- package/src/chain.ts +2 -2
- package/src/client.ts +3 -3
- package/src/constants.ts +1 -1
- package/src/contracts/empire_base.ts +1 -1
- package/src/contracts/empire_slashing_proposer.ts +2 -2
- package/src/contracts/fee_asset_handler.ts +1 -1
- package/src/contracts/fee_juice.ts +1 -1
- package/src/contracts/governance.ts +1 -1
- package/src/contracts/governance_proposer.ts +1 -1
- package/src/contracts/gse.ts +1 -1
- package/src/contracts/inbox.ts +1 -1
- package/src/contracts/multicall.ts +1 -1
- package/src/contracts/registry.ts +1 -1
- package/src/contracts/rollup.ts +2 -2
- package/src/contracts/slasher_contract.ts +1 -1
- package/src/contracts/tally_slashing_proposer.ts +1 -1
- package/src/deploy_l1_contracts.ts +5 -5
- package/src/eth-signer/eth-signer.ts +1 -1
- package/src/l1_artifacts.ts +1 -1
- package/src/l1_tx_utils/factory.ts +1 -1
- package/src/l1_tx_utils/l1_tx_utils.ts +3 -3
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +1 -1
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +2 -2
- package/src/l1_tx_utils/signer.ts +1 -1
- package/src/l1_tx_utils/types.ts +1 -1
- package/src/l1_tx_utils/utils.ts +1 -1
- package/src/test/eth_cheat_codes.ts +1 -1
- package/src/test/rollup_cheat_codes.ts +2 -2
- package/src/test/tx_delayer.ts +2 -2
- package/src/test/upgrade_utils.ts +1 -1
- package/src/types.ts +1 -1
- package/src/utils.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tx_delayer.d.ts","sourceRoot":"","sources":["../../src/test/tx_delayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"tx_delayer.d.ts","sourceRoot":"","sources":["../../src/test/tx_delayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,OAAO,EACL,KAAK,MAAM,EACX,KAAK,GAAG,EAQT,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,aAAa,CAAC;AAEhE,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,EAC7C,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,MAAM,GAAG,MAAM,EAC5B,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,oBAiBjB;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,EACnD,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,MAAM,GAAG,MAAM,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,oBAwBjB;AAED,MAAM,WAAW,OAAO;IACtB,sDAAsD;IACtD,eAAe,IAAI,GAAG,EAAE,CAAC;IACzB,iDAAiD;IACjD,eAAe,IAAI,GAAG,EAAE,CAAC;IACzB,8EAA8E;IAC9E,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IACxE,wEAAwE;IACxE,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAC1E,kDAAkD;IAClD,YAAY,IAAI,IAAI,CAAC;IACrB;;;;OAIG;IACH,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACzE;AA0CD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,UAAU,EAC9C,MAAM,EAAE,CAAC,EACT,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE;IAAE,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAC9C;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CA0GjC"}
|
package/dest/test/tx_delayer.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { omit } from '@aztec/foundation/collection';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
4
|
-
import { keccak256, parseTransaction, publicActions, serializeTransaction, walletActions } from '@spalladino/viem';
|
|
5
4
|
import { inspect } from 'util';
|
|
5
|
+
import { keccak256, parseTransaction, publicActions, serializeTransaction, walletActions } from 'viem';
|
|
6
6
|
import { isExtendedClient } from '../types.js';
|
|
7
7
|
export function waitUntilBlock(client, blockNumber, logger, timeout) {
|
|
8
8
|
const publicClient = 'getBlockNumber' in client && typeof client.getBlockNumber === 'function' ? client : client.extend(publicActions);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
2
|
import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
3
|
-
import { type GetContractReturnType, type PrivateKeyAccount } from '
|
|
3
|
+
import { type GetContractReturnType, type PrivateKeyAccount } from 'viem';
|
|
4
4
|
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
|
5
5
|
import type { ExtendedViemWalletClient, ViemPublicClient } from '../types.js';
|
|
6
6
|
export declare function executeGovernanceProposal(proposalId: bigint, governance: GetContractReturnType<typeof GovernanceAbi, ViemPublicClient>, voteAmount: bigint, privateKey: PrivateKeyAccount, l1Client: ExtendedViemWalletClient, rpcUrls: string[], logger: Logger): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade_utils.d.ts","sourceRoot":"","sources":["../../src/test/upgrade_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"upgrade_utils.d.ts","sourceRoot":"","sources":["../../src/test/upgrade_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAe,MAAM,MAAM,CAAC;AAGvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG9E,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,qBAAqB,CAAC,OAAO,aAAa,EAAE,gBAAgB,CAAC,EACzE,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,wBAAwB,EAClC,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,EAAE,MAAM,iBAmCf;AAED,wBAAsB,wBAAwB,CAC5C,cAAc,EAAE,KAAK,MAAM,EAAE,EAC7B,SAAS,EAAE,mBAAmB,EAC9B,UAAU,EAAE,iBAAiB,EAC7B,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;IACT,UAAU,EAAE,qBAAqB,CAAC,OAAO,aAAa,EAAE,gBAAgB,CAAC,CAAC;IAC1E,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAyCD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
2
2
|
import { TestERC20Abi as StakingAssetAbi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
3
|
-
import { getContract } from '
|
|
3
|
+
import { getContract } from 'viem';
|
|
4
4
|
import { extractProposalIdFromLogs } from '../contracts/governance.js';
|
|
5
5
|
import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils/index.js';
|
|
6
6
|
import { EthCheatCodes } from './eth_cheat_codes.js';
|
package/dest/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Abi, Account, Chain, Client, FallbackTransport, GetContractReturnType, HttpTransport, PublicActions, PublicClient, PublicRpcSchema, WalletActions, WalletRpcSchema } from '
|
|
1
|
+
import type { Abi, Account, Chain, Client, FallbackTransport, GetContractReturnType, HttpTransport, PublicActions, PublicClient, PublicRpcSchema, WalletActions, WalletRpcSchema } from 'viem';
|
|
2
2
|
/** Type for a viem public client */
|
|
3
3
|
export type ViemPublicClient = PublicClient<FallbackTransport<HttpTransport[]>, Chain>;
|
|
4
4
|
export type ExtendedViemWalletClient = Client<FallbackTransport<readonly HttpTransport[]>, Chain, Account, [
|
package/dest/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,OAAO,EACP,KAAK,EACL,MAAM,EACN,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,aAAa,EACb,eAAe,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,OAAO,EACP,KAAK,EACL,MAAM,EACN,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,aAAa,EACb,eAAe,EAChB,MAAM,MAAM,CAAC;AAEd,oCAAoC;AACpC,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AAEvF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAC3C,iBAAiB,CAAC,SAAS,aAAa,EAAE,CAAC,EAC3C,KAAK,EACL,OAAO,EACP;IAAC,GAAG,eAAe;IAAE,GAAG,eAAe;CAAC,EACxC,aAAa,CAAC,iBAAiB,CAAC,SAAS,aAAa,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAClG,CAAC;AAEF,4FAA4F;AAC5F,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,wBAAwB,CAAC;AAErE,6EAA6E;AAC7E,MAAM,MAAM,YAAY,CAAC,IAAI,SAAS,GAAG,IAAI,qBAAqB,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;AAEnG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,IAAI,wBAAwB,CAEvF"}
|
package/dest/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
import type { Logger } from '@aztec/foundation/log';
|
|
3
|
-
import { type Abi, type ContractEventName, type DecodeEventLogReturnType, type Hex, type Log } from '
|
|
3
|
+
import { type Abi, type ContractEventName, type DecodeEventLogReturnType, type Hex, type Log } from 'viem';
|
|
4
4
|
export interface L2Claim {
|
|
5
5
|
claimSecret: Fr;
|
|
6
6
|
claimAmount: Fr;
|
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,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,GAAG,EAER,KAAK,iBAAiB,EAEtB,KAAK,wBAAwB,EAC7B,KAAK,GAAG,EACR,KAAK,GAAG,EAGT,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,GAAG,EAER,KAAK,iBAAiB,EAEtB,KAAK,wBAAwB,EAC7B,KAAK,GAAG,EACR,KAAK,GAAG,EAGT,MAAM,MAAM,CAAC;AAEd,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;gBAET,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,EAAE;CAKlD;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;AA0BD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,GAAE,GAAe,GAAG,kBAAkB,CAwEpF;AAyBD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,sBAa7C"}
|
package/dest/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorsAbi } from '@aztec/l1-artifacts/ErrorsAbi';
|
|
2
|
-
import { BaseError, ContractFunctionRevertedError, decodeErrorResult, decodeEventLog } from '
|
|
2
|
+
import { BaseError, ContractFunctionRevertedError, decodeErrorResult, decodeEventLog } from 'viem';
|
|
3
3
|
export class FormattedViemError extends Error {
|
|
4
4
|
metaMessages;
|
|
5
5
|
constructor(message, metaMessages){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/ethereum",
|
|
3
|
-
"version": "2.1.0-rc.
|
|
3
|
+
"version": "2.1.0-rc.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"../package.common.json"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@aztec/blob-lib": "2.1.0-rc.
|
|
35
|
-
"@aztec/constants": "2.1.0-rc.
|
|
36
|
-
"@aztec/foundation": "2.1.0-rc.
|
|
37
|
-
"@aztec/l1-artifacts": "2.1.0-rc.
|
|
38
|
-
"@spalladino/viem": "2.38.2-eip7594.0",
|
|
34
|
+
"@aztec/blob-lib": "2.1.0-rc.14",
|
|
35
|
+
"@aztec/constants": "2.1.0-rc.14",
|
|
36
|
+
"@aztec/foundation": "2.1.0-rc.14",
|
|
37
|
+
"@aztec/l1-artifacts": "2.1.0-rc.14",
|
|
39
38
|
"@viem/anvil": "^0.0.10",
|
|
40
39
|
"dotenv": "^16.0.3",
|
|
41
40
|
"lodash.chunk": "^4.2.0",
|
|
42
41
|
"lodash.pickby": "^4.5.0",
|
|
43
42
|
"tslib": "^2.4.0",
|
|
43
|
+
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0",
|
|
44
44
|
"zod": "^3.23.8"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
package/src/account.ts
CHANGED
package/src/chain.ts
CHANGED
package/src/client.ts
CHANGED
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
fallback,
|
|
12
12
|
http,
|
|
13
13
|
publicActions,
|
|
14
|
-
} from '
|
|
15
|
-
import { mnemonicToAccount, privateKeyToAccount } from '
|
|
16
|
-
import { foundry } from '
|
|
14
|
+
} from 'viem';
|
|
15
|
+
import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
|
|
16
|
+
import { foundry } from 'viem/chains';
|
|
17
17
|
|
|
18
18
|
import { createEthereumChain } from './chain.js';
|
|
19
19
|
import type { ExtendedViemWalletClient, ViemPublicClient } from './types.js';
|
package/src/constants.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
2
2
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
3
3
|
import { EmpireBaseAbi } from '@aztec/l1-artifacts/EmpireBaseAbi';
|
|
4
4
|
|
|
5
|
-
import { type Hex, type TypedDataDefinition, encodeFunctionData } from '
|
|
5
|
+
import { type Hex, type TypedDataDefinition, encodeFunctionData } from 'viem';
|
|
6
6
|
|
|
7
7
|
import type { L1TxRequest } from '../l1_tx_utils/index.js';
|
|
8
8
|
|
|
@@ -3,6 +3,7 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
3
3
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
4
4
|
import { EmpireSlashingProposerAbi } from '@aztec/l1-artifacts/EmpireSlashingProposerAbi';
|
|
5
5
|
|
|
6
|
+
import EventEmitter from 'events';
|
|
6
7
|
import {
|
|
7
8
|
type EncodeFunctionDataParameters,
|
|
8
9
|
type GetContractReturnType,
|
|
@@ -11,8 +12,7 @@ import {
|
|
|
11
12
|
type TypedDataDefinition,
|
|
12
13
|
encodeFunctionData,
|
|
13
14
|
getContract,
|
|
14
|
-
} from '
|
|
15
|
-
import EventEmitter from 'events';
|
|
15
|
+
} from 'viem';
|
|
16
16
|
|
|
17
17
|
import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
|
|
18
18
|
import type { ViemClient } from '../types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts/FeeAssetHandlerAbi';
|
|
3
3
|
|
|
4
|
-
import { type Hex, encodeFunctionData, getContract } from '
|
|
4
|
+
import { type Hex, encodeFunctionData, getContract } from 'viem';
|
|
5
5
|
|
|
6
6
|
import type { L1TxUtils } from '../l1_tx_utils/index.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { TestERC20Abi as FeeJuiceAbi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
3
3
|
|
|
4
|
-
import { type GetContractReturnType, type Hex, getContract } from '
|
|
4
|
+
import { type GetContractReturnType, type Hex, getContract } from 'viem';
|
|
5
5
|
|
|
6
6
|
import { type ExtendedViemWalletClient, type ViemClient, isExtendedClient } from '../types.js';
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
encodeFunctionData,
|
|
12
12
|
getContract,
|
|
13
13
|
parseEventLogs,
|
|
14
|
-
} from '
|
|
14
|
+
} from 'viem';
|
|
15
15
|
|
|
16
16
|
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
|
17
17
|
import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils/index.js';
|
package/src/contracts/gse.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { GSEAbi } from '@aztec/l1-artifacts/GSEAbi';
|
|
|
3
3
|
|
|
4
4
|
import type { ProjPointType } from '@noble/curves/abstract/weierstrass';
|
|
5
5
|
import { bn254 } from '@noble/curves/bn254';
|
|
6
|
-
import { type GetContractReturnType, type Hex, getContract } from '
|
|
6
|
+
import { type GetContractReturnType, type Hex, getContract } from 'viem';
|
|
7
7
|
|
|
8
8
|
import type { ViemClient } from '../types.js';
|
|
9
9
|
|
package/src/contracts/inbox.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Buffer16 } from '@aztec/foundation/buffer';
|
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
import { InboxAbi } from '@aztec/l1-artifacts/InboxAbi';
|
|
4
4
|
|
|
5
|
-
import { type BlockTag, type GetContractReturnType, type Hex, getContract } from '
|
|
5
|
+
import { type BlockTag, type GetContractReturnType, type Hex, getContract } from 'viem';
|
|
6
6
|
|
|
7
7
|
import { getPublicClient } from '../client.js';
|
|
8
8
|
import type { DeployL1ContractsReturnType } from '../deploy_l1_contracts.js';
|
|
@@ -2,7 +2,7 @@ import { toHex as toPaddedHex } from '@aztec/foundation/bigint-buffer';
|
|
|
2
2
|
import { TimeoutError } from '@aztec/foundation/error';
|
|
3
3
|
import type { Logger } from '@aztec/foundation/log';
|
|
4
4
|
|
|
5
|
-
import { type EncodeFunctionDataParameters, type Hex, encodeFunctionData, multicall3Abi } from '
|
|
5
|
+
import { type EncodeFunctionDataParameters, type Hex, encodeFunctionData, multicall3Abi } from 'viem';
|
|
6
6
|
|
|
7
7
|
import type { L1BlobInputs, L1TxConfig, L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
|
|
8
8
|
import type { ExtendedViemWalletClient } from '../types.js';
|
|
@@ -3,7 +3,7 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
3
3
|
import { RegistryAbi } from '@aztec/l1-artifacts/RegistryAbi';
|
|
4
4
|
import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
5
5
|
|
|
6
|
-
import { type GetContractReturnType, type Hex, getContract } from '
|
|
6
|
+
import { type GetContractReturnType, type Hex, getContract } from 'viem';
|
|
7
7
|
|
|
8
8
|
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
|
9
9
|
import type { ViemClient } from '../types.js';
|
package/src/contracts/rollup.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { ViemSignature } from '@aztec/foundation/eth-signature';
|
|
|
4
4
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
5
5
|
import { RollupStorage } from '@aztec/l1-artifacts/RollupStorage';
|
|
6
6
|
|
|
7
|
+
import chunk from 'lodash.chunk';
|
|
7
8
|
import {
|
|
8
9
|
type Account,
|
|
9
10
|
type GetContractReturnType,
|
|
@@ -14,8 +15,7 @@ import {
|
|
|
14
15
|
getContract,
|
|
15
16
|
hexToBigInt,
|
|
16
17
|
keccak256,
|
|
17
|
-
} from '
|
|
18
|
-
import chunk from 'lodash.chunk';
|
|
18
|
+
} from 'viem';
|
|
19
19
|
|
|
20
20
|
import { getPublicClient } from '../client.js';
|
|
21
21
|
import type { DeployL1ContractsReturnType } from '../deploy_l1_contracts.js';
|
|
@@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { SlasherAbi } from '@aztec/l1-artifacts/SlasherAbi';
|
|
4
4
|
|
|
5
|
-
import { type GetContractReturnType, getContract } from '
|
|
5
|
+
import { type GetContractReturnType, getContract } from 'viem';
|
|
6
6
|
|
|
7
7
|
import type { ViemClient } from '../types.js';
|
|
8
8
|
|
|
@@ -8,6 +8,9 @@ import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
|
8
8
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
9
9
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
10
10
|
|
|
11
|
+
import type { Abi, Narrow } from 'abitype';
|
|
12
|
+
import { mkdir, writeFile } from 'fs/promises';
|
|
13
|
+
import chunk from 'lodash.chunk';
|
|
11
14
|
import {
|
|
12
15
|
type Chain,
|
|
13
16
|
type ContractConstructorArgs,
|
|
@@ -23,11 +26,8 @@ import {
|
|
|
23
26
|
getContractAddress,
|
|
24
27
|
numberToHex,
|
|
25
28
|
padHex,
|
|
26
|
-
} from '
|
|
27
|
-
import { foundry } from '
|
|
28
|
-
import type { Abi, Narrow } from 'abitype';
|
|
29
|
-
import { mkdir, writeFile } from 'fs/promises';
|
|
30
|
-
import chunk from 'lodash.chunk';
|
|
29
|
+
} from 'viem';
|
|
30
|
+
import { foundry } from 'viem/chains';
|
|
31
31
|
|
|
32
32
|
import { isAnvilTestChain } from './chain.js';
|
|
33
33
|
import { createExtendedL1Client } from './client.js';
|
|
@@ -5,7 +5,7 @@ import type { Buffer32 } from '@aztec/foundation/buffer';
|
|
|
5
5
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
6
|
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
7
7
|
|
|
8
|
-
import type { TransactionSerializable, TypedDataDefinition } from '
|
|
8
|
+
import type { TransactionSerializable, TypedDataDefinition } from 'viem';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Abstraction for signing operations used by the node keystore.
|
package/src/l1_artifacts.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
2
2
|
import type { Logger } from '@aztec/foundation/log';
|
|
3
3
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
4
|
|
|
5
|
-
import type { TransactionSerializable } from '
|
|
5
|
+
import type { TransactionSerializable } from 'viem';
|
|
6
6
|
|
|
7
7
|
import type { EthSigner } from '../eth-signer/eth-signer.js';
|
|
8
8
|
import type { ExtendedViemWalletClient, ViemClient } from '../types.js';
|
|
@@ -8,6 +8,7 @@ import { sleep } from '@aztec/foundation/sleep';
|
|
|
8
8
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
9
9
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
10
10
|
|
|
11
|
+
import pickBy from 'lodash.pickby';
|
|
11
12
|
import {
|
|
12
13
|
type Abi,
|
|
13
14
|
type BlockOverrides,
|
|
@@ -20,9 +21,8 @@ import {
|
|
|
20
21
|
createNonceManager,
|
|
21
22
|
formatGwei,
|
|
22
23
|
serializeTransaction,
|
|
23
|
-
} from '
|
|
24
|
-
import { jsonRpc } from '
|
|
25
|
-
import pickBy from 'lodash.pickby';
|
|
24
|
+
} from 'viem';
|
|
25
|
+
import { jsonRpc } from 'viem/nonce';
|
|
26
26
|
|
|
27
27
|
import type { ViemClient } from '../types.js';
|
|
28
28
|
import { formatViemError } from '../utils.js';
|
|
@@ -3,7 +3,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
3
3
|
import type { Logger } from '@aztec/foundation/log';
|
|
4
4
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
5
5
|
|
|
6
|
-
import type { TransactionSerializable } from '
|
|
6
|
+
import type { TransactionSerializable } from 'viem';
|
|
7
7
|
|
|
8
8
|
import type { EthSigner } from '../eth-signer/eth-signer.js';
|
|
9
9
|
import type { ExtendedViemWalletClient, ViemClient } from '../types.js';
|
|
@@ -4,6 +4,7 @@ import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
|
4
4
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
5
5
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
6
6
|
|
|
7
|
+
import pickBy from 'lodash.pickby';
|
|
7
8
|
import {
|
|
8
9
|
type Abi,
|
|
9
10
|
type Account,
|
|
@@ -18,8 +19,7 @@ import {
|
|
|
18
19
|
formatGwei,
|
|
19
20
|
getContractError,
|
|
20
21
|
hexToBytes,
|
|
21
|
-
} from '
|
|
22
|
-
import pickBy from 'lodash.pickby';
|
|
22
|
+
} from 'viem';
|
|
23
23
|
|
|
24
24
|
import type { ViemClient } from '../types.js';
|
|
25
25
|
import { type L1TxUtilsConfig, defaultL1TxUtilsConfig, l1TxUtilsConfigMappings } from './config.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import type { ViemTransactionSignature } from '@aztec/foundation/eth-signature';
|
|
3
3
|
|
|
4
|
-
import { type TransactionSerializable, type WalletClient, parseTransaction } from '
|
|
4
|
+
import { type TransactionSerializable, type WalletClient, parseTransaction } from 'viem';
|
|
5
5
|
|
|
6
6
|
import type { SigningCallback } from './types.js';
|
|
7
7
|
|
package/src/l1_tx_utils/types.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { BlobKzgInstance } from '@aztec/blob-lib/types';
|
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
import type { ViemTransactionSignature } from '@aztec/foundation/eth-signature';
|
|
4
4
|
|
|
5
|
-
import type { Abi, Address, Hex, TransactionReceipt, TransactionSerializable } from '
|
|
5
|
+
import type { Abi, Address, Hex, TransactionReceipt, TransactionSerializable } from 'viem';
|
|
6
6
|
|
|
7
7
|
import type { L1TxUtilsConfig } from './config.js';
|
|
8
8
|
|
package/src/l1_tx_utils/utils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compactArray } from '@aztec/foundation/collection';
|
|
2
2
|
|
|
3
|
-
import type { ContractFunctionExecutionError } from '
|
|
3
|
+
import type { ContractFunctionExecutionError } from 'viem';
|
|
4
4
|
|
|
5
5
|
export function tryGetCustomErrorNameContractFunction(err: ContractFunctionExecutionError) {
|
|
6
6
|
return compactArray([err.shortMessage, ...(err.metaMessages ?? []).slice(0, 2).map(s => s.trim())]).join(' ');
|
|
@@ -6,7 +6,7 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
6
6
|
import { pluralize } from '@aztec/foundation/string';
|
|
7
7
|
import type { TestDateProvider } from '@aztec/foundation/timer';
|
|
8
8
|
|
|
9
|
-
import { type Hex, type Transaction, createPublicClient, fallback, hexToNumber, http } from '
|
|
9
|
+
import { type Hex, type Transaction, createPublicClient, fallback, hexToNumber, http } from 'viem';
|
|
10
10
|
|
|
11
11
|
import type { ViemPublicClient } from '../types.js';
|
|
12
12
|
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
getContract,
|
|
14
14
|
hexToBigInt,
|
|
15
15
|
http,
|
|
16
|
-
} from '
|
|
17
|
-
import { foundry } from '
|
|
16
|
+
} from 'viem';
|
|
17
|
+
import { foundry } from 'viem/chains';
|
|
18
18
|
|
|
19
19
|
import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
20
20
|
|
package/src/test/tx_delayer.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
|
3
3
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
4
4
|
import type { DateProvider } from '@aztec/foundation/timer';
|
|
5
5
|
|
|
6
|
+
import { inspect } from 'util';
|
|
6
7
|
import {
|
|
7
8
|
type Client,
|
|
8
9
|
type Hex,
|
|
@@ -13,8 +14,7 @@ import {
|
|
|
13
14
|
publicActions,
|
|
14
15
|
serializeTransaction,
|
|
15
16
|
walletActions,
|
|
16
|
-
} from '
|
|
17
|
-
import { inspect } from 'util';
|
|
17
|
+
} from 'viem';
|
|
18
18
|
|
|
19
19
|
import { type ViemClient, isExtendedClient } from '../types.js';
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@ import type { Logger } from '@aztec/foundation/log';
|
|
|
2
2
|
import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
3
3
|
import { TestERC20Abi as StakingAssetAbi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
4
4
|
|
|
5
|
-
import { type GetContractReturnType, type PrivateKeyAccount, getContract } from '
|
|
5
|
+
import { type GetContractReturnType, type PrivateKeyAccount, getContract } from 'viem';
|
|
6
6
|
|
|
7
7
|
import { extractProposalIdFromLogs } from '../contracts/governance.js';
|
|
8
8
|
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
package/src/types.ts
CHANGED