@flipflop-sdk/cli
Version:
FlipFlop CLI tool for common operations
39 lines β’ 2.95 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.systemConfigCommand = systemConfigCommand;
const node_1 = require("@flipflop-sdk/node");
// Display mint command handler
async function systemConfigCommand(options) {
try {
const systemConfigAccountInfo = await (0, node_1.getSystemConfig)({ rpc: options.rpc });
if (!systemConfigAccountInfo.success || !systemConfigAccountInfo.data) {
console.log(systemConfigAccountInfo.message);
return;
}
// Display formatted token information
console.log('\nπ Flipflop system configs:');
console.log('β'.repeat(50));
console.log(`π€ System Admin: ${systemConfigAccountInfo.data.admin.toBase58()}`);
console.log(`π System Config Account: ${systemConfigAccountInfo.data.systemConfigAccount.toBase58()}`);
console.log(`π Launch Rule Account: ${systemConfigAccountInfo.data.launchRuleAccount.toBase58()}`);
console.log(`π¦ Protocol Fee Account: ${systemConfigAccountInfo.data.protocolFeeAccount.toBase58()}`);
console.log(`π’ Token Count: ${systemConfigAccountInfo.data.count.toString()}`);
console.log(`π― Referral Usage Max Count: ${systemConfigAccountInfo.data.referralUsageMaxCount}`);
// console.log(`π° Protocol Fee Rate: ${(systemConfigAccountInfo.data.protocolFeeRate * 100).toFixed(2)}%`);
console.log(`πΈ Refund Fee Rate: ${(systemConfigAccountInfo.data.refundFeeRate * 100).toFixed(2)}%`);
console.log(`β° Referrer Reset Interval: ${systemConfigAccountInfo.data.referrerResetIntervalSeconds.toString()} seconds`);
console.log(`π·οΈ Update Metadata Fee: ${(systemConfigAccountInfo.data.updateMetadataFee).toFixed(2)} SOL`);
console.log(`π Customized Deploy Fee: ${(systemConfigAccountInfo.data.customizedDeployFee).toFixed(2)} SOL`);
console.log(`π§ Init Pool WSOL Percent: ${(systemConfigAccountInfo.data.initPoolWsolAmount * 100).toFixed(2)}%`);
console.log(`π Graduate Fee Rate: ${(systemConfigAccountInfo.data.graduateFeeRate).toFixed(2)}%`);
console.log(`π Min Graduate Fee: ${(systemConfigAccountInfo.data.minGraduateFee).toFixed(2)} SOL`);
console.log(`π Raydium CPMM Create Fee: ${(systemConfigAccountInfo.data.raydiumCpmmCreateFee).toFixed(2)} SOL`);
// console.log(`π Transfer Fee Basis Points: ${systemConfigAccountInfo.transferFeeBasisPoints}`);
console.log(`βΈοΈ Is Paused: ${systemConfigAccountInfo.data.isPause ? 'β
Yes' : 'β No'}`);
console.log('β'.repeat(50));
}
catch (error) {
console.error('β Error displaying system config information:', error instanceof Error ? error.message : 'Unknown error');
}
}
//# sourceMappingURL=system-config.js.map