dacty-launch 1.3.1 → 1.4.1

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.
@@ -81,9 +81,9 @@ async function main() {
81
81
 
82
82
  const envContent = fs.readFileSync(envPath, 'utf-8');
83
83
  process.chdir(agentDir); // Change to agent directory for token config save
84
- const privateKeyMatch = envContent.match(/PRIVATE_KEY=(.+)/);
84
+ const privateKeyMatch = envContent.match(/AGENT_PRIVATE_KEY=(.+)/);
85
85
  if (!privateKeyMatch) {
86
- console.error('❌ Error: PRIVATE_KEY not found in .env file!');
86
+ console.error('❌ Error: AGENT_PRIVATE_KEY not found in .env file!');
87
87
  process.exit(1);
88
88
  }
89
89
 
@@ -99,14 +99,16 @@ async function main() {
99
99
  const initialSupply = '1000000000'; // Default supply
100
100
 
101
101
  console.log('\n📋 Configuration:');
102
- console.log(` Name: ${tokenName}`);
103
- console.log(` Symbol: ${tokenSymbol}`);
104
- console.log(` Supply: ${initialSupply}`);
105
- console.log(` Agent Wallet: ${agentConfig.wallet}`);
106
- console.log(` Fee Distribution: 80% Agent, 20% Dactyclaw\n`);
102
+ console.log(` Name: ${tokenName}`);
103
+ console.log(` Symbol: ${tokenSymbol}`);
104
+ console.log(` Supply: ${initialSupply}`);
105
+ console.log(` Agent Wallet: ${agentConfig.wallet}`);
106
+ console.log(` Fee Distribution: 80% Agent, 20% Clanker\n`);
107
107
 
108
- // Dactyclaw wallet address (should be configured)
109
- const DACTYCLAW_WALLET = process.env.DACTYCLAW_WALLET || '0x1eaf444ebDf6495C57aD52A04C61521bBf564ace';
108
+ // 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';
110
112
 
111
113
  try {
112
114
  console.log('🔄 Initializing Clanker SDK...');
@@ -128,34 +130,33 @@ async function main() {
128
130
 
129
131
  console.log('\n🚀 Deploying token...');
130
132
 
131
- // Deploy token with 80/20 reward split using correct SDK structure
132
- const tokenAddress = await clanker.deployToken({
133
+ // Deploy token with 80/20 fee split
134
+ // Using Clanker v4 deploy() method with correct token structure
135
+ const { txHash, waitForTransaction } = await clanker.deploy({
133
136
  name: tokenName,
134
137
  symbol: tokenSymbol,
135
- metadata: {
136
- description: `${tokenName} - Created with DACTYCLAW`,
137
- },
138
- context: {
139
- interface: 'DACTYCLAW',
140
- },
141
- pool: {
142
- quoteToken: '0x4200000000000000000000000000000000000006', // WETH on Base
143
- initialMarketCap: '10', // 10 ETH initial market cap
144
- },
145
- rewardsConfig: {
146
- creatorReward: 80, // 80% to agent
138
+ rewards: {
139
+ creatorReward: 80, // 80% to creator (agent)
147
140
  creatorAdmin: agentConfig.wallet,
148
141
  creatorRewardRecipient: agentConfig.wallet,
149
- interfaceAdmin: DACTYCLAW_WALLET,
150
- interfaceRewardRecipient: DACTYCLAW_WALLET,
142
+ interfaceAdmin: CLANKER_INTERFACE_ADMIN,
143
+ interfaceRewardRecipient: CLANKER_INTERFACE_RECIPIENT,
151
144
  },
145
+ vanity: true, // Try to get vanity address with "b07" suffix
152
146
  });
153
147
 
154
- if (!tokenAddress) {
155
- console.error(' Deployment error: No token address returned');
148
+ console.log(`✓ Transaction submitted: ${txHash}`);
149
+ console.log(' Waiting for confirmation...\n');
150
+
151
+ const result = await waitForTransaction();
152
+
153
+ if (result.error) {
154
+ console.error('❌ Deployment error:', result.error);
156
155
  process.exit(1);
157
156
  }
158
157
 
158
+ const tokenAddress = result.address;
159
+
159
160
  console.log('✅ Token deployed successfully!');
160
161
  console.log(`\n📊 Token Details:`);
161
162
  console.log(` Address: ${tokenAddress}`);
@@ -167,7 +168,7 @@ async function main() {
167
168
 
168
169
  console.log(`\n💰 Fee Distribution:`);
169
170
  console.log(` Agent (${agentConfig.wallet}): 80%`);
170
- console.log(` Dactyclaw: 20%`);
171
+ console.log(` Clanker Protocol: 20%`);
171
172
 
172
173
  // Save token configuration
173
174
  const tokenConfig = {
@@ -181,7 +182,7 @@ async function main() {
181
182
  agentWallet: agentConfig.wallet,
182
183
  fees: {
183
184
  agent: 80,
184
- dactyclaw: 20,
185
+ clanker: 20,
185
186
  },
186
187
  };
187
188
 
package/lib/index.mjs CHANGED
@@ -81,9 +81,9 @@ async function main() {
81
81
 
82
82
  const envContent = fs.readFileSync(envPath, 'utf-8');
83
83
  process.chdir(agentDir); // Change to agent directory for token config save
84
- const privateKeyMatch = envContent.match(/PRIVATE_KEY=(.+)/);
84
+ const privateKeyMatch = envContent.match(/AGENT_PRIVATE_KEY=(.+)/);
85
85
  if (!privateKeyMatch) {
86
- console.error('❌ Error: PRIVATE_KEY not found in .env file!');
86
+ console.error('❌ Error: AGENT_PRIVATE_KEY not found in .env file!');
87
87
  process.exit(1);
88
88
  }
89
89
 
@@ -99,14 +99,16 @@ async function main() {
99
99
  const initialSupply = '1000000000'; // Default supply
100
100
 
101
101
  console.log('\n📋 Configuration:');
102
- console.log(` Name: ${tokenName}`);
103
- console.log(` Symbol: ${tokenSymbol}`);
104
- console.log(` Supply: ${initialSupply}`);
105
- console.log(` Agent Wallet: ${agentConfig.wallet}`);
106
- console.log(` Fee Distribution: 80% Agent, 20% Dactyclaw\n`);
102
+ console.log(` Name: ${tokenName}`);
103
+ console.log(` Symbol: ${tokenSymbol}`);
104
+ console.log(` Supply: ${initialSupply}`);
105
+ console.log(` Agent Wallet: ${agentConfig.wallet}`);
106
+ console.log(` Fee Distribution: 80% Agent, 20% Clanker\n`);
107
107
 
108
- // Dactyclaw wallet address (should be configured)
109
- const DACTYCLAW_WALLET = process.env.DACTYCLAW_WALLET || '0x1eaf444ebDf6495C57aD52A04C61521bBf564ace';
108
+ // 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';
110
112
 
111
113
  try {
112
114
  console.log('🔄 Initializing Clanker SDK...');
@@ -128,34 +130,33 @@ async function main() {
128
130
 
129
131
  console.log('\n🚀 Deploying token...');
130
132
 
131
- // Deploy token with 80/20 reward split using correct SDK structure
132
- const tokenAddress = await clanker.deployToken({
133
+ // Deploy token with 80/20 fee split
134
+ // Using Clanker v4 deploy() method with correct token structure
135
+ const { txHash, waitForTransaction } = await clanker.deploy({
133
136
  name: tokenName,
134
137
  symbol: tokenSymbol,
135
- metadata: {
136
- description: `${tokenName} - Created with DACTYCLAW`,
137
- },
138
- context: {
139
- interface: 'DACTYCLAW',
140
- },
141
- pool: {
142
- quoteToken: '0x4200000000000000000000000000000000000006', // WETH on Base
143
- initialMarketCap: '10', // 10 ETH initial market cap
144
- },
145
- rewardsConfig: {
146
- creatorReward: 80, // 80% to agent
138
+ rewards: {
139
+ creatorReward: 80, // 80% to creator (agent)
147
140
  creatorAdmin: agentConfig.wallet,
148
141
  creatorRewardRecipient: agentConfig.wallet,
149
- interfaceAdmin: DACTYCLAW_WALLET,
150
- interfaceRewardRecipient: DACTYCLAW_WALLET,
142
+ interfaceAdmin: CLANKER_INTERFACE_ADMIN,
143
+ interfaceRewardRecipient: CLANKER_INTERFACE_RECIPIENT,
151
144
  },
145
+ vanity: true, // Try to get vanity address with "b07" suffix
152
146
  });
153
147
 
154
- if (!tokenAddress) {
155
- console.error(' Deployment error: No token address returned');
148
+ console.log(`✓ Transaction submitted: ${txHash}`);
149
+ console.log(' Waiting for confirmation...\n');
150
+
151
+ const result = await waitForTransaction();
152
+
153
+ if (result.error) {
154
+ console.error('❌ Deployment error:', result.error);
156
155
  process.exit(1);
157
156
  }
158
157
 
158
+ const tokenAddress = result.address;
159
+
159
160
  console.log('✅ Token deployed successfully!');
160
161
  console.log(`\n📊 Token Details:`);
161
162
  console.log(` Address: ${tokenAddress}`);
@@ -167,7 +168,7 @@ async function main() {
167
168
 
168
169
  console.log(`\n💰 Fee Distribution:`);
169
170
  console.log(` Agent (${agentConfig.wallet}): 80%`);
170
- console.log(` Dactyclaw: 20%`);
171
+ console.log(` Clanker Protocol: 20%`);
171
172
 
172
173
  // Save token configuration
173
174
  const tokenConfig = {
@@ -181,7 +182,7 @@ async function main() {
181
182
  agentWallet: agentConfig.wallet,
182
183
  fees: {
183
184
  agent: 80,
184
- dactyclaw: 20,
185
+ clanker: 20,
185
186
  },
186
187
  };
187
188
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dacty-launch",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "Launch tokens for agents in the Dactyclaw ecosystem",
5
5
  "type": "module",
6
6
  "bin": {