dacty-create 1.0.0 → 1.0.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.
- package/bin/dacty-create.mjs +6 -36
- package/lib/index.mjs +6 -36
- package/package.json +1 -1
package/bin/dacty-create.mjs
CHANGED
|
@@ -22,11 +22,6 @@ function generateWallet() {
|
|
|
22
22
|
return '0x' + Array.from({ length: 40 }, () => Math.floor(Math.random() * 16).toString(16)).join('');
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
// Generate token symbol
|
|
26
|
-
function generateTokenSymbol(agentName) {
|
|
27
|
-
return agentName.substring(0, 3).toUpperCase() + Math.random().toString(36).substring(2, 5).toUpperCase();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
25
|
async function createAgent() {
|
|
31
26
|
console.log('\n');
|
|
32
27
|
console.log(chalk.cyan.bold('╔════════════════════════════════════════╗'));
|
|
@@ -81,7 +76,6 @@ async function createAgent() {
|
|
|
81
76
|
// Generate agent data
|
|
82
77
|
const agentDNA = generateDNA();
|
|
83
78
|
const agentWallet = generateWallet();
|
|
84
|
-
const tokenSymbol = generateTokenSymbol(answers.agentName);
|
|
85
79
|
const timestamp = new Date().toISOString();
|
|
86
80
|
|
|
87
81
|
spinner.start('Generating agent configuration...');
|
|
@@ -93,16 +87,6 @@ async function createAgent() {
|
|
|
93
87
|
type: answers.agentType,
|
|
94
88
|
dna: agentDNA,
|
|
95
89
|
wallet: agentWallet,
|
|
96
|
-
token: {
|
|
97
|
-
symbol: tokenSymbol,
|
|
98
|
-
name: `${answers.agentName} Token`,
|
|
99
|
-
totalSupply: '1000000000000000000000000', // 1M tokens
|
|
100
|
-
decimals: 18
|
|
101
|
-
},
|
|
102
|
-
feeDistribution: {
|
|
103
|
-
agent: 80,
|
|
104
|
-
dactyclaw: 20
|
|
105
|
-
},
|
|
106
90
|
createdAt: timestamp,
|
|
107
91
|
github: {
|
|
108
92
|
username: answers.githubUsername,
|
|
@@ -135,7 +119,6 @@ async function createAgent() {
|
|
|
135
119
|
const envContent = `AGENT_NAME=${agentConfig.name}
|
|
136
120
|
AGENT_DNA=${agentConfig.dna}
|
|
137
121
|
AGENT_WALLET=${agentConfig.wallet}
|
|
138
|
-
TOKEN_SYMBOL=${agentConfig.token.symbol}
|
|
139
122
|
NETWORK=base
|
|
140
123
|
GITHUB_USERNAME=${agentConfig.github.username}
|
|
141
124
|
GITHUB_REPO=${agentConfig.github.repository}
|
|
@@ -231,7 +214,6 @@ dotenv.config();
|
|
|
231
214
|
const AGENT_NAME = process.env.AGENT_NAME;
|
|
232
215
|
const AGENT_DNA = process.env.AGENT_DNA;
|
|
233
216
|
const AGENT_WALLET = process.env.AGENT_WALLET;
|
|
234
|
-
const TOKEN_SYMBOL = process.env.TOKEN_SYMBOL;
|
|
235
217
|
|
|
236
218
|
console.log(\`
|
|
237
219
|
╔════════════════════════════════════════╗
|
|
@@ -239,15 +221,14 @@ console.log(\`
|
|
|
239
221
|
║ Agent: \${AGENT_NAME}
|
|
240
222
|
║ DNA: \${AGENT_DNA}
|
|
241
223
|
║ Wallet: \${AGENT_WALLET}
|
|
242
|
-
║ Token: \${TOKEN_SYMBOL}
|
|
243
224
|
╚════════════════════════════════════════╝
|
|
244
225
|
\`);
|
|
245
226
|
|
|
246
227
|
console.log('\\n[Deploy] Preparing agent for deployment...');
|
|
247
228
|
console.log('[Deploy] Agent configuration validated');
|
|
248
229
|
console.log('[Deploy] Ready to deploy to Base network');
|
|
249
|
-
console.log('[Deploy] Fee distribution: 80% Agent, 20% Dactyclaw');
|
|
250
230
|
console.log('[Deploy] ✓ Deployment ready!');
|
|
231
|
+
console.log('[Deploy] Next step: npx dacty-launch');
|
|
251
232
|
`;
|
|
252
233
|
fs.writeFileSync(path.join(agentDir, 'scripts', 'deploy.mjs'), deployScript);
|
|
253
234
|
|
|
@@ -261,15 +242,9 @@ An autonomous agent in the Dactyclaw ecosystem.
|
|
|
261
242
|
- **Agent Name:** ${agentConfig.name}
|
|
262
243
|
- **Agent DNA:** ${agentConfig.dna}
|
|
263
244
|
- **Wallet:** ${agentConfig.wallet}
|
|
264
|
-
- **Token Symbol:** ${agentConfig.token.symbol}
|
|
265
245
|
- **Network:** ${agentConfig.network}
|
|
266
246
|
- **Type:** ${agentConfig.agentType}
|
|
267
247
|
|
|
268
|
-
## Fee Distribution
|
|
269
|
-
|
|
270
|
-
- Agent: 80%
|
|
271
|
-
- Dactyclaw: 20%
|
|
272
|
-
|
|
273
248
|
## Getting Started
|
|
274
249
|
|
|
275
250
|
\`\`\`bash
|
|
@@ -277,10 +252,12 @@ npm install
|
|
|
277
252
|
npm run dev
|
|
278
253
|
\`\`\`
|
|
279
254
|
|
|
280
|
-
##
|
|
255
|
+
## Launch Token
|
|
256
|
+
|
|
257
|
+
To launch your token on-chain:
|
|
281
258
|
|
|
282
259
|
\`\`\`bash
|
|
283
|
-
|
|
260
|
+
npx dacty-launch
|
|
284
261
|
\`\`\`
|
|
285
262
|
|
|
286
263
|
## License
|
|
@@ -311,7 +288,6 @@ build/
|
|
|
311
288
|
console.log(chalk.white(` Name: ${agentConfig.name}`));
|
|
312
289
|
console.log(chalk.white(` DNA: ${agentConfig.dna}`));
|
|
313
290
|
console.log(chalk.white(` Wallet: ${agentConfig.wallet}`));
|
|
314
|
-
console.log(chalk.white(` Token Symbol: ${agentConfig.token.symbol}`));
|
|
315
291
|
console.log(chalk.white(` Type: ${agentConfig.agentType}`));
|
|
316
292
|
console.log(chalk.white(` Network: ${agentConfig.network}`));
|
|
317
293
|
console.log(chalk.white(` Directory: ${agentDir}`));
|
|
@@ -323,13 +299,7 @@ build/
|
|
|
323
299
|
console.log(chalk.white(` 1. cd ${agentConfig.github.repository}`));
|
|
324
300
|
console.log(chalk.white(` 2. npm install`));
|
|
325
301
|
console.log(chalk.white(` 3. npm run dev`));
|
|
326
|
-
console.log(chalk.
|
|
327
|
-
console.log('\n');
|
|
328
|
-
|
|
329
|
-
console.log(chalk.cyan('Fee Distribution:'));
|
|
330
|
-
console.log(chalk.gray('─'.repeat(50)));
|
|
331
|
-
console.log(chalk.white(` Agent: 80%`));
|
|
332
|
-
console.log(chalk.white(` Dactyclaw: 20%`));
|
|
302
|
+
console.log(chalk.white(` 4. npx dacty-launch (to launch token)`));
|
|
333
303
|
console.log(chalk.gray('─'.repeat(50)));
|
|
334
304
|
console.log('\n');
|
|
335
305
|
|
package/lib/index.mjs
CHANGED
|
@@ -22,11 +22,6 @@ function generateWallet() {
|
|
|
22
22
|
return '0x' + Array.from({ length: 40 }, () => Math.floor(Math.random() * 16).toString(16)).join('');
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
// Generate token symbol
|
|
26
|
-
function generateTokenSymbol(agentName) {
|
|
27
|
-
return agentName.substring(0, 3).toUpperCase() + Math.random().toString(36).substring(2, 5).toUpperCase();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
25
|
async function createAgent() {
|
|
31
26
|
console.log('\n');
|
|
32
27
|
console.log(chalk.cyan.bold('╔════════════════════════════════════════╗'));
|
|
@@ -81,7 +76,6 @@ async function createAgent() {
|
|
|
81
76
|
// Generate agent data
|
|
82
77
|
const agentDNA = generateDNA();
|
|
83
78
|
const agentWallet = generateWallet();
|
|
84
|
-
const tokenSymbol = generateTokenSymbol(answers.agentName);
|
|
85
79
|
const timestamp = new Date().toISOString();
|
|
86
80
|
|
|
87
81
|
spinner.start('Generating agent configuration...');
|
|
@@ -93,16 +87,6 @@ async function createAgent() {
|
|
|
93
87
|
type: answers.agentType,
|
|
94
88
|
dna: agentDNA,
|
|
95
89
|
wallet: agentWallet,
|
|
96
|
-
token: {
|
|
97
|
-
symbol: tokenSymbol,
|
|
98
|
-
name: `${answers.agentName} Token`,
|
|
99
|
-
totalSupply: '1000000000000000000000000', // 1M tokens
|
|
100
|
-
decimals: 18
|
|
101
|
-
},
|
|
102
|
-
feeDistribution: {
|
|
103
|
-
agent: 80,
|
|
104
|
-
dactyclaw: 20
|
|
105
|
-
},
|
|
106
90
|
createdAt: timestamp,
|
|
107
91
|
github: {
|
|
108
92
|
username: answers.githubUsername,
|
|
@@ -135,7 +119,6 @@ async function createAgent() {
|
|
|
135
119
|
const envContent = `AGENT_NAME=${agentConfig.name}
|
|
136
120
|
AGENT_DNA=${agentConfig.dna}
|
|
137
121
|
AGENT_WALLET=${agentConfig.wallet}
|
|
138
|
-
TOKEN_SYMBOL=${agentConfig.token.symbol}
|
|
139
122
|
NETWORK=base
|
|
140
123
|
GITHUB_USERNAME=${agentConfig.github.username}
|
|
141
124
|
GITHUB_REPO=${agentConfig.github.repository}
|
|
@@ -231,7 +214,6 @@ dotenv.config();
|
|
|
231
214
|
const AGENT_NAME = process.env.AGENT_NAME;
|
|
232
215
|
const AGENT_DNA = process.env.AGENT_DNA;
|
|
233
216
|
const AGENT_WALLET = process.env.AGENT_WALLET;
|
|
234
|
-
const TOKEN_SYMBOL = process.env.TOKEN_SYMBOL;
|
|
235
217
|
|
|
236
218
|
console.log(\`
|
|
237
219
|
╔════════════════════════════════════════╗
|
|
@@ -239,15 +221,14 @@ console.log(\`
|
|
|
239
221
|
║ Agent: \${AGENT_NAME}
|
|
240
222
|
║ DNA: \${AGENT_DNA}
|
|
241
223
|
║ Wallet: \${AGENT_WALLET}
|
|
242
|
-
║ Token: \${TOKEN_SYMBOL}
|
|
243
224
|
╚════════════════════════════════════════╝
|
|
244
225
|
\`);
|
|
245
226
|
|
|
246
227
|
console.log('\\n[Deploy] Preparing agent for deployment...');
|
|
247
228
|
console.log('[Deploy] Agent configuration validated');
|
|
248
229
|
console.log('[Deploy] Ready to deploy to Base network');
|
|
249
|
-
console.log('[Deploy] Fee distribution: 80% Agent, 20% Dactyclaw');
|
|
250
230
|
console.log('[Deploy] ✓ Deployment ready!');
|
|
231
|
+
console.log('[Deploy] Next step: npx dacty-launch');
|
|
251
232
|
`;
|
|
252
233
|
fs.writeFileSync(path.join(agentDir, 'scripts', 'deploy.mjs'), deployScript);
|
|
253
234
|
|
|
@@ -261,15 +242,9 @@ An autonomous agent in the Dactyclaw ecosystem.
|
|
|
261
242
|
- **Agent Name:** ${agentConfig.name}
|
|
262
243
|
- **Agent DNA:** ${agentConfig.dna}
|
|
263
244
|
- **Wallet:** ${agentConfig.wallet}
|
|
264
|
-
- **Token Symbol:** ${agentConfig.token.symbol}
|
|
265
245
|
- **Network:** ${agentConfig.network}
|
|
266
246
|
- **Type:** ${agentConfig.agentType}
|
|
267
247
|
|
|
268
|
-
## Fee Distribution
|
|
269
|
-
|
|
270
|
-
- Agent: 80%
|
|
271
|
-
- Dactyclaw: 20%
|
|
272
|
-
|
|
273
248
|
## Getting Started
|
|
274
249
|
|
|
275
250
|
\`\`\`bash
|
|
@@ -277,10 +252,12 @@ npm install
|
|
|
277
252
|
npm run dev
|
|
278
253
|
\`\`\`
|
|
279
254
|
|
|
280
|
-
##
|
|
255
|
+
## Launch Token
|
|
256
|
+
|
|
257
|
+
To launch your token on-chain:
|
|
281
258
|
|
|
282
259
|
\`\`\`bash
|
|
283
|
-
|
|
260
|
+
npx dacty-launch
|
|
284
261
|
\`\`\`
|
|
285
262
|
|
|
286
263
|
## License
|
|
@@ -311,7 +288,6 @@ build/
|
|
|
311
288
|
console.log(chalk.white(` Name: ${agentConfig.name}`));
|
|
312
289
|
console.log(chalk.white(` DNA: ${agentConfig.dna}`));
|
|
313
290
|
console.log(chalk.white(` Wallet: ${agentConfig.wallet}`));
|
|
314
|
-
console.log(chalk.white(` Token Symbol: ${agentConfig.token.symbol}`));
|
|
315
291
|
console.log(chalk.white(` Type: ${agentConfig.agentType}`));
|
|
316
292
|
console.log(chalk.white(` Network: ${agentConfig.network}`));
|
|
317
293
|
console.log(chalk.white(` Directory: ${agentDir}`));
|
|
@@ -323,13 +299,7 @@ build/
|
|
|
323
299
|
console.log(chalk.white(` 1. cd ${agentConfig.github.repository}`));
|
|
324
300
|
console.log(chalk.white(` 2. npm install`));
|
|
325
301
|
console.log(chalk.white(` 3. npm run dev`));
|
|
326
|
-
console.log(chalk.
|
|
327
|
-
console.log('\n');
|
|
328
|
-
|
|
329
|
-
console.log(chalk.cyan('Fee Distribution:'));
|
|
330
|
-
console.log(chalk.gray('─'.repeat(50)));
|
|
331
|
-
console.log(chalk.white(` Agent: 80%`));
|
|
332
|
-
console.log(chalk.white(` Dactyclaw: 20%`));
|
|
302
|
+
console.log(chalk.white(` 4. npx dacty-launch (to launch token)`));
|
|
333
303
|
console.log(chalk.gray('─'.repeat(50)));
|
|
334
304
|
console.log('\n');
|
|
335
305
|
|