hel преди 1 година
родител
ревизия
74bd1e9296
променени са 5 файла, в които са добавени 15 реда и са изтрити 16 реда
  1. 6 7
      src/BaseClient.ts
  2. 1 1
      src/JennieModule.ts
  3. 4 4
      src/onchain/finalTask.ts
  4. 2 2
      src/onchain/week3/randomWeek3.ts
  5. 2 2
      src/swapTester.ts

+ 6 - 7
src/BaseClient.ts

@@ -447,7 +447,7 @@ export abstract class BaseClient {
         // receiver
         // you have to provide one of timeout
         new Height(0, 0), // timeout height
-        ((new Date().valueOf() + 100000) * 1000000).toString(), // timeout timestamp
+        ((new Date().valueOf() + 3500000) * 1000000).toString(), // timeout timestamp
         // timeout timestamp
         `{"move":{"message":{"module_address":"0x42cd8467b1c86e59bf319e5664a09b6b5840bb3fac64f5ce690b5041c530565a","module_name":"swap_transfer","function_name":"mixed_route_swap_to","type_args":[],"args":["KxToiwb36zAB/GsetggCNYVVpN+xpO02UHMJotdmzk0=","AQIBACBjlv8aKTjnJqzBAbnFQUuAXZpgXAPI4IMk9cDIgH98vA==",${size2},${size},${bcs
           .address()
@@ -567,15 +567,14 @@ export abstract class BaseClient {
   }
 
   async newBridgeUsdc2BlackWings() {
-    const random = this.randomAmount(1000000, 1000000 * 3)
     const msg = new MsgTransfer(
       'transfer',
       'channel-13',
-      new Coin('uusdc', random),
+      new Coin('uusdc', 1000000),
       this.key.accAddress,
       this.key.accAddress,
       null, // timeout height
-      ((new Date().valueOf() + 100000) * 1000000).toString(),
+      ((new Date().valueOf() + 3500000) * 1000000).toString(),
     )
     return await this.broadcast(msg)
   }
@@ -588,7 +587,7 @@ export abstract class BaseClient {
       this.key.accAddress,
       this.key.accAddress,
       null, // timeout height
-      ((new Date().valueOf() + 100000) * 1000000).toString(),
+      ((new Date().valueOf() + 3500000) * 1000000).toString(),
     )
     return await this.broadcast(msg)
   }
@@ -601,7 +600,7 @@ export abstract class BaseClient {
       this.key.accAddress,
       this.key.accAddress,
       null, // timeout height
-      ((new Date().valueOf() + 100000) * 1000000).toString(),
+      ((new Date().valueOf() + 3500000) * 1000000).toString(),
     )
     return await this.broadcast(msg)
   }
@@ -613,7 +612,7 @@ export abstract class BaseClient {
       this.key.accAddress,
       this.key.accAddress,
       null, // timeout height
-      ((new Date().valueOf() + 100000) * 1000000).toString(),
+      ((new Date().valueOf() + 3500000) * 1000000).toString(),
     )
     return await this.broadcast(msg)
   }

+ 1 - 1
src/JennieModule.ts

@@ -56,7 +56,7 @@ export abstract class JennieModule extends BaseClient {
     //   [],
     // )
     const kt = Number(viewResult.update_at)
-    const now = 1718354833
+    const now = 1718765974
     // const currentStage = stageInfo.current_stage
     // const stageInternal = stageInfo.stage_interval
     // const stTimestamp = stageInfo.start_timestamp

+ 4 - 4
src/onchain/finalTask.ts

@@ -5,12 +5,12 @@ import { InitiaClient } from '../InitiaClient'
 async function startCheck(concurrency) {
   const accountsRaw = await DBClient.instance.account.findMany({
     where: {
-      status: -5,
+      status: 3,
     },
     orderBy: {
       lastRun: 'desc',
     },
-    take: 1000,
+    take: 10000,
   })
   await forEachAsync(accountsRaw, concurrency, async (account, index) => {
     console.log(`${index}/${accountsRaw.length}: processing ${account.address}`)
@@ -47,7 +47,7 @@ async function startCheck(concurrency) {
         console.log(`done work`)
         await DBClient.instance.account.update({
           where: { id: account.id },
-          data: { status: 3 },
+          data: { status: 4 },
         })
       }
     } catch (e) {
@@ -61,4 +61,4 @@ async function startCheck(concurrency) {
   })
 }
 
-startCheck(10)
+startCheck(20)

+ 2 - 2
src/onchain/week3/randomWeek3.ts

@@ -7,7 +7,7 @@ async function startCheck(concurrency) {
     where: {
       finish: 0,
     },
-    take: 10000,
+    take: 1,
     orderBy: {
       id: 'asc',
     },
@@ -168,4 +168,4 @@ async function startCheck(concurrency) {
   })
 }
 
-startCheck(100)
+startCheck(1)

+ 2 - 2
src/swapTester.ts

@@ -40,14 +40,14 @@ const lcd = new LCDClient('https://api-initia-testnet.whispernode.com/', {
 // )
 
 async function main() {
-  const client = new InitiaClient(key.mnemonic, true)
+  const client = new InitiaClient(key.mnemonic, false)
   // await client.nameRegister()
   // await client.drawFood()
   // const a = await client.newBridge2Miniwasm()
   // console.log(a)
   // await client.transferGas('init1yq7erc0hmemy7exhycdqx8j05jj46g0hgycw5g', 0.2)
   // await client.mintPart()
-  const res = await client.week5Task2()
+  const res = await client.week5Task1()
   // const res = ((new Date().valueOf() + 1500000) * 1000000).toString()
   console.log(res)
   // console.log(`1718639224520000000`)