From 9ce0c5048e3c96696f728e27a6917c481a5a74ef Mon Sep 17 00:00:00 2001 From: alec <93971719+0xAlec@users.noreply.github.com> Date: Wed, 29 May 2024 11:08:42 -0400 Subject: [PATCH] [trivial] rename to CDP (#22) --- README.md | 17 +++++++++-------- examples/alchemy/README.md | 9 ++++++--- examples/alchemy/src/mint.js | 2 +- examples/pimlico/README.md | 9 ++++++--- examples/pimlico/src/mint.js | 2 +- examples/zerodev/README.md | 7 +++++-- examples/zerodev/src/mint.js | 2 +- 7 files changed, 29 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 980ea7a..8709287 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# [Coinbase Cloud Paymaster & Bundler Examples](https://github.com/coinbase/paymaster-bundler-examples) +# [Coinbase Developer Platform Paymaster & Bundler Examples](https://github.com/coinbase/paymaster-bundler-examples) -This repo has code examples on how to sponsor a mint for a [Knight Warriors](https://sepolia.basescan.org/token/0x66519fcaee1ed65bc9e0acc25ccd900668d3ed49) NFT on Base Sepolia using Coinbase Cloud's Paymaster & Bundler. If you'd like to see a live demo app sponsoring NFT mints in action, check out ours [here](https://buildonchainapps.xyz/paymaster-bundler). +This repo has code examples on how to sponsor a mint for a [Knight Warriors](https://sepolia.basescan.org/token/0x66519fcaee1ed65bc9e0acc25ccd900668d3ed49) NFT on Base Sepolia using Coinbase Developer Platform's Paymaster & Bundler. If you'd like to see a live demo app sponsoring NFT mints in action, check out ours [here](https://buildonchainapps.xyz/paymaster-bundler). We currently have examples for the following SDKs, but contributions are always welcome! See [Contributing](https://github.com/coinbase/paymaster-bundler-examples/blob/master/CONTRIBUTING.md) for more details. @@ -50,13 +50,14 @@ yarn - This will setup dotenv to load the env file for private values -- ### Create your Base Node RPC URL +- ### Get your Node RPC URL - - Navigate to https://coinbase.com/cloud/products/base/rpc - - Sign up for a Coinbase Cloud account, if you don't have one already - - Create a project, and select **Base Sepolia** - - Click "**Activate**" on the Paymaster & Bundler modal + - Navigate to https://www.coinbase.com/developer-platform/products/base-node + - Sign up for a Coinbase Developer Platform account, if you don't have one already. + - Under the **Build Onchain** section in the Portal, select **Node** + - In the dropdown on the top right of **Configuration**, select **Base Testnet (Sepolia)** - Copy your RPC endpoint, and paste it into `.env` as the `RPC_URL` variable. + - The RPC URL should look like `https://api.developer.coinbase.com/rpc/v1/base-sepolia/` - ### Add a signer @@ -101,7 +102,7 @@ You should receive an Etherscan link with your sponsored transaction in the term ``` Minting to 0xF19CEA17462220437000F459f721e3e393bd1fc9 Waiting for transaction... - ⛽ Successfully sponsored gas for mintTo transaction with Coinbase Cloud! + ⛽ Successfully sponsored gas for mintTo transaction with Coinbase Developer Platform! 🔍 View on Etherscan: https://sepolia.basescan.org/tx/0xe51e9bf6fea0dfecfcbf7168bcc7da2c833ad0dcac5651940953a89857674885 ✨ Done in 5.66s. ``` diff --git a/examples/alchemy/README.md b/examples/alchemy/README.md index ce5fc3a..ce8b4f1 100644 --- a/examples/alchemy/README.md +++ b/examples/alchemy/README.md @@ -2,29 +2,32 @@ This example uses Alchemy's Account Kit [aa-core](https://accountkit.alchemy.com/packages/aa-core/) to create a [ERC-4337](https://www.erc4337.io/) smart contract account and send a sponsored transaction. -We'll be minting a NFT on Base Sepolia using Coinbase Cloud's Paymaster & Bundler. +We'll be minting a NFT on Base Sepolia using Coinbase Developer Platform's Paymaster & Bundler. ### 1. Setup Ensure you have the `rpc_url` and `private_key` variables set in the `config.json`. ### 2. Install dependencies + ``` yarn ``` ### 3. Run the example + ``` yarn dev ``` ### 4. See your sponsored transaction live! + You should receive an Etherscan link with your sponsored transaction in the terminal output. [Example](https://sepolia.basescan.org/tx/0xe51e9bf6fea0dfecfcbf7168bcc7da2c833ad0dcac5651940953a89857674885) ``` Minting to 0xF19CEA17462220437000F459f721e3e393bd1fc9 Waiting for transaction... - ⛽ Successfully sponsored gas for mintTo transaction with Coinbase Cloud! + ⛽ Successfully sponsored gas for mintTo transaction with Coinbase Developer Platform! 🔍 View on Etherscan: https://sepolia.basescan.org/tx/0xe51e9bf6fea0dfecfcbf7168bcc7da2c833ad0dcac5651940953a89857674885 ✨ Done in 5.66s. -``` \ No newline at end of file +``` diff --git a/examples/alchemy/src/mint.js b/examples/alchemy/src/mint.js index 298e453..32f2e6f 100644 --- a/examples/alchemy/src/mint.js +++ b/examples/alchemy/src/mint.js @@ -54,6 +54,6 @@ try { } catch (error) { // There's currently an issue with viem not being able to find the transaction hash, but it does exist const txHash = extractHashFromError(error.toString()) - console.log("\x1b[32m", `⛽ Successfully sponsored gas for ${config.function_name} transaction with Coinbase Cloud!`); + console.log("\x1b[32m", `⛽ Successfully sponsored gas for ${config.function_name} transaction with Coinbase Developer Platform!`); console.log("\x1b[36m", `🔍 View on Etherscan: https://sepolia.basescan.org/tx/${txHash}`); } \ No newline at end of file diff --git a/examples/pimlico/README.md b/examples/pimlico/README.md index bbdd0f3..ce0b213 100644 --- a/examples/pimlico/README.md +++ b/examples/pimlico/README.md @@ -2,29 +2,32 @@ This example uses Pimlico's [permissionless.js](https://docs.pimlico.io/permissionless/reference) SDK to create a [ERC-4337](https://www.erc4337.io/) smart contract account and send a sponsored transaction. -We'll be minting a NFT on Base Sepolia using Coinbase Cloud's Paymaster & Bundler. +We'll be minting a NFT on Base Sepolia using Coinbase Developer Platform's Paymaster & Bundler. ### 1. Setup Ensure you have the `rpc_url` and `private_key` variables set in the `config.json`. ### 2. Install dependencies + ``` yarn ``` ### 3. Run the example + ``` yarn dev ``` ### 4. See your sponsored transaction live! + You should receive an Etherscan link with your sponsored transaction in the terminal output. [Example](https://sepolia.basescan.org/tx/0xe51e9bf6fea0dfecfcbf7168bcc7da2c833ad0dcac5651940953a89857674885) ``` Minting to 0xF19CEA17462220437000F459f721e3e393bd1fc9 Waiting for transaction... - ⛽ Successfully sponsored gas for mintTo transaction with Coinbase Cloud! + ⛽ Successfully sponsored gas for mintTo transaction with Coinbase Developer Platform! 🔍 View on Etherscan: https://sepolia.basescan.org/tx/0xe51e9bf6fea0dfecfcbf7168bcc7da2c833ad0dcac5651940953a89857674885 ✨ Done in 5.66s. -``` \ No newline at end of file +``` diff --git a/examples/pimlico/src/mint.js b/examples/pimlico/src/mint.js index 311f918..f4a74b4 100644 --- a/examples/pimlico/src/mint.js +++ b/examples/pimlico/src/mint.js @@ -48,5 +48,5 @@ const txHash = await smartAccountClient.sendTransaction({ value: BigInt(0), }); -console.log("\x1b[32m", `⛽ Successfully sponsored gas for ${config.function_name} transaction with Coinbase Cloud!`); +console.log("\x1b[32m", `⛽ Successfully sponsored gas for ${config.function_name} transaction with Coinbase Developer Platform!`); console.log("\x1b[36m", `🔍 View on Etherscan: https://sepolia.basescan.org/tx/${txHash}`); \ No newline at end of file diff --git a/examples/zerodev/README.md b/examples/zerodev/README.md index a355bb7..9d9656e 100644 --- a/examples/zerodev/README.md +++ b/examples/zerodev/README.md @@ -2,29 +2,32 @@ This example uses [the ZeroDev SDK](https://docs.zerodev.app/) to create a [ERC-4337](https://www.erc4337.io/) smart contract account and send a sponsored transaction. -We'll be minting a NFT on Base Sepolia using Coinbase Cloud's Paymaster & Bundler. +We'll be minting a NFT on Base Sepolia using Coinbase Developer Platform's Paymaster & Bundler. ### 1. Setup Ensure you have the `rpc_url` and `private_key` variables set in the `config.json`. ### 2. Install dependencies + ``` yarn ``` ### 3. Run the example + ``` yarn dev ``` ### 4. See your sponsored transaction live! + You should receive an Etherscan link with your sponsored transaction in the terminal output. [Example](https://sepolia.basescan.org/tx/0xe51e9bf6fea0dfecfcbf7168bcc7da2c833ad0dcac5651940953a89857674885) ``` Minting to 0xF19CEA17462220437000F459f721e3e393bd1fc9 Waiting for transaction... - ⛽ Successfully sponsored gas for mintTo transaction with Coinbase Cloud! + ⛽ Successfully sponsored gas for mintTo transaction with Coinbase Developer Platform! 🔍 View on Etherscan: https://sepolia.basescan.org/tx/0xe51e9bf6fea0dfecfcbf7168bcc7da2c833ad0dcac5651940953a89857674885 ✨ Done in 5.66s. ``` diff --git a/examples/zerodev/src/mint.js b/examples/zerodev/src/mint.js index 544e1e8..5028591 100644 --- a/examples/zerodev/src/mint.js +++ b/examples/zerodev/src/mint.js @@ -33,5 +33,5 @@ const txHash = await kernelClient.sendTransaction({ }), }) -console.log("\x1b[32m", `⛽ Successfully sponsored gas for ${config.function_name} transaction with Coinbase Cloud!`); +console.log("\x1b[32m", `⛽ Successfully sponsored gas for ${config.function_name} transaction with Coinbase Developer Platform!`); console.log("\x1b[36m", `🔍 View on Etherscan: https://sepolia.basescan.org/tx/${txHash}`); \ No newline at end of file