Skip to content

jarrodwatts/polygon-coinbase-smart-wallet

Repository files navigation

Polygon 💜🤝 Coinbase Smart Wallet

Sponsor Coinbase Smart Wallet transactions with paymasters on Polygon Proof of Stake chain.

  • 🔗 Connect to the application via Coinbase Smart Wallet.
  • 💸 Perform transactions from your newly created wallet.
  • 🚫 Pay no gas fees! Thanks to the power of paymasters to cover user's gas fees.

Demo

Try the Live Demo!

Using this Repository

I have written a full tutorial on how to build this application from scratch. Read the tutorial!

To get started locally:

  1. Clone this repository.

  2. Install dependencies with pnpm install.

  3. Create a thirdweb API key on the thirdweb dashboard.

  4. Create a .env.local file in the root of the project and add the following: NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your-thirdweb-client-id-goes-here.

  5. On the page.tsx file, set what chain you want to use (from the list of supported chains). Note: You need to add a credit card to your thirdweb account if you want to use mainnet chains. To use testnets such as baseSepolia, you don't need to add a credit card.

    // The default is polygon mainnet, which requires a credit card on your thirdweb account.
    import { polygon } from "thirdweb/chains";
    const chainToUse = polygon;
  6. For mainnet use, configure paymaster rules on the thirdweb dashboard.

  7. Run the application with pnpm run dev and visit http://localhost:3000/ in your browser.

Devs do something

Reach out to me on Twitter @jarrodwattsdev or open an issue on this repository for any questions or feedback.

About

Use Coinbase Smart Wallet on Polygon PoS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published