hel 1 年之前
父节点
当前提交
1e9e1a50e1
共有 2 个文件被更改,包括 7 次插入11 次删除
  1. 2 7
      src/InitiaTask.ts
  2. 5 4
      src/swapTester.ts

+ 2 - 7
src/InitiaTask.ts

@@ -240,7 +240,7 @@ export abstract class InitiaTask extends JennieModule {
     }
 
     const usdcAmount = await this.getEthAmount()
-    if (Number(usdcAmount) < 1000) {
+    if (Number(usdcAmount) < 100) {
       await this.swapEthScript()
       return `needMint`
     }
@@ -262,10 +262,7 @@ export abstract class InitiaTask extends JennieModule {
           .u64()
           .serialize(Math.floor(Number(usdcAmount) / 2))
           .toBase64(), //amount
-        bcs
-          .option(bcs.u64())
-          .serialize(this.randomAmount(1000, 10000))
-          .toBase64(),
+        bcs.option(bcs.u64()).serialize(this.randomAmount(0, 10)).toBase64(),
         bcs.string().serialize(randomValidator).toBase64(), //validator
       ],
     )
@@ -273,8 +270,6 @@ export abstract class InitiaTask extends JennieModule {
   }
 
   async getDelegationInfo() {
-    const axiosClient = getAxiosClient(true)
-
     const data = await this.lcd.mstaking.delegations(this.key.accAddress)
     // const data = await axiosClient.get(
     //   `https://b545809c-5562-4e60-b5a1-22e83df57748.initiation-1.mesa-rest.ue1-prod.newmetric.xyz/initia/mstaking/v1/delegations/${this.key.accAddress}`,

+ 5 - 4
src/swapTester.ts

@@ -3,9 +3,10 @@ import { InitiaClient } from './InitiaClient'
 
 const key = new MnemonicKey({
   mnemonic:
-    // 'deal earth suggest craft impact vocal outdoor perfect winter nice unhappy lizard',
-    // 'language tooth rug border arm essence badge rough ahead unaware bag night stay auto spawn february odor equip hub demand three setup used sentence',
-    'grass spawn flavor cancel borrow only furnace must planet they hub mask dignity rotate report bubble nurse renew ten eagle purity mass dial fever',
+    'scheme address way popular shrug fall rail eyebrow buzz learn cross involve spatial rookie ostrich grocery chest ice glory security slogan summer also comfort',
+  // 'deal earth suggest craft impact vocal outdoor perfect winter nice unhappy lizard',
+  // 'language tooth rug border arm essence badge rough ahead unaware bag night stay auto spawn february odor equip hub demand three setup used sentence',
+  // 'grass spawn flavor cancel borrow only furnace must planet they hub mask dignity rotate report bubble nurse renew ten eagle purity mass dial fever',
 })
 console.log('mnemonic:', key.mnemonic)
 // mnemonic: beauty sniff protect...
@@ -35,7 +36,7 @@ async function main() {
   const client = new InitiaClient(key.mnemonic, false)
   // await client.nameRegister()
   // await client.drawFood()
-  const a = await client.claimableXp()
+  const a = await client.stakeEthSingle()
   console.log(a)
   // await client.mintPart()
 }