delphi-labs / shuttle

Shuttle is an open-source npm package designed to turn wallet connections into a plug-and-play Lego brick for Cosmos dApps.
https://npmjs.com/package/@delphi-labs/shuttle
MIT License
21 stars 29 forks source link

how to use shuttle with localterra? #113

Closed llllllluc closed 1 year ago

llllllluc commented 1 year ago

this is my localterra config

export const TERRA_LOCALTERRA: Network = {
  name: "Terra 2 LocalTerra",
  chainId: "localterra",
  chainPrefix: "terra",
  rpc: "http://localhost:26657",
  rest: "http://localhost:1317",
  bip44: {
    coinType: 330,
  },
  defaultCurrency: {
    coinDenom: "LUNA",
    coinMinimalDenom: "uluna",
    coinDecimals: 6,
    coinGeckoId: "terra-luna-2",
  },
  gasPrice: "0.015uluna",
};

but i'm getting this when i try to connect terra station


 1 of 1 unhandled error

Unhandled Runtime Error
TypeError: Failed to fetch

Call Stack
http
node_modules/@cosmjs/tendermint-rpc/build/rpcclients/http.js (31:0)
HttpClient.execute
node_modules/@cosmjs/tendermint-rpc/build/rpcclients/httpclient.js (22:0)
Tendermint34Client.detectVersion
node_modules/@cosmjs/tendermint-rpc/build/tendermint34/tendermint34client.js (68:0)
Tendermint34Client.create
node_modules/@cosmjs/tendermint-rpc/build/tendermint34/tendermint34client.js (63:0)
Tendermint34Client.connect
node_modules/@cosmjs/tendermint-rpc/build/tendermint34/tendermint34client.js (52:0)
CosmWasmClient.connect
node_modules/@cosmjs/cosmwasm-stargate/build/cosmwasmclient.js (21:0)
TerraStationProvider.eval
node_modules/@delphi-labs/shuttle/dist/esm/providers/TerraStationProvider.js (87:45)
step
node_modules/tslib/tslib.es6.js (147:0)
Object.eval [as next]
node_modules/tslib/tslib.es6.js (128:45)
fulfilled
node_modules/tslib/tslib.es6.js (118:42)
llllllluc commented 1 year ago

btw is there a telegram channel or discord to ask questions like this?

llllllluc commented 1 year ago

change rpc to 1317 gives me


 1 of 1 unhandled error

Unhandled Runtime Error
Error: Bad status on response: 501

Call Stack
filterBadStatus
node_modules/@cosmjs/tendermint-rpc/build/rpcclients/http.js (10:0)
async HttpClient.execute
node_modules/@cosmjs/tendermint-rpc/build/rpcclients/httpclient.js (22:0)
async Tendermint34Client.detectVersion
node_modules/@cosmjs/tendermint-rpc/build/tendermint34/tendermint34client.js (68:0)
async Tendermint34Client.create
node_modules/@cosmjs/tendermint-rpc/build/tendermint34/tendermint34client.js (63:0)
async CosmWasmClient.connect
node_modules/@cosmjs/cosmwasm-stargate/build/cosmwasmclient.js (21:0)
llllllluc commented 1 year ago

this is probably not an issue of shuttle, but wonder anyone has any suggestion

afsardo commented 1 year ago

Hi @llllllluc, this is an interesting issue, I haven't tried using shuttle with local terra but will do, let me check it out. We will also take your suggestion into consideration, about the telegram or discord to ask questions about Shuttle.

afsardo commented 1 year ago

In the mean time you can DM me in Telegram (@afsardo), that's my handle.

llllllluc commented 1 year ago

Thank you! @afsardo

afsardo commented 1 year ago

@llllllluc here is the Telegram group: DelphiLabsOSS

afsardo commented 1 year ago

@llllllluc were you able to make this work? Tbh I haven't tried it yet sorry. Let me know if this is still an issue.

llllllluc commented 1 year ago

@llllllluc were you able to make this work? Tbh I haven't tried it yet sorry. Let me know if this is still an issue.

i haven't either, will try it soon!

afsardo commented 1 year ago

@llllllluc just got the time to test it out and was able to use Shuttle with Station on LocalTerra with the following network config:

import {
  Network,
  StationExtensionProvider,
  WalletExtensionProvider,
} from "@delphi-labs/shuttle-react";

export const LOCAL_TERRA: Network = {
  name: "LocalTerra",
  chainId: "localterra",
  rest: "http://localhost:1317",
  rpc: "http://localhost:26657",
};

const extensionProviders: WalletExtensionProvider[] = [
  new StationExtensionProvider({
    networks: [LOCAL_TERRA],
  }),
];