# Table of Contents - [Connect to Abstract - Abstract](#connect-to-abstract-abstract) - [Introduction - Abstract](#introduction-abstract) - [Abstract Global Wallet - Abstract](#abstract-global-wallet-abstract) - [Getting Started - Abstract](#getting-started-abstract) - [Bridges - Abstract](#bridges-abstract) - [What is Abstract? - Abstract](#what-is-abstract-abstract) - [Portal - Abstract](#portal-abstract) - [ZKsync CLI - Abstract](#zksync-cli-abstract) - [Block Explorers - Abstract](#block-explorers-abstract) - [Faucets - Abstract](#faucets-abstract) - [Getting Started - Abstract](#getting-started-abstract) - [Deployed Contracts - Abstract](#deployed-contracts-abstract) - [Bridges - Abstract](#bridges-abstract) - [Interoperability - Abstract](#interoperability-abstract) - [Data & Indexing - Abstract](#data-indexing-abstract) - [Oracles - Abstract](#oracles-abstract) - [Layer 2s - Abstract](#layer-2s-abstract) - [How It Works - Abstract](#how-it-works-abstract) - [EVM Differences - Abstract](#evm-differences-abstract) - [Paymasters - Abstract](#paymasters-abstract) - [RPC Providers - Abstract](#rpc-providers-abstract) - [Frequently Asked Questions - Abstract](#frequently-asked-questions-abstract) - [Automation - Abstract](#automation-abstract) - [Relayers - Abstract](#relayers-abstract) - [Native Integration - Abstract](#native-integration-abstract) - [Dynamic - Abstract](#dynamic-abstract) - [ConnectKit - Abstract](#connectkit-abstract) - [RainbowKit - Abstract](#rainbowkit-abstract) - [Privy - Abstract](#privy-abstract) - [Ethers - Abstract](#ethers-abstract) - [Foundry - Abstract](#foundry-abstract) - [Thirdweb - Abstract](#thirdweb-abstract) - [Hardhat - Abstract](#hardhat-abstract) - [Thirdweb - Abstract](#thirdweb-abstract) - [useAbstractClient - Abstract](#useabstractclient-abstract) - [AbstractWalletProvider - Abstract](#abstractwalletprovider-abstract) - [useLoginWithAbstract - Abstract](#useloginwithabstract-abstract) - [Viem - Abstract](#viem-abstract) - [signTransaction - Abstract](#signtransaction-abstract) - [sendTransactionBatch - Abstract](#sendtransactionbatch-abstract) - [useGlobalWalletSignerAccount - Abstract](#useglobalwalletsigneraccount-abstract) --- # Connect to Abstract - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Overview Connect to Abstract [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Use the information below to connect and submit transactions to Abstract. | Property | Mainnet | Testnet | | --- | --- | --- | | Name | Abstract | Abstract Testnet | | Description | The mainnet for Abstract. | The public testnet for Abstract. | | Chain ID | `2741` | `11124` | | RPC URL | `https://api.mainnet.abs.xyz` | `https://api.testnet.abs.xyz` | | RPC URL (Websocket) | `wss://api.mainnet.abs.xyz/ws` | `wss://api.testnet.abs.xyz/ws` | | Explorer | `https://abscan.org/` | `https://sepolia.abscan.org/` | | Verify URL | `https://api.abscan.org/api` | `https://api-sepolia.abscan.org/api` | | Currency Symbol | ETH | ETH | Click the button below to connect your wallet to the Abstract. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/connect-to-abstract.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /connect-to-abstract) [What is Abstract?](/what-is-abstract) [Getting Started](/build-on-abstract/getting-started) --- # Introduction - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Overview Introduction [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [​](#get-started-with-abstract) Get started with Abstract ------------------------------------------------------------ Start building smart contracts and applications on Abstract with our quickstart guides. [Connect to Abstract\ -------------------\ \ Connect your wallet or development environment to Abstract.](/connect-to-abstract) [Start Building on Abstract\ --------------------------\ \ Start developing smart contracts or applications on Abstract.](/build-on-abstract/getting-started) [​](#explore-abstract-resources) Explore Abstract Resources -------------------------------------------------------------- Use our tutorials to kickstart your development journey on Abstract. [Clone Example Repositories\ --------------------------\ \ Browse our collection of cloneable starter kits and example repositories on GitHub.](https://github.com/Abstract-Foundation/examples) [YouTube Tutorials\ -----------------\ \ Watch our video tutorials to learn more about building on Abstract.](https://www.youtube.com/@AbstractBlockchain) [​](#learn-more-about-abstract) Learn more about Abstract ------------------------------------------------------------ Dive deeper into how Abstract works and how you can leverage its features. [What is Abstract?\ -----------------\ \ Learn more about the blockchain leading the next generation of consumer crypto.](/what-is-abstract) [How Abstract Works\ ------------------\ \ Learn more about how the technology powering Abstract works.](/how-abstract-works/architecture/layer-2s) [Architecture\ ------------\ \ Understand the architecture and components that make up Abstract.](/how-abstract-works/architecture/layer-2s) [Abstract Global Wallet\ ----------------------\ \ Discover Abstract Global Wallet - the smart contract wallet powering the Abstract ecosystem.](/abstract-global-wallet/overview) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/overview.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /overview) [What is Abstract?](/what-is-abstract) On this page * [Get started with Abstract](#get-started-with-abstract) * [Explore Abstract Resources](#explore-abstract-resources) * [Learn more about Abstract](#learn-more-about-abstract) --- # Abstract Global Wallet - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Abstract Global Wallet Abstract Global Wallet [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) **Create a new application with Abstract Global Wallet configured:** npx @abstract-foundation/create-abstract-app@latest my-app [​](#what-is-abstract-global-wallet%3F) What is Abstract Global Wallet? -------------------------------------------------------------------------- Abstract Global Wallet (AGW) is a cross-application [smart contract wallet](/how-abstract-works/native-account-abstraction/smart-contract-wallets) that users can create to interact with any application built on Abstract, powered by [native account abstraction](/how-abstract-works/native-account-abstraction) . AGW provides a seamless and secure way to onboard users, in which they sign up once using familiar login methods (such as email, social accounts, passkeys and more), and can then use this account to interact with _any_ application on Abstract. [Get Started with AGW\ --------------------\ \ Integrate Abstract Global Wallet into your application with our SDKs.](/abstract-global-wallet/getting-started) [How AGW Works\ -------------\ \ Learn more about how Abstract Global Wallet works under the hood.](/abstract-global-wallet/architecture) **Check out the live demo to see Abstract Global Wallet in action:** [Try the AGW live demo\ ---------------------\ \ Try the live demo of Abstract Global Wallet to see it in action.](https://create-abstract-app.vercel.app) [​](#packages) Packages -------------------------- Integrate Abstract Global Wallet (AGW) into your application using the packages below. 1. [agw-react](https://www.npmjs.com/package/@abstract-foundation/agw-react) : React hooks and components to prompt users to login with AGW and approve transactions. Built on [Wagmi](https://github.com/wagmi-dev/wagmi) . 2. [agw-client](https://www.npmjs.com/package/@abstract-foundation/agw-client) : Wallet actions and utility functions that complement the `agw-react` package. Built on [Viem](https://github.com/wagmi-dev/viem) . Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/overview.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/overview) [Getting Started](/abstract-global-wallet/getting-started) On this page * [What is Abstract Global Wallet?](#what-is-abstract-global-wallet%3F) * [Packages](#packages) --- # Getting Started - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Build on Abstract Getting Started [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Abstract is EVM compatible; however, there are [differences](/how-abstract-works/evm-differences/overview) between Abstract and Ethereum that enable more powerful user experiences. For developers, additional configuration may be required to accommodate these changes and take full advantage of Abstract’s capabilities. Follow the guides below to learn how to best set up your environment for Abstract. [​](#smart-contracts) Smart Contracts ---------------------------------------- Learn how to create a new smart contract project, compile your contracts, and deploy them to Abstract. [Hardhat: Get Started\ --------------------\ \ Learn how to set up a Hardhat plugin to compile smart contracts for Abstract](/build-on-abstract/smart-contracts/hardhat) [Foundry: Get Started\ --------------------\ \ Learn how to use a Foundry fork to compile smart contracts for Abstract](/build-on-abstract/smart-contracts/foundry) [​](#applications) Applications ---------------------------------- Learn how to build frontend applications to interact with smart contracts on Abstract. [Ethers: Get Started\ -------------------\ \ Quick start guide for using Ethers v6 with Abstract](/build-on-abstract/applications/ethers) [Viem: Get Started\ -----------------\ \ Set up a React + TypeScript app using the Viem library](/build-on-abstract/applications/viem) [Thirdweb: Get Started\ ---------------------\ \ Create a React + TypeScript app with the thirdweb SDK](/build-on-abstract/applications/thirdweb) Integrate Abstract Global Wallet, the smart contract wallet powering the Abstract ecosystem. [Abstract Global Wallet Documentation\ ------------------------------------\ \ Learn how to integrate Abstract Global Wallet into your applications.](/abstract-global-wallet/overview) [​](#explore-abstract-resources) Explore Abstract Resources -------------------------------------------------------------- Use our starter repositories and tutorials to kickstart your development journey on Abstract. [Clone Example Repositories\ --------------------------\ \ Browse our collection of cloneable starter kits and example repositories on GitHub.](https://github.com/Abstract-Foundation/examples/tree/main/smart-contract-accounts) [YouTube Tutorials\ -----------------\ \ Watch our video tutorials to learn more about building on Abstract.](https://www.youtube.com/@AbstractBlockchain) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/build-on-abstract/getting-started.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /build-on-abstract/getting-started) [Connect to Abstract](/connect-to-abstract) [Hardhat](/build-on-abstract/smart-contracts/hardhat) On this page * [Smart Contracts](#smart-contracts) * [Applications](#applications) * [Explore Abstract Resources](#explore-abstract-resources) --- # Bridges - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Ecosystem Bridges [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [Stargate\ --------](https://stargate.finance/bridge) [Relay\ -----](https://www.relay.link/) [Jumper\ ------](https://jumper.exchange/) [Symbiosis\ ---------](https://symbiosis.finance/) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/ecosystem/bridges.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /ecosystem/bridges) [Data & Indexing](/ecosystem/indexers) --- # What is Abstract? - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Overview What is Abstract? [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Abstract is a [Layer 2](https://ethereum.org/en/layer-2/) (L2) network built on top of [Ethereum](https://ethereum.org/en/developers/docs/) , designed to securely power consumer-facing blockchain applications at scale with low fees and fast transaction speeds. Built on top of the [ZK Stack](https://docs.zksync.io/zk-stack) , Abstract is a [zero-knowledge (ZK) rollup](https://ethereum.org/en/developers/docs/scaling/zk-rollups/) built to be a more scalable alternative to Ethereum; it achieves this scalability by executing transactions off-chain, batching them together, and verifying batches of transactions on Ethereum using [(ZK) proofs](https://ethereum.org/en/zero-knowledge-proofs/) . Abstract is [EVM](https://ethereum.org/en/developers/docs/evm/) compatible, meaning it looks and feels like Ethereum, but with lower gas fees and higher transaction throughput. Most existing smart contracts built for Ethereum will work out of the box on Abstract ([with some differences](/how-abstract-works/evm-differences/overview) ), meaning developers can easily port applications to Abstract with minimal changes. [​](#start-using-abstract) Start using Abstract -------------------------------------------------- Ready to start building on Abstract? Here are some next steps to get you started: [Connect to Abstract\ -------------------\ \ Connect your wallet or development environment to Abstract.](/connect-to-abstract) [Start Building\ --------------\ \ Start developing smart contracts or applications on Abstract.](/build-on-abstract/getting-started) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/what-is-abstract.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /what-is-abstract) [Introduction](/overview) [Connect to Abstract](/connect-to-abstract) On this page * [Start using Abstract](#start-using-abstract) --- # Portal - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Portal Portal [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The [Portal](https://abs.xyz) is the homepage of consumer crypto. Users can manage their [Abstract Global Wallet](/abstract-global-wallet/overview) , earn XP and badges, and discover the top apps & creators in the ecosystem. [Visit Portal\ ------------\ \ Explore a curated universe of onchain apps, watch trusted creators, and earn rewards.](https://abs.xyz) [​](#frequently-asked-questions) Frequently Asked Questions -------------------------------------------------------------- Find answers to common questions about the Portal below. ### [​](#funding-your-wallet) Funding your wallet How do I fund my account? You can fund your account in multiple ways: 1. **Funding from Solana, Ethereum, or any other chain:** * Click the deposit button on wallet page and select “Bridge” * Connect your existing wallet and select the chain * Wait for confirmation (may take several minutes) 2. **Funding from Coinbase:** * Click deposit and select “Coinbase” * Sign in to Coinbase and follow prompts * Wait for confirmation (may take several minutes) 3. **Funding from other exchanges (Binance, OKX, etc.):** * Click deposit and select “Centralized Exchange” * Use the generated QR code to send funds from zkSync Era wallet * **Important:** Send funds on zkSync Era only. Use QR code once only. * Note: This address differs from your Abstract wallet address 4. **Funding via bank account:** * Click deposit and select “Moonpay” * Follow prompts to sign in/create Moonpay account How to send funds on Abstract? The native currency on Abstract is Ether (ETH). Other currencies including USDC.e and USDT are also available. 1. Click the send button on the wallet page 2. Select the token to send and enter the exact amount to send 3. Enter the recipient’s address, domain, or identity. 4. Double check everything looks correct. **Transactions cannot be reversed, and funds sent to wrong places are impossible to recover** 5. Confirm transaction (recipient receives funds in < 1 minute) Do NOT send funds to your Abstract Global Wallet on any other network. Your AGW only exists on Abstract. I can't see my funds. What happened? Various reasons may cause funds to not display properly: 1. Navigate to the [Abstract Explorer](https://abscan.org/) and search your address (e.g. 0x1234…abcd) 2. Verify if there is an inbound transaction that you are expecting. 3. Check that the sender has sent funds to the correct address and network. If you are using the Abstract network without using Abstract Global Wallet, to see your funds, you must [connect your wallet to the Abstract network](/connect-to-abstract) and switch to the Abstract network. How do I export my private key outside of Abstract Global Wallet? Your Abstract Global Wallet is a [smart contract wallet](abstract-global-wallet/architecture) , not a traditional EOA. This means it does not have a private key for you to export. My card/PayPal funding failed. What do I do? Try again, turn off your VPN if you are using one. ### [​](#profile) Profile How do I edit my profile? Navigate to “Profile Page” in left-hand menu to: * Update profile information * Edit pictures * Link X (Twitter) and Discord accounts Why do I need to connect my Discord account to get rewards? Social connections enhance ecosystem security by: - Providing additional layer to identify and filter out bots - Allowing rewards for content about Abstract and ecosystem projects Why do I need to connect my Discord account to get XP bonuses? Discord connections help identify active community members by: * Linking offchain community participation to onchain portal activity * Providing additional verification to filter out bots * Enabling XP rewards for helpful community contributions How do I switch my linked X account or link a new one? Select “Edit Profile” option on the “Profile Page” to unlink social accounts. How do I enable two-factor authentication (2FA)? Enable 2FA under “Security Settings” using either: - Authenticator App - Passkey How do I change my PFP? Click the pencil icon over your profile picture to use any NFT in your wallet as your PFP. ### [​](#discover) Discover How do I vote for an app? Click the upvote button on the “Discover” page to support an app. Why can't I upvote an app? Either: - You have already upvoted that app - You need to fund your account (visit abs.xyz/wallet and click fund button) What is the spotlight? The spotlight features apps that have received the most upvotes and user interaction during a given time period. What are trending tokens? Trending tokens are ranked based on volume and price change in real time. **Important:** This is not financial advice or endorsement. The trending tokens section is not an endorsement of any team or project, and the algorithm may yield unexpected results. Always consult your financial advisor before investing. How do I sort apps? Browse app categories at the bottom of the discover page: * Gaming * Trading * Collectibles And more, sorted by user engagement in each category ### [​](#trade) Trade How do I make my first trade? Two options available: 1. Visit the “Trade” page for native trading features 2. Explore trading apps in the “Trading” category on the Discover page Getting an error on your trade? Check to verify: - You have enough ETH to fund the transaction - Your slippage is set correctly What is slippage? Slippage is the difference between expected trade price and actual execution price, common with high volume/volatility tokens. How do I view my trading history? Find your trading history in the “Transaction History” section of your Profile Page. ### [​](#rewards) Rewards What is XP? XP is the native reward system built to reward users for having fun. Users and creators earn XP for: * Using Abstract apps * Streaming via Abstract Global Wallet * Building successful apps How do I earn XP? Earn XP by engaging with Abstract-powered apps listed on the Discover page. When is the XP updated? XP is updated weekly and reflected in your rewards profile. How do I claim Badges? Earn Badges by completing hidden or public quests. Eligible badges appear in the “Badges” section of the “Rewards” page. What is the XP Multiplier? Bonus XP users can earn based on community standing and exclusive rewards. Can I lose XP? Yes, XP can be lost for: - Cheating the system - Breaking streamer rules Is XP transferable between accounts? No, XP is not transferable between accounts. ### [​](#streaming) Streaming How do I sign up, and is there an approval process? Currently: * Anyone can create an account to watch and interact * Only whitelisted accounts can stream * More creators will be supported over time Can I earn XP for streaming on Abstract? Yes: - Earn XP based on engagement and app usage validated onchain - Abstract-based application usage provides more XP compared to outside content What kind of content is allowed? All types of content can be streamed, but Abstract Apps usage provides additional XP. What happens if I lose my account credentials? Recover your account using your email address. We recommend: - Setting up passkeys - Enabling 2FA Both found in settings What kind of content is restricted? Abstract is an open platform but users must follow Terms of Use: - No harassment - No hate speech Does Abstract support multiple languages and regions? Yes, Abstract supports multiple languages and is available globally. How do streamers earn money? Streamers can receive tips from their audience members. How do I qualify for monetization features? All streamers are capable of receiving tips. What equipment or software do I need? Basic requirements: - Computer capable of running streaming software (e.g., OBS) - Stable internet connection - Microphone - Optional: webcam - Mobile streaming requires third-party apps with stream key support What are the recommended streaming settings? * Supports up to 1080p & 4k Bitrate - 5-15 second stream delay depending on internet/settings - Test different settings for optimal performance Can I stream simultaneously on other platforms? Yes, but: - Makes Luca sad - May impact potential XP earnings Can I moderate my chat or assign moderators? * Abstract provides basic chat moderation platform-wide - Additional moderation features may be added in future as needed Can I stream non-Abstract content? Yes, but: * We encourage exploring our ecosystem * Non-Abstract content may earn reduced or no XP Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/portal/overview.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /portal/overview) On this page * [Frequently Asked Questions](#frequently-asked-questions) * [Funding your wallet](#funding-your-wallet) * [Profile](#profile) * [Discover](#discover) * [Trade](#trade) * [Rewards](#rewards) * [Streaming](#streaming) --- # ZKsync CLI - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Build on Abstract ZKsync CLI [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) As Abstract is built on the [ZK Stack](https://docs.zksync.io/zk-stack) , you can use the [ZKsync CLI](https://docs.zksync.io/build/zksync-cli) to interact with Abstract directly, or run your own local Abstract node. The ZKsync CLI helps simplify the setup, development, testing and deployment of contracts on Abstract. Prerequisites Ensure you have the following installed on your machine: * [Node.js](https://nodejs.org/en/download/) v18.0.0 or later. * [Docker](https://docs.docker.com/get-docker/) for running a local Abstract node. [​](#install-zksync-cli) Install ZKsync CLI ---------------------------------------------- To install the ZKsync CLI, run the following command: npm install -g zksync-cli [​](#available-commands) Available Commands ---------------------------------------------- Run any of the below commands with the `zksync-cli` prefix: # For example, to create a new project: zksync-cli create | Command | Description | | --- | --- | | `dev` | Start a local development environment with Abstract and Ethereum nodes. | | `create` | Scaffold new projects using templates for frontend, contracts, and scripting. | | `contract` | Read and write data to Abstract contracts without building UI. | | `transaction` | Fetch and display detailed information about a specific transaction. | | `wallet` | Manage Abstract wallet assets, including transfers and balance checks. | | `bridge` | Perform deposits and withdrawals between Ethereum and Abstract. | | `config chains` | Add or edit custom chains for flexible testing and development. | Learn more on the official [ZKsync CLI documentation](https://docs.zksync.io/build/zksync-cli) . Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/build-on-abstract/zksync-cli.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /build-on-abstract/zksync-cli) [Thirdweb](/build-on-abstract/applications/thirdweb) [Layer 2s](/how-abstract-works/architecture/layer-2s) On this page * [Install ZKsync CLI](#install-zksync-cli) * [Available Commands](#available-commands) --- # Block Explorers - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Tooling Block Explorers [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The block explorer allows you to: * View, verify, and interact with smart contract source code. * View transaction, block, and batch information. * Track the finality status of transactions as they reach Ethereum. [Mainnet Explorer\ ----------------\ \ Go to the Abstract mainnet explorer to view transactions, blocks, and more.](https://abscan.org/) [Testnet Explorer\ ----------------\ \ Go to the Abstract testnet explorer to view transactions, blocks, and more.](https://sepolia.abscan.org/) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/tooling/block-explorers.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /tooling/block-explorers) [Libraries](/how-abstract-works/evm-differences/libraries) [Bridges](/tooling/bridges) --- # Faucets - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Tooling Faucets [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Faucets distribute small amounts of testnet ETH to enable developers & users to deploy and interact with smart contracts on the testnet. Abstract has its own testnet that uses the [Sepolia](https://ethereum.org/en/developers/docs/networks/#sepolia) network as the L1, meaning you can get testnet ETH on Abstract directly or [bridge](/tooling/bridges) Sepolia ETH to the Abstract testnet. [​](#abstract-testnet-faucets) Abstract Testnet Faucets ---------------------------------------------------------- | Name | Requires Signup | | --- | --- | | [Triangle faucet](https://faucet.triangleplatform.com/abstract/testnet) | No | | [Thirdweb faucet](https://thirdweb.com/abstract-testnet) | Yes | [​](#l1-sepolia-faucets) L1 Sepolia Faucets ---------------------------------------------- | Name | Requires Signup | Requirements | | --- | --- | --- | | [Ethereum Ecosystem Sepolia PoW faucet](https://www.ethereum-ecosystem.com/faucets/ethereum-sepolia) | No | ENS Handle | | [Sepolia PoW faucet](https://sepolia-faucet.pk910.de/) | No | Gitcoin Passport score | | [Google Cloud Sepolia faucet](https://cloud.google.com/application/web3/faucet/ethereum/sepolia) | No | 0.001 mainnet ETH | | [Grabteeth Sepolia faucet](https://grabteeth.xyz/) | No | A smart contract deployment before 2023 | | [Infura Sepolia faucet](https://www.infura.io/faucet/sepolia) | Yes | \- | | [Chainstack Sepolia faucet](https://faucet.chainstack.com/sepolia-testnet-faucet) | Yes | \- | | [Alchemy Sepolia faucet](https://www.alchemy.com/faucets/ethereum-sepolia) | Yes | 0.001 mainnet ETH | Use a [bridge](/tooling/bridges) to move Sepolia ETH to the Abstract testnet. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/tooling/faucets.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /tooling/faucets) [Bridges](/tooling/bridges) [Deployed Contracts](/tooling/deployed-contracts) On this page * [Abstract Testnet Faucets](#abstract-testnet-faucets) * [L1 Sepolia Faucets](#l1-sepolia-faucets) --- # Getting Started - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Abstract Global Wallet Getting Started [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [​](#new-projects) New Projects ---------------------------------- To kickstart a new project with AGW configured, use our CLI tool: npx @abstract-foundation/create-abstract-app@latest my-app [​](#existing-projects) Existing Projects -------------------------------------------- Integrate Abstract Global Wallet into an existing project using one of our integration guides below: [Native Integration\ ------------------\ \ Add AGW as the native wallet connection option to your React application.](/abstract-global-wallet/agw-react/native-integration) [Privy\ -----\ \ Integrate AGW into an existing Privy application.](/abstract-global-wallet/agw-react/integrating-with-privy) [ConnectKit\ ----------\ \ Integrate AGW as a wallet connection option to an existing ConnectKit application.](/abstract-global-wallet/agw-react/integrating-with-connectkit) [Dynamic\ -------\ \ Integrate AGW as a wallet connection option to an existing Dynamic application.](/abstract-global-wallet/agw-react/integrating-with-dynamic) [RainbowKit\ ----------\ \ Integrate AGW as a wallet connection option to an existing RainbowKit application.](/abstract-global-wallet/agw-react/integrating-with-rainbowkit) [Thirdweb\ --------\ \ Integrate AGW as a wallet connection option to an existing thirdweb application.](/abstract-global-wallet/agw-react/integrating-with-thirdweb) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/getting-started.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/getting-started) [Overview](/abstract-global-wallet/overview) [How It Works](/abstract-global-wallet/architecture) On this page * [New Projects](#new-projects) * [Existing Projects](#existing-projects) --- # Deployed Contracts - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Tooling Deployed Contracts [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [​](#currencies) Currencies ------------------------------ | Token | Mainnet | Testnet | | --- | --- | --- | | WETH9 | `0x3439153EB7AF838Ad19d56E1571FBD09333C2809` | `0x9EDCde0257F2386Ce177C3a7FCdd97787F0D841d` | | USDC | `0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1` | `0xe4C7fBB0a626ed208021ccabA6Be1566905E2dFc` | | USDT | `0x0709F39376dEEe2A2dfC94A58EdEb2Eb9DF012bD` | \- | [​](#nft-markets) NFT Markets -------------------------------- | Contract Type | Mainnet | Testnet | | --- | --- | --- | | Seaport | `0xDF3969A315e3fC15B89A2752D0915cc76A5bd82D` | `0xDF3969A315e3fC15B89A2752D0915cc76A5bd82D` | | Transfer Validator | `0x3203c3f64312AF9344e42EF8Aa45B97C9DFE4594` | `0x3203c3f64312af9344e42ef8aa45b97c9dfe4594` | [​](#uniswap-v2) Uniswap V2 ------------------------------ | Contract Type | Mainnet | Testnet | | --- | --- | --- | | UniswapV2Factory | `0x566d7510dEE58360a64C9827257cF6D0Dc43985E` | `0x566d7510dEE58360a64C9827257cF6D0Dc43985E` | | UniswapV2Router02 | `0xad1eCa41E6F772bE3cb5A48A6141f9bcc1AF9F7c` | `0x96ff7D9dbf52FdcAe79157d3b249282c7FABd409` | | Init code hash | `0x0100065f2f2a556816a482652f101ddda2947216a5720dd91a79c61709cbf2b8` | `0x0100065f2f2a556816a482652f101ddda2947216a5720dd91a79c61709cbf2b8` | [​](#uniswap-v3) Uniswap V3 ------------------------------ | Contract Type | Mainnet | Testnet | | --- | --- | --- | | UniswapV3Factory | `0xA1160e73B63F322ae88cC2d8E700833e71D0b2a1` | `0x2E17FF9b877661bDFEF8879a4B31665157a960F0` | | multicall2Address | `0x9CA4dcb2505fbf536F6c54AA0a77C79f4fBC35C0` | `0x84B11838e53f53DBc1fca7a6413cDd2c7Ab15DB8` | | proxyAdminAddress | `0x76d539e3c8bc2A565D22De95B0671A963667C4aD` | `0x10Ef01fF2CCc80BdDAF51dF91814e747ae61a5f1` | | tickLensAddress | `0x9c7d30F93812f143b6Efa673DB8448EfCB9f747E` | `0x2EC62f97506E0184C423B01c525ab36e1c61f78A` | | nftDescriptorLibraryAddressV1\_3\_0 | `0x30cF3266240021f101e388D9b80959c42c068C7C` | `0x99C98e979b15eD958d0dfb8F24D8EfFc2B41f9Fe` | | nonfungibleTokenPositionDescriptorV1\_3\_0 | `0xb9F2d038150E296CdAcF489813CE2Bbe976a4C62` | `0x8041c4f03B6CA2EC7b795F33C10805ceb98733dB` | | descriptorProxyAddress | `0x8433dEA5F658D9003BB6e52c5170126179835DaC` | `0x7a5d1718944bfA246e42c8b95F0a88E37bAC5495` | | nonfungibleTokenPositionManagerAddress | `0xfA928D3ABc512383b8E5E77edd2d5678696084F9` | `0x069f199763c045A294C7913E64bA80E5F362A5d7` | | v3MigratorAddress | `0x117Fc8DEf58147016f92bAE713533dDB828aBB7e` | `0xf3C430AF1C9C18d414b5cf890BEc08789431b6Ed` | | quoterV2Address | `0x728BD3eC25D5EDBafebB84F3d67367Cd9EBC7693` | `0xdE41045eb15C8352413199f35d6d1A32803DaaE2` | | swapRouter02 | `0x7712FA47387542819d4E35A23f8116C90C18767C` | `0xb9D4347d129a83cBC40499Cd4fF223dE172a70dF` | | permit2 | `0x0000000000225e31d15943971f47ad3022f714fa` | `0x7d174F25ADcd4157EcB5B3448fEC909AeCB70033` | | universalRouter | `0xE1b076ea612Db28a0d768660e4D81346c02ED75e` | `0xCdFB71b46bF3f44FC909B5B4Eaf4967EC3C5B4e5` | | v3StakerAddress | `0x2cB10Ac97F2C3dAEDEaB7b72DbaEb681891f51B8` | `0xe17e6f1518a5185f646eB34Ac5A8055792bD3c9D` | | Init code hash | `0x010013f177ea1fcbc4520f9a3ca7cd2d1d77959e05aa66484027cb38e712aeed` | `0x010013f177ea1fcbc4520f9a3ca7cd2d1d77959e05aa66484027cb38e712aeed` | [​](#safe) Safe ------------------ Access the Safe UI at [https://abstract-safe.protofire.io/](https://abstract-safe.protofire.io/) . | Contract Type | Mainnet | Testnet | | --- | --- | --- | | SimulateTxAccessor | `0xdd35026932273768A3e31F4efF7313B5B7A7199d` | `0xdd35026932273768A3e31F4efF7313B5B7A7199d` | | SafeProxyFactory | `0xc329D02fd8CB2fc13aa919005aF46320794a8629` | `0xc329D02fd8CB2fc13aa919005aF46320794a8629` | | TokenCallbackHandler | `0xd508168Db968De1EBc6f288322e6C820137eeF79` | `0xd508168Db968De1EBc6f288322e6C820137eeF79` | | CompatibilityFallbackHandler | `0x9301E98DD367135f21bdF66f342A249c9D5F9069` | `0x9301E98DD367135f21bdF66f342A249c9D5F9069` | | CreateCall | `0xAAA566Fe7978bB0fb0B5362B7ba23038f4428D8f` | `0xAAA566Fe7978bB0fb0B5362B7ba23038f4428D8f` | | MultiSend | `0x309D0B190FeCCa8e1D5D8309a16F7e3CB133E885` | `0x309D0B190FeCCa8e1D5D8309a16F7e3CB133E885` | | MultiSendCallOnly | `0x0408EF011960d02349d50286D20531229BCef773` | `0x0408EF011960d02349d50286D20531229BCef773` | | SignMessageLib | `0xAca1ec0a1A575CDCCF1DC3d5d296202Eb6061888` | `0xAca1ec0a1A575CDCCF1DC3d5d296202Eb6061888` | | SafeToL2Setup | `0x199A9df0224031c20Cc27083A4164c9c8F1Bcb39` | `0x199A9df0224031c20Cc27083A4164c9c8F1Bcb39` | | Safe | `0xC35F063962328aC65cED5D4c3fC5dEf8dec68dFa` | `0xC35F063962328aC65cED5D4c3fC5dEf8dec68dFa` | | SafeL2 | `0x610fcA2e0279Fa1F8C00c8c2F71dF522AD469380` | `0x610fcA2e0279Fa1F8C00c8c2F71dF522AD469380` | | SafeToL2Migration | `0xa26620d1f8f1a2433F0D25027F141aaCAFB3E590` | `0xa26620d1f8f1a2433F0D25027F141aaCAFB3E590` | | SafeMigration | `0x817756C6c555A94BCEE39eB5a102AbC1678b09A7` | `0x817756C6c555A94BCEE39eB5a102AbC1678b09A7` | Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/tooling/deployed-contracts.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /tooling/deployed-contracts) [Faucets](/tooling/faucets) [Introduction](/infrastructure/nodes/introduction) On this page * [Currencies](#currencies) * [NFT Markets](#nft-markets) * [Uniswap V2](#uniswap-v2) * [Uniswap V3](#uniswap-v3) * [Safe](#safe) --- # Bridges - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Tooling Bridges [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) A bridge is a tool that allows users to move assets such as ETH from Ethereum to Abstract and vice versa. Under the hood, bridging works by having two smart contracts deployed: 1. A smart contract deployed to Ethereum (L1). 2. A smart contract deployed to Abstract (L2). These smart contracts communicate with each other to facilitate the deposit and withdrawal of assets between the two chains. [​](#native-bridge) Native Bridge ------------------------------------ Abstract has a native bridge to move assets between Ethereum and Abstract for free (excluding gas fees) that supports bridging both ETH and ERC-20 tokens. Deposits from L1 to L2 take around ~15 minutes, whereas withdrawals from L2 to L1 currently take up to 24 hours due to the built-in [withdrawal delay](https://docs.zksync.io/build/resources/withdrawal-delay#withdrawal-delay) . [Mainnet Bridge\ --------------\ \ Visit the native bridge to move assets between Ethereum and Abstract.](https://portal.mainnet.abs.xyz/bridge/) [Testnet Bridge\ --------------\ \ Visit the native bridge to move assets between Ethereum and Abstract.](https://portal.testnet.abs.xyz/bridge/) [​](#third-party-bridges) Third-party Bridges ------------------------------------------------ In addition to the native bridge, users can also utilize third-party bridges to move assets from other chains to Abstract and vice versa. These bridges offer alternative routes that are typically faster and cheaper than the native bridge, however come with different **security risks**. [View Third-party Bridges\ ------------------------\ \ Use third-party bridges to move assets between other chains and Abstract.](/ecosystem/bridges) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/tooling/bridges.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /tooling/bridges) [Block Explorers](/tooling/block-explorers) [Faucets](/tooling/faucets) On this page * [Native Bridge](#native-bridge) * [Third-party Bridges](#third-party-bridges) --- # Interoperability - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Ecosystem Interoperability [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [LayerZero\ ---------](https://docs.layerzero.network/v2) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/ecosystem/interoperability.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /ecosystem/interoperability) [Data & Indexing](/ecosystem/indexers) [Oracles](/ecosystem/oracles) --- # Data & Indexing - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Ecosystem Data & Indexing [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [Alchemy\ -------](https://www.alchemy.com/abstract) [Ghost\ -----](https://docs.tryghost.xyz/ghostgraph/overview) [Goldsky\ -------](https://docs.goldsky.com/chains/abstract) [The Graph\ ---------](https://thegraph.com/docs/) [Reservoir\ ---------](https://docs.reservoir.tools/reference/what-is-reservoir) [SQD\ ---](https://docs.sqd.ai/) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/ecosystem/indexers.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /ecosystem/indexers) [Bridges](/ecosystem/bridges) [Interoperability](/ecosystem/interoperability) --- # Oracles - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Ecosystem Oracles [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [Proof of Play VRF\ -----------------](https://docs.proofofplay.com/services/vrf) [Gelato VRF\ ----------](https://docs.gelato.network/web3-services/vrf) [Pyth Price Feeds\ ----------------](https://docs.pyth.network/price-feeds) [Pyth Entropy\ ------------](https://docs.pyth.network/entropy) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/ecosystem/oracles.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /ecosystem/oracles) [Interoperability](/ecosystem/interoperability) [RPC Providers](/ecosystem/rpc-providers) --- # Layer 2s - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Architecture Layer 2s [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Abstract is a [layer 2](/_sites/docs.abs.xyz/how-abstract-works/architecture/layer-2s#what-is-a-layer-2) (L2) blockchain that creates batches of transactions and posts them to Ethereum to inherit Ethereum’s security properties. Specifically, Abstract is a [ZK Rollup](/_sites/docs.abs.xyz/how-abstract-works/architecture/layer-2s#what-is-a-zk-rollup) built with the [ZK stack](/_sites/docs.abs.xyz/how-abstract-works/architecture/layer-2s#what-is-the-zk-stack) . By posting and verifying batches of transactions on Ethereum, Abstract provides strong security guarantees while also enabling fast and cheap transactions. [​](#what-is-a-layer-2%3F) What is a Layer 2? ------------------------------------------------ A layer 2 (L2) is a collective term that refers to a set of blockchains that are built to scale Ethereum. Since Ethereum is only able to process roughly 15 transactions per second (TPS), often with expensive gas fees, it is not feasible for consumer applications to run on Ethereum directly. The main goal of an L2 is therefore to both increase the transaction throughput _(i.e. how many transactions can be processed per second)_, and reduce the cost of gas fees for those transactions, **without** sacrificing decentralization or security. [Ethereum Docs - Layer 2s\ ------------------------\ \ Start developing smart contracts or applications on Abstract](https://ethereum.org/en/layer-2/) [​](#what-is-a-zk-rollup%3F) What is a ZK Rollup? ---------------------------------------------------- A ZK (Zero-Knowledge) Rollup is a type of L2 that uses zero-knowledge proofs to verify the validity of batches of transactions that are posted to Ethereum. As the L2 posts batches of transactions to Ethereum, it is important to ensure that the transactions are valid and the state of the L2 is correct. This is done by using zero-knowledge proofs (called [validity proofs](https://ethereum.org/en/developers/docs/scaling/zk-rollups/#validity-proofs) ) to confirm the correctness of the state transitions in the batch without having to re-execute the transactions on Ethereum. [Ethereum Docs - ZK Rollups\ --------------------------\ \ Start developing smart contracts or applications on Abstract](https://ethereum.org/en/developers/docs/scaling/zk-rollups/) [​](#what-is-the-zk-stack%3F) What is the ZK Stack? ------------------------------------------------------ Abstract uses the [ZK stack](https://zkstack.io/components) ; an open-source framework for building sovereign ZK rollups. [ZKsync Docs - ZK Stack\ ----------------------\ \ Start developing smart contracts or applications on Abstract](https://zkstack.io) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/how-abstract-works/architecture/layer-2s.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /how-abstract-works/architecture/layer-2s) [ZKsync CLI](/build-on-abstract/zksync-cli) [Transaction Lifecycle](/how-abstract-works/architecture/transaction-lifecycle) On this page * [What is a Layer 2?](#what-is-a-layer-2%3F) * [What is a ZK Rollup?](#what-is-a-zk-rollup%3F) * [What is the ZK Stack?](#what-is-the-zk-stack%3F) --- # How It Works - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Abstract Global Wallet How It Works [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Abstract Global Wallet makes use of [native account abstraction](/how-abstract-works/native-account-abstraction) , by creating [smart contract wallets](/how-abstract-works/native-account-abstraction/smart-contract-wallets) for users that have more security and flexibility than traditional EOAs. Users can connect their Abstract Global Wallet to an application by logging in with their email, social account, or existing wallet. Once connected, applications can begin prompting users to approve transactions, which are executed from the user’s smart contract wallet. [Try the AGW live demo\ ---------------------\ \ Try the live demo of Abstract Global Wallet to see it in action.](https://create-abstract-app.vercel.app/) [​](#how-abstract-global-wallet-works) How Abstract Global Wallet Works -------------------------------------------------------------------------- Each AGW account must have at least one signer that is authorized to sign transactions on behalf of the smart contract wallet. For this reason, each AGW account is generated in a two-step process: 1. **EOA Creation**: An EOA wallet is created under the hood as the user signs up with their email, social account, or other login methods. 2. **Smart Contract Wallet Creation**: the smart contract wallet is deployed and provided with the EOA address (from the previous step) as an approved signer. Once the smart contract is initialized, the user can freely add and remove signers to the wallets and make use of the [other features](/_sites/docs.abs.xyz/abstract-global-wallet/architecture#smart-contract-wallet-features) provided by the AGW. ### [​](#eoa-creation) EOA Creation First, the user authenticates with their email, social account, or other login method and an EOA wallet (public-private key pair) tied to this login method is created under the hood. This process is powered by [Privy Embedded Wallets](https://docs.privy.io/guide/react/wallets/embedded/creation#automatic) . And occurs in a three step process: 1 Random Bit Generation A random 128-bit value is generated using a [CSPRNG](https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator) . 2 Keypair Generation The 128-bit value is converted into a 12-word mnemonic phrase using [BIP-39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) . From this mnemonic phrase, a public-private key pair is derived. 3 Private Key Sharding The private key is sharded (split) into 3 parts and stored in 3 different locations to ensure security and recovery mechanisms. #### [​](#private-key-sharding) Private Key Sharding The generated private key is split into 3 shards using [Shamir’s Secret Sharing](https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing) algorithm and stored in 3 different locations. **2 out of 3** shards are required to reconstruct the private key. The three shards are: 1. **Device Share**: This shard is stored on the user’s device. In a browser environment, it is stored inside the local storage of the Privy iframe. 2. **Auth Share**: This shard is encrypted and stored on Privy’s servers. It is retrieved when the user logs in with their original login method. 3. **Recovery Share**: This shard is stored in a backup location of the user’s choice, typically a cloud storage account such as Google Drive or iCloud. #### [​](#how-shards-are-combined) How Shards are Combined To reconstruct the private key, the user must have access to **two out of three** shards. This can be a combination of any two shards, with the most common being the **Device Share** and **Auth Share**. * **Device Share** + **Auth Share**: This is the typical flow; the user authenticates with the Privy server using their original login method (e.g. social account) on their device and the auth share is decrypted. * **Device Share** + **Recovery Share**: If the Privy server is offline or the user has lost access to their original login method (e.g. they no longer have access to their social account), they can use the recovery share to reconstruct the private key. * **Auth Share** + **Recovery Share**: If the user wants to access their account from a new device, a new device share can be generated by combining the auth share and recovery share. ### [​](#smart-contract-wallet-deployment) Smart Contract Wallet Deployment Once an EOA wallet is generated, the public key is provided to a [smart contract wallet](/how-abstract-works/native-account-abstraction/smart-contract-wallets) deployment. The smart contract wallet is deployed and the EOA wallet is added as an authorized signer to the wallet during the initialization process. As all accounts on Abstract are smart contract accounts, (see [native account abstraction](/how-abstract-works/native-account-abstraction) ), the smart contract wallet is treated as a first-class citizen when interacting with the Abstract ecosystem. The smart contract wallet that is deployed is a modified fork of [Clave](https://github.com/getclave/clave-contracts) customized to have an `secp256k1` signer by default to support the Privy Embedded Wallet _(as opposed to the default `secp256r1` signer in Clave)_ as well as custom validation logic to support [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures. #### [​](#smart-contract-wallet-features) Smart Contract Wallet Features The smart contract wallet includes many modules to extend the functionality of the wallet, including: * **Recovery Modules**: Allows the user to recover their account if they lose access to their login method via recovery methods including email or guardian recovery. * **Paymaster Support**: Transaction gas fees can be sponsored by [paymasters](/how-abstract-works/native-account-abstraction/paymasters) . * **Multiple Signers**: Users can add multiple signers to the wallet to allow for multiple different accounts to sign transactions. * **P256/secp256r1 Support**: Users can add signers generated from [passkeys](https://fidoalliance.org/passkeys/) to authorize transactions. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/architecture.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/architecture) [Getting Started](/abstract-global-wallet/getting-started) [Frequently Asked Questions](/abstract-global-wallet/frequently-asked-questions) On this page * [How Abstract Global Wallet Works](#how-abstract-global-wallet-works) * [EOA Creation](#eoa-creation) * [Private Key Sharding](#private-key-sharding) * [How Shards are Combined](#how-shards-are-combined) * [Smart Contract Wallet Deployment](#smart-contract-wallet-deployment) * [Smart Contract Wallet Features](#smart-contract-wallet-features) --- # EVM Differences - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation EVM Differences EVM Differences [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) While Abstract is EVM compatible and you can use familiar development tools from the Ethereum ecosystem, the bytecode that Abstract’s VM (the [ZKsync VM](https://docs.zksync.io/build/developer-reference/era-vm) ) understands is different than what Ethereum’s [EVM](https://ethereum.org/en/developers/docs/evm/) understands. These differences exist to both optimize the VM to perform efficiently with ZK proofs and to provide more powerful ways for developers to build consumer-facing applications. When building smart contracts on Abstract, it’s helpful to understand what the differences are between Abstract and Ethereum, and how best to leverage these differences to create the best experience for your users. [​](#recommended-best-practices) Recommended Best Practices -------------------------------------------------------------- Learn more about best practices for building and deploying smart contracts on Abstract. [Best practices\ --------------\ \ Recommended changes to make to your smart contracts when deploying on Abstract.](/how-abstract-works/evm-differences/best-practices) [Contract deployment\ -------------------\ \ See how contract deployment differs on Abstract compared to Ethereum.](/how-abstract-works/evm-differences/contract-deployment) [​](#differences-in-evm-instructions) Differences in EVM Instructions ------------------------------------------------------------------------ See how Abstract’s VM differs from the EVM’s opcodes and precompiled contracts. [EVM opcodes\ -----------\ \ See what opcodes are supported natively or supplemented with system contracts.](/how-abstract-works/evm-differences/evm-opcodes) [EVM precompiles\ ---------------\ \ See what precompiled smart contracts are supported by Abstract.](/how-abstract-works/evm-differences/precompiles) [​](#other-differences) Other Differences -------------------------------------------- Learn the nuances of other differences between Abstract and Ethereum. [Gas fees\ --------\ \ Learn how gas fees and gas refunds work with the bootloader on Abstract.](/how-abstract-works/evm-differences/best-practices) [Nonces\ ------\ \ Explore how nonces are stored on Abstract’s smart contract accounts.](/how-abstract-works/evm-differences/contract-deployment) [Libraries\ ---------\ \ Learn how the compiler handles libraries on Abstract.](/how-abstract-works/evm-differences/contract-deployment) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/how-abstract-works/evm-differences/overview.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /how-abstract-works/evm-differences/overview) [Signature Validation](/how-abstract-works/native-account-abstraction/signature-validation) [Best Practices](/how-abstract-works/evm-differences/best-practices) On this page * [Recommended Best Practices](#recommended-best-practices) * [Differences in EVM Instructions](#differences-in-evm-instructions) * [Other Differences](#other-differences) --- # Paymasters - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Ecosystem Paymasters [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [Zyfi\ ----](https://docs.zyfi.org/integration-guide/paymasters-integration/sponsored-paymaster) [Sablier\ -------](https://sablier.com/) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/ecosystem/paymasters.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /ecosystem/paymasters) [RPC Providers](/ecosystem/rpc-providers) [Automation](/ecosystem/automation) --- # RPC Providers - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Ecosystem RPC Providers [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [Alchemy\ -------](https://www.alchemy.com/abstract) [BlastAPI\ --------](https://docs.blastapi.io/blast-documentation/apis-documentation/core-api/abstract) [QuickNode\ ---------](https://www.quicknode.com/docs/abstract) [dRPC\ ----](https://drpc.org/chainlist/abstract) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/ecosystem/rpc-providers.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /ecosystem/rpc-providers) [Oracles](/ecosystem/oracles) [Paymasters](/ecosystem/paymasters) --- # Frequently Asked Questions - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Abstract Global Wallet Frequently Asked Questions [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) ### [​](#who-holds-the-private-keys-to-the-agw%3F) Who holds the private keys to the AGW? As described in the [how it works](/abstract-global-wallet/architecture) section, the private key of the EOA that is the approved signer of the AGW smart contract is generated and split into three shards. * **Device Share**: This shard is stored on the user’s device. In a browser environment, it is stored inside the local storage of the Privy iframe. * **Auth Share**: This shard is encrypted and stored on Privy’s servers. It is retrieved when the user logs in with their original login method. * **Recovery Share**: This shard is stored in a backup location of the user’s choice, typically a cloud storage account such as Google Drive or iCloud. ### [​](#does-the-user-need-to-create-their-agw-on-the-abstract-website%3F) Does the user need to create their AGW on the Abstract website? No, users don’t need to leave your application to create their AGW, any application that integrates the wallet connection flow supports both creating a new AGW and connecting an existing AGW. For example, the [live demo](https://create-abstract-app.vercel.app/) showcases how both users without an existing AGW can create one from within the application and existing AGW users can connect their AGW to the application and begin approving transactions. ### [​](#who-deploys-the-agw-smart-contracts%3F) Who deploys the AGW smart contracts? A factory smart contract deploys each AGW smart contract. The generated EOA sends the transaction to deploy the AGW smart contract via the factory, and initializes the smart contract with itself as the approved signer. Using the [SDK](/abstract-global-wallet/getting-started) , this transaction is sponsored by a [paymaster](/how-abstract-works/native-account-abstraction/paymasters) , meaning users don’t need to load their EOA with any funds to deploy the AGW smart contract to get started. ### [​](#does-the-agw-smart-contract-work-on-other-chains%3F) Does the AGW smart contract work on other chains? Abstract Global Wallet is built on top of [native account abstraction](/how-abstract-works/native-account-abstraction/overview) ; a feature unique to Abstract. While the smart contract code is EVM-compatible, the SDK is not chain-agnostic and only works on Abstract due to the technical differences between Abstract and other EVM-compatible chains. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/frequently-asked-questions.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/frequently-asked-questions) [How It Works](/abstract-global-wallet/architecture) [Native Integration](/abstract-global-wallet/agw-react/native-integration) On this page * [Who holds the private keys to the AGW?](#who-holds-the-private-keys-to-the-agw%3F) * [Does the user need to create their AGW on the Abstract website?](#does-the-user-need-to-create-their-agw-on-the-abstract-website%3F) * [Who deploys the AGW smart contracts?](#who-deploys-the-agw-smart-contracts%3F) * [Does the AGW smart contract work on other chains?](#does-the-agw-smart-contract-work-on-other-chains%3F) --- # Automation - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Ecosystem Automation [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [Gelato Web3 Functions\ ---------------------](https://docs.gelato.network/web3-services/web3-functions) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/ecosystem/automation.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /ecosystem/automation) [Paymasters](/ecosystem/paymasters) [Relayers](/ecosystem/relayers) --- # Relayers - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Ecosystem Relayers [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [Gelato Relay\ ------------](https://docs.gelato.network/web3-services/relay) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/ecosystem/relayers.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /ecosystem/relayers) [Automation](/ecosystem/automation) --- # Native Integration - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Library Integrations Native Integration [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Integrate AGW into an existing React application using the steps below, or [watch the video tutorial](https://youtu.be/P5lvuBcmisU) for a step-by-step walkthrough. ### [​](#1-install-abstract-global-wallet) 1\. Install Abstract Global Wallet Install the required dependencies: npm install @abstract-foundation/agw-react @abstract-foundation/agw-client wagmi [email protected] @tanstack/react-query ### [​](#2-setup-the-abstractwalletprovider) 2\. Setup the AbstractWalletProvider Wrap your application in the `AbstractWalletProvider` component to enable the use of the package’s hooks and components throughout your application. import { AbstractWalletProvider } from "@abstract-foundation/agw-react"; import { abstractTestnet, abstract } from "viem/chains"; // Use abstract for mainnet const App = () => { return ( {/* Your application components */} ); }; **Next.js App Router:** If you are using [Next.js App Router](https://nextjs.org/docs) , create a new component and add the `use client` directive at the top of your file ([see example](https://github.com/Abstract-Foundation/examples/blob/main/agw-nextjs/src/components/NextAbstractWalletProvider.tsx) ) and wrap your application in this component ([see example](https://github.com/Abstract-Foundation/examples/blob/main/agw-nextjs/src/app/layout.tsx#L48-L54) ). The `AbstractWalletProvider` wraps your application in both the [WagmiProvider](https://wagmi.sh/react/api/WagmiProvider) and [QueryClientProvider](https://tanstack.com/query/latest/docs/framework/react/reference/QueryClientProvider) , meaning you can use the hooks and features of these libraries within your application. ### [​](#3-login-with-agw) 3\. Login with AGW With the provider setup, prompt users to sign in to your application with their Abstract Global Wallet using the [useLoginWithAbstract](/abstract-global-wallet/agw-react/hooks/useLoginWithAbstract) hook. import { useLoginWithAbstract } from "@abstract-foundation/agw-react"; export default function SignIn() { // login function to prompt the user to sign in with AGW. const { login } = useLoginWithAbstract(); return ; } ### [​](#4-use-the-wallet) 4\. Use the Wallet With the AGW connected, prompt the user to approve sending transactions from their wallet. * Use the [Abstract Client](/abstract-global-wallet/agw-react/hooks/useAbstractClient) or Abstract hooks for: * Wallet actions. e.g. [sendTransaction](/abstract-global-wallet/agw-client/actions/sendTransaction) , [deployContract](/abstract-global-wallet/agw-client/actions/deployContract) , [writeContract](/abstract-global-wallet/agw-client/actions/writeContract) etc. * Smart contract wallet features. e.g. [gas-sponsored transactions](/abstract-global-wallet/agw-react/hooks/useWriteContractSponsored) , [session keys](/abstract-global-wallet/agw-client/session-keys/overview) , [transaction batches](/abstract-global-wallet/agw-client/actions/sendTransactionBatch) . * Use [Wagmi](https://wagmi.sh/) hooks and [Viem](https://viem.sh/) functions for generic blockchain interactions, for example: * Reading data, e.g. Wagmi’s [useAccount](https://wagmi.sh/react/api/hooks/useAccount) and [useBalance](https://wagmi.sh/react/api/hooks/useBalance) hooks. * Writing data, e.g. Wagmi’s [useSignMessage](https://wagmi.sh/react/api/hooks/useSignMessage) and Viem’s [verifyMessage](https://viem.sh/docs/actions/public/verifyMessage.html) . Abstract Client Abstract Hooks Wagmi Hooks import { useAbstractClient } from "@abstract-foundation/agw-react"; export default function SendTransactionButton() { // Option 1: Access and call methods directly const { data: client } = useAbstractClient(); async function sendTransaction() { if (!client) return; // Submits a transaction from the connected AGW smart contract wallet. const hash = await client.sendTransaction({ to: "0x273B3527BF5b607dE86F504fED49e1582dD2a1C6", data: "0x69", }); } return ; } Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/native-integration.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/native-integration) [Frequently Asked Questions](/abstract-global-wallet/frequently-asked-questions) [ConnectKit](/abstract-global-wallet/agw-react/integrating-with-connectkit) On this page * [1\. Install Abstract Global Wallet](#1-install-abstract-global-wallet) * [2\. Setup the AbstractWalletProvider](#2-setup-the-abstractwalletprovider) * [3\. Login with AGW](#3-login-with-agw) * [4\. Use the Wallet](#4-use-the-wallet) --- # Dynamic - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Library Integrations Dynamic [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The `agw-react` package includes an option to include Abstract Global Wallet as a connection option in the Dynamic `DynamicWidget` component. [AGW + Dynamic Example Repo\ --------------------------\ \ Use our example repo to quickly get started with AGW and Dynamic.](https://github.com/Abstract-Foundation/examples/tree/main/agw-dynamic-nextjs) [​](#installation) Installation ---------------------------------- Install the required dependencies: npm install @abstract-foundation/agw-react @abstract-foundation/agw-client @dynamic-labs/sdk-react-core @dynamic-labs/ethereum @dynamic-labs-connectors/abstract-global-wallet-evm viem [​](#usage) Usage -------------------- ### [​](#1-configure-the-dynamiccontextprovider) 1\. Configure the DynamicContextProvider Wrap your application in the [DynamicContextProvider](https://docs.dynamic.xyz/react-sdk/components/dynamiccontextprovider) component: Providers Config import { DynamicContextProvider } from "@dynamic-labs/sdk-react-core"; import { AbstractEvmWalletConnectors } from "@dynamic-labs-connectors/abstract-global-wallet-evm"; import { Chain } from "viem"; import { abstractTestnet, abstract } from "viem/chains"; // Use abstract for mainnet export default function AbstractWalletWrapper({ children, }: { children: React.ReactNode; }) { return ( {children} ); } **Next.js App Router:** If you are using [Next.js App Router](https://nextjs.org/docs) , create a new component and add the `use client` directive at the top of your file ([see example](https://github.com/Abstract-Foundation/examples/blob/main/agw-dynamic-nextjs/src/components/NextAbstractWalletProvider.tsx) ) and wrap your application in this component. ### [​](#2-render-the-dynamicwidget) 2\. Render the DynamicWidget Render the [DynamicWidget](https://docs.dynamic.xyz/react-sdk/components/dynamicwidget) component anywhere in your application: import { DynamicWidget } from "@dynamic-labs/sdk-react-core"; export default function Home() { return ; } Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/integrating-with-dynamic.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/integrating-with-dynamic) [ConnectKit](/abstract-global-wallet/agw-react/integrating-with-connectkit) [Privy](/abstract-global-wallet/agw-react/integrating-with-privy) On this page * [Installation](#installation) * [Usage](#usage) * [1\. Configure the DynamicContextProvider](#1-configure-the-dynamiccontextprovider) * [2\. Render the DynamicWidget](#2-render-the-dynamicwidget) --- # ConnectKit - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Library Integrations ConnectKit [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The `agw-react` package includes an option to include Abstract Global Wallet as a connection option in the ConnectKit `ConnectKitButton` component. [AGW + ConnectKit Example Repo\ -----------------------------\ \ Use our example repo to quickly get started with AGW and ConnectKit.](https://github.com/Abstract-Foundation/examples/tree/main/agw-connectkit-nextjs) [​](#installation) Installation ---------------------------------- Install the required dependencies: npm install @abstract-foundation/agw-react @abstract-foundation/agw-client wagmi viem connectkit @tanstack/react-query @rainbow-me/rainbowkit [​](#usage) Usage -------------------- ### [​](#1-configure-the-providers) 1\. Configure the Providers Wrap your application in the required providers: Providers Wagmi Config import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { WagmiProvider } from "wagmi"; import { ConnectKitProvider } from "connectkit"; const queryClient = new QueryClient(); export default function AbstractWalletWrapper({ children, }: { children: React.ReactNode; }) { return ( {/* Your application components */} {children} ); } ### [​](#2-render-the-connectkitbutton) 2\. Render the ConnectKitButton Render the [ConnectKitButton](https://docs.family.co/connectkit/connect-button) component anywhere in your application: import { ConnectKitButton } from "connectkit"; export default function Home() { return ; } Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/integrating-with-connectkit.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/integrating-with-connectkit) [Native Integration](/abstract-global-wallet/agw-react/native-integration) [Dynamic](/abstract-global-wallet/agw-react/integrating-with-dynamic) On this page * [Installation](#installation) * [Usage](#usage) * [1\. Configure the Providers](#1-configure-the-providers) * [2\. Render the ConnectKitButton](#2-render-the-connectkitbutton) --- # RainbowKit - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Library Integrations RainbowKit [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The `agw-react` package includes an option to include Abstract Global Wallet as a connection option in your [RainbowKit ConnectButton](https://www.rainbowkit.com/docs/connect-button) . [AGW + RainbowKit Example Repo\ -----------------------------\ \ Use our example repo to quickly get started with AGW and RainbowKit.](https://github.com/Abstract-Foundation/examples/tree/main/agw-rainbowkit-nextjs) [​](#installation) Installation ---------------------------------- Install the required dependencies: npm install @abstract-foundation/agw-react @abstract-foundation/agw-client @rainbow-me/rainbowkit wagmi [email protected] @tanstack/react-query [​](#import) Import ---------------------- The `agw-react` package includes the `abstractWallet` connector you can use to add Abstract Global Wallet as a connection option in your RainbowKit [ConnectButton](https://www.rainbowkit.com/docs/connect-button) . import { abstractWallet } from "@abstract-foundation/agw-react/connectors"; [​](#usage) Usage -------------------- ### [​](#1-configure-the-providers) 1\. Configure the Providers Wrap your application in the following providers: * [WagmiProvider](https://wagmi.sh/react/api/WagmiProvider) from `wagmi`. * [QueryClientProvider](https://tanstack.com/query/latest/docs/framework/react/reference/QueryClientProvider) from `@tanstack/react-query`. * [RainbowKitProvider](https://www.rainbowkit.com/docs/custom-connect-button) from `@rainbow-me/rainbowkit`. Providers RainbowKit Config Wagmi Config import { RainbowKitProvider, darkTheme } from "@rainbow-me/rainbowkit"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { WagmiProvider } from "wagmi"; // + import config from your wagmi config const client = new QueryClient(); export default function AbstractWalletWrapper() { return ( {/* Your application components */} ); } ### [​](#2-render-the-connectbutton) 2\. Render the ConnectButton Render the `ConnectButton` from `@rainbow-me/rainbowkit` anywhere in your app. import { ConnectButton } from "@rainbow-me/rainbowkit"; export default function Home() { return ; } Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/integrating-with-rainbowkit.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/integrating-with-rainbowkit) [Privy](/abstract-global-wallet/agw-react/integrating-with-privy) [Thirdweb](/abstract-global-wallet/agw-react/integrating-with-thirdweb) On this page * [Installation](#installation) * [Import](#import) * [Usage](#usage) * [1\. Configure the Providers](#1-configure-the-providers) * [2\. Render the ConnectButton](#2-render-the-connectbutton) --- # Privy - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Library Integrations Privy [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [Privy](https://docs.privy.io/guide/react/quickstart) powers the login screen and [EOA creation](/abstract-global-wallet/architecture#eoa-creation) of Abstract Global Wallet, meaning you can use Privy’s features and SDKs natively alongside AGW. The `agw-react` package provides an `AbstractPrivyProvider` component, which wraps your application with the [PrivyProvider](https://docs.privy.io/reference/sdk/react-auth/functions/PrivyProvider) as well as the Wagmi and TanStack Query providers; allowing you to use the features of each library with Abstract Global Wallet. [AGW + Privy Example Repo\ ------------------------\ \ Use our example repo to quickly get started with AGW and Privy.](https://github.com/Abstract-Foundation/examples/tree/main/agw-privy-nextjs) [​](#installation) Installation ---------------------------------- Install the required dependencies: npm install @abstract-foundation/agw-react @abstract-foundation/agw-client wagmi viem @tanstack/react-query [​](#usage) Usage -------------------- This section assumes you have already created an app on the [Privy dashboard](https://docs.privy.io/guide/react/quickstart) . ### [​](#1-enable-abstract-integration) 1\. Enable Abstract Integration From the [Privy dashboard](https://dashboard.privy.io/) , navigate to **Ecosystem** > **Integrations**. Scroll down to find **Abstract** and toggle the switch to enable the integration. ### [​](#2-configure-the-abstractprivyprovider) 2\. Configure the AbstractPrivyProvider Wrap your application in the `AbstractPrivyProvider` component, providing your Privy app ID as the `appId` prop. import { AbstractPrivyProvider } from "@abstract-foundation/agw-react/privy"; const App = () => { return ( {children} ); }; **Next.js App Router:** If you are using [Next.js App Router](https://nextjs.org/docs) , create a new component and add the `use client` directive at the top of your file ([see example](https://github.com/Abstract-Foundation/examples/blob/main/agw-privy-nextjs/src/components/NextAbstractWalletProvider.tsx) ) and wrap your application in this component. ### [​](#3-login-users) 3\. Login users Use the `useAbstractPrivyLogin` hook to prompt users to login with Abstract Global Wallet. import { useAbstractPrivyLogin } from "@abstract-foundation/agw-react/privy"; const LoginButton = () => { const { login, link } = useAbstractPrivyLogin(); return ; }; * The `login` function uses Privy’s [loginWithCrossAppAccount](https://docs.privy.io/guide/react/cross-app/requester#login) function to authenticate users with their Abstract Global Wallet account. * The `link` function uses Privy’s [linkCrossAppAccount](https://docs.privy.io/guide/react/cross-app/requester#linking) function to allow authenticated users to link their existing account to an Abstract Global Wallet. ### [​](#4-use-hooks-and-functions) 4\. Use hooks and functions Once the user has signed in, you can begin to use any of the `agw-react` hooks, such as [useWriteContractSponsored](/abstract-global-wallet/agw-react/hooks/useWriteContractSponsored) as well as all of the existing [wagmi hooks](https://wagmi.sh/react/api/hooks) ; such as [useAccount](https://wagmi.sh/react/api/hooks/useAccount) , [useBalance](https://wagmi.sh/react/api/hooks/useBalance) , etc. All transactions will be sent from the connected AGW smart contract wallet (i.e. the `tx.from` address will be the AGW smart contract wallet address). import { useAccount, useSendTransaction } from "wagmi"; export default function Example() { const { address, status } = useAccount(); const { sendTransaction, isPending } = useSendTransaction(); return ( ); } Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/integrating-with-privy.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/integrating-with-privy) [Dynamic](/abstract-global-wallet/agw-react/integrating-with-dynamic) [RainbowKit](/abstract-global-wallet/agw-react/integrating-with-rainbowkit) On this page * [Installation](#installation) * [Usage](#usage) * [1\. Enable Abstract Integration](#1-enable-abstract-integration) * [2\. Configure the AbstractPrivyProvider](#2-configure-the-abstractprivyprovider) * [3\. Login users](#3-login-users) * [4\. Use hooks and functions](#4-use-hooks-and-functions) --- # Ethers - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Applications Ethers [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) To best utilize the features of Abstract, it is recommended to use [zksync-ethers](https://sdk.zksync.io/js/ethers/why-zksync-ethers) library alongside [ethers](https://docs.ethers.io/v6/) . Prerequisites Ensure you have the following installed on your machine: - [Node.js](https://nodejs.org/en/download/) v18.0.0 or later. [​](#1-create-a-new-project) 1\. Create a new project -------------------------------------------------------- Create a new directory and change directory into it. mkdir my-abstract-app && cd my-abstract-app Initialize a new Node.js project. npm init -y Install the `zksync-ethers` and `ethers` libraries. npm install zksync-ethers@6 ethers@6 [​](#2-connect-to-abstract) 2\. Connect to Abstract ------------------------------------------------------ Testnet Mainnet import { Provider, Wallet } from "zksync-ethers"; import { ethers } from "ethers"; // Read data from a provider const provider = new Provider("https://api.testnet.abs.xyz"); const blockNumber = await provider.getBlockNumber(); // Submit transactions from a wallet const wallet = new Wallet(ethers.Wallet.createRandom().privateKey, provider); const tx = await wallet.sendTransaction({ to: wallet.getAddress(), }); Learn more about the features of `zksync-ethers` in the official documentation: * [zksync-ethers features](https://sdk.zksync.io/js/ethers/guides/features) * [ethers documentation](https://docs.ethers.io/v6/) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/build-on-abstract/applications/ethers.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /build-on-abstract/applications/ethers) [Debugging Smart Contracts](/build-on-abstract/smart-contracts/debugging-contracts) [Viem](/build-on-abstract/applications/viem) On this page * [1\. Create a new project](#1-create-a-new-project) * [2\. Connect to Abstract](#2-connect-to-abstract) --- # Foundry - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Smart Contracts Foundry [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) To use Foundry to build smart contracts on Abstract, use the [foundry-zksync](https://github.com/matter-labs/foundry-zksync) fork. [YouTube Tutorial: Get Started with Foundry\ ------------------------------------------\ \ Watch a step-by-step tutorial on how to get started with Foundry.](https://www.youtube.com/watch?v=7qgH6UNqTl8) [​](#1-install-the-foundry-zksync-fork) 1\. Install the foundry-zksync fork ------------------------------------------------------------------------------ This installation overrides any existing forge and cast binaries in `~/.foundry`. To revert to the standard foundry installation, follow the [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation#using-foundryup) . You can swap between the two installations at any time. 1 Install foundry-zksync Install the `foundryup-zksync` fork: curl -L https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/install-foundry-zksync | bash Run `foundryup-zksync` to install `forge`, `cast`, and `anvil`: foundryup-zksync You may need to restart your terminal session after installation to continue. Common installation issues foundryup-zksync: command not found Restart your terminal session. Could not detect shell To add the `foundry` binary to your PATH, run the following command: export PATH="$PATH:/Users//.foundry/bin" Replace `` with the correct path to your home directory. Library not loaded: libusb The [libusb](https://libusb.info/) library may need to be installed manually on macOS. Run the following command to install the library: brew install libusb 2 Verify installation A helpful command to check if the installation was successful is: forge build --help | grep -A 20 "ZKSync configuration:" If installed successfully, 20 lines of `--zksync` options will be displayed. [​](#2-create-a-new-project) 2\. Create a new project -------------------------------------------------------- Create a new project with `forge` and change directory into the project. forge init my-abstract-project && cd my-abstract-project [​](#3-modify-foundry-configuration) 3\. Modify Foundry configuration ------------------------------------------------------------------------ Update your `foundry.toml` file to include the following options: [profile.default] src = 'src' libs = ['lib'] fallback_oz = true is_system = false # Note: NonceHolder and the ContractDeployer system contracts can only be called with a special is_system flag as true mode = "3" To use [system contracts](/how-abstract-works/system-contracts/overview) , set the `is_system` flag to **true**. [​](#4-write-a-smart-contract) 4\. Write a smart contract ------------------------------------------------------------ Modify the `src/Counter.sol` file to include the following smart contract: // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; contract Counter { uint256 public number; function setNumber(uint256 newNumber) public { number = newNumber; } function increment() public { number++; } } [​](#5-compile-the-smart-contract) 5\. Compile the smart contract -------------------------------------------------------------------- Use the [zksolc compiler](https://docs.zksync.io/zk-stack/components/compiler/toolchain/solidity) (installed in the above steps) to compile smart contracts for Abstract: forge build --zksync You should now see the compiled smart contracts in the generated `zkout` directory. [​](#6-deploy-the-smart-contract) 6\. Deploy the smart contract ------------------------------------------------------------------ Get testnet funds Deploying smart contracts requires testnet ETH. Claim testnet funds via a [faucet](/tooling/faucets) , or [bridge](/tooling/bridges) ETH from Sepolia to the Abstract testnet. Add your private key Create a new [wallet keystore](https://book.getfoundry.sh/reference/cast/cast-wallet-import) . cast wallet import myKeystore --interactive Enter your wallet’s private key when prompted and provide a password to encrypt it. We recommend not to use a private key associated with real funds. Create a new wallet for this step. Deploy your smart contract Run the following command to deploy your smart contracts: Testnet Mainnet forge create src/Counter.sol:Counter \ --account myKeystore \ --rpc-url https://api.testnet.abs.xyz \ --chain 11124 \ --zksync Ensure `myKeystore` is the name of the keystore file you created in the previous step. If successful, the output should look similar to the following: Deployer: 0x9C073184e74Af6D10DF575e724DC4712D98976aC Deployed to: 0x85717893A18F255285AB48d7bE245ddcD047dEAE Transaction hash: 0x2a4c7c32f26b078d080836b247db3e6c7d0216458a834cfb8362a2ac84e68d9f Verify your smart contract on the block explorer Verifying your smart contract is helpful for others to view the code and interact with it from a [block explorer](/tooling/block-explorers) . To verify your smart contract, run the following command: Testnet Mainnet forge verify-contract 0x85717893A18F255285AB48d7bE245ddcD047dEAE \ src/Counter.sol:Counter \ --verifier etherscan \ --verifier-url https://api-sepolia.abscan.org/api \ --etherscan-api-key TACK2D1RGYX9U7MC31SZWWQ7FCWRYQ96AD \ --zksync _**Note**: Replace the contract path and address with your own._ Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/build-on-abstract/smart-contracts/foundry.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /build-on-abstract/smart-contracts/foundry) [Hardhat](/build-on-abstract/smart-contracts/hardhat) [Debugging Smart Contracts](/build-on-abstract/smart-contracts/debugging-contracts) On this page * [1\. Install the foundry-zksync fork](#1-install-the-foundry-zksync-fork) * [2\. Create a new project](#2-create-a-new-project) * [3\. Modify Foundry configuration](#3-modify-foundry-configuration) * [4\. Write a smart contract](#4-write-a-smart-contract) * [5\. Compile the smart contract](#5-compile-the-smart-contract) * [6\. Deploy the smart contract](#6-deploy-the-smart-contract) --- # Thirdweb - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Applications Thirdweb [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Prerequisites Ensure you have the following installed on your machine: * [Node.js](https://nodejs.org/en/download/) v18.0.0 or later. [​](#1-create-a-new-project) 1\. Create a new project -------------------------------------------------------- Create a new React or React Native project using the thirdweb CLI. npx thirdweb create app --legacy-peer-deps Select your preferences when prompted by the CLI, or use the recommended setup below. Recommended application setup We recommend selecting the following options when prompted by the thirdweb CLI: ✔ What type of project do you want to create? › App ✔ What is your project named? … my-abstract-app ✔ What framework do you want to use? › Next.js Change directory into the newly created project: cd my-abstract-app (Replace `my-abstract-app` with your created project name.) [​](#2-set-up-a-thirdweb-api-key) 2\. Set up a Thirdweb API key ------------------------------------------------------------------ On the [thirdweb dashboard](https://thirdweb.com/dashboard) , create your account (or sign in), and copy your project’s **Client ID** from the **Settings** section. Ensure that `localhost` is included in the allowed domains. Create an `.env.local` file and add your client ID as an environment variable: NEXT_PUBLIC_TEMPLATE_CLIENT_ID=your-client-id-here Start the development server and navigate to [`http://localhost:3000`](http://localhost:3000) in your browser to view the application. npm run dev [​](#3-connect-the-app-to-abstract) 3\. Connect the app to Abstract ---------------------------------------------------------------------- Import the Abstract chain from the `thirdweb/chains` package: Testnet Mainnet import { abstractTestnet } from "thirdweb/chains"; Use the Abstract chain import as the value for the `chain` property wherever required. Learn more on the official [thirdweb documentation](https://portal.thirdweb.com/react/v5) . Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/build-on-abstract/applications/thirdweb.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /build-on-abstract/applications/thirdweb) [Viem](/build-on-abstract/applications/viem) [ZKsync CLI](/build-on-abstract/zksync-cli) On this page * [1\. Create a new project](#1-create-a-new-project) * [2\. Set up a Thirdweb API key](#2-set-up-a-thirdweb-api-key) * [3\. Connect the app to Abstract](#3-connect-the-app-to-abstract) --- # Hardhat - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Smart Contracts Hardhat [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) [YouTube Tutorial: Get Started with Hardhat\ ------------------------------------------\ \ Watch a step-by-step tutorial on how to get started with Hardhat.](https://www.youtube.com/watch?v=Jr_Flw-asZ4) [​](#1-create-a-new-project) 1\. Create a new project -------------------------------------------------------- Prerequisites Ensure you have the following installed on your machine: * [Node.js](https://nodejs.org/en/download/) v18.0.0 or later. * If you are on Windows, we strongly recommend using [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/about) to follow this guide. Inside an empty directory, initialize a new Hardhat project using the [Hardhat CLI](https://hardhat.org/getting-started/) : Create a new directory and navigate into it: mkdir my-abstract-project && cd my-abstract-project Initialize a new Hardhat project within the directory: npx hardhat init Select your preferences when prompted by the CLI, or use the recommended setup below. Recommended Hardhat setup We recommend selecting the following options when prompted by the Hardhat CLI: ✔ What do you want to do? · Create a TypeScript project ✔ Hardhat project root: · /path/to/my-abstract-project ✔ Do you want to add a .gitignore? (Y/n) · y ✔ Do you ... install ... dependencies with npm ... · y [​](#2-install-the-required-dependencies) 2\. Install the required dependencies ---------------------------------------------------------------------------------- Abstract smart contracts use [different bytecode](/how-abstract-works/evm-differences/overview) than the Ethereum Virtual Machine (EVM). Install the required dependencies to compile, deploy and interact with smart contracts on Abstract: * [@matterlabs/hardhat-zksync](https://github.com/matter-labs/hardhat-zksync) : A suite of Hardhat plugins for working with Abstract. * [zksync-ethers](/build-on-abstract/applications/ethers) : Recommended package for writing [Hardhat scripts](https://hardhat.org/hardhat-runner/docs/advanced/scripts) to interact with your smart contracts. npm install -D @matterlabs/hardhat-zksync zksync-ethers@6 ethers@6 [​](#3-modify-the-hardhat-configuration) 3\. Modify the Hardhat configuration -------------------------------------------------------------------------------- Update your `hardhat.config.ts` file to include the following options: import { HardhatUserConfig } from "hardhat/config"; import "@matterlabs/hardhat-zksync"; const config: HardhatUserConfig = { zksolc: { version: "latest", settings: { // Note: This must be true to call NonceHolder & ContractDeployer system contracts enableEraVMExtensions: false, }, }, defaultNetwork: "abstractTestnet", networks: { abstractTestnet: { url: "https://api.testnet.abs.xyz", ethNetwork: "sepolia", zksync: true, chainId: 11124, }, abstractMainnet: { url: "https://api.mainnet.abs.xyz", ethNetwork: "mainnet", zksync: true, chainId: 2741, }, }, etherscan: { apiKey: { abstractTestnet: "TACK2D1RGYX9U7MC31SZWWQ7FCWRYQ96AD", abstractMainnet: "IEYKU3EEM5XCD76N7Y7HF9HG7M9ARZ2H4A", }, customChains: [\ {\ network: "abstractTestnet",\ chainId: 11124,\ urls: {\ apiURL: "https://api-sepolia.abscan.org/api",\ browserURL: "https://sepolia.abscan.org/",\ },\ },\ {\ network: "abstractMainnet",\ chainId: 2741,\ urls: {\ apiURL: "https://api.abscan.org/api",\ browserURL: "https://abscan.org/",\ },\ },\ ], }, solidity: { version: "0.8.24", }, }; export default config; ### [​](#using-system-contracts) Using system contracts To use [system contracts](/how-abstract-works/system-contracts/overview) , install the `@matterlabs/zksync-contracts` package: npm install -D @matterlabs/zksync-contracts Then set the `enableEraVMExtensions` flag to **true**: zksolc: { settings: { // If you plan to interact directly with the NonceHolder or ContractDeployer system contracts enableEraVMExtensions: true, }, }, [​](#4-write-a-smart-contract) 4\. Write a smart contract ------------------------------------------------------------ Rename the existing `contracts/Lock.sol` file to `contracts/HelloAbstract.sol`: mv contracts/Lock.sol contracts/HelloAbstract.sol Write a new smart contract in the `contracts/HelloAbstract.sol` file, or use the example smart contract below: // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; contract HelloAbstract { function sayHello() public pure virtual returns (string memory) { return "Hello, World!"; } } [​](#5-compile-the-smart-contract) 5\. Compile the smart contract -------------------------------------------------------------------- Clear any existing artifacts: npx hardhat clean Use the [zksolc compiler](https://docs.zksync.io/zk-stack/components/compiler/toolchain/solidity) (installed in the above steps) to compile smart contracts for Abstract: Testnet Mainnet npx hardhat compile --network abstractTestnet You should now see the compiled smart contracts in the generated `artifacts-zk` directory. [​](#6-deploy-the-smart-contract) 6\. Deploy the smart contract ------------------------------------------------------------------ Get testnet funds Deploying smart contracts requires testnet ETH. Claim testnet funds via a [faucet](/tooling/faucets) , or [bridge](/tooling/bridges) ETH from Sepolia to the Abstract testnet. Add your private key Create a new [configuration variable](https://hardhat.org/hardhat-runner/docs/guides/configuration-variables) called `DEPLOYER_PRIVATE_KEY`. npx hardhat vars set DEPLOYER_PRIVATE_KEY Enter the private key of a new wallet you created for this step. ✔ Enter value: · **************************************************************** Do NOT use a private key associated with real funds. Create a new wallet for this step. Write the deployment script Create a new [Hardhat script](https://hardhat.org/hardhat-runner/docs/advanced/scripts) located at `/deploy/deploy.ts`: mkdir deploy && touch deploy/deploy.ts Add the following code to the `deploy.ts` file: import { Wallet } from "zksync-ethers"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { Deployer } from "@matterlabs/hardhat-zksync"; import { vars } from "hardhat/config"; // An example of a deploy script that will deploy and call a simple contract. export default async function (hre: HardhatRuntimeEnvironment) { console.log(`Running deploy script`); // Initialize the wallet using your private key. const wallet = new Wallet(vars.get("DEPLOYER_PRIVATE_KEY")); // Create deployer object and load the artifact of the contract we want to deploy. const deployer = new Deployer(hre, wallet); // Load contract const artifact = await deployer.loadArtifact("HelloAbstract"); // Deploy this contract. The returned object will be of a `Contract` type, // similar to the ones in `ethers`. const tokenContract = await deployer.deploy(artifact); console.log( `${ artifact.contractName } was deployed to ${await tokenContract.getAddress()}` ); } Deploy your smart contract Run the following command to deploy your smart contracts: Testnet Mainnet npx hardhat deploy-zksync --script deploy.ts --network abstractTestnet If successful, your output should look similar to the following: Running deploy script HelloAbstract was deployed to YOUR_CONTRACT_ADDRESS Verify your smart contract on the block explorer Verifying your smart contract is helpful for others to view the code and interact with it from a [block explorer](/tooling/block-explorers) . To verify your smart contract, run the following command: Testnet Mainnet npx hardhat verify --network abstractTestnet YOUR_CONTRACT_ADDRESS **Note**: Replace `YOUR_CONTRACT_ADDRESS` with the address of your deployed smart contract. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/build-on-abstract/smart-contracts/hardhat.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /build-on-abstract/smart-contracts/hardhat) [Getting Started](/build-on-abstract/getting-started) [Foundry](/build-on-abstract/smart-contracts/foundry) On this page * [1\. Create a new project](#1-create-a-new-project) * [2\. Install the required dependencies](#2-install-the-required-dependencies) * [3\. Modify the Hardhat configuration](#3-modify-the-hardhat-configuration) * [Using system contracts](#using-system-contracts) * [4\. Write a smart contract](#4-write-a-smart-contract) * [5\. Compile the smart contract](#5-compile-the-smart-contract) * [6\. Deploy the smart contract](#6-deploy-the-smart-contract) --- # Thirdweb - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Library Integrations Thirdweb [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The `agw-react` package includes an option to include Abstract Global Wallet as a connection option in the thirdweb `ConnectButton` component. [AGW + Thirdweb Example Repo\ ---------------------------\ \ Use our example repo to quickly get started with AGW and thirdweb.](https://github.com/Abstract-Foundation/examples/tree/main/agw-thirdweb-nextjs) [​](#installation) Installation ---------------------------------- Install the required dependencies: npm install @abstract-foundation/agw-react @abstract-foundation/agw-client wagmi viem thirdweb [​](#usage) Usage -------------------- ### [​](#1-configure-the-thirdwebprovider) 1\. Configure the ThirdwebProvider Wrap your application in the [ThirdwebProvider](https://portal.thirdweb.com/react/v5/ThirdwebProvider) component. import { ThirdwebProvider } from "thirdweb/react"; export default function AbstractWalletWrapper({ children, }: { children: React.ReactNode; }) { return ( {/* Your application components */} ); } **Next.js App Router:** If you are using [Next.js App Router](https://nextjs.org/docs) , create a new component and add the `use client` directive at the top of your file ([see example](https://github.com/Abstract-Foundation/examples/blob/main/agw-thirdweb-nextjs/src/components/NextAbstractWalletProvider.tsx) ) and wrap your application in this component ([see example](https://github.com/Abstract-Foundation/examples/blob/main/agw-thirdweb-nextjs/src/app/layout.tsx#L51) ). ### [​](#2-render-the-connectbutton) 2\. Render the ConnectButton Render the [ConnectButton](https://portal.thirdweb.com/react/v5/ConnectButton) component anywhere in your application, and include `abstractWallet` in the `wallets` prop. import { abstractWallet } from "@abstract-foundation/agw-react/thirdweb"; import { createThirdwebClient } from "thirdweb"; import { abstractTestnet, abstract } from "thirdweb/chains"; // Use abstract for mainnet import { ConnectButton } from "thirdweb/react"; export default function Home() { const client = createThirdwebClient({ clientId: "your-thirdweb-client-id-here", }); return ( ); } Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/integrating-with-thirdweb.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/integrating-with-thirdweb) [RainbowKit](/abstract-global-wallet/agw-react/integrating-with-rainbowkit) [AbstractWalletProvider](/abstract-global-wallet/agw-react/AbstractWalletProvider) On this page * [Installation](#installation) * [Usage](#usage) * [1\. Configure the ThirdwebProvider](#1-configure-the-thirdwebprovider) * [2\. Render the ConnectButton](#2-render-the-connectbutton) --- # useAbstractClient - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Abstract Client useAbstractClient [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Gets the [Wallet client](https://viem.sh/docs/clients/wallet) exposed by the [AbstractWalletProvider](/abstract-global-wallet/agw-react/AbstractWalletProvider) context. Use this client to perform actions from the connected Abstract Global Wallet, for example [deployContract](/abstract-global-wallet/agw-client/actions/deployContract) , [sendTransaction](/abstract-global-wallet/agw-client/actions/sendTransaction) , [writeContract](/abstract-global-wallet/agw-client/actions/writeContract) , etc. [​](#import) Import ---------------------- import { useAbstractClient } from "@abstract-foundation/agw-react"; [​](#usage) Usage -------------------- import { useAbstractClient } from "@abstract-foundation/agw-react"; export default function Example() { const { data: abstractClient, isLoading, error } = useAbstractClient(); // Use the client to perform actions such as sending transactions or deploying contracts async function submitTx() { if (!abstractClient) return; const hash = await abstractClient.sendTransaction({ to: "0x8e729E23CDc8bC21c37a73DA4bA9ebdddA3C8B6d", data: "0x69", }); } // ... rest of your component ... } [​](#returns) Returns ------------------------ Returns a `UseQueryResult`. Show properties [​](#param-data) data AbstractClient | undefined The [AbstractClient](/abstract-global-wallet/agw-client/createAbstractClient) instance from the [AbstractWalletProvider](/abstract-global-wallet/agw-react/AbstractWalletProvider) context. [​](#param-data-updated-at) dataUpdatedAt number The timestamp for when the query most recently returned the status as ‘success’. [​](#param-error) error null | Error The error object for the query, if an error was thrown. Defaults to null. [​](#param-error-updated-at) errorUpdatedAt number The timestamp for when the query most recently returned the status as ‘error’. [​](#param-error-update-count) errorUpdateCount number The sum of all errors. [​](#param-failure-count) failureCount number The failure count for the query. Incremented every time the query fails. Reset to 0 when the query succeeds. [​](#param-failure-reason) failureReason null | Error The failure reason for the query retry. Reset to null when the query succeeds. [​](#param-fetch-status) fetchStatus 'fetching' | 'idle' | 'paused' * fetching: Is true whenever the queryFn is executing, which includes initial pending state as well as background refetches. - paused: The query wanted to fetch, but has been paused. - idle: The query is not fetching. See Network Mode for more information. [​](#param-is-error-is-pending-is-success) isError / isPending / isSuccess boolean Boolean variables derived from status. [​](#param-is-fetched) isFetched boolean Will be true if the query has been fetched. [​](#param-is-fetched-after-mount) isFetchedAfterMount boolean Will be true if the query has been fetched after the component mounted. This property can be used to not show any previously cached data. [​](#param-is-fetching-is-paused) isFetching / isPaused boolean Boolean variables derived from fetchStatus. [​](#param-is-loading) isLoading boolean Is `true` whenever the first fetch for a query is in-flight. Is the same as `isFetching && isPending`. [​](#param-is-loading-error) isLoadingError boolean Will be `true` if the query failed while fetching for the first time. [​](#param-is-placeholder-data) isPlaceholderData boolean Will be `true` if the data shown is the placeholder data. [​](#param-is-refetch-error) isRefetchError boolean Will be `true` if the query failed while refetching. [​](#param-is-refetching) isRefetching boolean Is true whenever a background refetch is in-flight, which does not include initial `pending`. Is the same as `isFetching && !isPending`. [​](#param-is-stale) isStale boolean Will be `true` if the data in the cache is invalidated or if the data is older than the given staleTime. [​](#param-refetch) refetch (options?: {cancelRefetch?: boolean}) => Promise> A function to manually refetch the query. * `cancelRefetch`: When set to `true`, a currently running request will be canceled before a new request is made. When set to false, no refetch will be made if there is already a request running. Defaults to `true`. [​](#param-status) status 'error' | 'pending' | 'success' * `pending`: if there’s no cached data and no query attempt was finished yet. * `error`: if the query attempt resulted in an error. The corresponding error property has the error received from the attempted fetch. * `success`: if the query has received a response with no errors and is ready to display its data. The corresponding data property on the query is the data received from the successful fetch or if the query’s enabled property is set to false and has not been fetched yet, data is the first initialData supplied to the query on initialization. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/hooks/useAbstractClient.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/hooks/useAbstractClient) [useLoginWithAbstract](/abstract-global-wallet/agw-react/hooks/useLoginWithAbstract) [useGlobalWalletSignerAccount](/abstract-global-wallet/agw-react/hooks/useGlobalWalletSignerAccount) On this page * [Import](#import) * [Usage](#usage) * [Returns](#returns) --- # AbstractWalletProvider - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Abstract Client AbstractWalletProvider [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Wrap your application in the `AbstractWalletProvider` component to enable the use of the package’s hooks and components throughout your application. [Learn more on the Native Integration guide](/abstract-global-wallet/agw-react/native-integration) . import { AbstractWalletProvider } from "@abstract-foundation/agw-react"; import { abstractTestnet, abstract } from "viem/chains"; // Use abstract for mainnet const App = () => { return ( {/* Your application components */} ); }; [​](#props) Props -------------------- [​](#param-chain) chain Chain required The chain to connect to. Must be either `abstractTestnet` or `abstract` (for mainnet). The provider will throw an error if an unsupported chain is provided. [​](#param-transport) transport Transport Optional. A [Viem Transport](https://viem.sh/docs/clients/transports/http.html) instance to use if you want to connect to a custom RPC URL. If not provided, the default HTTP transport will be used. [​](#param-query-client) queryClient QueryClient Optional. A [@tanstack/react-query QueryClient](https://tanstack.com/query/latest/docs/reference/QueryClient#queryclient) instance to use for data fetching. If not provided, a new QueryClient instance will be created with default settings. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/AbstractWalletProvider.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/AbstractWalletProvider) [Thirdweb](/abstract-global-wallet/agw-react/integrating-with-thirdweb) [useLoginWithAbstract](/abstract-global-wallet/agw-react/hooks/useLoginWithAbstract) On this page * [Props](#props) --- # useLoginWithAbstract - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Abstract Client useLoginWithAbstract [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Use the `useLoginWithAbstract` hook to prompt users to sign up or sign into your application using Abstract Global Wallet and optionally sign out once connected. It uses the following hooks from [wagmi](https://wagmi.sh/) under the hood: * `login`: [useConnect](https://wagmi.sh/react/api/hooks/useConnect) . * `logout`: [useDisconnect](https://wagmi.sh/react/api/hooks/useDisconnect) . [​](#import) Import ---------------------- import { useLoginWithAbstract } from "@abstract-foundation/agw-react"; [​](#usage) Usage -------------------- import { useLoginWithAbstract } from "@abstract-foundation/agw-react"; export default function App() { const { login, logout } = useLoginWithAbstract(); return ; } [​](#returns) Returns ------------------------ [​](#param-login) login function Opens the signup/login modal to prompt the user to connect to the application using Abstract Global Wallet. [​](#param-logout) logout function Disconnects the user’s wallet from the application. [​](#demo) Demo ------------------ View the [live demo](https://create-abstract-app.vercel.app/) to see Abstract Global Wallet in action. If the user does not have an Abstract Global Wallet, they will be prompted to create one: If the user already has an Abstract Global Wallet, they will be prompted to use it to sign in: Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/hooks/useLoginWithAbstract.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/hooks/useLoginWithAbstract) [AbstractWalletProvider](/abstract-global-wallet/agw-react/AbstractWalletProvider) [useAbstractClient](/abstract-global-wallet/agw-react/hooks/useAbstractClient) On this page * [Import](#import) * [Usage](#usage) * [Returns](#returns) * [Demo](#demo) --- # Viem - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Applications Viem [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The Viem library has first-class support for Abstract by providing a set of extensions to interact with [paymasters](/how-abstract-works/native-account-abstraction/paymasters) , [smart contract wallets](/how-abstract-works/native-account-abstraction/smart-contract-wallets) , and more. This page will walk through how to configure Viem to utilize Abstract’s features. Prerequisites Ensure you have the following installed on your machine: * [Node.js](https://nodejs.org/en/download/) v18.0.0 or later. * You’ve already created a JavaScript project, (e.g. using [CRA](https://create-react-app.dev/) or [Next.js](https://nextjs.org/) ). * Viem library version 2.21.25 or later installed. [​](#1-installation) 1\. Installation ---------------------------------------- Install the `viem` package. npm install viem [​](#2-client-configuration) 2\. Client Configuration -------------------------------------------------------- Configure your Viem [client](https://viem.sh/zksync/client) using `abstractTestnet` as the [chain](https://viem.sh/zksync/chains) and extend it with [eip712WalletActions](https://viem.sh/zksync/client#eip712walletactions) . Testnet Mainnet import { createPublicClient, createWalletClient, custom, http } from 'viem' import { abstractTestnet } from 'viem/chains' import { eip712WalletActions } from 'viem/zksync' // Create a client from a wallet const walletClient = createWalletClient({ chain: abstractTestnet, transport: custom(window.ethereum!), }).extend(eip712WalletActions()) ; // Create a client without a wallet const publicClient = createPublicClient({ chain: abstractTestnet, transport: http() }).extend(eip712WalletActions()); Learn more on the official [viem documentation](https://viem.sh/zksync) . ### [​](#reading-blockchain-data) Reading Blockchain Data Use a [public client](https://viem.sh/docs/clients/public) to fetch data from the blockchain via an [RPC](/connect-to-abstract) . const balance = await publicClient.getBalance({ address: "0x8e729E23CDc8bC21c37a73DA4bA9ebdddA3C8B6d", }); ### [​](#sending-transactions) Sending Transactions Use a [wallet client](https://viem.sh/docs/clients/wallet) to send transactions to the blockchain. const transactionHash = await walletClient.sendTransaction({ to: "0x8e729E23CDc8bC21c37a73DA4bA9ebdddA3C8B6d", data: "0x69", }); #### [​](#paymasters) Paymasters Viem has native support for Abstract [paymasters](/how-abstract-works/native-account-abstraction/paymasters) . Provide the `paymaster` and `paymasterInput` fields when sending a transaction. [View Viem documentation](https://viem.sh/zksync#2-use-actions) . const hash = await walletClient.sendTransaction({ to: "0x8e729E23CDc8bC21c37a73DA4bA9ebdddA3C8B6d", paymaster: "0x5407B5040dec3D339A9247f3654E59EEccbb6391", // Your paymaster contract address paymasterInput: "0x", // Any additional data to be sent to the paymaster }); #### [​](#smart-contract-wallets) Smart Contract Wallets Viem also has native support for using [smart contract wallets](/how-abstract-works/native-account-abstraction/smart-contract-wallets) . This means you can submit transactions `from` a smart contract wallet by providing a smart wallet account as the `account` field to the [client](/_sites/docs.abs.xyz/build-on-abstract/applications/viem#client-configuration) . [View Viem documentation](https://viem.sh/zksync/accounts/toSmartAccount) . Testnet Mainnet import { toSmartAccount, eip712WalletActions } from "viem/zksync"; import { createWalletClient, http } from "viem"; import { abstractTestnet } from "viem/chains"; const account = toSmartAccount({ address: CONTRACT_ADDRESS, async sign({ hash }) { // ... signing logic here for your smart contract account }, }); // Create a client from a smart contract wallet const walletClient = createWalletClient({ chain: abstractTestnet, transport: http(), account: account, // <-- Provide the smart contract wallet account }).extend(eip712WalletActions()); // ... Continue using the wallet client as usual (will send transactions from the smart contract wallet) Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/build-on-abstract/applications/viem.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /build-on-abstract/applications/viem) [Ethers](/build-on-abstract/applications/ethers) [Thirdweb](/build-on-abstract/applications/thirdweb) On this page * [1\. Installation](#1-installation) * [2\. Client Configuration](#2-client-configuration) * [Reading Blockchain Data](#reading-blockchain-data) * [Sending Transactions](#sending-transactions) * [Paymasters](#paymasters) * [Smart Contract Wallets](#smart-contract-wallets) --- # signTransaction - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Wallet Actions signTransaction [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The [AbstractClient](/abstract-global-wallet/agw-client/createAbstractClient) includes a `signTransaction` method that can be used to sign a transaction using the connected Abstract Global Wallet. Transactions are signed by the approved signer account (EOA) of the Abstract Global Wallet. [​](#usage) Usage -------------------- import { useAbstractClient } from "@abstract-foundation/agw-react"; export default function SignTransaction() { const { data: agwClient } = useAbstractClient(); async function signTransaction() { if (!agwClient) return; const signature = await agwClient.signTransaction({ to: "0x273B3527BF5b607dE86F504fED49e1582dD2a1C6", data: "0x69", }); } } [​](#parameters) Parameters ------------------------------ [​](#param-to) to Address | null | undefined The recipient address of the transaction. [​](#param-from) from Address The sender address of the transaction. By default, this is set as the Abstract Global Wallet smart contract address. [​](#param-data) data Hex | undefined Contract code or a hashed method call with encoded args. [​](#param-gas) gas bigint | undefined Gas provided for transaction execution. [​](#param-nonce) nonce number | undefined Unique number identifying this transaction. Learn more in the [handling nonces](/how-abstract-works/native-account-abstraction/handling-nonces) section. [​](#param-value) value bigint | undefined Value in wei sent with this transaction. [​](#param-max-fee-per-gas) maxFeePerGas bigint Total fee per gas in wei (`gasPrice/baseFeePerGas + maxPriorityFeePerGas`). [​](#param-max-priority-fee-per-gas) maxPriorityFeePerGas bigint Max priority fee per gas (in wei). [​](#param-gas-per-pubdata) gasPerPubdata bigint | undefined The amount of gas to pay per byte of data on Ethereum. [​](#param-factory-deps) factoryDeps Hex\[\] | undefined An array of bytecodes of contracts that are dependencies for the transaction. [​](#param-paymaster) paymaster Account | Address Address of the [paymaster](/how-abstract-works/native-account-abstraction/paymasters) smart contract that will pay the gas fees of the transaction. Must also provide a `paymasterInput` field. [​](#param-paymaster-input) paymasterInput Hex Input data to the **paymaster**. Must also provide a `paymaster` field. Show Example import { agwClient } from "./config"; import { getGeneralPaymasterInput } from "viem/zksync"; const signature = await agwClient.signTransaction({ to: "0x273B3527BF5b607dE86F504fED49e1582dD2a1C6", data: "0x69", paymaster: "0x5407B5040dec3D339A9247f3654E59EEccbb6391", paymasterInput: getGeneralPaymasterInput({ innerInput: "0x", }), }); [​](#param-custom-signature) customSignature Hex | undefined Custom signature for the transaction. [​](#param-type) type 'eip712' | undefined Transaction type. For EIP-712 transactions, this should be `eip712`. [​](#returns) Returns ------------------------ Returns a `Promise` containing the signed serialized transaction. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-client/actions/signTransaction.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-client/actions/signTransaction) [deployContract](/abstract-global-wallet/agw-client/actions/deployContract) [sendTransaction](/abstract-global-wallet/agw-client/actions/sendTransaction) On this page * [Usage](#usage) * [Parameters](#parameters) * [Returns](#returns) --- # sendTransactionBatch - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Wallet Actions sendTransactionBatch [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) The [AbstractClient](/abstract-global-wallet/agw-client/createAbstractClient) includes a `sendTransactionBatch` method that can be used to sign and submit multiple transactions in a single call using the connected Abstract Global Wallet. [YouTube Tutorial: Send Batch Transactions with AGW\ --------------------------------------------------\ \ Watch our video tutorials to learn more about building on Abstract.](https://youtu.be/CTuhS5hVCe0) [​](#usage) Usage -------------------- Example.tsx config.ts import { useAbstractClient } from "@abstract-foundation/agw-react"; import { getGeneralPaymasterInput } from "viem/zksync"; import { encodeFunctionData, parseUnits } from "viem"; import { ROUTER_ADDRESS, TOKEN_ADDRESS, WETH_ADDRESS, PAYMASTER_ADDRESS, routerAbi, erc20Abi } from "./config"; export default function SendTransactionBatch() { const { data: agwClient } = useAbstractClient(); async function sendTransactionBatch() { if (!agwClient) return; // Batch an approval and a swap in a single call const hash = await agwClient.sendTransactionBatch({ calls: [\ // 1 - Approval\ {\ to: TOKEN_ADDRESS,\ args: [ROUTER_ADDRESS, parseUnits("100", 18)],\ data: encodeFunctionData({\ abi: erc20Abi,\ functionName: "approve",\ args: [ROUTER_ADDRESS, parseUnits("100", 18)],\ }),\ },\ // 2 - Swap\ {\ to: ROUTER_ADDRESS,\ data: encodeFunctionData({\ abi: routerAbi,\ functionName: "swapExactTokensForETH",\ args: [\ parseUnits("100", 18),\ BigInt(0),\ [TOKEN_ADDRESS, WETH_ADDRESS],\ agwClient.account.address,\ BigInt(Math.floor(Date.now() / 1000) + 60 * 20),\ ],\ }),\ },\ ], paymaster: PAYMASTER_ADDRESS, paymasterInput: getGeneralPaymasterInput({ innerInput: "0x", }), }); } } [​](#parameters) Parameters ------------------------------ [​](#param-calls) calls Array An array of transaction requests. Each transaction request can include the following fields: Show Transaction Request Fields [​](#param-to) to Address | null | undefined The recipient address of the transaction. [​](#param-from) from Address The sender address of the transaction. By default, this is set as the Abstract Global Wallet smart contract address. [​](#param-data) data Hex | undefined Contract code or a hashed method call with encoded args. [​](#param-gas) gas bigint | undefined Gas provided for transaction execution. [​](#param-nonce) nonce number | undefined Unique number identifying this transaction. [​](#param-value) value bigint | undefined Value in wei sent with this transaction. [​](#param-max-fee-per-gas) maxFeePerGas bigint Total fee per gas in wei (`gasPrice/baseFeePerGas + maxPriorityFeePerGas`). [​](#param-max-priority-fee-per-gas) maxPriorityFeePerGas bigint Max priority fee per gas (in wei). [​](#param-gas-per-pubdata) gasPerPubdata bigint | undefined The amount of gas to pay per byte of data on Ethereum. [​](#param-factory-deps) factoryDeps Hex\[\] | undefined An array of bytecodes of contracts that are dependencies for the transaction. [​](#param-custom-signature) customSignature Hex | undefined Custom signature for the transaction. [​](#param-type) type 'eip712' | undefined Transaction type. For EIP-712 transactions, this should be `eip712`. [​](#param-paymaster) paymaster Account | Address Address of the [paymaster](/how-abstract-works/native-account-abstraction/paymasters) smart contract that will pay the gas fees of the transaction batch. [​](#param-paymaster-input) paymasterInput Hex Input data to the **paymaster**. [​](#returns) Returns ------------------------ Returns a `Promise` containing the transaction hash of the submitted transaction batch. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-client/actions/sendTransactionBatch.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-client/actions/sendTransactionBatch) [sendTransaction](/abstract-global-wallet/agw-client/actions/sendTransaction) [writeContract](/abstract-global-wallet/agw-client/actions/writeContract) On this page * [Usage](#usage) * [Parameters](#parameters) * [Returns](#returns) --- # useGlobalWalletSignerAccount - Abstract [Abstract home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/light.svg)![dark logo](https://mintlify.s3.us-west-1.amazonaws.com/abstract/logo/dark.svg)](/) Search... Search... Navigation Abstract Client useGlobalWalletSignerAccount [Documentation](/overview) [Abstract Global Wallet](/abstract-global-wallet/overview) [Ecosystem](/ecosystem/bridges) [Portal](/portal/overview) Use the `useGlobalWalletSignerAccount` hook to retrieve the [account](https://viem.sh/docs/ethers-migration#signers--accounts) approved to sign transactions for the connected Abstract Global Wallet. This is helpful if you need to access the underlying [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account) approved to sign transactions for the Abstract Global Wallet smart contract. It uses the [useAccount](https://wagmi.sh/react/api/hooks/useAccount) hook from [wagmi](https://wagmi.sh/) under the hood. [​](#import) Import ---------------------- import { useGlobalWalletSignerAccount } from "@abstract-foundation/agw-react"; [​](#usage) Usage -------------------- import { useGlobalWalletSignerAccount } from "@abstract-foundation/agw-react"; export default function App() { const { address, status } = useGlobalWalletSignerAccount(); if (status === "disconnected") return
Disconnected
; if (status === "connecting" || status === "reconnecting") { return
Connecting...
; } return (
Connected to EOA: {address} Status: {status}
); } [​](#returns) Returns ------------------------ Returns a `UseAccountReturnType`. Show properties [​](#param-address) address Hex | undefined The specific address of the approved signer account (selected using `useAccount`’s `addresses[1]`). [​](#param-addresses) addresses readonly Hex\[\] | undefined An array of all addresses connected to the application. [​](#param-chain) chain Chain Information about the currently connected blockchain network. [​](#param-chain-id) chainId number The ID of the current blockchain network. [​](#param-connector) connector Connector The connector instance used to manage the connection. [​](#param-is-connected) isConnected boolean Indicates if the account is currently connected. [​](#param-is-reconnecting) isReconnecting boolean Indicates if the account is attempting to reconnect. [​](#param-is-connecting) isConnecting boolean Indicates if the account is in the process of connecting. [​](#param-is-disconnected) isDisconnected boolean Indicates if the account is disconnected. [​](#param-status) status 'connected' | 'connecting' | 'reconnecting' | 'disconnected' A string representing the connection status of the account to the application. * `'connecting'` attempting to establish connection. * `'reconnecting'` attempting to re-establish connection to one or more connectors. * `'connected'` at least one connector is connected. * `'disconnected'` no connection to any connector. Was this page helpful? YesNo [Suggest edits](https://github.com/abstract-foundation/abstract-docs/edit/main/abstract-global-wallet/agw-react/hooks/useGlobalWalletSignerAccount.mdx) [Raise issue](https://github.com/abstract-foundation/abstract-docs/issues/new?title=Issue on docs&body=Path: /abstract-global-wallet/agw-react/hooks/useGlobalWalletSignerAccount) [useAbstractClient](/abstract-global-wallet/agw-react/hooks/useAbstractClient) [useGlobalWalletSignerClient](/abstract-global-wallet/agw-react/hooks/useGlobalWalletSignerClient) On this page * [Import](#import) * [Usage](#usage) * [Returns](#returns) ---