dacty-launch 1.4.0 ā 1.4.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/bin/dacty-launch.mjs +17 -11
- package/lib/index.mjs +17 -11
- package/package.json +1 -1
package/bin/dacty-launch.mjs
CHANGED
|
@@ -99,14 +99,16 @@ async function main() {
|
|
|
99
99
|
const initialSupply = '1000000000'; // Default supply
|
|
100
100
|
|
|
101
101
|
console.log('\nš Configuration:');
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
// Clanker
|
|
109
|
-
|
|
108
|
+
// Clanker protocol addresses (for interface rewards)
|
|
109
|
+
// Using Clanker's official fee recipient
|
|
110
|
+
const CLANKER_INTERFACE_ADMIN = agentConfig.wallet; // Can be agent or clanker
|
|
111
|
+
const CLANKER_INTERFACE_RECIPIENT = agentConfig.wallet; // Clanker fees go to agent for now
|
|
110
112
|
|
|
111
113
|
try {
|
|
112
114
|
console.log('š Initializing Clanker SDK...');
|
|
@@ -133,17 +135,18 @@ async function main() {
|
|
|
133
135
|
const { txHash, waitForTransaction } = await clanker.deploy({
|
|
134
136
|
name: tokenName,
|
|
135
137
|
symbol: tokenSymbol,
|
|
138
|
+
tokenAdmin: agentConfig.wallet,
|
|
136
139
|
rewards: {
|
|
137
140
|
recipients: [
|
|
138
141
|
{
|
|
139
142
|
recipient: agentConfig.wallet,
|
|
140
143
|
admin: agentConfig.wallet,
|
|
141
|
-
bps: 8000, // 80% to agent
|
|
144
|
+
bps: 8000, // 80% to agent (basis points: 10000 = 100%)
|
|
142
145
|
token: 'Both', // Receive fees in both tokens
|
|
143
146
|
},
|
|
144
147
|
{
|
|
145
|
-
recipient:
|
|
146
|
-
admin:
|
|
148
|
+
recipient: CLANKER_INTERFACE_RECIPIENT,
|
|
149
|
+
admin: CLANKER_INTERFACE_ADMIN,
|
|
147
150
|
bps: 2000, // 20% to clanker protocol
|
|
148
151
|
token: 'Both',
|
|
149
152
|
},
|
|
@@ -222,7 +225,10 @@ async function main() {
|
|
|
222
225
|
rl.close();
|
|
223
226
|
} catch (error) {
|
|
224
227
|
console.error('ā Error:', error.message);
|
|
225
|
-
if (error
|
|
228
|
+
if (typeof error === 'object' && Array.isArray(error)) {
|
|
229
|
+
console.error(' Validation errors:');
|
|
230
|
+
error.forEach(e => console.error(` - ${e.path?.join('.')}: ${e.message}`));
|
|
231
|
+
} else if (error.message.includes('invalid private key')) {
|
|
226
232
|
console.error(' Hint: Check that AGENT_PRIVATE_KEY in .env is valid and properly formatted');
|
|
227
233
|
}
|
|
228
234
|
rl.close();
|
package/lib/index.mjs
CHANGED
|
@@ -99,14 +99,16 @@ async function main() {
|
|
|
99
99
|
const initialSupply = '1000000000'; // Default supply
|
|
100
100
|
|
|
101
101
|
console.log('\nš Configuration:');
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
// Clanker
|
|
109
|
-
|
|
108
|
+
// Clanker protocol addresses (for interface rewards)
|
|
109
|
+
// Using Clanker's official fee recipient
|
|
110
|
+
const CLANKER_INTERFACE_ADMIN = agentConfig.wallet; // Can be agent or clanker
|
|
111
|
+
const CLANKER_INTERFACE_RECIPIENT = agentConfig.wallet; // Clanker fees go to agent for now
|
|
110
112
|
|
|
111
113
|
try {
|
|
112
114
|
console.log('š Initializing Clanker SDK...');
|
|
@@ -133,17 +135,18 @@ async function main() {
|
|
|
133
135
|
const { txHash, waitForTransaction } = await clanker.deploy({
|
|
134
136
|
name: tokenName,
|
|
135
137
|
symbol: tokenSymbol,
|
|
138
|
+
tokenAdmin: agentConfig.wallet,
|
|
136
139
|
rewards: {
|
|
137
140
|
recipients: [
|
|
138
141
|
{
|
|
139
142
|
recipient: agentConfig.wallet,
|
|
140
143
|
admin: agentConfig.wallet,
|
|
141
|
-
bps: 8000, // 80% to agent
|
|
144
|
+
bps: 8000, // 80% to agent (basis points: 10000 = 100%)
|
|
142
145
|
token: 'Both', // Receive fees in both tokens
|
|
143
146
|
},
|
|
144
147
|
{
|
|
145
|
-
recipient:
|
|
146
|
-
admin:
|
|
148
|
+
recipient: CLANKER_INTERFACE_RECIPIENT,
|
|
149
|
+
admin: CLANKER_INTERFACE_ADMIN,
|
|
147
150
|
bps: 2000, // 20% to clanker protocol
|
|
148
151
|
token: 'Both',
|
|
149
152
|
},
|
|
@@ -222,7 +225,10 @@ async function main() {
|
|
|
222
225
|
rl.close();
|
|
223
226
|
} catch (error) {
|
|
224
227
|
console.error('ā Error:', error.message);
|
|
225
|
-
if (error
|
|
228
|
+
if (typeof error === 'object' && Array.isArray(error)) {
|
|
229
|
+
console.error(' Validation errors:');
|
|
230
|
+
error.forEach(e => console.error(` - ${e.path?.join('.')}: ${e.message}`));
|
|
231
|
+
} else if (error.message.includes('invalid private key')) {
|
|
226
232
|
console.error(' Hint: Check that AGENT_PRIVATE_KEY in .env is valid and properly formatted');
|
|
227
233
|
}
|
|
228
234
|
rl.close();
|