@paulstinchcombe/gasless-nft-tx 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,20 +20,243 @@ A comprehensive TypeScript library for **truly sponsored** KAMI NFT operations w
20
20
  └─────────────────┘ └──────────────────┘ └────────────────────┘
21
21
  ```
22
22
 
23
+ ### **Account Roles**
24
+
25
+ 1. **Platform EOA**:
26
+
27
+ - Holds the main ETH balance (treasury)
28
+ - Sends ETH to SimpleAccount when needed
29
+ - Sends execute calls to SimpleAccount
30
+
31
+ 2. **Platform SimpleAccount**:
32
+
33
+ - Receives ETH from Platform EOA
34
+ - Pays for all user operations (deployments, mints, etc.)
35
+ - Executes contract deployments
36
+
37
+ 3. **User's EOA**:
38
+ - Signs messages only
39
+ - Never needs ETH
40
+ - Owns the deployed contracts
41
+
42
+ ## 💰 Funding Flow & Requirements
43
+
44
+ ### **Funding Architecture**
45
+
46
+ The Platform EOA serves as the **funding source** for the Platform SimpleAccount:
47
+
48
+ ```
49
+ Platform EOA (Treasury) → Platform SimpleAccount (Operations) → User Operations
50
+ ```
51
+
52
+ ### **Initial Setup Requirements**
53
+
54
+ 1. **Platform EOA**: Needs ~0.1 ETH for initial setup and ongoing funding
55
+ 2. **Platform SimpleAccount**: Receives ETH from Platform EOA for operations
56
+ 3. **User's EOA**: Requires NO ETH (that's the whole point!)
57
+
58
+ ### **Funding Methods**
59
+
60
+ #### **1. Manual Funding**
61
+
62
+ ```typescript
63
+ // Fund SimpleAccount with specific amount
64
+ const result = await sponsoredDeployment.fundSimpleAccount(parseEther('0.05'));
65
+
66
+ if (result.success) {
67
+ console.log(`✅ SimpleAccount funded! Transaction: ${result.transactionHash}`);
68
+ } else {
69
+ console.error(`❌ Funding failed: ${result.error}`);
70
+ }
71
+ ```
72
+
73
+ #### **2. Auto-Funding on Deployment**
74
+
75
+ The system automatically checks and funds the SimpleAccount when needed:
76
+
77
+ ```typescript
78
+ // Deploy contract (will auto-fund if SimpleAccount balance is low)
79
+ const result = await sponsoredDeployment.deployKAMI721C({
80
+ contractName: 'My NFT Collection',
81
+ contractSymbol: 'MNC',
82
+ baseTokenURI: 'https://api.example.com/metadata/',
83
+ initialMintPrice: parseEther('0.001'),
84
+ platformCommissionPercentage: 250,
85
+ userSignature: userSignatureData,
86
+ });
87
+
88
+ // System will automatically:
89
+ // 1. Check SimpleAccount balance
90
+ // 2. If low, fund it from Platform EOA
91
+ // 3. Proceed with deployment
92
+ ```
93
+
94
+ #### **3. Balance Monitoring**
95
+
96
+ ```typescript
97
+ // Check SimpleAccount balance
98
+ const simpleAccountBalance = await sponsoredDeployment.getPlatformBalance();
99
+ console.log(`SimpleAccount balance: ${formatEther(simpleAccountBalance)} ETH`);
100
+
101
+ // Check Platform EOA balance
102
+ const platformBalance = await publicClient.getBalance({
103
+ address: platformAccount.address,
104
+ });
105
+ console.log(`Platform EOA balance: ${formatEther(platformBalance)} ETH`);
106
+
107
+ // Ensure SimpleAccount is funded
108
+ const isFunded = await sponsoredDeployment.ensureSimpleAccountFunded();
109
+ if (!isFunded) {
110
+ console.log('⚠️ SimpleAccount funding failed');
111
+ }
112
+ ```
113
+
114
+ ### **Funding Flow Example**
115
+
116
+ ```typescript
117
+ import { KamiSponsoredDeployment, createUserSignatureData } from '@paulstinchcombe/gasless-nft-tx';
118
+ import { parseEther, formatEther } from 'viem';
119
+
120
+ // Platform configuration
121
+ const config = {
122
+ rpcUrl: 'https://sepolia.base.org',
123
+ platformPrivateKey: process.env.PLATFORM_PRIVATE_KEY,
124
+ platformSimpleAccountAddress: process.env.PLATFORM_SIMPLE_ACCOUNT_ADDRESS,
125
+ contractDeployerAddress: process.env.CONTRACT_DEPLOYER_ADDRESS,
126
+ platformAddress: process.env.PLATFORM_ADDRESS,
127
+ paymentToken: process.env.PAYMENT_TOKEN,
128
+ };
129
+
130
+ const sponsoredDeployment = new KamiSponsoredDeployment(config);
131
+
132
+ async function deployWithFunding() {
133
+ // 1. Check balances
134
+ const simpleAccountBalance = await sponsoredDeployment.getPlatformBalance();
135
+ const platformBalance = await publicClient.getBalance({
136
+ address: config.platformPrivateKey ? privateKeyToAccount(config.platformPrivateKey).address : '0x0',
137
+ });
138
+
139
+ console.log(`SimpleAccount balance: ${formatEther(simpleAccountBalance)} ETH`);
140
+ console.log(`Platform EOA balance: ${formatEther(platformBalance)} ETH`);
141
+
142
+ // 2. Fund SimpleAccount if needed
143
+ if (simpleAccountBalance < parseEther('0.01')) {
144
+ console.log('🔄 Funding SimpleAccount...');
145
+ const fundResult = await sponsoredDeployment.fundSimpleAccount(parseEther('0.05'));
146
+
147
+ if (!fundResult.success) {
148
+ throw new Error(`Funding failed: ${fundResult.error}`);
149
+ }
150
+
151
+ console.log(`✅ SimpleAccount funded! Transaction: ${fundResult.transactionHash}`);
152
+ }
153
+
154
+ // 3. Deploy contract (will auto-fund if needed)
155
+ const userSignatureData = createUserSignatureData(
156
+ userAddress,
157
+ 'My NFT Collection',
158
+ 'MNC',
159
+ 'https://api.example.com/metadata/',
160
+ parseEther('0.001'),
161
+ 250,
162
+ userSignature
163
+ );
164
+
165
+ const result = await sponsoredDeployment.deployKAMI721C({
166
+ contractName: 'My NFT Collection',
167
+ contractSymbol: 'MNC',
168
+ baseTokenURI: 'https://api.example.com/metadata/',
169
+ initialMintPrice: parseEther('0.001'),
170
+ platformCommissionPercentage: 250,
171
+ userSignature: userSignatureData,
172
+ });
173
+
174
+ if (result.success) {
175
+ console.log(`🎉 Contract deployed: ${result.contractAddress}`);
176
+ console.log(`💰 Gas paid by: Platform`);
177
+ console.log(`💸 User paid: ZERO ETH`);
178
+ } else {
179
+ console.error(`❌ Deployment failed: ${result.error}`);
180
+ }
181
+ }
182
+ ```
183
+
184
+ ### **Cost Management**
185
+
186
+ #### **Platform Costs**
187
+
188
+ - **Contract Deployment**: ~0.015 ETH per contract
189
+ - **Token Minting**: ~0.003 ETH per token
190
+ - **Other Operations**: ~0.001-0.002 ETH per operation
191
+
192
+ #### **Funding Strategy**
193
+
194
+ ```typescript
195
+ // Recommended funding amounts
196
+ const FUNDING_AMOUNTS = {
197
+ INITIAL_SETUP: parseEther('0.1'), // Initial SimpleAccount funding
198
+ TOP_UP: parseEther('0.05'), // Regular top-up amount
199
+ MINIMUM_BALANCE: parseEther('0.01'), // Minimum balance threshold
200
+ PLATFORM_EOA_MIN: parseEther('0.02'), // Minimum Platform EOA balance
201
+ };
202
+
203
+ // Auto-funding logic
204
+ async function manageFunding() {
205
+ const simpleAccountBalance = await sponsoredDeployment.getPlatformBalance();
206
+ const platformBalance = await publicClient.getBalance({
207
+ address: platformAccount.address,
208
+ });
209
+
210
+ // Check if SimpleAccount needs funding
211
+ if (simpleAccountBalance < FUNDING_AMOUNTS.MINIMUM_BALANCE) {
212
+ if (platformBalance >= FUNDING_AMOUNTS.TOP_UP) {
213
+ await sponsoredDeployment.fundSimpleAccount(FUNDING_AMOUNTS.TOP_UP);
214
+ } else {
215
+ console.warn('⚠️ Platform EOA balance too low for funding');
216
+ }
217
+ }
218
+ }
219
+ ```
220
+
23
221
  ## 🚀 Quick Start
24
222
 
223
+ ### Prerequisites
224
+
225
+ This project uses **pnpm** as the package manager. Make sure you have pnpm installed:
226
+
227
+ ```bash
228
+ # Install pnpm globally if you haven't already
229
+ npm install -g pnpm
230
+
231
+ # Or using corepack (recommended)
232
+ corepack enable
233
+ corepack prepare pnpm@latest --activate
234
+ ```
235
+
25
236
  ### 1. Installation
26
237
 
27
238
  ```bash
28
- npm install @paulstinchcombe/gasless-nft-tx
239
+ pnpm install @paulstinchcombe/gasless-nft-tx
29
240
  ```
30
241
 
31
- ### 2. Deploy Infrastructure (One-Time Setup)
242
+ ### 2. Create Platform EOA (Required)
243
+
244
+ The Platform EOA is your treasury account that funds all operations:
32
245
 
33
246
  ```bash
34
- # Set your platform private key
35
- export PRIVATE_KEY="0x..."
247
+ # Generate a new private key for the platform
248
+ node -e "console.log('0x' + require('crypto').randomBytes(32).toString('hex'))"
249
+
250
+ # Set as environment variable
251
+ export PRIVATE_KEY=0x[GENERATED_PRIVATE_KEY]
252
+
253
+ # Fund this account with ETH (~0.1 ETH recommended)
254
+ # Send ETH from your main account to the Platform EOA address
255
+ ```
256
+
257
+ ### 3. Deploy Infrastructure (One-Time Setup)
36
258
 
259
+ ```bash
37
260
  # Deploy all infrastructure needed for sponsored transactions
38
261
  npx tsx setup-sponsored-infrastructure.ts
39
262
  ```
@@ -45,7 +268,23 @@ This will deploy:
45
268
  - ContractDeployer helper
46
269
  - KAMI Libraries
47
270
 
48
- ### 3. Platform Setup
271
+ ### 4. Environment Configuration
272
+
273
+ Create a `.env` file with the addresses from the setup:
274
+
275
+ ```bash
276
+ # Platform Configuration (from setup)
277
+ PLATFORM_PRIVATE_KEY="0x..." # Platform's private key (has ETH)
278
+ PLATFORM_SIMPLE_ACCOUNT_ADDRESS="0x..." # Platform's SimpleAccount (has ETH)
279
+ CONTRACT_DEPLOYER_ADDRESS="0x..." # ContractDeployer address
280
+ PLATFORM_ADDRESS="0x..." # Platform address (for receiving ERC20 commissions)
281
+ PAYMENT_TOKEN="0x..." # Payment token address (USDC, etc.)
282
+
283
+ # Network Configuration
284
+ RPC_URL="https://sepolia.base.org"
285
+ ```
286
+
287
+ ### 5. Platform Setup
49
288
 
50
289
  ```typescript
51
290
  import { KamiSponsoredOperations, KamiSponsoredDeployment } from '@paulstinchcombe/gasless-nft-tx';
@@ -65,7 +304,7 @@ const sponsoredDeployment = new KamiSponsoredDeployment(config);
65
304
  const sponsoredOps = new KamiSponsoredOperations(config);
66
305
  ```
67
306
 
68
- ### 4. Deploy Contract (Sponsored)
307
+ ### 6. Deploy Contract (Sponsored)
69
308
 
70
309
  ```typescript
71
310
  // User signs message for deployment (no ETH needed)
@@ -94,7 +333,7 @@ console.log('Gas paid by: Platform');
94
333
  console.log('User paid: ZERO ETH');
95
334
  ```
96
335
 
97
- ### 5. Mint Token (Sponsored)
336
+ ### 7. Mint Token (Sponsored)
98
337
 
99
338
  ```typescript
100
339
  // User signs message for minting (no ETH needed)
@@ -183,18 +422,73 @@ console.log('User paid: ZERO ETH');
183
422
 
184
423
  ## 🔧 Environment Setup
185
424
 
186
- Create a `.env` file:
425
+ ### **Required Environment Variables**
426
+
427
+ Create a `.env` file with the following variables:
187
428
 
188
429
  ```bash
189
- # Platform Configuration
190
- PLATFORM_PRIVATE_KEY="0x..." # Platform's private key (has ETH)
191
- PLATFORM_SIMPLE_ACCOUNT_ADDRESS="0x..." # Platform's SimpleAccount (has ETH)
192
- CONTRACT_DEPLOYER_ADDRESS="0x..." # ContractDeployer address
193
- PLATFORM_ADDRESS="0x..." # Platform address
430
+ # Platform Configuration (Required)
431
+ PLATFORM_PRIVATE_KEY="0x..." # Platform's private key (has ETH for funding)
432
+ PLATFORM_SIMPLE_ACCOUNT_ADDRESS="0x..." # Platform's SimpleAccount (receives ETH)
433
+ CONTRACT_DEPLOYER_ADDRESS="0x..." # ContractDeployer helper address
434
+ PLATFORM_ADDRESS="0x..." # Platform address (for receiving ERC20 commissions)
194
435
  PAYMENT_TOKEN="0x..." # Payment token address (USDC, etc.)
195
436
 
196
437
  # Network Configuration
197
- RPC_URL="https://sepolia.base.org"
438
+ RPC_URL="https://sepolia.base.org" # RPC endpoint
439
+ ```
440
+
441
+ ### **Account Setup Process**
442
+
443
+ 1. **Generate Platform EOA**:
444
+
445
+ ```bash
446
+ # Generate private key
447
+ node -e "console.log('0x' + require('crypto').randomBytes(32).toString('hex'))"
448
+
449
+ # Set environment variable
450
+ export PRIVATE_KEY=0x[GENERATED_PRIVATE_KEY]
451
+ ```
452
+
453
+ 2. **Fund Platform EOA**:
454
+
455
+ - Send ~0.1 ETH to the Platform EOA address
456
+ - This account will fund the SimpleAccount for operations
457
+
458
+ 3. **Deploy Infrastructure**:
459
+
460
+ ```bash
461
+ pnpm exec tsx setup-sponsored-infrastructure.ts
462
+ ```
463
+
464
+ 4. **Update Environment Variables**:
465
+ - Copy the addresses from the setup output
466
+ - Update your `.env` file with the new addresses
467
+
468
+ ### **Balance Requirements**
469
+
470
+ | Account | Purpose | Minimum Balance | Recommended |
471
+ | -------------------------- | ---------------- | --------------- | ----------- |
472
+ | **Platform EOA** | Treasury/Funding | 0.02 ETH | 0.1 ETH |
473
+ | **Platform SimpleAccount** | Operations | 0.01 ETH | 0.05 ETH |
474
+ | **User's EOA** | Signatures Only | 0 ETH | 0 ETH |
475
+
476
+ ### **Funding Management**
477
+
478
+ ```typescript
479
+ // Check balances
480
+ const simpleAccountBalance = await sponsoredDeployment.getPlatformBalance();
481
+ const platformBalance = await publicClient.getBalance({
482
+ address: platformAccount.address,
483
+ });
484
+
485
+ console.log(`SimpleAccount: ${formatEther(simpleAccountBalance)} ETH`);
486
+ console.log(`Platform EOA: ${formatEther(platformBalance)} ETH`);
487
+
488
+ // Auto-fund if needed
489
+ if (simpleAccountBalance < parseEther('0.01')) {
490
+ await sponsoredDeployment.fundSimpleAccount(parseEther('0.05'));
491
+ }
198
492
  ```
199
493
 
200
494
  ## 📚 Documentation
@@ -210,22 +504,22 @@ RPC_URL="https://sepolia.base.org"
210
504
 
211
505
  ```bash
212
506
  # Deploy all infrastructure (one-time setup)
213
- npx tsx setup-sponsored-infrastructure.ts
507
+ pnpm exec tsx setup-sponsored-infrastructure.ts
214
508
 
215
509
  # Deploy individual components
216
- npx tsx deploy-simpleaccount.ts
217
- npx tsx deploy-contract-deployer.ts
218
- npx tsx deploy-kami-libraries.ts
510
+ pnpm exec tsx deploy-simpleaccount.ts
511
+ pnpm exec tsx deploy-contract-deployer.ts
512
+ pnpm exec tsx deploy-kami-libraries.ts
219
513
  ```
220
514
 
221
515
  ### Backend Examples
222
516
 
223
517
  ```bash
224
518
  # Deploy contracts with sponsored gas
225
- npx tsx examples/sponsored-deployment-example.ts
519
+ pnpm exec tsx examples/sponsored-deployment-example.ts
226
520
 
227
521
  # Perform all operations with sponsored gas
228
- npx tsx examples/sponsored-operations-example.ts
522
+ pnpm exec tsx examples/sponsored-operations-example.ts
229
523
  ```
230
524
 
231
525
  ### Frontend Examples
@@ -255,6 +549,110 @@ const { userAddress, signature, nonce } = await requestUserSignatureForOperation
255
549
  - **Parameter Validation**: All operation parameters are validated
256
550
  - **Platform Security**: Platform private keys are kept secure
257
551
 
552
+ ## 🛠️ Troubleshooting
553
+
554
+ ### **Common Funding Issues**
555
+
556
+ #### **1. "Insufficient balance" Error**
557
+
558
+ ```
559
+ Error: The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.
560
+ ```
561
+
562
+ **Solution**: Check which account has insufficient balance:
563
+
564
+ ```typescript
565
+ // Check Platform EOA balance
566
+ const platformBalance = await publicClient.getBalance({
567
+ address: platformAccount.address,
568
+ });
569
+
570
+ // Check SimpleAccount balance
571
+ const simpleAccountBalance = await sponsoredDeployment.getPlatformBalance();
572
+
573
+ console.log(`Platform EOA: ${formatEther(platformBalance)} ETH`);
574
+ console.log(`SimpleAccount: ${formatEther(simpleAccountBalance)} ETH`);
575
+ ```
576
+
577
+ #### **2. "Function constructor not found on ABI" Error**
578
+
579
+ ```
580
+ Error: Function "constructor" not found on ABI.
581
+ ```
582
+
583
+ **Solution**: This was fixed in v0.8.1. Update to the latest version:
584
+
585
+ ```bash
586
+ pnpm install @paulstinchcombe/gasless-nft-tx@latest
587
+ ```
588
+
589
+ #### **3. Transaction Sent from Wrong Account**
590
+
591
+ ```
592
+ from: 0xeaA30cdd68C6002e0ebA0Bed2374223561D0785E # User's address (wrong!)
593
+ ```
594
+
595
+ **Solution**: Check your `PLATFORM_PRIVATE_KEY` environment variable:
596
+
597
+ ```bash
598
+ # This should be the Platform's private key, NOT the user's
599
+ export PLATFORM_PRIVATE_KEY=0x[PLATFORM_PRIVATE_KEY]
600
+ ```
601
+
602
+ #### **4. SimpleAccount Balance Too Low**
603
+
604
+ ```
605
+ Error: Insufficient SimpleAccount balance: 0.005 ETH (minimum required: 0.01 ETH)
606
+ ```
607
+
608
+ **Solution**: Fund the SimpleAccount:
609
+
610
+ ```typescript
611
+ // Manual funding
612
+ await sponsoredDeployment.fundSimpleAccount(parseEther('0.05'));
613
+
614
+ // Or let the system auto-fund
615
+ const result = await sponsoredDeployment.deployKAMI721C(params);
616
+ // System will auto-fund if needed
617
+ ```
618
+
619
+ ### **Debugging Steps**
620
+
621
+ 1. **Check Account Addresses**:
622
+
623
+ ```typescript
624
+ console.log(`Platform Account: ${platformAccount.address}`);
625
+ console.log(`SimpleAccount: ${config.platformSimpleAccountAddress}`);
626
+ console.log(`User Address: ${userSignature.userAddress}`);
627
+ ```
628
+
629
+ 2. **Check Balances**:
630
+
631
+ ```typescript
632
+ const balances = await Promise.all([
633
+ publicClient.getBalance({ address: platformAccount.address }),
634
+ sponsoredDeployment.getPlatformBalance(),
635
+ ]);
636
+
637
+ console.log(`Platform EOA: ${formatEther(balances[0])} ETH`);
638
+ console.log(`SimpleAccount: ${formatEther(balances[1])} ETH`);
639
+ ```
640
+
641
+ 3. **Test Funding**:
642
+ ```typescript
643
+ const fundResult = await sponsoredDeployment.fundSimpleAccount(parseEther('0.01'));
644
+ console.log(`Funding result:`, fundResult);
645
+ ```
646
+
647
+ ### **Environment Variable Checklist**
648
+
649
+ - [ ] `PLATFORM_PRIVATE_KEY` - Platform's private key (has ETH)
650
+ - [ ] `PLATFORM_SIMPLE_ACCOUNT_ADDRESS` - Platform's SimpleAccount address
651
+ - [ ] `CONTRACT_DEPLOYER_ADDRESS` - ContractDeployer address
652
+ - [ ] `PLATFORM_ADDRESS` - Platform address (for ERC20 commissions)
653
+ - [ ] `PAYMENT_TOKEN` - Payment token address
654
+ - [ ] `RPC_URL` - RPC endpoint URL
655
+
258
656
  ## 🎯 Benefits
259
657
 
260
658
  1. **True Gasless Experience**: Users never need ETH
@@ -309,10 +707,11 @@ const result = await sponsoredOps.unpauseContract(contractAddress, contractType,
309
707
 
310
708
  ## 🚀 Getting Started
311
709
 
312
- 1. **Install the library**: `npm install @paulstinchcombe/gasless-nft-tx`
313
- 2. **Set up environment**: Create `.env` file with platform configuration
314
- 3. **Deploy infrastructure**: Deploy ContractDeployer and libraries (one-time setup)
315
- 4. **Start using**: Deploy contracts and perform operations with sponsored gas!
710
+ 1. **Install pnpm**: `npm install -g pnpm` or use `corepack enable`
711
+ 2. **Install the library**: `pnpm install @paulstinchcombe/gasless-nft-tx`
712
+ 3. **Set up environment**: Create `.env` file with platform configuration
713
+ 4. **Deploy infrastructure**: Deploy ContractDeployer and libraries (one-time setup)
714
+ 5. **Start using**: Deploy contracts and perform operations with sponsored gas!
316
715
 
317
716
  ## 📄 License
318
717
 
@@ -87,13 +87,17 @@ export declare class KamiSponsoredDeployment {
87
87
  */
88
88
  getPlatformBalance(): Promise<bigint>;
89
89
  /**
90
- * Check if platform has sufficient balance for deployment
90
+ * Fund Platform SimpleAccount from Platform EOA
91
91
  */
92
- checkPlatformBalance(required?: bigint): Promise<{
93
- sufficient: boolean;
94
- balance: bigint;
95
- reason?: string;
92
+ fundSimpleAccount(amount?: bigint): Promise<{
93
+ success: boolean;
94
+ transactionHash?: string;
95
+ error?: string;
96
96
  }>;
97
+ /**
98
+ * Auto-fund SimpleAccount if balance is low
99
+ */
100
+ ensureSimpleAccountFunded(minimumBalance?: bigint): Promise<boolean>;
97
101
  }
98
102
  /**
99
103
  * Utility function to create user signature data
@@ -1 +1 @@
1
- {"version":3,"file":"kami-sponsored-deployment.d.ts","sourceRoot":"","sources":["../src/kami-sponsored-deployment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKN,OAAO,EAOP,MAAM,MAAM,CAAC;AAKd;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,KAAK,MAAM,EAAE,CAAC;IAClC,4BAA4B,EAAE,OAAO,CAAC;IACtC,uBAAuB,EAAE,OAAO,CAAC;IACjC,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,GAAG,CAA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AsB;IAe9B;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAM3C;;OAEG;IACG,oBAAoB,CAAC,QAAQ,GAAE,MAA2B,GAAG,OAAO,CAAC;QAC1E,UAAU,EAAE,OAAO,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CAWF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,WAAW,EAAE,OAAO,EACpB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EACxB,4BAA4B,EAAE,MAAM,EACpC,aAAa,EAAE,KAAK,MAAM,EAAE,GAC1B,iBAAiB,CAUnB"}
1
+ {"version":3,"file":"kami-sponsored-deployment.d.ts","sourceRoot":"","sources":["../src/kami-sponsored-deployment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAMN,OAAO,EAOP,MAAM,MAAM,CAAC;AAKd;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,KAAK,MAAM,EAAE,CAAC;IAClC,4BAA4B,EAAE,OAAO,CAAC;IACtC,uBAAuB,EAAE,OAAO,CAAC;IACjC,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,4BAA4B,EAAE,MAAM,CAAC;IACrC,SAAS,EAAE,KAAK,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAy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AC,OAAO,CAAC;CAe9F;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,WAAW,EAAE,OAAO,EACpB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EACxB,4BAA4B,EAAE,MAAM,EACpC,aAAa,EAAE,KAAK,MAAM,EAAE,GAC1B,iBAAiB,CAUnB"}
@@ -58,23 +58,26 @@ class KamiSponsoredDeployment {
58
58
  error: 'KAMI721C artifact not found',
59
59
  };
60
60
  }
61
- // Create constructor arguments
61
+ // Create constructor arguments (matching KAMI721C constructor)
62
62
  const constructorArgs = [
63
- params.userSignature.userAddress, // owner (user's EOA)
64
- this.config.paymentToken,
65
- params.contractName,
66
- params.contractSymbol,
67
- params.baseTokenURI,
68
- params.initialMintPrice,
69
- this.config.platformAddress,
70
- params.platformCommissionPercentage,
63
+ this.config.paymentToken, // paymentToken_
64
+ params.contractName, // name_
65
+ params.contractSymbol, // symbol_
66
+ params.baseTokenURI, // baseTokenURI_
67
+ this.config.platformAddress, // platformAddress_
68
+ BigInt(params.platformCommissionPercentage), // platformCommissionPercentage_
69
+ params.userSignature.userAddress, // adminAddress_ (user's EOA)
71
70
  ];
72
- // Encode constructor data
73
- const constructorData = (0, viem_1.encodeFunctionData)({
74
- abi: artifact.abi,
75
- functionName: 'constructor',
76
- args: constructorArgs,
77
- });
71
+ // Encode constructor data using encodeAbiParameters for constructor
72
+ const constructorData = (0, viem_1.encodeAbiParameters)([
73
+ { name: 'paymentToken_', type: 'address' },
74
+ { name: 'name_', type: 'string' },
75
+ { name: 'symbol_', type: 'string' },
76
+ { name: 'baseTokenURI_', type: 'string' },
77
+ { name: 'platformAddress_', type: 'address' },
78
+ { name: 'platformCommissionPercentage_', type: 'uint96' },
79
+ { name: 'adminAddress_', type: 'address' },
80
+ ], constructorArgs);
78
81
  // Get bytecode with constructor args
79
82
  const fullBytecode = (artifact.bytecode + constructorData.slice(2));
80
83
  // Deploy via platform SimpleAccount
@@ -121,23 +124,26 @@ class KamiSponsoredDeployment {
121
124
  error: 'KAMI721AC artifact not found',
122
125
  };
123
126
  }
124
- // Create constructor arguments
127
+ // Create constructor arguments (matching KAMI721AC constructor)
125
128
  const constructorArgs = [
126
- params.userSignature.userAddress, // owner (user's EOA)
127
- this.config.paymentToken,
128
- params.contractName,
129
- params.contractSymbol,
130
- params.baseTokenURI,
131
- params.initialMintPrice,
132
- this.config.platformAddress,
133
- params.platformCommissionPercentage,
129
+ this.config.paymentToken, // paymentToken_
130
+ params.contractName, // name_
131
+ params.contractSymbol, // symbol_
132
+ params.baseTokenURI, // baseTokenURI_
133
+ this.config.platformAddress, // platformAddress_
134
+ BigInt(params.platformCommissionPercentage), // platformCommissionPercentage_
135
+ params.userSignature.userAddress, // adminAddress_ (user's EOA)
134
136
  ];
135
- // Encode constructor data
136
- const constructorData = (0, viem_1.encodeFunctionData)({
137
- abi: artifact.abi,
138
- functionName: 'constructor',
139
- args: constructorArgs,
140
- });
137
+ // Encode constructor data using encodeAbiParameters for constructor
138
+ const constructorData = (0, viem_1.encodeAbiParameters)([
139
+ { name: 'paymentToken_', type: 'address' },
140
+ { name: 'name_', type: 'string' },
141
+ { name: 'symbol_', type: 'string' },
142
+ { name: 'baseTokenURI_', type: 'string' },
143
+ { name: 'platformAddress_', type: 'address' },
144
+ { name: 'platformCommissionPercentage_', type: 'uint96' },
145
+ { name: 'adminAddress_', type: 'address' },
146
+ ], constructorArgs);
141
147
  // Get bytecode with constructor args
142
148
  const fullBytecode = (artifact.bytecode + constructorData.slice(2));
143
149
  // Deploy via platform SimpleAccount
@@ -184,23 +190,22 @@ class KamiSponsoredDeployment {
184
190
  error: 'KAMI1155C artifact not found',
185
191
  };
186
192
  }
187
- // Create constructor arguments
193
+ // Create constructor arguments (matching KAMI1155C constructor)
188
194
  const constructorArgs = [
189
- params.userSignature.userAddress, // owner (user's EOA)
190
- this.config.paymentToken,
191
- params.contractName,
192
- params.contractSymbol,
193
- params.baseTokenURI,
194
- params.initialMintPrice,
195
- this.config.platformAddress,
196
- params.platformCommissionPercentage,
195
+ this.config.paymentToken, // paymentToken_
196
+ params.baseTokenURI, // baseTokenURI_
197
+ this.config.platformAddress, // platformAddress_
198
+ BigInt(params.platformCommissionPercentage), // platformCommissionPercentage_
199
+ params.userSignature.userAddress, // adminAddress_ (user's EOA)
197
200
  ];
198
- // Encode constructor data
199
- const constructorData = (0, viem_1.encodeFunctionData)({
200
- abi: artifact.abi,
201
- functionName: 'constructor',
202
- args: constructorArgs,
203
- });
201
+ // Encode constructor data using encodeAbiParameters for constructor
202
+ const constructorData = (0, viem_1.encodeAbiParameters)([
203
+ { name: 'paymentToken_', type: 'address' },
204
+ { name: 'baseTokenURI_', type: 'string' },
205
+ { name: 'platformAddress_', type: 'address' },
206
+ { name: 'platformCommissionPercentage_', type: 'uint96' },
207
+ { name: 'adminAddress_', type: 'address' },
208
+ ], constructorArgs);
204
209
  // Get bytecode with constructor args
205
210
  const fullBytecode = (artifact.bytecode + constructorData.slice(2));
206
211
  // Deploy via platform SimpleAccount
@@ -260,6 +265,35 @@ class KamiSponsoredDeployment {
260
265
  console.log('📤 Sending sponsored deployment transaction...');
261
266
  console.log(` Platform SimpleAccount: ${this.config.platformSimpleAccountAddress}`);
262
267
  console.log(` ContractDeployer: ${this.config.contractDeployerAddress}`);
268
+ console.log(` Platform Account Address: ${this.platformAccount.address}`);
269
+ // Check platform SimpleAccount balance (this is where the funds should be)
270
+ const simpleAccountBalance = await this.publicClient.getBalance({
271
+ address: this.config.platformSimpleAccountAddress,
272
+ });
273
+ console.log(` Platform SimpleAccount Balance: ${(0, viem_1.formatEther)(simpleAccountBalance)} ETH`);
274
+ // Check platform EOA balance (needs minimal ETH for gas)
275
+ const platformBalance = await this.publicClient.getBalance({
276
+ address: this.platformAccount.address,
277
+ });
278
+ console.log(` Platform EOA Balance: ${(0, viem_1.formatEther)(platformBalance)} ETH`);
279
+ if (simpleAccountBalance < (0, viem_1.parseEther)('0.01')) {
280
+ console.log(`⚠️ SimpleAccount balance low: ${(0, viem_1.formatEther)(simpleAccountBalance)} ETH`);
281
+ console.log(`🔄 Attempting to auto-fund SimpleAccount...`);
282
+ const fundResult = await this.fundSimpleAccount((0, viem_1.parseEther)('0.05'));
283
+ if (!fundResult.success) {
284
+ return {
285
+ success: false,
286
+ error: `Failed to fund SimpleAccount: ${fundResult.error}`,
287
+ };
288
+ }
289
+ console.log(`✅ SimpleAccount funded successfully!`);
290
+ }
291
+ if (platformBalance < (0, viem_1.parseEther)('0.001')) {
292
+ return {
293
+ success: false,
294
+ error: `Insufficient platform EOA balance: ${(0, viem_1.formatEther)(platformBalance)} ETH (minimum required: 0.001 ETH for gas)`,
295
+ };
296
+ }
263
297
  // Send transaction from platform EOA to platform SimpleAccount
264
298
  const txHash = await this.walletClient.sendTransaction({
265
299
  account: this.platformAccount,
@@ -338,18 +372,55 @@ class KamiSponsoredDeployment {
338
372
  });
339
373
  }
340
374
  /**
341
- * Check if platform has sufficient balance for deployment
375
+ * Fund Platform SimpleAccount from Platform EOA
342
376
  */
343
- async checkPlatformBalance(required = (0, viem_1.parseEther)('0.01')) {
344
- const balance = await this.getPlatformBalance();
345
- if (balance < required) {
377
+ async fundSimpleAccount(amount = (0, viem_1.parseEther)('0.05')) {
378
+ try {
379
+ console.log(`💰 Funding SimpleAccount with ${(0, viem_1.formatEther)(amount)} ETH...`);
380
+ // Check Platform EOA balance
381
+ const platformBalance = await this.publicClient.getBalance({
382
+ address: this.platformAccount.address,
383
+ });
384
+ if (platformBalance < amount) {
385
+ return {
386
+ success: false,
387
+ error: `Insufficient Platform EOA balance: ${(0, viem_1.formatEther)(platformBalance)} ETH (required: ${(0, viem_1.formatEther)(amount)} ETH)`,
388
+ };
389
+ }
390
+ // Send ETH from Platform EOA to Platform SimpleAccount
391
+ const txHash = await this.walletClient.sendTransaction({
392
+ account: this.platformAccount,
393
+ to: this.config.platformSimpleAccountAddress,
394
+ value: amount,
395
+ });
396
+ console.log(`✅ SimpleAccount funded! Transaction: ${txHash}`);
397
+ return {
398
+ success: true,
399
+ transactionHash: txHash,
400
+ };
401
+ }
402
+ catch (error) {
403
+ console.error('❌ Failed to fund SimpleAccount:', error);
346
404
  return {
347
- sufficient: false,
348
- balance,
349
- reason: `Insufficient platform balance: ${(0, viem_1.formatEther)(balance)} ETH (required: ${(0, viem_1.formatEther)(required)} ETH)`,
405
+ success: false,
406
+ error: error.message || 'Unknown funding error',
350
407
  };
351
408
  }
352
- return { sufficient: true, balance };
409
+ }
410
+ /**
411
+ * Auto-fund SimpleAccount if balance is low
412
+ */
413
+ async ensureSimpleAccountFunded(minimumBalance = (0, viem_1.parseEther)('0.01')) {
414
+ const simpleAccountBalance = await this.publicClient.getBalance({
415
+ address: this.config.platformSimpleAccountAddress,
416
+ });
417
+ if (simpleAccountBalance < minimumBalance) {
418
+ console.log(`⚠️ SimpleAccount balance low: ${(0, viem_1.formatEther)(simpleAccountBalance)} ETH`);
419
+ console.log(`🔄 Auto-funding SimpleAccount...`);
420
+ const fundResult = await this.fundSimpleAccount((0, viem_1.parseEther)('0.05'));
421
+ return fundResult.success;
422
+ }
423
+ return true;
353
424
  }
354
425
  }
355
426
  exports.KamiSponsoredDeployment = KamiSponsoredDeployment;
@@ -1 +1 @@
1
- {"version":3,"file":"kami-sponsored-deployment.js","sourceRoot":"","sources":["../src/kami-sponsored-deployment.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmdH,0DAkBC;AAneD,+BAYc;AACd,4CAAoD;AACpD,wCAA0C;AAC1C,qEAAiE;AAkDjE;;;GAGG;AACH,MAAa,uBAAuB;IAC3B,YAAY,CAAM;IAClB,YAAY,CAAM;IAClB,MAAM,CAA4B;IAClC,eAAe,CAAoB;IAE3C,YAAY,MAAiC;QAC5C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,IAAA,8BAAmB,EAAC,MAAM,CAAC,kBAAkB,CAAC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C,CAAC,oCAAoC;gBAC3F,OAAO,eAA0B,CAAC;YACnC,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB;QACvB,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;YACzC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,4BAA4B;SACjD,CAAC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,oBAAoB,CAAC,WAAmB,IAAA,iBAAU,EAAC,MAAM,CAAC;QAK/D,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAChD,IAAI,OAAO,GAAG,QAAQ,EAAE,CAAC;YACxB,OAAO;gBACN,UAAU,EAAE,KAAK;gBACjB,OAAO;gBACP,MAAM,EAAE,kCAAkC,IAAA,kBAAW,EAAC,OAAO,CAAC,mBAAmB,IAAA,kBAAW,EAAC,QAAQ,CAAC,OAAO;aAC7G,CAAC;QACH,CAAC;QACD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACtC,CAAC;CACD;AAtYD,0DAsYC;AAED;;;GAGG;AACH,SAAgB,uBAAuB,CACtC,WAAoB,EACpB,YAAoB,EACpB,cAAsB,EACtB,YAAoB,EACpB,gBAAwB,EACxB,4BAAoC,EACpC,aAA4B;IAE5B,OAAO;QACN,WAAW;QACX,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,gBAAgB;QAChB,4BAA4B;QAC5B,SAAS,EAAE,aAAa;KACxB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"kami-sponsored-deployment.js","sourceRoot":"","sources":["../src/kami-sponsored-deployment.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAkjBH,0DAkBC;AAlkBD,+BAac;AACd,4CAAoD;AACpD,wCAA0C;AAC1C,qEAAiE;AAkDjE;;;GAGG;AACH,MAAa,uBAAuB;IAC3B,YAAY,CAAM;IA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ulstinchcombe/gasless-nft-tx",
3
- "version": "0.8.0",
4
- "description": "Complete library for deploying and managing KAMI NFT contracts with truly gasless transactions using EIP-4337 Account Abstraction",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "build": "tsc && npm run copy-artifacts",
9
- "copy-artifacts": "mkdir -p dist/KAMI-NFTs && cp -r src/KAMI-NFTs/artifacts dist/KAMI-NFTs/ && cp -r src/KAMI-NFTs/*.sol dist/KAMI-NFTs/ 2>/dev/null || true",
10
- "test": "vitest",
11
- "test:coverage": "vitest --coverage",
12
- "test:all": "npx tsx tests/run-tests.ts",
13
- "test:infrastructure": "npx tsx tests/run-tests.ts infrastructure",
14
- "test:sponsored": "npx tsx tests/run-tests.ts sponsored",
15
- "test:legacy": "npx tsx tests/run-tests.ts legacy",
16
- "test:utilities": "npx tsx tests/run-tests.ts utilities",
17
- "dev": "tsc --watch",
18
- "prepublishOnly": "npm run build"
19
- },
20
- "keywords": [
21
- "ethereum",
22
- "nft",
23
- "gasless",
24
- "simpleaccount",
25
- "account-abstraction"
26
- ],
27
- "author": "Paul Stinchcombe | KAMI",
28
- "license": "MIT",
29
- "dependencies": {
30
- "@account-abstraction/contracts": "0.7.0",
31
- "ethers": "^6.13.0",
32
- "tslib": "^2.6.0",
33
- "viem": "^2.21.0"
34
- },
35
- "devDependencies": {
36
- "@types/node": "^20.0.0",
37
- "@vitest/coverage-v8": "^1.0.0",
38
- "anvil": "^0.0.6",
39
- "tsx": "^4.20.6",
40
- "typescript": "^5.0.0",
41
- "vitest": "^1.0.0"
42
- },
43
- "files": [
44
- "dist/**/*",
45
- "README.md",
46
- "LICENSE"
47
- ],
48
- "engines": {
49
- "node": ">=18.0.0"
50
- }
51
- }
2
+ "name": "@paulstinchcombe/gasless-nft-tx",
3
+ "version": "0.8.2",
4
+ "description": "Complete library for deploying and managing KAMI NFT contracts with truly gasless transactions using EIP-4337 Account Abstraction",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "keywords": [
8
+ "ethereum",
9
+ "nft",
10
+ "gasless",
11
+ "simpleaccount",
12
+ "account-abstraction"
13
+ ],
14
+ "author": "Paul Stinchcombe | KAMI",
15
+ "license": "MIT",
16
+ "dependencies": {
17
+ "@account-abstraction/contracts": "0.7.0",
18
+ "ethers": "^6.13.0",
19
+ "tslib": "^2.6.0",
20
+ "viem": "^2.21.0"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "^20.0.0",
24
+ "@vitest/coverage-v8": "^1.0.0",
25
+ "anvil": "^0.0.6",
26
+ "tsx": "^4.20.6",
27
+ "typescript": "^5.0.0",
28
+ "vitest": "^1.0.0"
29
+ },
30
+ "files": [
31
+ "dist/**/*",
32
+ "README.md",
33
+ "LICENSE"
34
+ ],
35
+ "engines": {
36
+ "node": ">=18.0.0"
37
+ },
38
+ "scripts": {
39
+ "build": "tsc && pnpm run copy-artifacts",
40
+ "copy-artifacts": "mkdir -p dist/KAMI-NFTs && cp -r src/KAMI-NFTs/artifacts dist/KAMI-NFTs/ && cp -r src/KAMI-NFTs/*.sol dist/KAMI-NFTs/ 2>/dev/null || true",
41
+ "test": "vitest",
42
+ "test:coverage": "vitest --coverage",
43
+ "test:all": "pnpm exec tsx tests/run-tests.ts",
44
+ "test:infrastructure": "pnpm exec tsx tests/run-tests.ts infrastructure",
45
+ "test:sponsored": "pnpm exec tsx tests/run-tests.ts sponsored",
46
+ "test:legacy": "pnpm exec tsx tests/run-tests.ts legacy",
47
+ "test:utilities": "pnpm exec tsx tests/run-tests.ts utilities",
48
+ "dev": "tsc --watch",
49
+ "publish:beta": "pnpm run build && pnpm publish --tag beta --access public",
50
+ "publish:dry-run": "pnpm run build && pnpm publish --dry-run --access public"
51
+ }
52
+ }