swapTester.ts 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { AccAddress, LCDClient, MnemonicKey } from '@initia/initia.js'
  2. import { InitiaClient } from './InitiaClient'
  3. const key = new MnemonicKey({
  4. mnemonic:
  5. 'front today attitude network chef scene anxiety fashion hole trim regret liquid sudden void agree angle page angle chief screen under various bridge dirt',
  6. // 'visual giant rely tooth recall explain vital tunnel snow road airport cake',
  7. // 'deal earth suggest craft impact vocal outdoor perfect winter nice unhappy lizard',
  8. // 'educate shock jaguar unfold famous bag legend damp fence trumpet steak again body party carbon index daughter unusual miracle hen dove brand loan beach',
  9. // 'recipe bind slow color mammal wave slush clump filter spot retire faculty area room enough pill become cluster cheap repair riot safe grit smile',
  10. // 'educate shock jaguar unfold famous bag legend damp fence trumpet steak again body party carbon index daughter unusual miracle hen dove brand loan beach',
  11. // 'nut chalk dilemma solve same correct hood lava earn window under coral picture rabbit inform room maximum puppy mixed valley giggle glue mail frame',
  12. // 'recipe bind slow color mammal wave slush clump filter spot retire faculty area room enough pill become cluster cheap repair riot safe grit smile',
  13. // 'language tooth rug border arm essence badge rough ahead unaware bag night stay auto spawn february odor equip hub demand three setup used sentence',
  14. // 'camp rural essay together right oblige shine visa sketch garage legal crush argue calm soup egg forum luxury action cupboard fade myth gospel confirm',
  15. // 'neutral flight plug goddess marble champion message bottom gentle guilt ketchup way guide obey nominee panda sleep meadow scene sea fine cause upgrade only',
  16. })
  17. console.log('mnemonic:', key.mnemonic)
  18. // mnemonic: beauty sniff protect...
  19. console.log('account address:', key.accAddress)
  20. // account address: init10m5nnevplkzvv5svqf0xjx6dc4705u5dxfn2st
  21. const lcd = new LCDClient('https://api-initia-testnet.whispernode.com/', {
  22. chainId: 'initiation-1',
  23. })
  24. // const wallet = new Wallet(lcd, key)
  25. // const msg = new MsgExecute(
  26. // key.accAddress,
  27. // '0x1',
  28. // 'dex',
  29. // 'swap_script',
  30. // [],
  31. // [
  32. // 'sTSuZ4bxDvdClOYn0lGbY7fHQqZzX5hoKSn+qahHRNI=',
  33. // 'jkczvavPfUr8PRTw3UbJv1L7D86eS5lsk54ZW4vIkdk=',
  34. // 'QEIPAAAAAAA=',
  35. // 'AdWGAQAAAAAA',
  36. // ],
  37. // )
  38. async function main() {
  39. const client = new InitiaClient(key.mnemonic, false)
  40. const res = await client.freezeDogs()
  41. console.log(res)
  42. }
  43. // hex()
  44. main()