dacty-launch 1.3.1 → 1.4.0
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-launch.mjs +35 -27
- package/lib/index.mjs +35 -27
- package/package.json +1 -1
package/bin/dacty-launch.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(/
|
|
84
|
+
const privateKeyMatch = envContent.match(/AGENT_PRIVATE_KEY=(.+)/);
|
|
85
85
|
if (!privateKeyMatch) {
|
|
86
|
-
console.error('❌ Error:
|
|
86
|
+
console.error('❌ Error: AGENT_PRIVATE_KEY not found in .env file!');
|
|
87
87
|
process.exit(1);
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -103,10 +103,10 @@ async function main() {
|
|
|
103
103
|
console.log(` Symbol: ${tokenSymbol}`);
|
|
104
104
|
console.log(` Supply: ${initialSupply}`);
|
|
105
105
|
console.log(` Agent Wallet: ${agentConfig.wallet}`);
|
|
106
|
-
console.log(` Fee Distribution: 80% Agent, 20%
|
|
106
|
+
console.log(` Fee Distribution: 80% Agent, 20% Clanker\n`);
|
|
107
107
|
|
|
108
|
-
//
|
|
109
|
-
const
|
|
108
|
+
// Clanker wallet address for fee distribution
|
|
109
|
+
const CLANKER_WALLET = '0x0000000000000000000000000000000000000000'; // Clanker protocol address
|
|
110
110
|
|
|
111
111
|
try {
|
|
112
112
|
console.log('🔄 Initializing Clanker SDK...');
|
|
@@ -128,34 +128,42 @@ async function main() {
|
|
|
128
128
|
|
|
129
129
|
console.log('\n🚀 Deploying token...');
|
|
130
130
|
|
|
131
|
-
// Deploy token with 80/20
|
|
132
|
-
|
|
131
|
+
// Deploy token with 80/20 fee split
|
|
132
|
+
// Using Clanker v4 deploy() method with correct token structure
|
|
133
|
+
const { txHash, waitForTransaction } = await clanker.deploy({
|
|
133
134
|
name: tokenName,
|
|
134
135
|
symbol: tokenSymbol,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
interfaceRewardRecipient: DACTYCLAW_WALLET,
|
|
136
|
+
rewards: {
|
|
137
|
+
recipients: [
|
|
138
|
+
{
|
|
139
|
+
recipient: agentConfig.wallet,
|
|
140
|
+
admin: agentConfig.wallet,
|
|
141
|
+
bps: 8000, // 80% to agent
|
|
142
|
+
token: 'Both', // Receive fees in both tokens
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
recipient: CLANKER_WALLET,
|
|
146
|
+
admin: CLANKER_WALLET,
|
|
147
|
+
bps: 2000, // 20% to clanker protocol
|
|
148
|
+
token: 'Both',
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
151
|
},
|
|
152
|
+
vanity: true, // Try to get vanity address with "b07" suffix
|
|
152
153
|
});
|
|
153
154
|
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
console.log(`✓ Transaction submitted: ${txHash}`);
|
|
156
|
+
console.log('⏳ Waiting for confirmation...\n');
|
|
157
|
+
|
|
158
|
+
const result = await waitForTransaction();
|
|
159
|
+
|
|
160
|
+
if (result.error) {
|
|
161
|
+
console.error('❌ Deployment error:', result.error);
|
|
156
162
|
process.exit(1);
|
|
157
163
|
}
|
|
158
164
|
|
|
165
|
+
const tokenAddress = result.address;
|
|
166
|
+
|
|
159
167
|
console.log('✅ Token deployed successfully!');
|
|
160
168
|
console.log(`\n📊 Token Details:`);
|
|
161
169
|
console.log(` Address: ${tokenAddress}`);
|
|
@@ -167,7 +175,7 @@ async function main() {
|
|
|
167
175
|
|
|
168
176
|
console.log(`\n💰 Fee Distribution:`);
|
|
169
177
|
console.log(` Agent (${agentConfig.wallet}): 80%`);
|
|
170
|
-
console.log(`
|
|
178
|
+
console.log(` Clanker Protocol: 20%`);
|
|
171
179
|
|
|
172
180
|
// Save token configuration
|
|
173
181
|
const tokenConfig = {
|
|
@@ -181,7 +189,7 @@ async function main() {
|
|
|
181
189
|
agentWallet: agentConfig.wallet,
|
|
182
190
|
fees: {
|
|
183
191
|
agent: 80,
|
|
184
|
-
|
|
192
|
+
clanker: 20,
|
|
185
193
|
},
|
|
186
194
|
};
|
|
187
195
|
|
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(/
|
|
84
|
+
const privateKeyMatch = envContent.match(/AGENT_PRIVATE_KEY=(.+)/);
|
|
85
85
|
if (!privateKeyMatch) {
|
|
86
|
-
console.error('❌ Error:
|
|
86
|
+
console.error('❌ Error: AGENT_PRIVATE_KEY not found in .env file!');
|
|
87
87
|
process.exit(1);
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -103,10 +103,10 @@ async function main() {
|
|
|
103
103
|
console.log(` Symbol: ${tokenSymbol}`);
|
|
104
104
|
console.log(` Supply: ${initialSupply}`);
|
|
105
105
|
console.log(` Agent Wallet: ${agentConfig.wallet}`);
|
|
106
|
-
console.log(` Fee Distribution: 80% Agent, 20%
|
|
106
|
+
console.log(` Fee Distribution: 80% Agent, 20% Clanker\n`);
|
|
107
107
|
|
|
108
|
-
//
|
|
109
|
-
const
|
|
108
|
+
// Clanker wallet address for fee distribution
|
|
109
|
+
const CLANKER_WALLET = '0x0000000000000000000000000000000000000000'; // Clanker protocol address
|
|
110
110
|
|
|
111
111
|
try {
|
|
112
112
|
console.log('🔄 Initializing Clanker SDK...');
|
|
@@ -128,34 +128,42 @@ async function main() {
|
|
|
128
128
|
|
|
129
129
|
console.log('\n🚀 Deploying token...');
|
|
130
130
|
|
|
131
|
-
// Deploy token with 80/20
|
|
132
|
-
|
|
131
|
+
// Deploy token with 80/20 fee split
|
|
132
|
+
// Using Clanker v4 deploy() method with correct token structure
|
|
133
|
+
const { txHash, waitForTransaction } = await clanker.deploy({
|
|
133
134
|
name: tokenName,
|
|
134
135
|
symbol: tokenSymbol,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
interfaceRewardRecipient: DACTYCLAW_WALLET,
|
|
136
|
+
rewards: {
|
|
137
|
+
recipients: [
|
|
138
|
+
{
|
|
139
|
+
recipient: agentConfig.wallet,
|
|
140
|
+
admin: agentConfig.wallet,
|
|
141
|
+
bps: 8000, // 80% to agent
|
|
142
|
+
token: 'Both', // Receive fees in both tokens
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
recipient: CLANKER_WALLET,
|
|
146
|
+
admin: CLANKER_WALLET,
|
|
147
|
+
bps: 2000, // 20% to clanker protocol
|
|
148
|
+
token: 'Both',
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
151
|
},
|
|
152
|
+
vanity: true, // Try to get vanity address with "b07" suffix
|
|
152
153
|
});
|
|
153
154
|
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
console.log(`✓ Transaction submitted: ${txHash}`);
|
|
156
|
+
console.log('⏳ Waiting for confirmation...\n');
|
|
157
|
+
|
|
158
|
+
const result = await waitForTransaction();
|
|
159
|
+
|
|
160
|
+
if (result.error) {
|
|
161
|
+
console.error('❌ Deployment error:', result.error);
|
|
156
162
|
process.exit(1);
|
|
157
163
|
}
|
|
158
164
|
|
|
165
|
+
const tokenAddress = result.address;
|
|
166
|
+
|
|
159
167
|
console.log('✅ Token deployed successfully!');
|
|
160
168
|
console.log(`\n📊 Token Details:`);
|
|
161
169
|
console.log(` Address: ${tokenAddress}`);
|
|
@@ -167,7 +175,7 @@ async function main() {
|
|
|
167
175
|
|
|
168
176
|
console.log(`\n💰 Fee Distribution:`);
|
|
169
177
|
console.log(` Agent (${agentConfig.wallet}): 80%`);
|
|
170
|
-
console.log(`
|
|
178
|
+
console.log(` Clanker Protocol: 20%`);
|
|
171
179
|
|
|
172
180
|
// Save token configuration
|
|
173
181
|
const tokenConfig = {
|
|
@@ -181,7 +189,7 @@ async function main() {
|
|
|
181
189
|
agentWallet: agentConfig.wallet,
|
|
182
190
|
fees: {
|
|
183
191
|
agent: 80,
|
|
184
|
-
|
|
192
|
+
clanker: 20,
|
|
185
193
|
},
|
|
186
194
|
};
|
|
187
195
|
|