From f9fa7b07ef397ef412f78466aa49fe871a7514ad Mon Sep 17 00:00:00 2001 From: Ngozi-Txfusion Date: Wed, 3 Jul 2024 13:31:55 +0100 Subject: [PATCH] chore: update utils --- .../05.api/10.v5/00.providers/01.provider.md | 78 +++++++++---------- .../05.api/20.v6/00.providers/01.provider.md | 74 +++++++++--------- 2 files changed, 76 insertions(+), 76 deletions(-) diff --git a/content/sdk/10.js/00.ethers/05.api/10.v5/00.providers/01.provider.md b/content/sdk/10.js/00.ethers/05.api/10.v5/00.providers/01.provider.md index 0eada315..50921867 100644 --- a/content/sdk/10.js/00.ethers/05.api/10.v5/00.providers/01.provider.md +++ b/content/sdk/10.js/00.ethers/05.api/10.v5/00.providers/01.provider.md @@ -44,7 +44,7 @@ async estimateFee(transaction: TransactionRequest): Promise ``` ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const fee = await provider.estimateFee({ @@ -129,7 +129,7 @@ async estimateGasL1(transaction: TransactionRequest): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const gasL1 = await provider.estimateGasL1({ @@ -264,7 +264,7 @@ async estimateL1ToL2Execute(transaction: { #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const gasL1ToL2 = await provider.estimateL1ToL2Execute({ @@ -296,7 +296,7 @@ async getAllAccountBalances(address: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const balances = await provider.getAllAccountBalances("0x36615Cf349d7F6344891B1e7CA7C72883F5dc049"); @@ -324,7 +324,7 @@ async getBalance(address: Address, blockTag?: BlockTag, tokenAddress?: Address) #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const account = "0x36615Cf349d7F6344891B1e7CA7C72883F5dc049"; @@ -346,7 +346,7 @@ async getBaseTokenContractAddress(): Promise
#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Base token: ${await provider.getBaseTokenContractAddress()}`); @@ -363,7 +363,7 @@ async getBlock(blockHashOrBlockTag: BlockTag | string | Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Block details: ${toJSON(await provider.getBlockDetails(90_000))}`); @@ -407,7 +407,7 @@ async getBridgehubContractAddress(): Promise
#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Bridgehub: ${await provider.getBridgehubContractAddress()}`); @@ -432,7 +432,7 @@ async getBytecodeByHash(bytecodeHash: BytesLike): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; // Bytecode hash can be computed by following these steps: // const testnetPaymasterBytecode = await provider.getCode(await provider.getTestnetPaymasterAddress()); @@ -489,7 +489,7 @@ async getContractAccountInfo(address:Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const tokenAddress = "0x927488F48ffbc32112F1fF721759649A89721F8F"; // Crown token which can be minted for free @@ -514,7 +514,7 @@ getDefaultBridgeAddresses(): Promise<{ #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Default bridges: ${toJSON(await provider.getDefaultBridgeAddresses())}`); @@ -538,7 +538,7 @@ async connectL2Bridge(address: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const l2Bridge = await provider.connectL2Bridge(""); @@ -561,7 +561,7 @@ async isL2BridgeLegacy(address: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const isBridgeLegacy = await provider.isL2BridgeLegacy(""); @@ -585,7 +585,7 @@ static getDefaultProvider(zksyncNetwork: ZkSyncNetwork = ZkSyncNetwork.Localhost #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const providerMainnet = Provider.getDefaultProvider(types.Network.Mainnet); const providerTestnet = Provider.getDefaultProvider(types.Network.Sepolia); @@ -652,7 +652,7 @@ static override getFormatter(): Formatter #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const formatter = Provider.getFormatter(); ``` @@ -668,7 +668,7 @@ async getGasPrice(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Gas price: ${await provider.getGasPrice()}`); @@ -694,7 +694,7 @@ async getL1BatchBlockRange(l1BatchNumber: number): Promise<[number, number] | nu #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const l1BatchNumber = await provider.getL1BatchNumber(); @@ -720,7 +720,7 @@ async getL1BatchDetails(number: number): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const l1BatchNumber = await provider.getL1BatchNumber(); @@ -740,7 +740,7 @@ async getL1BatchNumber(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`L1 batch number: ${await provider.getL1BatchNumber()}`); @@ -763,7 +763,7 @@ async getL2TransactionFromPriorityOp(l1TxResponse: ethers.TransactionResponse): #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const ethProvider = ethers.getDefaultProvider("sepolia"); @@ -794,7 +794,7 @@ async getLogProof(txHash: BytesLike, index ? : number): Promise L1 transaction can be used. @@ -821,7 +821,7 @@ getLogs(filter: Filter | FilterByBlockHash | Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Logs: ${toJSON(await provider.getLogs({ fromBlock: 0, toBlock: 5, address: utils.L2_ETH_TOKEN_ADDRESS }))}`); @@ -840,7 +840,7 @@ async getMainContractAddress(): Promise
#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Main contract: ${await provider.getMainContractAddress()}`); @@ -896,7 +896,7 @@ async getPriorityOpResponse(l1TxResponse: ethers.TransactionResponse): Promise

#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Protocol version: ${await provider.getProtocolVersion()}`); @@ -1000,7 +1000,7 @@ async getRawBlockTransactions(number: number): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Raw block transactions: ${toJSON(await provider.getRawBlockTransactions(90_000))}`); @@ -1018,7 +1018,7 @@ async getTestnetPaymasterAddress(): Promise

#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Testnet paymaster: ${await provider.getTestnetPaymasterAddress()}`); @@ -1042,7 +1042,7 @@ async getTransaction(hash: string | Promise): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); @@ -1102,7 +1102,7 @@ async getTransactionReceipt(transactionHash: string | Promise): Promise< #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const TX_HASH = ""; @@ -1126,7 +1126,7 @@ async getTransactionStatus(txHash: string): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); @@ -1289,7 +1289,7 @@ async isBaseToken(token: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Is base token: ${await provider.isBaseToken("0x5C221E77624690fff6dd741493D735a17716c26B")}`); @@ -1306,7 +1306,7 @@ async isEthBasedChain(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Is ETH based chain: ${await provider.isEthBasedChain()}`); @@ -1325,7 +1325,7 @@ async l1ChainId(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`L1 chain ID: ${await provider.l1ChainId()}`); @@ -1353,7 +1353,7 @@ async l1TokenAddress(token: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`L1 token address: ${await provider.l1TokenAddress("0x3e7676937A7E96CFB7616f255b9AD9FF47363D4b")}`); @@ -1382,7 +1382,7 @@ async l2TokenAddress(token: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`L2 token address: ${await provider.l2TokenAddress("0x5C221E77624690fff6dd741493D735a17716c26B")}`); @@ -1400,7 +1400,7 @@ async newBlockFilter(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`New block filter: ${await provider.newBlockFilter()}`); @@ -1450,7 +1450,7 @@ async newPendingTransactionsFilter(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`New pending transaction filter: ${await provider.newPendingTransactionsFilter()}`); diff --git a/content/sdk/10.js/00.ethers/05.api/20.v6/00.providers/01.provider.md b/content/sdk/10.js/00.ethers/05.api/20.v6/00.providers/01.provider.md index 38b0bfb6..f093419c 100644 --- a/content/sdk/10.js/00.ethers/05.api/20.v6/00.providers/01.provider.md +++ b/content/sdk/10.js/00.ethers/05.api/20.v6/00.providers/01.provider.md @@ -91,7 +91,7 @@ async estimateFee(transaction: TransactionRequest): Promise **Example:** ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const fee = await provider.estimateFee({ @@ -154,7 +154,7 @@ async estimateGasL1(transaction: TransactionRequest): Promise **Example:** ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const gasL1 = await provider.estimateGasL1({ @@ -289,7 +289,7 @@ async estimateL1ToL2Execute(transaction: { #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const gasL1ToL2 = await provider.estimateL1ToL2Execute({ @@ -321,7 +321,7 @@ async getAllAccountBalances(address: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const balances = await provider.getAllAccountBalances("0x36615Cf349d7F6344891B1e7CA7C72883F5dc049"); @@ -349,7 +349,7 @@ async getBalance(address: Address, blockTag?: BlockTag, tokenAddress?: Address) #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const account = "0x36615Cf349d7F6344891B1e7CA7C72883F5dc049"; @@ -371,7 +371,7 @@ async getBaseTokenContractAddress(): Promise
#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Base token: ${await provider.getBaseTokenContractAddress()}`); @@ -395,7 +395,7 @@ async getBlock(blockHashOrBlockTag: BlockTag, includeTxs?: boolean): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Block details: ${toJSON(await provider.getBlockDetails(90_000))}`); @@ -439,7 +439,7 @@ async getBridgehubContractAddress(): Promise
#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Bridgehub: ${await provider.getBridgehubContractAddress()}`); @@ -464,7 +464,7 @@ async getBytecodeByHash(bytecodeHash: BytesLike): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; // Bytecode hash can be computed by following these steps: // const testnetPaymasterBytecode = await provider.getCode(await provider.getTestnetPaymasterAddress()); @@ -521,7 +521,7 @@ async getContractAccountInfo(address:Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const tokenAddress = "0x927488F48ffbc32112F1fF721759649A89721F8F"; // Crown token which can be minted for free @@ -546,7 +546,7 @@ getDefaultBridgeAddresses(): Promise<{ #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Default bridges: ${toJSON(await provider.getDefaultBridgeAddresses())}`); @@ -570,7 +570,7 @@ async connectL2Bridge(address: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const l2Bridge = await provider.connectL2Bridge(""); @@ -593,7 +593,7 @@ async isL2BridgeLegacy(address: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const isBridgeLegacy = await provider.isL2BridgeLegacy(""); @@ -617,7 +617,7 @@ static getDefaultProvider(zksyncNetwork: ZkSyncNetwork = ZkSyncNetwork.Localhost #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const providerMainnet = Provider.getDefaultProvider(types.Network.Mainnet); const providerTestnet = Provider.getDefaultProvider(types.Network.Sepolia); @@ -683,7 +683,7 @@ async getGasPrice(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Gas price: ${await provider.getGasPrice()}`); @@ -709,7 +709,7 @@ async getL1BatchBlockRange(l1BatchNumber: number): Promise<[number, number] | nu #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const l1BatchNumber = await provider.getL1BatchNumber(); @@ -735,7 +735,7 @@ async getL1BatchDetails(number: number): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const l1BatchNumber = await provider.getL1BatchNumber(); @@ -755,7 +755,7 @@ async getL1BatchNumber(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`L1 batch number: ${await provider.getL1BatchNumber()}`); @@ -778,7 +778,7 @@ async getL2TransactionFromPriorityOp(l1TxResponse: ethers.TransactionResponse): #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const ethProvider = ethers.getDefaultProvider("sepolia"); @@ -809,7 +809,7 @@ async getLogProof(txHash: BytesLike, index ? : number): Promise L1 transaction can be used. @@ -854,7 +854,7 @@ async getMainContractAddress(): Promise
#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Main contract: ${await provider.getMainContractAddress()}`); @@ -910,7 +910,7 @@ async getPriorityOpResponse(l1TxResponse: ethers.TransactionResponse): Promise

#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Protocol version: ${await provider.getProtocolVersion()}`); @@ -1014,7 +1014,7 @@ async getRawBlockTransactions(number: number): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Raw block transactions: ${toJSON(await provider.getRawBlockTransactions(90_000))}`); @@ -1032,7 +1032,7 @@ async getTestnetPaymasterAddress(): Promise

#### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Testnet paymaster: ${await provider.getTestnetPaymasterAddress()}`); @@ -1056,7 +1056,7 @@ async getTransaction(txHash: string): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); @@ -1089,7 +1089,7 @@ async getTransactionDetails(txHash: BytesLike): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); @@ -1116,7 +1116,7 @@ async getTransactionReceipt(txHash: string): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); const TX_HASH = ""; @@ -1140,7 +1140,7 @@ async getTransactionStatus(txHash: string): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); @@ -1303,7 +1303,7 @@ async isBaseToken(token: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Is base token: ${await provider.isBaseToken("0x5C221E77624690fff6dd741493D735a17716c26B")}`); @@ -1320,7 +1320,7 @@ async isEthBasedChain(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`Is ETH based chain: ${await provider.isEthBasedChain()}`); @@ -1339,7 +1339,7 @@ async l1ChainId(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`L1 chain ID: ${await provider.l1ChainId()}`); @@ -1366,7 +1366,7 @@ async l1TokenAddress(token: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`L1 token address: ${await provider.l1TokenAddress("0x3e7676937A7E96CFB7616f255b9AD9FF47363D4b")}`); @@ -1394,7 +1394,7 @@ async l2TokenAddress(token: Address): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`L2 token address: ${await provider.l2TokenAddress("0x5C221E77624690fff6dd741493D735a17716c26B")}`); @@ -1411,7 +1411,7 @@ async newBlockFilter(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`New block filter: ${await provider.newBlockFilter()}`); @@ -1461,7 +1461,7 @@ async newPendingTransactionsFilter(): Promise #### Example ```ts -import { Provider, types } from "zksync-ethers"; +import { Provider, types, utils } from "zksync-ethers"; const provider = Provider.getDefaultProvider(types.Network.Sepolia); console.log(`New pending transaction filter: ${await provider.newPendingTransactionsFilter()}`);