123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688 |
- import {
- APIRequester,
- bcs,
- Coin,
- Coins,
- Fee,
- Height,
- LCDClient,
- MnemonicKey,
- Msg,
- MsgExecute,
- MsgInitiateTokenDeposit,
- MsgTransfer,
- Wallet,
- } from '@initia/initia.js'
- import { generateRandomString, getAxiosClient } from './utils'
- import { HttpsProxyAgent } from 'https-proxy-agent'
- const rpcUrl = [
- 'https://lcd.initiation-1.initia.xyz/',
- 'https://api-initia-testnet.whispernode.com/',
- 'https://initia-testnet-lcd.orbitalcommand.io/',
- 'https://testnet-initia-api.lavenderfive.com/',
- 'https://api.initiation.test.pfc.zone/',
- ]
- export abstract class BaseClient {
- key: MnemonicKey
- lcd: LCDClient
- tucana: LCDClient
- initAi: LCDClient
- civi: LCDClient
- blackWings: LCDClient
- noon: LCDClient
- miniMove: LCDClient
- wallet: Wallet
- tucanaWallet: Wallet
- rpcUrlUsing: string
- protected constructor(mnemonic: string, useProxy: boolean = true) {
- this.key = new MnemonicKey({
- mnemonic: mnemonic,
- })
- const rpc = rpcUrl[Math.floor(Math.random() * rpcUrl.length)]
- this.rpcUrlUsing = rpc
- const pass = `test1234_session-${generateRandomString(8)}_lifetime-20m`
- const proxyAgent = useProxy
- ? new HttpsProxyAgent(`http://tuxla:${pass}@geo.iproyal.com:12321`)
- : undefined
- const username = `u3e4c2852572e05c5-zone-custom-session-${generateRandomString(
- 9,
- )}-sessTime-20`
- const password = 'u3e4c2852572e05c5'
- // const proxyAgent = new HttpsProxyAgent(
- // `http://${username}:${password}@43.152.113.55:2334`,
- // )
- const requester = new APIRequester(rpc, {
- httpsAgent: proxyAgent,
- headers: {
- 'User-Agent':
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
- 'Sec-Ch-Ua':
- '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
- 'Sec-Ch-Ua-Mobile': '?0',
- 'Sec-Ch-Ua-Platform': '"Windows"',
- // Origin: 'https://faucet.testnet.initia.xyz/',
- // Referer: 'https://faucet.testnet.initia.xyz/',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-site',
- },
- })
- this.lcd = new LCDClient(
- rpc,
- {
- chainId: 'initiation-1',
- },
- useProxy ? requester : null,
- )
- const noonRequester = new APIRequester(
- 'https://burrito-1-lcd.lunchlunch.xyz/',
- {
- httpsAgent: proxyAgent,
- headers: {
- 'User-Agent':
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
- 'Sec-Ch-Ua':
- '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
- 'Sec-Ch-Ua-Mobile': '?0',
- 'Sec-Ch-Ua-Platform': '"Windows"',
- // Origin: 'https://faucet.testnet.initia.xyz/',
- // Referer: 'https://faucet.testnet.initia.xyz/',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-site',
- },
- },
- )
- this.noon = new LCDClient(
- 'https://burrito-1-lcd.lunchlunch.xyz/',
- { chainId: 'burrito-1' },
- useProxy ? noonRequester : null,
- )
- const miniMoveRequester = new APIRequester(
- 'https://lcd.minimove-1.initia.xyz',
- {
- httpsAgent: proxyAgent,
- headers: {
- 'User-Agent':
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
- 'Sec-Ch-Ua':
- '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
- 'Sec-Ch-Ua-Mobile': '?0',
- 'Sec-Ch-Ua-Platform': '"Windows"',
- // Origin: 'https://faucet.testnet.initia.xyz/',
- // Referer: 'https://faucet.testnet.initia.xyz/',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-site',
- },
- },
- )
- this.miniMove = new LCDClient(
- 'https://lcd.minimove-1.initia.xyz',
- { chainId: 'minimove-1' },
- useProxy ? miniMoveRequester : null,
- )
- const tucanaMoveRequester = new APIRequester(
- 'https://maze-rest-c9796789-107d-49ab-b6de-059724d2a91d.ue1-prod.newmetric.xyz/',
- {
- httpsAgent: proxyAgent,
- headers: {
- 'User-Agent':
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
- 'Sec-Ch-Ua':
- '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
- 'Sec-Ch-Ua-Mobile': '?0',
- 'Sec-Ch-Ua-Platform': '"Windows"',
- // Origin: 'https://faucet.testnet.initia.xyz/',
- // Referer: 'https://faucet.testnet.initia.xyz/',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-site',
- },
- },
- )
- this.tucana = new LCDClient(
- 'https://maze-rest-c9796789-107d-49ab-b6de-059724d2a91d.ue1-prod.newmetric.xyz/',
- {
- chainId: 'birdee-1',
- },
- useProxy ? tucanaMoveRequester : null,
- )
- const civiMoveRequester = new APIRequester(
- 'https://maze-rest-sequencer-beab9b6f-d96d-435e-9caf-5679296d8172.ue1-prod.newmetric.xyz',
- {
- httpsAgent: proxyAgent,
- headers: {
- 'User-Agent':
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
- 'Sec-Ch-Ua':
- '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
- 'Sec-Ch-Ua-Mobile': '?0',
- 'Sec-Ch-Ua-Platform': '"Windows"',
- // Origin: 'https://faucet.testnet.initia.xyz/',
- // Referer: 'https://faucet.testnet.initia.xyz/',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-site',
- },
- },
- )
- this.civi = new LCDClient(
- 'https://maze-rest-sequencer-beab9b6f-d96d-435e-9caf-5679296d8172.ue1-prod.newmetric.xyz',
- {
- chainId: 'landlord-1',
- },
- useProxy ? civiMoveRequester : null,
- )
- const blackWingsMoveRequester = new APIRequester(
- 'https://maze-rest-18bdff44-3aa4-425e-9bc0-06a2afa40af8.ue1-prod.newmetric.xyz',
- {
- httpsAgent: proxyAgent,
- headers: {
- 'User-Agent':
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
- 'Sec-Ch-Ua':
- '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
- 'Sec-Ch-Ua-Mobile': '?0',
- 'Sec-Ch-Ua-Platform': '"Windows"',
- // Origin: 'https://faucet.testnet.initia.xyz/',
- // Referer: 'https://faucet.testnet.initia.xyz/',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-site',
- },
- },
- )
- this.blackWings = new LCDClient(
- 'https://maze-rest-18bdff44-3aa4-425e-9bc0-06a2afa40af8.ue1-prod.newmetric.xyz',
- {
- chainId: 'tomcat-1',
- },
- useProxy ? blackWingsMoveRequester : null,
- )
- const initAiRequester = new APIRequester(
- 'https://maze-rest-617bacff-7d34-4eb8-87f4-ee16fb4e0ac7.ue1-prod.newmetric.xyz',
- {
- httpsAgent: proxyAgent,
- headers: {
- 'User-Agent':
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
- 'Sec-Ch-Ua':
- '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
- 'Sec-Ch-Ua-Mobile': '?0',
- 'Sec-Ch-Ua-Platform': '"Windows"',
- // Origin: 'https://faucet.testnet.initia.xyz/',
- // Referer: 'https://faucet.testnet.initia.xyz/',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-site',
- },
- },
- )
- this.initAi = new LCDClient(
- 'https://maze-rest-617bacff-7d34-4eb8-87f4-ee16fb4e0ac7.ue1-prod.newmetric.xyz',
- {
- chainId: 'init-ai-1',
- },
- useProxy ? initAiRequester : null,
- )
- this.wallet = new Wallet(this.lcd, this.key)
- }
- async broadcast(msg: Msg | Msg[]) {
- // const randLimit = 160000 + Math.floor(Math.random() * 10000)
- const simulate = await this.lcd.tx.estimateFee(
- [{ sequenceNumber: await this.wallet.sequence() }],
- {
- msgs: Array.isArray(msg) ? msg : [msg],
- },
- )
- // console.log('simulate', simulate)
- // console.log('simulate2', simulate.amount.toArray()[0].amount)
- const signed = await this.wallet.createAndSignTx({
- msgs: Array.isArray(msg) ? msg : [msg],
- fee: new Fee(
- simulate.gas_limit,
- new Coins([
- new Coin(
- 'move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff',
- simulate.amount.toArray()[0].amount,
- ),
- ]),
- ),
- })
- // return `1`
- // const signed2 = await this.wallet.createAndSignTx({
- // msgs: Array.isArray(msg) ? msg : [msg],
- // fee: new Fee(
- // Math.floor(Number(simulate) * 1.1),
- // new Coins([
- // new Coin(
- // 'move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff',
- // Math.floor(Number(simulate) * 1.05),
- // ),
- // ]),
- // ),
- // })
- const broadcast = await this.lcd.tx.broadcastAsync(signed)
- return broadcast.txhash
- }
- randomAmount(min: number, max: number) {
- return Math.floor(Math.random() * (max - min) + min)
- }
- async checkBalance() {
- const balances = await this.lcd.bank.balance(this.key.accAddress)
- return balances[0].toArray()
- }
- async axiosBalance() {
- const axios = getAxiosClient(true)
- const res = await axios.get(
- `https://celatone-api-prod.alleslabs.dev/v1/initia/initiation-1/accounts/${this.key.accAddress}/balances`,
- )
- return res.data
- }
- async getGasAmount() {
- // const balances = await this.axiosBalance()
- // const balances = await this.axiosBalance()
- const balances = (await this.lcd.bank.balance(this.key.accAddress))[0]
- try {
- const usdc = balances.filter(
- token =>
- token.denom ===
- 'move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff',
- )
- return Number(usdc.toArray()[0].amount)
- } catch (e) {
- throw new Error('..')
- }
- }
- async gasGot() {
- const balances = await this.lcd.bank.balanceByDenom(
- this.key.accAddress,
- 'move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff',
- )
- return Number(balances.amount) > 3500000
- }
- async funded() {
- const tokens = await this.checkBalance()
- const uinit = tokens.filter(token => token.denom === 'uinit')[0]
- return Number(uinit.amount) > 0
- }
- async checkTucanaBalance() {
- const balances = await this.tucana.bank.balance(this.key.accAddress)
- const tuc = balances[0].toArray().filter(token => token.denom === 'utuc')[0]
- return tuc.amount
- }
- async needBlackWingsInit() {
- const balances = await this.blackWings.bank.balance(this.key.accAddress)
- const blackWings = balances[0]
- .toArray()
- .filter(
- token =>
- token.denom ===
- 'l2/aee375e9d0b181f0d9d3a49f9a3d1d6b05d62b0ac81f8c92b9282afa4213d884',
- )[0]
- return Number(blackWings.amount) < 1000000
- }
- async checkBlackWingsBalance() {
- try {
- const balances = await this.blackWings.bank.balance(this.key.accAddress)
- return balances[0].toArray()
- } catch (e) {
- throw new Error('..')
- }
- }
- async checkAiBalance() {
- try {
- const balances = await this.initAi.bank.balance(this.key.accAddress)
- return balances[0].toArray()
- } catch (e) {
- throw new Error('..')
- }
- }
- async checkUsdcSwaped() {
- const tokens = await this.checkBalance()
- try {
- const usdc = tokens.filter(token => token.denom === 'uusdc')[0]
- return Number(usdc.amount) > 2000000
- } catch (e) {
- console.log(`error`)
- throw new Error('..')
- }
- }
- async checkTiaSwaped() {
- const tokens = await this.checkBalance()
- const usdc = tokens.filter(token => token.denom === 'utia')[0]
- return !!usdc
- }
- async checkEthSwaped() {
- const tokens = await this.checkBalance()
- try {
- const usdc = tokens.filter(token => token.denom === 'ueth')[0]
- return !!usdc
- } catch (e) {
- return false
- }
- }
- async getUsdcAmount() {
- const tokens = await this.checkBalance()
- const usdc = tokens.filter(token => token.denom === 'uusdc')[0]
- return usdc.amount
- }
- async getTargetAmount(toAddr: string) {
- const data = await this.lcd.bank.balance(toAddr)
- const tokens = data[0].toArray()
- try {
- console.log(tokens)
- const usdc = tokens.filter(token => token.denom === 'uinit')[0]
- return usdc.amount
- } catch (e) {
- return 0
- }
- }
- async getInitAmount() {
- const tokens = await this.checkBalance()
- try {
- console.log(tokens)
- const usdc = tokens.filter(token => token.denom === 'uinit')[0]
- return usdc.amount
- } catch (e) {
- return 0
- }
- }
- async getTiaAmount() {
- const tokens = await this.checkBalance()
- try {
- const usdc = tokens.filter(token => token.denom === 'utia')[0]
- return usdc.amount
- } catch (e) {
- return 0
- }
- }
- async getEthAmount() {
- const tokens = await this.checkBalance()
- try {
- const usdc = tokens.filter(token => token.denom === 'ueth')[0]
- return usdc.amount
- } catch (e) {
- return 0
- }
- }
- async bridge() {
- const size = bcs.option(bcs.u64()).serialize(0).toBase64()
- const balance = await this.checkTucanaBalance()
- console.log('balance', balance)
- const randomLimit = 70000 + Math.floor(Math.random() * 1000)
- const value = Number(balance) - randomLimit
- const size2 = bcs.option(bcs.u64()).serialize(value.toString()).toBase64()
- const msgs = [
- new MsgTransfer(
- 'transfer', // port
- 'channel-0', // src channel
- new Coin('utuc', value), // amount
- this.key.accAddress, // sender
- '0x42cd8467b1c86e59bf319e5664a09b6b5840bb3fac64f5ce690b5041c530565a::swap_transfer::mixed_route_swap_to',
- // receiver
- // you have to provide one of timeout
- new Height(0, 0), // timeout height
- ((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()
- .serialize(this.key.accAddress)
- .toBase64()}]}}}`,
- ),
- ]
- const fee = {
- amount: [
- {
- amount: '62579',
- denom: 'utuc',
- },
- ],
- gasLimit: '417192',
- granter: '',
- payer: '',
- }
- // 创建 Coins 实例
- const coin = new Coin('utuc', '70000')
- const coins = new Coins()
- coins.add(coin)
- // 创建 Fee 实例
- const feeInstance = new Fee(
- parseInt(fee.gasLimit, 10), // gas_limit
- coins, // amount
- fee.payer, // payer (optional)
- fee.granter, // granter (optional)
- )
- const signedTx = await this.tucanaWallet.createAndSignTx({
- msgs,
- fee: feeInstance,
- })
- await this.tucana.tx.broadcastSync(signedTx).then(res => console.log(res))
- }
- async bridge2Blackwings(amount: number) {
- const size = bcs.option(bcs.u64()).serialize(0).toBase64()
- const size2 = bcs
- .u64()
- .serialize(amount * Math.pow(10, 6))
- .toBase64()
- const msg = new MsgExecute(
- this.key.accAddress,
- '0x42cd8467b1c86e59bf319e5664a09b6b5840bb3fac64f5ce690b5041c530565a',
- 'swap_transfer',
- 'mixed_route_swap_transfer',
- [],
- [
- 'jkczvavPfUr8PRTw3UbJv1L7D86eS5lsk54ZW4vIkdk=',
- 'AQIBACDb8GxIrzmE7G2a6KmqfbsLseeEqpuMSlaBr2YM+FWNfQ==',
- size2,
- size,
- bcs.string().serialize(this.key.accAddress).toBase64(),
- 'CHRyYW5zZmVy',
- 'CmNoYW5uZWwtMTM=',
- 'AA==',
- ],
- )
- const signed = await this.wallet.createAndSignTx({
- msgs: Array.isArray(msg) ? msg : [msg],
- feeDenoms: ['uinit'],
- })
- await this.lcd.tx.broadcast(signed)
- }
- async bridge2Ai(amount: number) {
- const size = bcs
- .option(bcs.u64())
- .serialize(amount * Math.pow(10, 6) * 0.995)
- .toBase64()
- const size2 = bcs
- .u64()
- .serialize(amount * Math.pow(10, 6))
- .toBase64()
- const msg = new MsgExecute(
- this.key.accAddress,
- '0x42cd8467b1c86e59bf319e5664a09b6b5840bb3fac64f5ce690b5041c530565a',
- 'swap_transfer',
- 'mixed_route_swap_deposit',
- [],
- [
- 'jkczvavPfUr8PRTw3UbJv1L7D86eS5lsk54ZW4vIkdk=',
- 'AA==',
- size2,
- size,
- 'BgAAAAAAAAA=',
- bcs.address().serialize(this.key.accAddress).toBase64(),
- 'AA==',
- ],
- )
- // [
- // ('jkczvavPfUr8PRTw3UbJv1L7D86eS5lsk54ZW4vIkdk=',
- // 'AA==',
- // 'QEIPAAAAAAA=',
- // 'AbguDwAAAAAA',
- // 'BgAAAAAAAAA=',
- // 'AAAAAAAAAAAAAAAAdpKzfgzxKB4sBaUJs11Wa9w+emA=',
- // 'AA==')
- // ][
- // ('jkczvavPfUr8PRTw3UbJv1L7D86eS5lsk54ZW4vIkdk=',
- // 'AA==',
- // 'gIQeAAAAAAA=',
- // 'AXBdHgAAAAAA',
- // 'BgAAAAAAAAA=',
- // 'AAAAAAAAAAAAAAAAdpKzfgzxKB4sBaUJs11Wa9w+emA=',
- // 'AA==')
- // ]
- const signed = await this.wallet.createAndSignTx({
- msgs: Array.isArray(msg) ? msg : [msg],
- feeDenoms: ['uinit'],
- })
- const broadcast = await this.lcd.tx.broadcastSync(signed)
- console.log(broadcast)
- }
- async newBridgeUsdc2BlackWings() {
- const msg = new MsgTransfer(
- 'transfer',
- 'channel-13',
- new Coin('uusdc', 1000000),
- this.key.accAddress,
- this.key.accAddress,
- null, // timeout height
- ((new Date().valueOf() + 3500000) * 1000000).toString(),
- )
- return await this.broadcast(msg)
- }
- async newBridgeUsdc2Tucana() {
- const random = this.randomAmount(1000000, 1500000)
- const msg = new MsgTransfer(
- 'transfer',
- 'channel-25',
- new Coin('uusdc', random),
- this.key.accAddress,
- this.key.accAddress,
- null, // timeout height
- ((new Date().valueOf() + 3500000) * 1000000).toString(),
- )
- return await this.broadcast(msg)
- }
- async newBridgeTia2Noon() {
- const random = this.randomAmount(100000, 150000)
- const msg = new MsgTransfer(
- 'transfer',
- 'channel-31',
- new Coin('utia', random),
- this.key.accAddress,
- this.key.accAddress,
- null, // timeout height
- ((new Date().valueOf() + 3500000) * 1000000).toString(),
- )
- return await this.broadcast(msg)
- }
- async newBridgeEth2MiniMove() {
- const msg = new MsgTransfer(
- 'transfer',
- 'channel-0',
- new Coin('ueth', 100),
- this.key.accAddress,
- this.key.accAddress,
- null, // timeout height
- ((new Date().valueOf() + 3500000) * 1000000).toString(),
- )
- return await this.broadcast(msg)
- }
- async newBridge2BlackWings() {
- const random = this.randomAmount(1000000, 1500000)
- const msg = new MsgInitiateTokenDeposit(
- this.key.accAddress,
- 8,
- this.key.accAddress,
- new Coin('uinit', random),
- )
- return await this.broadcast(msg)
- }
- async newBridge2Noon() {
- const msg = new MsgInitiateTokenDeposit(
- this.key.accAddress,
- 17,
- this.key.accAddress,
- new Coin('uinit', 1500000),
- )
- return await this.broadcast(msg)
- }
- async newBridge2Ai() {
- const random = this.randomAmount(1500000, 2000000)
- const msg = new MsgInitiateTokenDeposit(
- this.key.accAddress,
- 6,
- this.key.accAddress,
- new Coin('uinit', random),
- )
- return await this.broadcast(msg)
- }
- async newBridge2Civi() {
- const random = this.randomAmount(1500000, 2000000)
- const msg = new MsgInitiateTokenDeposit(
- this.key.accAddress,
- 24,
- this.key.accAddress,
- new Coin('uinit', random),
- )
- return await this.broadcast(msg)
- }
- async newBridge2Tucana() {
- const msg = new MsgInitiateTokenDeposit(
- this.key.accAddress,
- 14,
- this.key.accAddress,
- new Coin('uinit', 1000000),
- )
- return await this.broadcast(msg)
- }
- async newBridge2Miniwasm() {
- const msg = new MsgInitiateTokenDeposit(
- this.key.accAddress,
- 2,
- this.key.accAddress,
- new Coin('uinit', 1000000),
- )
- return await this.broadcast(msg)
- }
- async newBridge2Minimove() {
- const msg = new MsgInitiateTokenDeposit(
- this.key.accAddress,
- 1,
- this.key.accAddress,
- new Coin('uinit', 1000000),
- )
- return await this.broadcast(msg)
- }
- }
|