mirror of
https://github.com/alexgo-io/brc20-indexer-contracts.git
synced 2026-04-30 19:02:21 +08:00
* feat: dev-stack & bootstrap Signed-off-by: bestmike007 <i@bestmike007.com> * chore: contract codegen Signed-off-by: bestmike007 <i@bestmike007.com> * chore: add depends_on Signed-off-by: bestmike007 <i@bestmike007.com> --------- Signed-off-by: bestmike007 <i@bestmike007.com>
29 lines
726 B
TypeScript
29 lines
726 B
TypeScript
import {
|
|
DEPLOYER_ACCOUNT_ADDRESS,
|
|
DEPLOYER_ACCOUNT_SECRETKEY,
|
|
} from './constants';
|
|
import { transferStxTo } from './contracts/operationFactory';
|
|
import { processOperations } from './utils/processOperations';
|
|
|
|
const processAsDeployer = processOperations(
|
|
DEPLOYER_ACCOUNT_ADDRESS(),
|
|
DEPLOYER_ACCOUNT_SECRETKEY(),
|
|
1e6,
|
|
);
|
|
|
|
async function faucet() {
|
|
const recipient = process.argv[2];
|
|
if (recipient == null) {
|
|
console.log(`Usage: yarn faucet <address>`);
|
|
return;
|
|
}
|
|
if (!recipient.startsWith('ST') && !recipient.startsWith('SP')) {
|
|
console.log(`Invalid stacks address: ${recipient}`);
|
|
return;
|
|
}
|
|
|
|
await processAsDeployer([transferStxTo(recipient, 100e6)]);
|
|
}
|
|
|
|
faucet().catch(console.error);
|