铭文之风在ORDI的突破新高下又开始猛烈起来!上次提到铭文在波卡圈刮起来,也顺手打了几张。目前还没上线市场,也不知成果。现在Bifrost也正想赶上风口,推出了自己的铭文系列:BNCS.
打铭文其实没太多好说的,连上钱包,mint就行。不过就是一次次点,感觉有点心累,幸好团队贴心地提供了自动脚本,释放了双手,点个赞!
脚本(mint.ts)如下:
import {Keyring, ApiPromise, WsProvider} from '@polkadot/api';
(async () => {
let polkadotlWSS = "wss://hk-tmp.bifrost-polkadot-rpc.liebi.com/ws";
const polkadotProvider = new WsProvider(polkadotlWSS);
const polkadotApi = await ApiPromise.create({provider: polkadotProvider});
let MintBNCS = (new Keyring({type: 'sr25519'}) as any).addFromMnemonic("帐号助记词")
let MintBNCSAddress = MintBNCS.address
function sleep (time: any) {
return new Promise((resolve) => setTimeout(resolve, time));
}
async function creatMint() {
let tx1 = polkadotApi.tx.system.remarkWithEvent('{"p":"bncs-20","op":"mint","tick":"BNCS"}')
return polkadotApi.tx.utility.batchAll([tx1]).signAndSend(MintBNCS)
}
for (let i = 0; i < 10; i++) { //自动打10次
await creatMint()
await sleep(32000)
console.log(113, "Successfully mint $BNCS:", i + 1)
}
console.log('Complated!')
process.exit(0)
})()
安装好@polkadot/api, typescript, tsc mint.ts编译成js文件, 再node mint.js就可以开打啰!测了下,每次大约要消耗0.2个BNC, 可以打到8000个BNCS。想到BNCS的总量,又默默多运行了几次脚本!