Skip to content

Dablclub/cdp-sdk-mass-payments-ts

Repository files navigation

CDP Mass Payments Demo

Next.js TypeScript Tailwind Coinbase

A demo application of developer-custodied server wallet payments tool using the new CDP Wallet API v2. Users can sign in with their email (currently powered by Google or Github) and send funds to other emails. All emails are backed by Coinbase Server Wallets running on Base Sepolia.

License

The CDP Mass Payments App is free and open source and released under the Apache License, Version 2.0.

The application and code are only available for demonstration purposes.

Acknowledgments

This project leverages the Gaslite Drop contract from Pop Punk LLC Gaslite for mass transfers.

Special thanks to HeimLabs for foundational work on the original Paymaker frontend and backend that informed this sample app.

Prerequisites

Getting Started

  1. [Optional] Deploy the Drop Contract

This application uses the Gaslite Drop smart contract for the batch transfers. The .env.example file contains the contract address for the Gaslite Drop contract deployed on the Base Sepolia testnet. If you want to deploy your own contract, you can clone the Gaslite Core, and deploy by calling:

cd gaslite-core
forge build
forge script script/GasliteDrop.s.sol \
  --rpc-url https://sepolia.base.org \
  --broadcast \
  --chain-id 84532

Note: you will need to have your Base Sepolia wallet private key in your env as PRIVATE_KEY

  1. Clone the repository:
git clone https://github.com/coinbase-samples/coinbase-samples/cdp-sdk-mass-payments-ts.git
cd cdp-sdk-mass-payments-ts
  1. Install dependencies:
bun install
  1. Set up your environment variables - You will need to do the following
  • Copy .env.example to .env.local
  • Get an API Key ID and Secret from Coinbase Developer Platform portal
  • Generate a WalletSecret from the CDP Portal Wallet Page
  • Navigate to the Node page on the CDP Portal to get a Base Sepolia RPC URL for BASE_SEPOLIA_NODE_URL
  • Generate a secret for NEXTAUTH_SECRET via:
openssl rand -base64 32

Set that output in the .env.local for JWT and CSRF token signing

  1. Start the local Postgres/Neon database:
bun run start-local-db
  1. Start the development server:
bun run dev

The application will be available at http://localhost:3000.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •