# Viem Build reliable Ethereum apps & libraries with lightweight, composable, & type-safe modules from viem. - [Viem · TypeScript Interface for Ethereum](/index) - [Getting Started with Account Abstraction](/account-abstraction): Getting Started with Account Abstraction in Viem - [USDC (Circle)](/circle-usdc) - [Getting Started](/experimental): Getting started with experimental features in Viem - [Getting Started with OP Stack](/op-stack): Getting started with the OP Stack in Viem - [Getting Started](/tempo/) - [Getting Started with ZKsync](/zksync): Getting started with the ZKsync in Viem - [Platform Compatibility](/docs/compatibility): Platforms compatible with Viem - [EIP-7702 Overview](/docs/eip7702): An Overview of EIP-7702 - [Error Handling](/docs/error-handling) - [Ethers v5 → viem Migration Guide](/docs/ethers-migration): Migrate from Ethers v5 to viem - [Frequently Asked Questions](/docs/faq) - [Getting Started](/docs/getting-started): Get started with viem in just a few lines of code. - [Installation](/docs/installation) - [Why Viem](/docs/introduction): A brief preamble on why we built Viem - [Migration Guide](/docs/migration-guide) - [TypeScript](/docs/typescript): TypeScript support for Viem - [Client](/experimental/client): Setting up your Viem Client - [Chains](/op-stack/chains) - [Client](/op-stack/client): Setting up your Viem Client with the OP Stack - [Accounts](/tempo/accounts/) - [Overview](/tempo/actions/) - [Chains](/tempo/chains) - [Tempo Transactions](/tempo/transactions) - [Chains](/zksync/chains) - [Client](/zksync/client): Setting up your ZKsync Viem Client - [Smart Accounts](/account-abstraction/accounts/smart) - [WebAuthn Account](/account-abstraction/accounts/webauthn) - [Bundler Client](/account-abstraction/clients/bundler): A function to create a Bundler Client. - [Paymaster Client](/account-abstraction/clients/paymaster): A function to create a Paymaster Client. - [Sending User Operations](/account-abstraction/guides/sending-user-operations) - [Cross Chain USDC Transfers with Bridge Kit](/circle-usdc/guides/bridge-kit) - [Cross-Chain USDC Transfers](/circle-usdc/guides/cross-chain) - [Integrating USDC into Your Application](/circle-usdc/guides/integrating) - [Cross Chain USDC Transfers (CCTP Integration)](/circle-usdc/guides/manual-cctp) - [Gasless USDC Transfers with Circle Paymaster](/circle-usdc/guides/paymaster) - [Circle Smart Account](/circle-usdc/guides/smart-account) - [decodeAbiParameters](/docs/abi/decodeAbiParameters): Decodes ABI encoded data. - [encodeAbiParameters](/docs/abi/encodeAbiParameters): Generates ABI encoded data. - [encodePacked](/docs/abi/encodePacked): Generates ABI encoded data. - [getAbiItem](/docs/abi/getAbiItem): Retrieves an item from the ABI array. - [parseAbi](/docs/abi/parseAbi): Parses human-readable ABI into JSON. - [parseAbiItem](/docs/abi/parseAbiItem): Parses human-readable ABI item (e.g. error, event, function) into ABI item. - [parseAbiParameter](/docs/abi/parseAbiParameter): Parses human-readable ABI parameter into ABI parameter. - [parseAbiParameters](/docs/abi/parseAbiParameters): Parses human-readable ABI parameters into ABI parameters. - [JSON-RPC Account](/docs/accounts/jsonRpc): A function to create a JSON-RPC Account. - [Local Accounts (Private Key, Mnemonic, etc)](/docs/accounts/local) - [Celo](/docs/chains/celo): Integrating with Celo in Viem - [Fees](/docs/chains/fees): Configure chain-based fee data in Viem - [Formatters](/docs/chains/formatters): Configure chain-based formatters in Viem - [Chains](/docs/chains/introduction) - [Serializers](/docs/chains/serializers): Configure chain-based serializers in Viem - [ZKsync](/docs/chains/zksync): Integrating with ZKsync in Viem - [Build your own Client](/docs/clients/custom) - [Introduction to Clients & Transports](/docs/clients/intro): A brief introduction to Clients & Transports. - [Public Client](/docs/clients/public): A function to create a Public Client - [Test Client](/docs/clients/test): A function to create a Test Client - [Wallet Client](/docs/clients/wallet): A function to create a Wallet Client. - [createContractEventFilter](/docs/contract/createContractEventFilter): Creates a Filter to retrieve contract event logs. - [decodeDeployData](/docs/contract/decodeDeployData): Decodes ABI encoded deploy data (bytecode & arguments). - [decodeErrorResult](/docs/contract/decodeErrorResult): Decodes reverted error from a contract function call. - [decodeEventLog](/docs/contract/decodeEventLog): Decodes ABI encoded event topics & data. - [decodeFunctionData](/docs/contract/decodeFunctionData): Decodes ABI encoded data (4 byte selector & arguments) into a function name and arguments. - [decodeFunctionResult](/docs/contract/decodeFunctionResult): Decodes the result of a function call on a contract. - [deployContract](/docs/contract/deployContract): Deploys a contract to the network, given bytecode & constructor arguments. - [encodeDeployData](/docs/contract/encodeDeployData): Encodes deploy data (bytecode & constructor args) into an ABI encoded value. - [encodeErrorResult](/docs/contract/encodeErrorResult): Encodes a reverted error from a function call. - [encodeEventTopics](/docs/contract/encodeEventTopics): Encodes an event (with optional arguments) into filter topics. - [encodeFunctionData](/docs/contract/encodeFunctionData): Encodes the function name and parameters into an ABI encoded value (4 byte selector & arguments). - [encodeFunctionResult](/docs/contract/encodeFunctionResult): Encodes structured return data into ABI encoded data. - [estimateContractGas](/docs/contract/estimateContractGas): Estimates the gas required to successfully execute a contract write function call. - [getCode](/docs/contract/getCode): Retrieves the bytecode at an address. - [Contract Instances](/docs/contract/getContract): A Contract Instance is a type-safe interface for performing contract-related actions with a specific ABI and address, created by the getContract function. - [getContractEvents](/docs/contract/getContractEvents): Returns a list of event logs matching the provided parameters. - [getStorageAt](/docs/contract/getStorageAt): Returns the value from a storage slot at a given address. - [multicall](/docs/contract/multicall): Batches up multiple functions on a contract in a single call. - [parseEventLogs](/docs/contract/parseEventLogs): Extracts & decodes logs from a set of opaque logs. - [readContract](/docs/contract/readContract): Calls a read-only function on a contract, and returns the response. - [simulateContract](/docs/contract/simulateContract): Simulates & validates a contract interaction. - [watchContractEvent](/docs/contract/watchContractEvent): Watches and returns emitted contract event logs. - [writeContract](/docs/contract/writeContract): Executes a write function on a contract. - [writeContractSync](/docs/contract/writeContractSync): Executes a write function on a contract synchronously. - [Contract Writes with EIP-7702](/docs/eip7702/contract-writes) - [getDelegation](/docs/eip7702/getDelegation): Returns the address an account has delegated to via EIP-7702. - [hashAuthorization](/docs/eip7702/hashAuthorization): Calculates an Authorization object hash in EIP-7702 format. - [prepareAuthorization](/docs/eip7702/prepareAuthorization): Prepares an EIP-7702 Authorization for signing. - [recoverAuthorizationAddress](/docs/eip7702/recoverAuthorizationAddress): Recovers the original signing address from a signed Authorization object. - [Sending Transactions with EIP-7702](/docs/eip7702/sending-transactions) - [signAuthorization](/docs/eip7702/signAuthorization): Signs an EIP-7702 Authorization object. - [verifyAuthorization](/docs/eip7702/verifyAuthorization): Verifies that an Authorization object was signed by the provided address. - [Errors](/docs/glossary/errors): Glossary of Errors in viem. - [Terms](/docs/glossary/terms): Glossary of Terms in viem. - [Types](/docs/glossary/types): Glossary of Types in viem. - [Blob Transactions](/docs/guides/blob-transactions): Sending your first Blob Transaction with Viem. - [blobsToCommitments](/docs/utilities/blobsToCommitments): Compute commitments from a list of blobs. - [blobsToProofs](/docs/utilities/blobsToProofs): Compute the proofs for a list of blobs and their commitments. - [commitmentsToVersionedHashes](/docs/utilities/commitmentsToVersionedHashes): Transform a list of commitments to their versioned hashes. - [commitmentToVersionedHash](/docs/utilities/commitmentToVersionedHash): Transform a commitment to it's versioned hash. - [compactSignatureToSignature](/docs/utilities/compactSignatureToSignature): Parses a compact signature into signature format. - [concat](/docs/utilities/concat): Concatenates a set of hex values or byte arrays. - [defineKzg](/docs/utilities/defineKzg): Defines a KZG interface. - [extractChain](/docs/utilities/extractChain) - [formatEther](/docs/utilities/formatEther): Converts numerical wei to a string representation of ether. - [formatGwei](/docs/utilities/formatGwei): Converts numerical wei to a string representation of gwei. - [formatUnits](/docs/utilities/formatUnits): Divides a number by a given exponent of base 10, and formats it into a string representation of the number. - [fromBase58](/docs/utilities/fromBase58) - [fromBase64](/docs/utilities/fromBase64) - [fromBlobs](/docs/utilities/fromBlobs): Transforms blobs into the originating data. - [fromBytes](/docs/utilities/fromBytes): Decodes a byte array to a string, hex value, boolean or number. - [fromHex](/docs/utilities/fromHex): Decodes a hex value to a string, number or byte array. - [fromRlp](/docs/utilities/fromRlp): Decodes a RLP value into a decoded hex value or byte array. - [getAddress](/docs/utilities/getAddress): Converts an address into an address that is checksum encoded. - [getContractAddress](/docs/utilities/getContractAddress): Retrieves a contract address. - [hashMessage](/docs/utilities/hashMessage): Hashes a message in EIP-191 format. - [hashTypedData](/docs/utilities/hashTypedData): Hashes EIP-712 typed data. - [isAddress](/docs/utilities/isAddress): Checks if the address is valid. - [isAddressEqual](/docs/utilities/isAddressEqual): Checks if the given addresses (checksummed) are equal. - [isBytes](/docs/utilities/isBytes): Checks whether the value is a byte array or not. - [isErc6492Signature](/docs/utilities/isErc6492Signature): Checks whether the signature is in ERC-6492 format. - [isHash](/docs/utilities/isHash): Checks if a string is a valid 32-byte hex hash. - [isHex](/docs/utilities/isHex): Checks whether the value is a hex value or not. - [keccak256](/docs/utilities/keccak256): Calculates the Keccak256 hash of a byte array. - [pad](/docs/utilities/pad): Pads a hex value or byte array with leading or trailing zeros. - [parseCompactSignature](/docs/utilities/parseCompactSignature): Parses a hex formatted compact signature into a structured compact signature. - [parseErc6492Signature](/docs/utilities/parseErc6492Signature): Parses a hex-formatted ERC-6492 flavoured signature. - [parseEther](/docs/utilities/parseEther): Converts a string representation of ether to numerical wei. - [parseGwei](/docs/utilities/parseGwei): Converts a string representation of gwei to numerical wei. - [parseSignature](/docs/utilities/parseSignature): Parses a hex formatted signature into a structured signature. - [parseTransaction](/docs/utilities/parseTransaction): Converts a serialized transaction to a structured transaction. - [parseUnits](/docs/utilities/parseUnits): Multiplies a string representation of a number by a given exponent of base 10. - [recoverAddress](/docs/utilities/recoverAddress): Recovers the signing address from a hash & signature. - [recoverMessageAddress](/docs/utilities/recoverMessageAddress): Recovers the signing address from a message & signature. - [recoverPublicKey](/docs/utilities/recoverPublicKey): Recovers the signing public key from a hash & signature. - [recoverTransactionAddress](/docs/utilities/recoverTransactionAddress): Recovers the signing address from a transaction & signature. - [recoverTypedDataAddress](/docs/utilities/recoverTypedDataAddress): Recovers the signing address from EIP-712 typed data & signature. - [ripemd160](/docs/utilities/ripemd160): Calculates the Ripemd160 hash of a byte array. - [serializeCompactSignature](/docs/utilities/serializeCompactSignature): Serializes a compact signature into hex format. - [serializeErc6492Signature](/docs/utilities/serializeErc6492Signature): Serializes a ERC-6492 flavoured signature into hex format. - [serializeSignature](/docs/utilities/serializeSignature): Serializes a structured signature into hex format. - [serializeTransaction](/docs/utilities/serializeTransaction): Serializes a transaction object. - [setupKzg](/docs/utilities/setupKzg): Sets up and returns a KZG interface. - [sha256](/docs/utilities/sha256): Calculates the Sha256 hash of a byte array. - [sidecarsToVersionedHashes](/docs/utilities/sidecarsToVersionedHashes): Transforms a list of sidecars to their versioned hashes. - [signatureToCompactSignature](/docs/utilities/signatureToCompactSignature): Parses a signature into a compact signature. - [size](/docs/utilities/size): Retrieves the size of the value (in bytes). - [slice](/docs/utilities/slice): Returns a section of the hex or byte array given a start/end bytes offset. - [toBase58](/docs/utilities/toBase58) - [toBase64](/docs/utilities/toBase64) - [toBlobs](/docs/utilities/toBlobs): Transforms arbitrary data into blobs. - [toBlobSidecars](/docs/utilities/toBlobSidecars): Transforms arbitrary data into blob sidecars. - [toBytes](/docs/utilities/toBytes): Encodes a string, hex value, number or boolean to a byte array. - [toEventHash](/docs/utilities/toEventHash): Returns the hash (of the event signature) for a given event definition. - [toEventSelector](/docs/utilities/toEventSelector): Returns the event selector for a given event definition. - [toEventSignature](/docs/utilities/toEventSignature): Returns the signature for a given event or event definition. - [toFunctionHash](/docs/utilities/toFunctionHash): Returns the hash (of the function signature) for a given function definition. - [toFunctionSelector](/docs/utilities/toFunctionSelector): Returns the function selector (4 byte encoding) for a given function definition. - [toFunctionSignature](/docs/utilities/toFunctionSignature): Returns the signature for a given function definition. - [toHex](/docs/utilities/toHex): Encodes a string, number, boolean or byte array to a hex value. - [toRlp](/docs/utilities/toRlp): Encodes a hex value or byte array into a RLP encoded value. - [trim](/docs/utilities/trim): Trims the leading or trailing zero byte data from a hex value or byte array. - [verifyMessage](/docs/utilities/verifyMessage): Verifies if a signed message was generated by the provided address. - [verifyTypedData](/docs/utilities/verifyTypedData): Verifies a typed data signature - [Extending Client with ERC-7715](/experimental/erc7715/client): Setting up your Viem Client - [grantPermissions](/experimental/erc7715/grantPermissions): Request permissions from a wallet to perform actions on behalf of a user. - [Extending Client with ERC-7739 Actions](/experimental/erc7739/client): Setting up your Viem Client - [hashMessage](/experimental/erc7739/hashMessage): Hashes an EIP-191 message via ERC-7739 format. - [hashTypedData](/experimental/erc7739/hashTypedData): Hashes EIP-712 typed data via Solady's ERC-1271 format. - [signMessage](/experimental/erc7739/signMessage): Signs a personal sign message via Solady's ERC-1271 format. - [signTypedData](/experimental/erc7739/signTypedData): Signs typed data via Solady's ERC-1271 format. - [wrapTypedDataSignature](/experimental/erc7739/wrapTypedDataSignature) - [Extending Client with ERC-7811 Actions](/experimental/erc7811/client): Setting up your Viem Client - [getAssets](/experimental/erc7811/getAssets): Requests to get assets for an account from a Wallet. - [Extending Client with ERC-7821 Actions](/experimental/erc7821/client): Setting up your Viem Client - [execute](/experimental/erc7821/execute): Executes call(s) using the `execute` function on an ERC-7821-compatible contract. - [executeBatches](/experimental/erc7821/executeBatches): Executes batches of call(s) on an ERC-7821-compatible contract. - [supportsExecutionMode](/experimental/erc7821/supportsExecutionMode): Checks if the contract supports the ERC-7821 execution mode. - [Extending Client with ERC-7846 Actions](/experimental/erc7846/client): Setting up your Viem Client - [connect](/experimental/erc7846/connect): Requests to connect Account(s). - [disconnect](/experimental/erc7846/disconnect): Requests to disconnect account(s). - [addSubAccount](/experimental/erc7895/addSubAccount): Requests to add a Sub Account. - [Extending Client with ERC-7895 Actions](/experimental/erc7895/client): Setting up your Viem Client - [buildDepositTransaction](/op-stack/actions/buildDepositTransaction): Builds & prepares parameters for a deposit transaction to be initiated on an L1 and executed on the L2. - [buildInitiateWithdrawal](/op-stack/actions/buildInitiateWithdrawal): Builds & prepares parameters for a withdrawal to be initiated on an L2. - [buildProveWithdrawal](/op-stack/actions/buildProveWithdrawal): Builds the transaction that proves a withdrawal was initiated on an L2. - [depositTransaction](/op-stack/actions/depositTransaction): Initiates a deposit transaction on an L1, which executes a transaction on an L2. - [estimateContractL1Fee](/op-stack/actions/estimateContractL1Fee): Estimates the L1 fee to execute an L2 contract write. - [estimateContractL1Gas](/op-stack/actions/estimateContractL1Gas): Estimates the L1 gas to execute an L2 contract write. - [estimateContractTotalFee](/op-stack/actions/estimateContractTotalFee): Estimates the total (L1 + L2) fee to execute an L2 contract write. - [estimateContractTotalGas](/op-stack/actions/estimateContractTotalGas): Estimates the total (L1 + L2) gas to execute an L2 contract write. - [estimateDepositTransactionGas](/op-stack/actions/estimateDepositTransactionGas): Estimates gas to initiate a deposit transaction on an L1, which executes a transaction on an L2. - [estimateFinalizeWithdrawalGas](/op-stack/actions/estimateFinalizeWithdrawalGas): Estimates gas required to finalize a withdrawal that occurred on an L2. - [estimateInitiateWithdrawalGas](/op-stack/actions/estimateInitiateWithdrawalGas): Estimates gas required to initiate a withdrawal on an L2 to the L1. - [estimateL1Fee](/op-stack/actions/estimateL1Fee): Estimates the L1 fee to execute an L2 transaction. - [estimateL1Gas](/op-stack/actions/estimateL1Gas): Estimates the amount of L1 gas required to execute an L2 transaction - [estimateOperatorFee](/op-stack/actions/estimateOperatorFee): Estimates the operator fee to execute an L2 transaction. - [estimateProveWithdrawalGas](/op-stack/actions/estimateProveWithdrawalGas): Estimates gas required to prove a withdrawal that occurred on an L2. - [estimateTotalFee](/op-stack/actions/estimateTotalFee): Estimates the L1 + L2 + operator fee to execute an L2 transaction. - [estimateTotalGas](/op-stack/actions/estimateTotalGas): Estimates the amount of L1 + L2 gas required to execute an L2 transaction - [finalizeWithdrawal](/op-stack/actions/finalizeWithdrawal): Finalizes a withdrawal that occurred on an L2. - [getGame](/op-stack/actions/getGame): Retrieves a valid dispute game on an L2 that occurred after a provided L2 block number. - [getGames](/op-stack/actions/getGames): Retrieves dispute games for an L2. - [getL2Output](/op-stack/actions/getL2Output): Retrieves the first L2 output proposal that occurred after a provided block number. - [getTimeToFinalize](/op-stack/actions/getTimeToFinalize): Returns the time until the withdrawal transaction can be finalized. - [getTimeToNextGame](/op-stack/actions/getTimeToNextGame): Returns the time until the next L2 dispute game is submitted. - [getTimeToNextL2Output](/op-stack/actions/getTimeToNextL2Output): Builds & prepares parameters for a withdrawal to be initiated on an L2. - [getTimeToProve](/op-stack/actions/getTimeToProve): Gets time until the L2 withdrawal transaction is ready to be proved. - [getWithdrawalStatus](/op-stack/actions/getWithdrawalStatus): Returns the current status of a withdrawal. - [initiateWithdrawal](/op-stack/actions/initiateWithdrawal): Initiates a withdrawal on an L2 to the L1. - [proveWithdrawal](/op-stack/actions/proveWithdrawal): Proves a withdrawal that occurred on an L2. - [waitForNextGame](/op-stack/actions/waitForNextGame): Waits for the next dispute game to be submitted. - [waitForNextL2Output](/op-stack/actions/waitForNextL2Output): Waits for the next L2 output (after the provided block number) to be submitted. - [waitToFinalize](/op-stack/actions/waitToFinalize): Waits until the withdrawal transaction can be finalized. - [waitToProve](/op-stack/actions/waitToProve): Waits until the L2 withdrawal transaction is ready to be proved. - [Deposits](/op-stack/guides/deposits) - [Withdrawals](/op-stack/guides/withdrawals) - [extractTransactionDepositedLogs](/op-stack/utilities/extractTransactionDepositedLogs): Extracts "TransactionDeposited" logs from an opaque array of logs. - [extractWithdrawalMessageLogs](/op-stack/utilities/extractWithdrawalMessageLogs): Extracts "MessagePassed" logs from a withdrawal initialization from an opaque array of logs. - [opaqueDataToDepositData](/op-stack/utilities/fromOpaqueData): Decodes opaque deposit data found in the "TransactionDeposited" event log. - [getL2TransactionHash](/op-stack/utilities/getL2TransactionHash): Computes the L2 transaction hash from an L1 "TransactionDeposited" log. - [getL2TransactionHashes](/op-stack/utilities/getL2TransactionHashes): Computes the L2 transaction hashes from an array of L1 "TransactionDeposited" logs. - [getSourceHash](/op-stack/utilities/getSourceHash): Computes source hash of a deposit transaction. - [getWithdrawalHashStorageSlot](/op-stack/utilities/getWithdrawalHashStorageSlot): Computes the withdrawal hash storage slot to be used when proving a withdrawal. - [getWithdrawals](/op-stack/utilities/getWithdrawals): Gets the messages from a withdrawal initialization. - [opaqueDataToDepositData](/op-stack/utilities/opaqueDataToDepositData): Converts opaque data into a structured deposit data format. - [parseTransaction (OP Stack)](/op-stack/utilities/parseTransaction): Converts a serialized transaction to a structured transaction, with support for OP Stack. - [serializeTransaction (OP Stack)](/op-stack/utilities/serializeTransaction): Serializes a transaction object, with support for OP Stack. - [Account.fromP256](/tempo/accounts/account.fromP256) - [Account.fromSecp256k1](/tempo/accounts/account.fromSecp256k1) - [Account.fromWebAuthnP256](/tempo/accounts/account.fromWebAuthnP256) - [Account.fromWebCryptoP256](/tempo/accounts/account.fromWebCryptoP256) - [accessKey.authorize](/tempo/actions/accessKey.authorize) - [accessKey.getMetadata](/tempo/actions/accessKey.getMetadata) - [accessKey.getRemainingLimit](/tempo/actions/accessKey.getRemainingLimit) - [accessKey.revoke](/tempo/actions/accessKey.revoke) - [accessKey.signAuthorization](/tempo/actions/accessKey.signAuthorization) - [accessKey.updateLimit](/tempo/actions/accessKey.updateLimit) - [amm.burn](/tempo/actions/amm.burn) - [amm.getLiquidityBalance](/tempo/actions/amm.getLiquidityBalance) - [amm.getPool](/tempo/actions/amm.getPool) - [amm.mint](/tempo/actions/amm.mint) - [amm.rebalanceSwap](/tempo/actions/amm.rebalanceSwap) - [amm.watchBurn](/tempo/actions/amm.watchBurn) - [amm.watchMint](/tempo/actions/amm.watchMint) - [amm.watchRebalanceSwap](/tempo/actions/amm.watchRebalanceSwap) - [dex.buy](/tempo/actions/dex.buy) - [dex.cancel](/tempo/actions/dex.cancel) - [dex.cancelStale](/tempo/actions/dex.cancelStale) - [dex.createPair](/tempo/actions/dex.createPair) - [dex.getBalance](/tempo/actions/dex.getBalance) - [dex.getBuyQuote](/tempo/actions/dex.getBuyQuote) - [dex.getOrder](/tempo/actions/dex.getOrder) - [dex.getSellQuote](/tempo/actions/dex.getSellQuote) - [dex.getTickLevel](/tempo/actions/dex.getTickLevel) - [dex.place](/tempo/actions/dex.place) - [dex.placeFlip](/tempo/actions/dex.placeFlip) - [dex.sell](/tempo/actions/dex.sell) - [dex.watchFlipOrderPlaced](/tempo/actions/dex.watchFlipOrderPlaced) - [dex.watchOrderCancelled](/tempo/actions/dex.watchOrderCancelled) - [dex.watchOrderFilled](/tempo/actions/dex.watchOrderFilled) - [dex.watchOrderPlaced](/tempo/actions/dex.watchOrderPlaced) - [dex.withdraw](/tempo/actions/dex.withdraw) - [faucet.fund](/tempo/actions/faucet.fund) - [fee.getUserToken](/tempo/actions/fee.getUserToken) - [fee.setUserToken](/tempo/actions/fee.setUserToken) - [fee.watchSetUserToken](/tempo/actions/fee.watchSetUserToken) - [nonce.getNonce](/tempo/actions/nonce.getNonce) - [nonce.watchNonceIncremented](/tempo/actions/nonce.watchNonceIncremented) - [policy.create](/tempo/actions/policy.create) - [policy.getData](/tempo/actions/policy.getData) - [policy.isAuthorized](/tempo/actions/policy.isAuthorized) - [policy.modifyBlacklist](/tempo/actions/policy.modifyBlacklist) - [policy.modifyWhitelist](/tempo/actions/policy.modifyWhitelist) - [policy.setAdmin](/tempo/actions/policy.setAdmin) - [policy.watchAdminUpdated](/tempo/actions/policy.watchAdminUpdated) - [policy.watchBlacklistUpdated](/tempo/actions/policy.watchBlacklistUpdated) - [policy.watchCreate](/tempo/actions/policy.watchCreate) - [policy.watchWhitelistUpdated](/tempo/actions/policy.watchWhitelistUpdated) - [reward.claim](/tempo/actions/reward.claim) - [reward.distribute](/tempo/actions/reward.distribute) - [reward.getGlobalRewardPerToken](/tempo/actions/reward.getGlobalRewardPerToken) - [reward.getPendingRewards](/tempo/actions/reward.getPendingRewards) - [reward.getUserRewardInfo](/tempo/actions/reward.getUserRewardInfo) - [reward.setRecipient](/tempo/actions/reward.setRecipient) - [reward.watchRewardDistributed](/tempo/actions/reward.watchRewardDistributed) - [reward.watchRewardRecipientSet](/tempo/actions/reward.watchRewardRecipientSet) - [Setup](/tempo/actions/setup) - [token.approve](/tempo/actions/token.approve) - [token.burn](/tempo/actions/token.burn) - [token.burnBlocked](/tempo/actions/token.burnBlocked) - [token.changeTransferPolicy](/tempo/actions/token.changeTransferPolicy) - [token.create](/tempo/actions/token.create) - [token.getAllowance](/tempo/actions/token.getAllowance) - [token.getBalance](/tempo/actions/token.getBalance) - [token.getMetadata](/tempo/actions/token.getMetadata) - [token.grantRoles](/tempo/actions/token.grantRoles) - [token.hasRole](/tempo/actions/token.hasRole) - [token.mint](/tempo/actions/token.mint) - [token.pause](/tempo/actions/token.pause) - [token.renounceRoles](/tempo/actions/token.renounceRoles) - [token.revokeRoles](/tempo/actions/token.revokeRoles) - [token.setRoleAdmin](/tempo/actions/token.setRoleAdmin) - [token.setSupplyCap](/tempo/actions/token.setSupplyCap) - [token.transfer](/tempo/actions/token.transfer) - [token.unpause](/tempo/actions/token.unpause) - [token.watchAdminRole](/tempo/actions/token.watchAdminRole) - [token.watchApprove](/tempo/actions/token.watchApprove) - [token.watchBurn](/tempo/actions/token.watchBurn) - [token.watchCreate](/tempo/actions/token.watchCreate) - [token.watchMint](/tempo/actions/token.watchMint) - [token.watchRole](/tempo/actions/token.watchRole) - [token.watchTransfer](/tempo/actions/token.watchTransfer) - [validator.add](/tempo/actions/validator.add) - [validator.changeOwner](/tempo/actions/validator.changeOwner) - [validator.changeStatus](/tempo/actions/validator.changeStatus) - [validator.get](/tempo/actions/validator.get) - [validator.getByIndex](/tempo/actions/validator.getByIndex) - [validator.getCount](/tempo/actions/validator.getCount) - [validator.getNextFullDkgCeremony](/tempo/actions/validator.getNextFullDkgCeremony) - [validator.getOwner](/tempo/actions/validator.getOwner) - [validator.list](/tempo/actions/validator.list) - [validator.setNextFullDkgCeremony](/tempo/actions/validator.setNextFullDkgCeremony) - [validator.update](/tempo/actions/validator.update) - [withFeePayer](/tempo/transports/withFeePayer) - [TempoAddress.format](/tempo/utilities/TempoAddress.format) - [TempoAddress.parse](/tempo/utilities/TempoAddress.parse) - [TempoAddress.validate](/tempo/utilities/TempoAddress.validate) - [toMultisigSmartAccount (ZKsync)](/zksync/accounts/toMultisigSmartAccount): Creates a multi-signature ZKsync Smart Account - [toSinglesigSmartAccount (ZKsync)](/zksync/accounts/toSinglesigSmartAccount): Creates a single-signature ZKsync Smart Account - [toSmartAccount (ZKsync)](/zksync/accounts/toSmartAccount): Creates a ZKsync Smart Account - [claimFailedDeposit](/zksync/actions/claimFailedDeposit): Withdraws funds from the initiated deposit, which failed when finalizing on L2. - [deployContract](/zksync/actions/deployContract): Deploys a contract to the network, given bytecode & constructor arguments by using EIP712 transaction. - [deposit](/zksync/actions/deposit): Transfers the specified token from the associated account on the L1 network to the target account on the L2 network. - [estimateFee](/zksync/actions/estimateFee): Returns an estimated Fee for requested transaction. - [estimateGasL1ToL2](/zksync/actions/estimateGasL1ToL2): Returns an estimated gas for L1 to L2 execution. - [finalizeWithdrawal](/zksync/actions/finalizeWithdrawal): Proves the inclusion of the `L2->L1` withdrawal message. - [getAllBalances](/zksync/actions/getAllBalances): Returns all known balances for a given account. - [getBaseTokenL1Address](/zksync/actions/getBaseTokenL1Address): Returns the base token L1 address. - [getBlockDetails](/zksync/actions/getBlockDetails): Returns additional ZKsync-specific information about the L2 block. - [getBridgehubContractAddress](/zksync/actions/getBridgehubContractAddress): Returns the Bridgehub smart contract address. - [getDefaultBridgeAddresses](/zksync/actions/getDefaultBridgeAddress): Returns the addresses of the default ZKsync Era bridge contracts on both L1 and L2. - [getGasPerPubData](/zksync/actions/getGasPerPubData): Returns the scaled gas per pubdata limit for the currently open batch. - [getL1Allowance](/zksync/actions/getL1Allowance): Determines the amount of approved tokens for a specific L1 bridge. - [getL1Balance](/zksync/actions/getL1Balance): Returns the amount of the token held by the account on the L1 network. - [getL1BatchBlockRange](/zksync/actions/getL1BatchBlockRange): Returns the range of blocks contained within a batch given by batch number. - [getL1BatchDetails](/zksync/actions/getL1BatchDetails): Returns data pertaining to a given batch. - [getL1BatchNumber](/zksync/actions/getL1BatchNumber): Returns the latest L1 batch number. - [getL1ChainId](/zksync/actions/getL1ChainId): Returns the Chain Id of underlying L1 network. - [getL1TokenAddress](/zksync/actions/getL1TokenAddress): Returns the L1 token address equivalent for a L2 token address as they are not equal. - [getL1TokenBalance](/zksync/actions/getL1TokenBalance): Retrieve the token balance held by the contract on L1. - [getL2TokenAddress](/zksync/actions/getL2TokenAddress): Returns the L2 token address equivalent for a L1 token address as they are not equal. - [getLogProof](/zksync/actions/getLogProof): Given a transaction hash, and an index of the L2 to L1 log produced within the transaction, it returns the proof for the corresponding L2 to L1 log. - [getMainContractAddress](/zksync/actions/getMainContractAddress): Returns the address of a Main ZKsync Contract. - [getRawBlockTransaction](/zksync/actions/getRawBlockTransactions): Returns data of transactions in a block. - [getTestnetPaymasterAddress (depreated)](/zksync/actions/getTestnetPaymasterAddress): Returns the address of a Paymaster on a Testnet. - [getTransactionDetails](/zksync/actions/getTransactionDetails): Returns data from a specific transaction given by the transaction hash. - [isWithdrawalFinalized](/zksync/actions/isWithdrawalFinalized): Returns whether the withdrawal transaction is finalized on the L1 network. - [requestExecute](/zksync/actions/requestExecute): Requests execution of a L2 transaction from L1. - [sendTransaction](/zksync/actions/sendTransaction): Creates, signs, and sends a new transaction to the network, with EIP712 transaction support. - [signTransaction](/zksync/actions/signTransaction): Signs a transaction, with EIP712 transaction support. - [withdraw](/zksync/actions/withdraw): Initiates the withdrawal process which withdraws ETH or any ERC20 token from the associated account on L2 network to the target account on L1 network. - [writeContract](/zksync/actions/writeContract): Executes a write function on a contract, with EIP712 transaction support. - [parseEip712Transaction](/zksync/utilities/parseEip712Transaction): Parse EIP712 transaction. - [signMessage (Smart Account)](/account-abstraction/accounts/smart/signMessage) - [signTypedData (Smart Account)](/account-abstraction/accounts/smart/signTypedData) - [signUserOperation (Smart Account)](/account-abstraction/accounts/smart/signUserOperation) - [Coinbase Smart Wallet](/account-abstraction/accounts/smart/toCoinbaseSmartAccount) - [Kernel (ZeroDev) Smart Account](/account-abstraction/accounts/smart/toEcdsaKernelSmartAccount) - [Light Smart Account](/account-abstraction/accounts/smart/toLightSmartAccount) - [MetaMask Smart Account](/account-abstraction/accounts/smart/toMetaMaskSmartAccount) - [Nexus Smart Account](/account-abstraction/accounts/smart/toNexusSmartAccount) - [Safe Smart Account](/account-abstraction/accounts/smart/toSafeSmartAccount) - [Simple Smart Account](/account-abstraction/accounts/smart/toSimpleSmartAccount) - [toSmartAccount](/account-abstraction/accounts/smart/toSmartAccount): Creates a Smart Account with a provided Account Implementation. - [Solady Smart Account](/account-abstraction/accounts/smart/toSoladySmartAccount) - [Thirdweb Smart Account](/account-abstraction/accounts/smart/toThirdwebSmartAccount) - [Trust Smart Account](/account-abstraction/accounts/smart/toTrustSmartAccount) - [createWebAuthnCredential](/account-abstraction/accounts/webauthn/createWebAuthnCredential) - [toWebAuthnAccount](/account-abstraction/accounts/webauthn/toWebAuthnAccount) - [estimateUserOperationGas](/account-abstraction/actions/bundler/estimateUserOperationGas): Estimates the gas values for a User Operation to be executed successfully. - [getChainId](/account-abstraction/actions/bundler/getChainId): Returns the chain ID associated with the bundler - [getSupportedEntryPoints](/account-abstraction/actions/bundler/getSupportedEntryPoints): Returns the EntryPoints that the bundler supports. - [getUserOperation](/account-abstraction/actions/bundler/getUserOperation): Retrieves information about a User Operation given a hash. - [getUserOperationReceipt](/account-abstraction/actions/bundler/getUserOperationReceipt): Returns the User Operation receipt given a User Operation hash. - [TODO](/account-abstraction/actions/bundler/introduction) - [prepareUserOperation](/account-abstraction/actions/bundler/prepareUserOperation): Prepares a User Operation for execution and fills in missing properties. - [sendUserOperation](/account-abstraction/actions/bundler/sendUserOperation): Broadcasts a User Operation to the Bundler. - [waitForUserOperationReceipt](/account-abstraction/actions/bundler/waitForUserOperationReceipt): Waits for the User Operation to be included on a Block, and then returns the User Operation receipt. - [getPaymasterData](/account-abstraction/actions/paymaster/getPaymasterData): Retrieves paymaster-related properties to be used for the User Operation. - [getPaymasterStubData](/account-abstraction/actions/paymaster/getPaymasterStubData): Retrieves paymaster-related properties to be used for the User Operation. - [createNonceManager](/docs/accounts/local/createNonceManager): Creates a Nonce Manager for automatic nonce generation - [hdKeyToAccount](/docs/accounts/local/hdKeyToAccount): A function to create a Hierarchical Deterministic (HD) Account. - [mnemonicToAccount](/docs/accounts/local/mnemonicToAccount): A function to create a Mnemonic Account. - [privateKeyToAccount](/docs/accounts/local/privateKeyToAccount): A function to create a Private Key Account. - [signMessage (Local Account)](/docs/accounts/local/signMessage): Signs a message with the Account's private key. - [signTransaction (Local Account)](/docs/accounts/local/signTransaction): Signs a transaction with the Account's private key. - [signTypedData (Local Account)](/docs/accounts/local/signTypedData): Signs typed data with the Account's private key. - [toAccount](/docs/accounts/local/toAccount): A function to create a Custom Account. - [call](/docs/actions/public/call): An Action for executing a new message call. - [createAccessList](/docs/actions/public/createAccessList) - [createBlockFilter](/docs/actions/public/createBlockFilter): An Action for creating a new Block Filter. - [createEventFilter](/docs/actions/public/createEventFilter): An Action for creating a new Event Filter. - [createPendingTransactionFilter](/docs/actions/public/createPendingTransactionFilter): An Action for creating a new pending transaction filter. - [estimateFeesPerGas](/docs/actions/public/estimateFeesPerGas): Returns an estimate for the fees per gas (in wei) for a transaction to be likely included in the next block. - [estimateGas](/docs/actions/public/estimateGas): An Action for estimating gas for a transaction. - [estimateMaxPriorityFeePerGas](/docs/actions/public/estimateMaxPriorityFeePerGas): Returns an estimate for the max priority fee per gas (in wei) for a transaction to be likely included in the next block. - [getBalance](/docs/actions/public/getBalance): Returns the balance of an address in wei. - [getBlobBaseFee](/docs/actions/public/getBlobBaseFee): Returns the current blob base fee (in wei). - [getBlock](/docs/actions/public/getBlock): Returns information about a block at a block number, hash or tag. - [getBlockNumber](/docs/actions/public/getBlockNumber): Returns the number of the most recent block seen. - [getBlockTransactionCount](/docs/actions/public/getBlockTransactionCount): Returns the number of Transactions at a block number, hash or tag. - [getChainId](/docs/actions/public/getChainId): Returns the chain ID associated with the current network - [getEip712Domain](/docs/actions/public/getEip712Domain): Reads the EIP-712 domain from a contract. - [getFeeHistory](/docs/actions/public/getFeeHistory): Returns a collection of historical gas information. - [getFilterChanges](/docs/actions/public/getFilterChanges): Returns a list of logs or hashes based on a Filter. - [getFilterLogs](/docs/actions/public/getFilterLogs): Returns a list of event logs since the filter was created. - [getGasPrice](/docs/actions/public/getGasPrice): Returns the current price of gas (in wei). - [getLogs](/docs/actions/public/getLogs): Returns a list of event logs matching the provided parameters. - [getProof](/docs/actions/public/getProof): Returns the account and storage values of the specified account including the Merkle-proof. - [getTransaction](/docs/actions/public/getTransaction): Returns information about a transaction given a hash or block identifier. - [getTransactionConfirmations](/docs/actions/public/getTransactionConfirmations): Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - [getTransactionCount](/docs/actions/public/getTransactionCount): Returns the number of Transactions an Account has sent. - [getTransactionReceipt](/docs/actions/public/getTransactionReceipt): Returns the transaction receipt given a transaction hash. - [Introduction to Public Actions](/docs/actions/public/introduction): A brief introduction on what Public Actions are in viem. - [simulateBlocks](/docs/actions/public/simulateBlocks): Simulates a set of calls on block(s). - [simulateCalls](/docs/actions/public/simulateCalls): Simulates a set of calls on block(s). - [uninstallFilter](/docs/actions/public/uninstallFilter): Destroys a Filter. - [verifyHash](/docs/actions/public/verifyHash): Verifies if a signed hash was generated by the provided address. - [verifyMessage](/docs/actions/public/verifyMessage): Verifies if a signed message was generated by the provided address. - [verifyTypedData](/docs/actions/public/verifyTypedData): Verifies a typed data signature - [waitForTransactionReceipt](/docs/actions/public/waitForTransactionReceipt): Retrieves a Transaction Receipt for a given Transaction hash. - [watchBlockNumber](/docs/actions/public/watchBlockNumber): Watches and returns incoming block numbers. - [watchBlocks](/docs/actions/public/watchBlocks): Watches and returns information for incoming blocks. - [watchEvent](/docs/actions/public/watchEvent): Watches and returns emitted Event Logs. - [watchPendingTransactions](/docs/actions/public/watchPendingTransactions): Watches and returns pending transaction hashes. - [dropTransaction](/docs/actions/test/dropTransaction): Removes a transaction from the mempool. - [dumpState](/docs/actions/test/dumpState): Serializes the current state into a savable data blob. - [getAutomine](/docs/actions/test/getAutomine): Returns the automatic mining status of the node. - [getTxpoolContent](/docs/actions/test/getTxpoolContent): Returns the details of all transactions currently pending for inclusion in the next block(s). - [getTxpoolStatus](/docs/actions/test/getTxpoolStatus): Returns a summary of all the transactions currently pending for inclusion in the next block(s). - [impersonateAccount](/docs/actions/test/impersonateAccount): Impersonate an account or contract address. - [increaseTime](/docs/actions/test/increaseTime): Jump forward in time by the given amount of time, in seconds. - [inspectTxpool](/docs/actions/test/inspectTxpool): Returns a summary of all the transactions currently pending for inclusion in the next block(s). - [Introduction to Test Actions](/docs/actions/test/introduction): A brief introduction on what Test Actions are in viem. - [loadState](/docs/actions/test/loadState): Adds state previously dumped to the current chain. - [mine](/docs/actions/test/mine): Mine a specified number of blocks. - [removeBlockTimestampInterval](/docs/actions/test/removeBlockTimestampInterval): Removes setBlockTimestampInterval if it exists. - [reset](/docs/actions/test/reset): Resets the fork back to its original state. - [revert](/docs/actions/test/revert): Revert the state of the blockchain at the current block. - [sendUnsignedTransaction](/docs/actions/test/sendUnsignedTransaction): Executes a transaction regardless of the signature. - [setAutomine](/docs/actions/test/setAutomine): Enables or disables the automatic mining of new blocks with each new transaction submitted to the network. - [setBalance](/docs/actions/test/setBalance): Modifies the balance of an account. - [setBlockGasLimit](/docs/actions/test/setBlockGasLimit): Sets the block's gas limit. - [setBlockTimestampInterval](/docs/actions/test/setBlockTimestampInterval): Sets the block's timestamp interval. - [setCode](/docs/actions/test/setCode): Modifies the bytecode stored at an account's address. - [setCoinbase](/docs/actions/test/setCoinbase): Sets the coinbase address to be used in new blocks. - [setIntervalMining](/docs/actions/test/setIntervalMining): Sets the automatic mining interval (in seconds) of blocks. - [setLoggingEnabled](/docs/actions/test/setLoggingEnabled): Enable or disable logging on the test node network. - [setMinGasPrice](/docs/actions/test/setMinGasPrice): Change the minimum gas price accepted by the network (in wei). - [setNextBlockBaseFeePerGas](/docs/actions/test/setNextBlockBaseFeePerGas): Sets the next block's base fee per gas. - [setNextBlockTimestamp](/docs/actions/test/setNextBlockTimestamp): Sets the next block's timestamp. - [setNonce](/docs/actions/test/setNonce): Modifies (overrides) the nonce of an account. - [setRpcUrl](/docs/actions/test/setRpcUrl): Sets the backend RPC URL. - [setStorageAt](/docs/actions/test/setStorageAt): Writes to a slot of an account's storage. - [snapshot](/docs/actions/test/snapshot): Snapshot the state of the blockchain at the current block. - [stopImpersonatingAccount](/docs/actions/test/stopImpersonatingAccount): Stop impersonating an account after having previously used impersonateAccount. - [addChain](/docs/actions/wallet/addChain): Adds an EVM chain to the wallet. - [getAddresses](/docs/actions/wallet/getAddresses): Returns a list of addresses owned by the wallet or client. - [getCallsStatus](/docs/actions/wallet/getCallsStatus): Returns the status of a call batch. - [getCapabilities](/docs/actions/wallet/getCapabilities): Extract capabilities that a connected wallet supports. - [getPermissions](/docs/actions/wallet/getPermissions): Gets the wallets current permissions. - [Introduction to Wallet Actions](/docs/actions/wallet/introduction): A brief introduction to Wallet Actions in viem. - [prepareTransactionRequest](/docs/actions/wallet/prepareTransactionRequest): Prepares a transaction request for signing. - [requestAddresses](/docs/actions/wallet/requestAddresses): Requests a list of accounts managed by a wallet. - [requestPermissions](/docs/actions/wallet/requestPermissions): Requests permissions for a wallet. - [sendCalls](/docs/actions/wallet/sendCalls): Sign and broadcast a batch of calls to the network. - [sendCallsSync](/docs/actions/wallet/sendCallsSync): Sign and broadcast a batch of calls to the network, and waits for the calls to be included in a block. - [sendRawTransaction](/docs/actions/wallet/sendRawTransaction): Sends a signed transaction to the network - [sendRawTransactionSync](/docs/actions/wallet/sendRawTransactionSync): Sends a signed transaction to the network synchronously - [sendTransaction](/docs/actions/wallet/sendTransaction): Creates, signs, and sends a new transaction to the network. - [sendTransactionSync](/docs/actions/wallet/sendTransactionSync): Creates, signs, and sends a new transaction to the network synchronously. - [showCallsStatus](/docs/actions/wallet/showCallsStatus): Requests for the wallet to show information about a call batch. - [signMessage](/docs/actions/wallet/signMessage): Signs a message with the Account's private key. - [signTransaction](/docs/actions/wallet/signTransaction): Signs a transaction. - [signTypedData](/docs/actions/wallet/signTypedData): Signs typed data with the Account's private key. - [switchChain](/docs/actions/wallet/switchChain): Switch the target chain in a wallet. - [waitForCallsStatus](/docs/actions/wallet/waitForCallsStatus): Waits for a call batch to be confirmed & included on a Block. - [watchAsset](/docs/actions/wallet/watchAsset): Requests that the user tracks the token in their wallet. - [Custom Transport](/docs/clients/transports/custom): A function to create a Custom Transport for a Client - [Fallback Transport](/docs/clients/transports/fallback): A function to create a Fallback Transport for a Client - [HTTP Transport](/docs/clients/transports/http): A function to create a HTTP Transport for a Client - [IPC Transport](/docs/clients/transports/ipc): A function to create an IPC Transport for a Client - [WebSocket Transport](/docs/clients/transports/websocket): A function to create a WebSocket Transport for a Client - [getEnsAddress](/docs/ens/actions/getEnsAddress): Gets address for ENS name. - [getEnsAvatar](/docs/ens/actions/getEnsAvatar): Gets the avatar of an ENS name. - [getEnsName](/docs/ens/actions/getEnsName): Gets primary name for specified address. - [getEnsResolver](/docs/ens/actions/getEnsResolver): Gets resolver for ENS name. - [getEnsText](/docs/ens/actions/getEnsText): Gets a text record for specified ENS name. - [labelhash](/docs/ens/utilities/labelhash): Hashes ENS label. - [namehash](/docs/ens/utilities/namehash): Hashes ENS name. - [normalize](/docs/ens/utilities/normalize): Normalizes ENS name to UTS46. - [verifySiweMessage](/docs/siwe/actions/verifySiweMessage): Verifies EIP-4361 formatted message was signed. - [createSiweMessage](/docs/siwe/utilities/createSiweMessage): Creates EIP-4361 formatted message. - [generateSiweNonce](/docs/siwe/utilities/generateSiweNonce): Generates random EIP-4361 nonce. - [parseSiweMessage](/docs/siwe/utilities/parseSiweMessage): Parses EIP-4361 formatted message into message fields object. - [validateSiweMessage](/docs/siwe/utilities/validateSiweMessage): Validates EIP-4361 message. - [getL2HashFromPriorityOp](/zksync/utilities/bridge/getL2HashFromPriorityOp): Returns the hash of the L2 priority operation from a given L1 transaction receipt. - [getApprovalBasedPaymasterInput](/zksync/utilities/paymaster/getApprovalBasedPaymasterInput): Returns encoded formatted approval-based paymaster params. - [getGeneralPaymasterInput](/zksync/utilities/paymaster/getGeneralPaymasterInput): Returns encoded formatted general-based paymaster params.