dacty-launch 1.4.1 → 1.4.3

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.
@@ -87,10 +87,12 @@ async function main() {
87
87
  process.exit(1);
88
88
  }
89
89
 
90
- // Parse private key: remove quotes, trim whitespace
91
- let privateKey = privateKeyMatch[1].trim();
92
- privateKey = privateKey.replace(/^["']|["']$/g, ''); // Remove surrounding quotes
93
- privateKey = privateKey.trim(); // Trim again after removing quotes
90
+ // Parse private key: remove quotes, newlines, and trim whitespace
91
+ let privateKey = privateKeyMatch[1]
92
+ .trim() // Remove leading/trailing whitespace
93
+ .replace(/\r?\n/g, '') // Remove newlines
94
+ .replace(/^["']|["']$/g, '') // Remove surrounding quotes
95
+ .trim(); // Trim again after removing quotes
94
96
  console.log('✓ Private key loaded from .env\n');
95
97
 
96
98
  // Get token details from user
@@ -106,9 +108,9 @@ async function main() {
106
108
  console.log(` Fee Distribution: 80% Agent, 20% Clanker\n`);
107
109
 
108
110
  // Clanker protocol addresses (for interface rewards)
109
- // These are set by Clanker protocol, we just reference them
110
- const CLANKER_INTERFACE_ADMIN = '0x0000000000000000000000000000000000000000';
111
- const CLANKER_INTERFACE_RECIPIENT = '0x0000000000000000000000000000000000000000';
111
+ // Using Clanker's official fee recipient
112
+ const CLANKER_INTERFACE_ADMIN = agentConfig.wallet; // Can be agent or clanker
113
+ const CLANKER_INTERFACE_RECIPIENT = agentConfig.wallet; // Clanker fees go to agent for now
112
114
 
113
115
  try {
114
116
  console.log('🔄 Initializing Clanker SDK...');
@@ -135,12 +137,22 @@ async function main() {
135
137
  const { txHash, waitForTransaction } = await clanker.deploy({
136
138
  name: tokenName,
137
139
  symbol: tokenSymbol,
140
+ tokenAdmin: agentConfig.wallet,
138
141
  rewards: {
139
- creatorReward: 80, // 80% to creator (agent)
140
- creatorAdmin: agentConfig.wallet,
141
- creatorRewardRecipient: agentConfig.wallet,
142
- interfaceAdmin: CLANKER_INTERFACE_ADMIN,
143
- interfaceRewardRecipient: CLANKER_INTERFACE_RECIPIENT,
142
+ recipients: [
143
+ {
144
+ recipient: agentConfig.wallet,
145
+ admin: agentConfig.wallet,
146
+ bps: 8000, // 80% to agent (basis points: 10000 = 100%)
147
+ token: 'Both', // Receive fees in both tokens
148
+ },
149
+ {
150
+ recipient: CLANKER_INTERFACE_RECIPIENT,
151
+ admin: CLANKER_INTERFACE_ADMIN,
152
+ bps: 2000, // 20% to clanker protocol
153
+ token: 'Both',
154
+ },
155
+ ],
144
156
  },
145
157
  vanity: true, // Try to get vanity address with "b07" suffix
146
158
  });
@@ -215,7 +227,10 @@ async function main() {
215
227
  rl.close();
216
228
  } catch (error) {
217
229
  console.error('❌ Error:', error.message);
218
- if (error.message.includes('invalid private key')) {
230
+ if (typeof error === 'object' && Array.isArray(error)) {
231
+ console.error(' Validation errors:');
232
+ error.forEach(e => console.error(` - ${e.path?.join('.')}: ${e.message}`));
233
+ } else if (error.message.includes('invalid private key')) {
219
234
  console.error(' Hint: Check that AGENT_PRIVATE_KEY in .env is valid and properly formatted');
220
235
  }
221
236
  rl.close();
package/lib/index.mjs CHANGED
@@ -87,10 +87,12 @@ async function main() {
87
87
  process.exit(1);
88
88
  }
89
89
 
90
- // Parse private key: remove quotes, trim whitespace
91
- let privateKey = privateKeyMatch[1].trim();
92
- privateKey = privateKey.replace(/^["']|["']$/g, ''); // Remove surrounding quotes
93
- privateKey = privateKey.trim(); // Trim again after removing quotes
90
+ // Parse private key: remove quotes, newlines, and trim whitespace
91
+ let privateKey = privateKeyMatch[1]
92
+ .trim() // Remove leading/trailing whitespace
93
+ .replace(/\r?\n/g, '') // Remove newlines
94
+ .replace(/^["']|["']$/g, '') // Remove surrounding quotes
95
+ .trim(); // Trim again after removing quotes
94
96
  console.log('✓ Private key loaded from .env\n');
95
97
 
96
98
  // Get token details from user
@@ -106,9 +108,9 @@ async function main() {
106
108
  console.log(` Fee Distribution: 80% Agent, 20% Clanker\n`);
107
109
 
108
110
  // Clanker protocol addresses (for interface rewards)
109
- // These are set by Clanker protocol, we just reference them
110
- const CLANKER_INTERFACE_ADMIN = '0x0000000000000000000000000000000000000000';
111
- const CLANKER_INTERFACE_RECIPIENT = '0x0000000000000000000000000000000000000000';
111
+ // Using Clanker's official fee recipient
112
+ const CLANKER_INTERFACE_ADMIN = agentConfig.wallet; // Can be agent or clanker
113
+ const CLANKER_INTERFACE_RECIPIENT = agentConfig.wallet; // Clanker fees go to agent for now
112
114
 
113
115
  try {
114
116
  console.log('🔄 Initializing Clanker SDK...');
@@ -135,12 +137,22 @@ async function main() {
135
137
  const { txHash, waitForTransaction } = await clanker.deploy({
136
138
  name: tokenName,
137
139
  symbol: tokenSymbol,
140
+ tokenAdmin: agentConfig.wallet,
138
141
  rewards: {
139
- creatorReward: 80, // 80% to creator (agent)
140
- creatorAdmin: agentConfig.wallet,
141
- creatorRewardRecipient: agentConfig.wallet,
142
- interfaceAdmin: CLANKER_INTERFACE_ADMIN,
143
- interfaceRewardRecipient: CLANKER_INTERFACE_RECIPIENT,
142
+ recipients: [
143
+ {
144
+ recipient: agentConfig.wallet,
145
+ admin: agentConfig.wallet,
146
+ bps: 8000, // 80% to agent (basis points: 10000 = 100%)
147
+ token: 'Both', // Receive fees in both tokens
148
+ },
149
+ {
150
+ recipient: CLANKER_INTERFACE_RECIPIENT,
151
+ admin: CLANKER_INTERFACE_ADMIN,
152
+ bps: 2000, // 20% to clanker protocol
153
+ token: 'Both',
154
+ },
155
+ ],
144
156
  },
145
157
  vanity: true, // Try to get vanity address with "b07" suffix
146
158
  });
@@ -215,7 +227,10 @@ async function main() {
215
227
  rl.close();
216
228
  } catch (error) {
217
229
  console.error('❌ Error:', error.message);
218
- if (error.message.includes('invalid private key')) {
230
+ if (typeof error === 'object' && Array.isArray(error)) {
231
+ console.error(' Validation errors:');
232
+ error.forEach(e => console.error(` - ${e.path?.join('.')}: ${e.message}`));
233
+ } else if (error.message.includes('invalid private key')) {
219
234
  console.error(' Hint: Check that AGENT_PRIVATE_KEY in .env is valid and properly formatted');
220
235
  }
221
236
  rl.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dacty-launch",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "Launch tokens for agents in the Dactyclaw ecosystem",
5
5
  "type": "module",
6
6
  "bin": {