#🚀・dev-support

1 messages · Page 11 of 1

devout wharf
#

yeah i was reading

#

it give me headache

#

sleep time 02:46

#

Goodluck i want all the data sir

lime ruin
#

err

#

gn

devout wharf
topaz seal
#

@lime ruin @devout wharf for extensive discussions about very specific topics, please let's use the #1189372652561895475 channel. General questions from other users are difficult to spot/identify when we use this channel for personal conversations

lavish estuary
#

How do we query a token smart contract with go-sdk?

topaz seal
#

Check the messages (requests) in the wasm module. Probably the contract state messages will return the info you need. To interact with contracts you can use MsgExecuteContract

dapper oak
#

Is it possible that no one ever talked about Web3Gateway in here? Searching for it doesn't give me any result. There's so little documentation and I can't understand how to implement it. I want to make a transaction with wallet A but paying fees with wallet B. It seems that the way to go (by docs) is to use Web3Gateway, but it's not clear how to. It seems I need to run a microservice (on my own full node? How so?), and also the examples provided in the section "Web3Gw Transactions" are not very useful tbh

dapper oak
#

Sorry guys another question: I had some INJ in staking and I requested the unstaking sending a MsgUndelegate. When the time is up, should I send another msg to "collect" the tokens or those will become available "automatically" and transferable? For example I see in docs there's a MsgWithdrawDelegatorReward but I'm not sure it's the right one for my case, if there is a case at all 😄

lime ruin
dapper oak
#

Another question...anyone knows the fastest rpc out there for Injective? Also paid ones

split rain
#

hey guys, Injective SC dev looking for short term fixed projects here

devout wharf
devout wharf
dapper oak
devout wharf
dapper oak
#

Hi guys, I'm having issue using the grpc from my typescript code to my node. I just use "localhost:9900" as the endpoint for grpc and make a new instance that uses grpc like this: const chainGrpcAuthApi = new ChainGrpcAuthApi(endpoint);

Then try to use any function to test it, like: await chainGrpcAuthApi.fetchAccount(address)
and the code stucks on this request, which apparently never happens.

It works if I change the url to the same one as the rest endpoint which is: 'http://localhost:10337'
But my question is, am I using the grpc doing that? I mean it makes no sense for me to connect to that port which is for the rest endpoint, but apparently the grpc port doesn't work with the typscript SDK?
If I test it from cli with grpcurl it works tho, so it's probably something related to typescript SDK or some error in my code 🥲

glossy vine
#

Hello, did you installed the node polyfills in your app?

kind flare
dapper oak
dapper oak
kind flare
severe patio
#

@dapper oak In sdk, network endpoints, grpc is mapped to 9091 (which is grpc-web actually, but in sdk context we call it gRPC. 9900, was never used , but its indeed native gRPC). With latest cometbft upgrade, grpc-web port changed to 10337 , so same as REST . Try changing your endpoints.grpc to 10337 should work

#

Ping me if you have further problems
"But my question is, am I using the grpc doing that? " Yes, you use grpc-web (its now served via same port as REST API 10337)

modern pier
#

Hi

#

Can anyone help with a transaction?

subtle horizon
next viper
#

i have done bridge from sol to inj through portalbridge ! but cant do migration from SOLlegacy ! string wormhole14ejqjyq8um4p3xfqj74yld5waqljf88fz25yxnma0cngspxe3les00fpjx has invalid length for format hex . What problem is it?

ocean arch
#

Am I the only one who can't get orderbook update on tia from listen_spot_orderbook_snapshots ? I'm on mainnet and others markets work perfectly

reef quail
#

This looks like it will bring some progress to our dapps in the future

ocean arch
hexed dock
random charm
#

Hey guys! Due to INJ being 18 decimals I keep running into overflow errors when trying to stake more than 10 INJ or accruing rewards through my contract on cw_multi_test . Mostly the error occurs when querying delegations as this is when rewards get recalculated. It appears as though the injective-test-tube doesn't allow for querying anything on the staking module so can't use that either. Any ideas ?

topaz seal
ocean arch
#

Hello Abel thank you for your answer
I have this code:
import asyncio
from typing import Any, Dict

from grpc import RpcError

from pyinjective.async_client import AsyncClient
from pyinjective.core.network import Network

async def orderbook_event_processor(event: Dict[str, Any]):
print(event)

def stream_error_processor(exception: RpcError):
print(f"There was an error listening to spot orderbook snapshots ({exception})")

def stream_closed_processor():
print("The spot orderbook snapshots stream has been closed")

async def main() -> None:
network = Network.mainnet()
client = AsyncClient(network)
market_ids = [
"0x35fd4fa9291ea68ce5eef6e0ea8567c7744c1891c2059ef08580ba2e7a31f101",
]

task = asyncio.get_event_loop().create_task(
    client.listen_spot_orderbook_snapshots(
        market_ids=market_ids,
        callback=orderbook_event_processor,
        on_end_callback=stream_closed_processor,
        on_status_callback=stream_error_processor,
    )
)

await asyncio.sleep(delay=60)
task.cancel()

if name == "main":
asyncio.get_event_loop().run_until_complete(main())

I tried again and now it works for all markets as before. It's a problem that this data is not accessible at certain times. I have the impression that it depends on the time of day I try and the market from which I want data. I also have the impression that once I've got the data stream, everything's fine, but if I run the script again, it can cause the problem.

topaz seal
frosty kiln
# random charm Hey guys! Due to INJ being 18 decimals I keep running into overflow errors when ...

whats the type, is it Uint128 ? as for test-tube, it actually is possible to query anything, even if there isn't a helper. but I haven't done so myself yet, you could also make a PR to add the query you need:

But note that those are queries in your integration test, not from your contract. That is what you need?

hexed dock
topaz seal
# hexed dock Is there a private node / indexer that streams the orderbook of market like in t...

You can choose any of the providers named in the documentation page, or you could run your own node and indexer
https://docs.injective.network/nodes/private-nodes

As a developer, you may be interested in having a private / dedicated node or indexing solutions powering your dApp. Here is a list of companies offering private Injective infrastructure services. For more information, click on their websites below.

hexed dock
topaz seal
random charm
#

Hey Markus, thanks for your reply. It is a Uint128 but obv I can’t change the type as its part of the testing framework.
Essentially, in my contract I have a function X which queries the total amount my contract has staked across a bunch of validators. I have a function Y which calls function X and also stakes. Currently when calling either one using testube it panics. So I need to be able to call those functions using testubes and simulate rewards accruing.

frosty kiln
random charm
true torrent
#

@frosty kiln Where do I submit a proposal for a bounty? I emailed rfp@injective.foundation yesterday.

topaz seal
#

Bounty? I am not aware of any bounty program to be honest

true torrent
unique fulcrum
#

Are there any tech details for the injective bridge, eg source code, or a whitepaper? I saw the docs and the description about wormhole and IBC integration.

elder dune
topaz seal
elder dune
buoyant stump
# elder dune Can you plz confirm if the amount of this prop is 0 ? https://www.mintscan.io/i...

it is 0 as well, yes :

{
  "proposal": {
    "id": "445",
    "messages": [
      {
        "type": "cosmos-sdk/distr/MsgCommunityPoolSpend",
        "value": {
          "authority": "inj10d07y265gmmuvt4z0w9aw880jnsr700jstypyt",
          "recipient": "inj1hxwcaee0d6k2lhmaxzk5e2ue6nlcmwek57yplg",
          "amount": []
        }
      }
    ],
    "status": 2,
    "final_tally_result": {
      "yes_count": "0",
      "abstain_count": "0",
      "no_count": "0",
      "no_with_veto_count": "0"
    },
    "submit_time": "2024-09-30T11:37:30.45027737Z",
    "deposit_end_time": "2024-10-02T11:37:30.45027737Z",
    "total_deposit": [
      {
        "denom": "inj",
        "amount": "100111000000000000000"
      }
    ],
    "voting_start_time": "2024-09-30T11:37:30.45027737Z",
    "voting_end_time": "2024-10-04T11:37:30.45027737Z",
    "metadata": "{\"title\":\"Funding Proposal: Support Development of Apello (Corrected Proposal)\",\"summary\":\"Prop #444 was submitted without a specified amount. Please vote on this one. Prop discussion: http://bit.ly/4gL00zl\"}",
    "title": "Funding Proposal: Support Development of Apello (Corrected Proposal)",
    "summary": "Prop #444 was submitted without a specified amount. Please vote on this one. Prop discussion: http://bit.ly/4gL00zl",
    "proposer": "inj1hxwcaee0d6k2lhmaxzk5e2ue6nlcmwek57yplg"
  }
}
elder dune
buoyant stump
#

hm
Might be best to submit it directly in CLI then, if you have the binary installed somewhere and/or a node running

buoyant stump
# elder dune okay ill try using it!

so
You need to create a proposal.json file with the data in it, e.g. :

 "messages": [
  {
   "@type": "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",
   "authority": "inj10d07y265gmmuvt4z0w9aw880jnsr700jstypyt",
   "recipient": "inj1hxwcaee0d6k2lhmaxzk5e2ue6nlcmwek57yplg",
   "amount": ["6000000000000000000000inj"]
  }
 ],
 "metadata": "ipfs://CID",
 "deposit": "100111000000000000000inj",
 "title": "Funding Proposal: Support Development of Apello",
 "summary": "Proposal discussion here \u003e https://commonwealth.im/injective/discussion/25005-funding-proposal-fund-deployment-of-apello-on-injective",
 "expedited": false
}``` 

(I suppose it's the right format for the amount part, not sure)

then I don't know if you can upload that through minstcan ui, or need to use a cli command absolutely
topaz seal
elder dune
#

but yes, the problem is from mintscan

true torrent
# topaz seal cc: <@737113363313852465>

@topaz seal @jolly pulsar Still no response to this. Can I work on the 'automative yield strategies challenge' on dorahacks? It mentioned I need permission for this. Have emailed a proposal.

topaz seal
true torrent
#

Ok @jolly pulsar can you let me know so I can start to work asap🫡

toxic forge
#

Looking through the docs but just asking here to verify: There doesn't seem to be a cron module (or equivalent) currently. Is this correct?

severe patio
#

wdym by cron module @toxic forge ? Like cron job ? (thats not native sdk module)

north sorrel
#

Hello, I get the error ‘pubKey does not match signer address with signer index: 0: invalid pubkey’ during the broadcast phase when transferring injective tokens with the following code. Please help.

lime ruin
true torrent
west shuttle
#

Hello! Did anyone manage to run injective-py with a custom network? I'd like to use the injective instance from NOWNodes but I need to add my api key in all the requests, not sure how to do that...

marble mirage
#

GM !
Can i check if Injective blocktime is deterministic .65s or is it the average block time ?

topaz seal
topaz seal
lime ruin
silver dawn
#

Hello everyone, tell me how can I use a proxy in the inj SDK? (python)

tall plover
lunar tusk
#

hi, can i ask how i would get started in building a system to interact with the injective API? i have to use a language that doesnt have an SDK, and dont see any documentation for how to interact with the grpc protobuf resources, which im not familiar with

topaz seal
true torrent
#

@topaz seal Did you manage to check my proposal for the Dorahacks thing? I'm unable to get through to Shayan

topaz seal
lunar tusk
topaz seal
# lunar tusk hi <@831364009877569538> apologies could you explain that in more detail? i down...

Hi @lunar tusk. The first question is a C# related question, and we don't tackle that kind of questions in this server (only Injective related questions).

Regarding the second question my point is that if you want to interact with a node or an indexer without using any of the official SDKs, you will have to implement the abstractions the SDKs provide in your application. The end result will be the same, but your app will contain all the gRPC related logic

lunar tusk
topaz seal
proper dawn
#

Hi ninjas, is there an equivalent to the zero address of Ethereum? i.e. 0x0000000000000000000000000000000000000000

I want to burn some token but don't know which address should be used for that.

hot marten
proper dawn
stark ridge
#

Hi all, as soon as I want to do an action in the injective hub, it says "You are connected to the wrong wallet. Please use Metamask.", although I'm connected to the right Metamask wallet. Have my INJ delegated, cant even unbond. Are you able to help me? Thanks!

lime ruin
fickle cobalt
fast ocean
#

Hello, i have some tokens in my contract, but i don't have function to withdraw tokens. Can i somehow get these tokens back?

fickle cobalt
reef fiber
#

Does mongo as deployed from the provided docker image trim its own size?

fickle cobalt
#

it does not set any explicit limits

#

they Dockerfile that we use to build it also does not set any limits

fickle cobalt
# fast ocean Hey?

I consulted with our team. Could you please post details to public channel if possible? maybe, some team members have more context on smart cnotracts than I do

fast ocean
fickle cobalt
#

what's your address?

#

you can send me in dm

reef fiber
fickle cobalt
#

yes, you can set limit either by mongo collection config cap or limit the size of the volume in your docker compose

#
  mongo_data:
    driver: local
    driver_opts:
      type: none
      o: size=10G,uid=1000
      device: ${PWD}/volumes/mongo```
#

something like this

bitter hinge
reef fiber
#

Im running the docker container for indexer-exchange-process (mongo, node, and eventprovider are already running) and encountered this error:
the market_id causing the error changes if I change the starting block height, so the issue isn't really with the particular market_id. Can someone help please? thanks!

ebon sonnet
#

Hello sir my withdrawal is pending from last day inj to eth please help me

fickle cobalt
reef fiber
reef fiber
# reef fiber sure, its here: https://pastebin.com/f5Yy9Dv5

Thanks very much for looking into this, I should also mention that I am trying to use a polkachu snapshot to run node, because the official snapshot on s3 is from many weeks ago - it would take at least 1 week to catch up and find out if it would work. As a result, things like s3://injective-snapshots/$NETWORK/weekly/mongo/eventProviderV2Pruned are not obtained from s3 as well, but left empty. So far, eventProvider seems to run just fine, but maybe exchangeProvider requires continuation from a mongo "snapshot"? Or does it just require its markets to be initialized by a snapshot but does not require every block in between, so that I can use a polkachu node snapshot with a older eventProviderV2Pruned mongo data?

I tried diving into the error, but I didn't manage to find injective-indexer code/github.

hot marten
fickle cobalt
#

Our devops team shall resume snapshots today.
Default period is every 7,14,21,28 th day
the core and indexer snapshots we upload are paired (heavily pruned too but we ensure that core has the blocks indxer needs to sync) so you should not have trouble syncing.

#

so i'd suggest to catch the moment just after we upload the snapshots

topaz seal
topaz seal
fickle notch
#

Hello

#

I'm trying to collect data use API

#

from sentry.exchange

#

when I set the start time, it's works.
But, when I set the end time, there's no data

#

Is there a good way to collect data by setting a start and end time?
Or maybe there is a special trick for this?
Thank you.

#

cc @muted helm

lime ruin
fickle notch
#

or did I miss something?

#

I've set it up earlier in UNIX format.
It works for the start time, but not for the end time.

lime ruin
# fickle notch

It didn't work with the epoch timestamp in seconds on my end but worked when I replaced it with the epoch timestamp in milliseconds.

muted helm
unique jungle
#

Hey guys i am new to blockchain and learning stuffs.I have built frontend with reactjs and now i want to link injective chain to test walletconnection deposit funcntionalities
i installed injective-ts using pnpm install @injectivelabs/injective-ts
i used
import { Wallet, InjectiveWallet, InjectiveChain } from '@injectivelabs/injective-ts';
But when i save it i get
Failed to compile.

Module not found: Error: Can't resolve '@injectivelabs/injective-ts' in '/home/Chain/frontend/src/Pages'

im sure injective-ts is there in nodemodules folder

lime ruin
unique jungle
lime ruin
unique jungle
fickle notch
fickle notch
wide wedge
#

Hi can you make it so that we can scroll up on the order book on helix ? It used to be possible but now its not anymore , it t was really usefull (lowering the tick size doesn’t give a clear view of where the order is)

unique jungle
#

Hello devs i am working on deposit logic 😅 when i click send in keplr wallet i get that TransactionException: empty error

true torrent
#

@topaz seal I sent through the proposal for the dorahacks bounty to Justin. But haven't got a response yet. Wondering if it is possible to get a reply soon so we can get to work.

fickle cobalt
fickle cobalt
stark minnow
#

hello, I have just joined the discord channel. I am AI Engineer for 4 years and I want to contribute to the project. I am also from Türkiye (85 million country). I can help you to communicate Turkish people

stark minnow
#

@fickle cobalt selam

dense spruce
#

hey team, is there any way to check market open interest data?

fickle cobalt
fickle cobalt
dense spruce
unique jungle
fickle cobalt
fickle cobalt
dense spruce
fickle cobalt
#

there would be at least at least one problem: client.fetch_oracle_price does not return the historical info AFAIK. also, public rpcs might not have some distant blocks history.

muted osprey
fickle cobalt
glass saddle
#

hi guy i'm want to use module feegrant in injective does it exist ?

stray barn
#

Hello everyone!
Do we have mainnet cw20-adapter contract address?

fickle cobalt
glass saddle
#

Can i set a periodic allowannce ?

errant valve
#

What will happen to this?!!

topaz seal
fickle cobalt
tropic depot
#

Hey team, maybe this isn't the right channel but is it possible to import the INJ token on testnet to metamask? On mainnet I can search for it and it works but on testnet metamask requires a token contract address, I've looked and tried multiple addresses but I can't get it to show my balance in metamask

#

Thank you

lime ruin
lime ruin
tropic depot
last quiver
#

Guys i need help using @injectivelabs/sdk-ts library
the code below gives module not found error

import { InjectiveDirectEthSecp256k1Wallet } from '@injectivelabs/sdk-ts';
This was valid till
"@injectivelabs/sdk-ts": "^1.14.7",

glass saddle
glass saddle
#

i'm use the stargate client but it emit that error: Invalid string. Length must be a multiple of 4 when seding grant msg

#

i use injective/sdk-ts@1.12.1 Stargate.InjectiveSigningStargateClient

#

normal signAndBroadcast

glass saddle
#

Not yet, i think i need to patch cosmjs ver 32.4 with inj pubkey derivation

fickle notch
#

Wow, Injective is very fast! About 85 tx/s? akagithumbsup

#

It's really cool!27082blueflames

fickle cobalt
# fickle notch Wow, Injective is very fast! About 85 tx/s? <:akagithumbsup:1260647950019858606>
Injective Blog

Injective is continuing to redefine blockchain performance, consistently delivering faster and unmatched experiences for developers and users alike.

Recent performance upgrades have slashed block times down to just 0.65 seconds on average. Not only is this a monumental leap from the sub-second block times achieved a year ago, but

reef fiber
fair cobalt
#

Confused why injective bridge bridges USDC but I recieve it as USDClegacy and then theres no liquidity anywhere for me to swap out of it, now I have to bridge back my USDC and figure out another route, from a dev standpoint id just get rid of USDC or find a way to fix the legacy problem. Not happy about paying unnecesary fees 😦

lime ruin
#

USDC & USDC Legacy are same but that USDC is just not used on Injective anymore, Injective mainly supports the USDC from Noble.

fickle notch
unique jungle
unique jungle
fickle seal
#

If anyone would like to test out our Historical APIs (hAPIs) let me know. Totally free, we'd just like feedback.

More info on our hAPIs
Our Historical API service solves one of the biggest blockchain challenges—data aggregation. It goes beyond just fetching data from a blockchain, providing a solution that aggregates, processes, and understands historical data since block one. Our service translates this vast data into human and machine-readable formats, enabling developers to query and stream blockchain data with minimal latency.

Key Benefits:

  • Big Data Made Simple: No need to build custom solutions to analyze blockchain volume, traffic, and actions. We provide historical data in easy-to-use formats across multiple APIs (HTTP, GraphQL, GRPC, Websockets).
  • Low Latency Streaming: Our service allows you to subscribe to specific data changes, offering real-time insights without constantly querying.
  • Custom Data Processing: Utilize our SDK to create custom pre-processors and adapt data flows to your specific needs.
  • Token Trading Insights: Discover which tokens are gaining traction before they even hit the chain by analyzing mempool transactions in real time.
  • Enhanced Support & Integration: We offer premium integration support or SLAs to ensure seamless usage and boost your development productivity.
severe patio
#

@fickle seal You have all historical injective data ?

fickle seal
unique jungle
#

I am getting subaccount id is not valid error used msgdeposit logic

fickle cobalt
unique jungle
# fickle cobalt could you please share your code for MsgDeposit submission?
import { MsgDeposit, MsgBroadcasterWithPk, getEthereumAddress } from '@injectivelabs/sdk-ts'
import { BigNumberInBase } from '@injectivelabs/utils'
import { Network } from '@injectivelabs/networks'

const privateKey = '0x...'
const injectiveAddress = 'inj1...'

const amount = {
  denom: 'inj',
  amount: new BigNumberInBase(1).toWei()
}

const ethereumAddress = getEthereumAddress(injectiveAddress)
const subaccountIndex = 0
const suffix = '0'.repeat(23) + subaccountIndex
const subaccountId = ethereumAddress + suffix

const msg = MsgDeposit.fromJSON({
  amount,
  subaccountId,
  injectiveAddress
});

const txHash = await new MsgBroadcasterWithPk({
  privateKey,
  network: Network.Testnet
}).broadcast({
  msgs: msg
})

console.log(txHash)
fickle cobalt
#

make sure your market id is present on the tstnet

#

yeah, i got it

#

your default subaccount (with no.0) corresponds to your address by default

unique jungle
#

Issue solved i changed index to 1

vernal nest
#

HELLO

fickle cobalt
topaz seal
#

Subaccount 0 is a special subaccount (as mentioned in the documnetation) and it is managed by the chain. User can only deposit into or withdraw from subaccount 1 or greater

unique jungle
#

i have a doubt regarding spot limit order getting placed what does price and quantity stand for i set price to 21 and quanitiy to 1 but when i saw helix it just place a wierd order

topaz seal
#

Both price and quantity fields stand for what they mean, no hidden meaning in those fields. Please make sure you are sending the values in chain format and not in human readable format

unique jungle
# topaz seal Both price and quantity fields stand for what they mean, no hidden meaning in th...
import {
  MsgCreateSpotLimitOrder,
  MsgBroadcasterWithPk,
  getEthereumAddress,
  getSpotMarketTensMultiplier
} from '@injectivelabs/sdk-ts'
import { BigNumberInBase, spotPriceToChainPriceToFixed, spotQuantityToChainQuantityToFixed } from '@injectivelabs/utils'
import { Network } from '@injectivelabs/networks'

const privateKey = '0x...'
const injectiveAddress = 'inj1...'
const feeRecipient = 'inj1...'
const market = {
  marketId: '0x...',
  baseDecimals: 18,
  quoteDecimals: 6,
  minPriceTickSize: '', /* fetched from the chain */
  minQuantityTickSize: '', /* fetched from the chain */
  priceTensMultiplier: '', /** can be fetched from getSpotMarketTensMultiplier */
  quantityTensMultiplier: '', /** can be fetched from getSpotMarketTensMultiplier */
}

const order = {
  price: 1,
  quantity: 1
}

const ethereumAddress = getEthereumAddress(injectiveAddress)
const subaccountIndex = 0
const suffix = '0'.repeat(23) + subaccountIndex
const subaccountId = ethereumAddress + suffix

const msg = MsgCreateSpotLimitOrder.fromJSON({
  subaccountId,
  injectiveAddress,
  orderType: 1, /* Buy */
  price: spotPriceToChainPriceToFixed({
    value: order.price,
    tensMultiplier: market.priceTensMultiplier,
    baseDecimals: market.baseDecimals,
    quoteDecimals: market.quoteDecimals
  }),
  quantity: spotQuantityToChainQuantityToFixed({
    value: order.quantity,
    tensMultiplier: market.quantityTensMultiplier,
    baseDecimals: market.baseDecimals
  }),
  marketId: market.marketId,
  feeRecipient: feeRecipient
})

const txHash = await new MsgBroadcasterWithPk({
  privateKey,
  network: Network.Testnet
}).broadcast({
  msgs: msg
})

console.log(txHash)

Can you just give an example of what should price and quantity be if i wanted to place limit order at 17.3 with 1inj

topaz seal
fickle cobalt
fickle cobalt
#

if you're not sure, why don't you swap your asset to something more common and bridge it to get some other common asset?

#

here's our briding guide

#

as for assets on the wormhole side, you should ask in their discord

topaz seal
#

@lime ruin @lime mountain could you please ban the users spamming this channel?

honest geyser
#

hey mate, @topaz seal
Error handling transaction with Leap: TypeError: o.TxRestClient is not a constructor

previusly i had a long utils func file, which had handle tx func.

This func inputted memo, msg, sender, receiver etc from other parts of next js app, and made wallet popup appear sign tx and return tx hash if tx is successfull.

Problem is this same handle tx now dont work. nothing changed in either front end components or this utils file, like not a single line of code changed.

But now if try to make tx, the tx popsUp. Wallet user sign tx, then it gives this error:

`2117-be868c57aa48fc5e.js:1 Error handling transaction with Leap: TypeError: o.TxRestClient is not a constructor

Transaction error: TypeError: o.TxRestClient is not a constructor`

Did recent inj upgrade deprecated TxRestClient or what?

#

for reference here is my handle with keplr func:

`async function handleTxWithKeplr(
receiverAddress,
senderAddress,
tokenToTransact,
mesg,
chainId,
restEndpoint,
memoFull
) {
try {

const getKeplr = async () => {
  await window.keplr.enable(chainId);
  const offlineSigner = window.keplr.getOfflineSigner(chainId);
  const accounts = await offlineSigner.getAccounts();
  const key = await window.keplr.getKey(chainId);
  return { offlineSigner, accounts, key };
};

const broadcastTx = async (txRaw) => {
  const txRestClient = new TxRestClient(restEndpoint);
  const txHash = await txRestClient.broadcastTx(txRaw);
  if (!txHash) {
    throw new Error("Transaction failed to be broadcasted");
  }
  return txHash;
};

const handleTransactionKeplrwithINJ = async () => {
  const { offlineSigner, accounts, key } = await getKeplr();
  const userAddress = accounts[0].address;

  if (!key.pubKey) {
    throw new Error("Public key not found for the connected account.");
  }

  const chainRestAuthApi = new ChainRestAuthApi(restEndpoint);
  const accountDetailsResponse = await chainRestAuthApi.fetchAccount(
    userAddress
  );
  const baseAccount = BaseAccount.fromRestApi(accountDetailsResponse);
  const accountDetails = baseAccount.toAccountDetails();

`

#

` const chainRestTendermintApi = new ChainRestTendermintApi(restEndpoint);
const latestBlock = await chainRestTendermintApi.fetchLatestBlock();
const latestHeight = latestBlock.header.height;
const timeoutHeight = new BigNumberInBase(latestHeight).plus(
DEFAULT_BLOCK_TIMEOUT_HEIGHT
);

  const amountToSend = {
    amount: new BigNumberInBase(0.01).toWei().toFixed(),
    denom: "inj",
  };
  const msg = mesg;
  const pubKey = Buffer.from(key.pubKey).toString("base64");
  const { txRaw, signDoc } = createTransaction({
    pubKey,
    chainId,
    fee: DEFAULT_STD_FEE,
    memo: memoFull,
    message: [msg],
    sequence: accountDetails.sequence,
    timeoutHeight: timeoutHeight.toNumber(),
    accountNumber: accountDetails.accountNumber,
  });

  const directSignResponse = await offlineSigner.signDirect(
    userAddress,
    signDoc
  );
  const signedTxRaw =
    getTxRawFromTxRawOrDirectSignResponse(directSignResponse);
  const TxResult = await broadcastTx(signedTxRaw);
  console.log(`Transaction Hash: ${TxResult.tx_response.txhash}`);

  const txFullHash = TxResult.tx_response.txhash;
  return { TxResult, txFullHash };
};
const KeplrResponse = await handleTransactionKeplrwithINJ();
return KeplrResponse;

} catch (error) {
console.error("Error handling transaction with Keplr:", error);
throw error;
}
}`

#

I hope u @topaz seal can guide me if there is any new terms in this place with new updates on inj

#

@kind flare I will appriciate if u can answer as abel seems to be offline

#

i am solving this rn, so now reply will help me most thanks

kind flare
#

Use TxRestApi instead of TxRestClient

kind flare
honest geyser
#

lemme update my code

honest geyser
kind flare
#

Huh?

honest geyser
# kind flare Huh?

I mean, we now need to use tx rest api, instead of tx rest client right.

But txRestClient is used in atleast 3000 different places in my app, right.

SO i cannot go to each file searching, also if i use universal vscode search i still need to change 300 times. Is there a way to change one word to anthoer throughout entire app.

kind flare
#

Search and replace in your code editor

honest geyser
#

Nevr Mind found that vscode has this feature, just needed to search a bit, thats a lot, your help worked all tx working great.

kind flare
#

This class was deprecated in favor of TxRestApi and was removed in the latest version

honest geyser
# kind flare This class was deprecated in favor of `TxRestApi` and was removed in the latest ...

Ok, i have a q.

Like swaps of dojoswap are smart xcontracts right.

I searched a bit, they are allowed to be executed by anyone, cause they swaps.

So like if i make a swap ui, and inject that contract adress in it. Cannot i alos use smart contracts made by dojoswap.

(I know fee will go to dojo too) but i will be able to make a swap on inj right. With out building swaps , markets and pools myself

#

In this way, anyone can copy anyones on-chain idea.

kind flare
honest geyser
honest geyser
kind flare
#

custom

honest geyser
#

like if we swap on coinhall, we get different contract than dojo, even though pair of coins we swapped is same

honest geyser
# kind flare custom

so can i get a guide how to make custom contracts, as they allow me to gwet my fees

#

instead of giving to dojo or coinhall

#

by usng thir contract

#

like a doc or soemthing speacifically for swaps

#

on inj

kind flare
honest geyser
#

hey @kind flare .

I currently made an launchpad with this working logic:

Launchpad tokens are stored in address a, Its pricvate key and address is accessed by backend vercel api only (stored in env )

Another address which cllect users funcs which are sent by user to get launching token.

The api have hard coded Receiver address (the address which should receive funds)

Now when buyer comes it sends funds to receiver wallet, then api checks if:
Receiver is hardcoded address?
is tx new and not used before for buying
is amount correct?
is tx successfull

if all correct, then the api sends required tokens to Buyer, and funds to launchpad maker.

this who0le process donot require any smart contract, it relies simply on MsgSend on inj.

But is there a way to deploy a smart contract on chain that stores tokens and on buying send funds to launchpad maker.

#

Like technically the Token making is a smart contract. But its docs are present, but there is no guide i found on how to create such smart conract.
Can u guide me?
As if i use smart contract, it donot use vercel computes, thus reducing vercel bill

fickle cobalt
#

token station is not a launchpad smart contract on the whole. it's just web app

#

you can create your tokens programmatically

honest geyser
fickle cobalt
#

yes, you can implement this as a part of your custom cosmwasm logic.

honest geyser
#

Lemme xplain to u more.

I already have a working launchpad syustem. Here is its logic:

For launchpad owner/token owner/launchpad maker:
I have a launchpad making page, in this they give launchpad token details, supply needed of token for launchpad, phases info, addresses allowed for each pahse, in short provide tokens to launch + all different kind of info.
This info is added to mongo db, via backend api on vercel.

Now we have a launchpad, our launchpad wallet have tokens needed in launchpad and all data for launchpad.

Nw we have a user side, user comes.
Enter buy amount clicks buy.
This send users inj to our fee collection wallet. then api req is sent to backend to check if tx is correct.
then if user inj are received by wallet (our fee receiver wallet), then the api sends tkens using msg send in backend to user.
these tokens are received by user wallet.
user paret ends now.

Now our backend api initiate a new api: send funds toOwner
this gets inj from fee wallet, split its our fee 1-5%, send to appwholetreasurywallet, rest 95 to launchpad creator wallet

#

I want his all but with smart contract, so we dont have to manually verify each tx failure or success and other non chain related things

#

Have i told clerarly? @fickle cobalt

#

I hope this explains in clear words what i am tryna do

honest geyser
#

with phases suport, whitelist support etc

#

and some other features

fickle cobalt
#

i mean, yeah, you can do that. mito contracts are written in cosmwasm, so you can use open references like this

#

to implement your contracts

#

that's a huge deal of work and audits, i can't discuss the whole logic with you in this chat

honest geyser
fickle cobalt
#

maybe you can create your own app in front of the mito vaults (a unique vault per each stage per each project)

honest geyser
fickle cobalt
#

yes. at all you need is typescript knowledge

honest geyser
#

Like bro, is not there a way to write smart contracts in js?

honest geyser
#

but not rust, docker etc, i just learnt whole vps custom host niginx, 5 days ago. so rust is too far for now

fickle cobalt
#

cosmwasm smart contracts are compiled ones. this means, you use a rust compiler to get the code. if you want smart contracts in "js" within our ecosystem you would need to create a safe(!!) transpiler from js into rust. i mean, if somebody on earth is capable of that, show me these ppl :0

honest geyser
#

hahahah, so bro btw, in your thoughts is this apis using msg send approach ok, as next js backend and front end are seperate so basically very less changce of something going wrong ( i know if i dont add error handling then a lot f things can gfo wrong) but if i add good code then launchpad using msg send can work right

#

me waiting for msg, as Pavel is typng

fickle cobalt
#

as long as you use up to date audited libraries and user has some verified keplr installation, everything is fine

#

it's just client side signing with tx sent to chain rpc

honest geyser
honest geyser
fickle cobalt
#

rust is a good investment today

#

you can start with this

honest geyser
# fickle cobalt rust is a good investment today

yeah if my this dapp even makes 6k+$ i will learn it in a week to deploy contract in 2 weeks

Like bro money motivates me, like a normal human.

But for now i goota make this system poerfect with more checks, etc. I also made a On chain chat app

#

A onchain dapp, that uses memo to store user msg, then display it in public on chain group chat, not even apis or db used]

#

And an hybrid chat, that uses on chain tx login by user address, and then websockets to chat fadter than onchain one

#

so launchpad is like 5th product in dapp.

#

making an everything app on inj, i dont know i will succeed or not but hopes are here

fickle cobalt
#

Sounds like a web3 empire …

honest geyser
#

Till then it's pretty basic dapp

tardy spindle
#

Question for experienced developers, if I want to start programming, specifically for the Injective ecosystem, where should I start, what programming languages should I learn? I know C++ I've been learning it for over 1 year

fickle cobalt
wraith drift
#

Hi, need help on InjectiveSDK 'ChainGrpcWasmApi', specifically the method 'fetchSmartContractState', is there a way to modify the gasLimit on the grpc request? I received the error:
GrpcWebError: codespace sdk code 11: out of gas: out of gas in location: wasm contract; gasWanted: 3000000, gasUsed: 3566534

wraith drift
fickle cobalt
#

will just a raw query for this smart contract work?

#

what's your node version?

#

what's the address of the contract?

wraith drift
fickle cobalt
#

i think that's due to smart contract query gas limit settings on the node that you're using.

#

you can try other public nodes. in the meanwhile, i asked our dev team about that

wraith drift
wraith drift
wraith drift
fickle cobalt
fickle cobalt
tawdry sandal
#

Hey folks. Im trying to get to the totalSupply for a token at a given block. The approach I'm taking right now is querying the current totalSupply, and working backwards finding mints and burns with indexerGrpcExplorerApi.fetchAccountTx using the emittor address as a filter. I see that the method has a type parameter, but when trying to use it, the return is always an empty array:

import {
  IndexerGrpcExplorerApi,
} from "@injectivelabs/sdk-ts";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
(async () => {
  const endpoints = getNetworkEndpoints(Network.Mainnet);
  const indexerGrpcExplorerApi = new IndexerGrpcExplorerApi(endpoints.explorer)
  const injQuntCreatorAddress = "inj127l5a2wmkyvucxdlupqyac3y0v6wqfhq03ka64";
  const account = await indexerGrpcExplorerApi.fetchAccountTx({
    address: injQuntCreatorAddress,
    limit: 1,
    // type: '/injective.wasmx.v1.MsgExecuteContractCompat',
  })
  console.log("Account transactions messages", account.txs[0].messages)
})();

returns

Account transactions messages [
  {
    type: '/injective.wasmx.v1.MsgExecuteContractCompat',
    value: {
      sender: 'inj127l5a2wmkyvucxdlupqyac3y0v6wqfhq03ka64',
      contract: 'inj1gtze7qm07nky47n7mwgj4zatf2s77xqvh3k2n8',
      msg: '{"unstake":{"coin":{"denom":"factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj12hrath9g2c02e87vjadnlqnmurxtr8md7djyxm","amount":"169115430594861099676669"}}}',
      funds: '0'
    }
  }
]

Then when I filter for the message type (uncomment on code above)

returns
Account transactions messages []

thanks in advance, and feel free to letme know if there's a better approach for achieving this

forest ibex
#

have a nice day, I need your help please. I made unit tests for my contract, but the error with bech32 haunts me. I also tried using cw-multi-test, MockApi, and toBech32, but nothing helps

I will be glad to help

topaz seal
#

@lime mountain please help us banning this scammer

forest ibex
# forest ibex have a nice day, I need your help please. I made unit tests for my contract, bu...

should I make multi-test and fix the bug there, or is this a problem in my contract?

https://github.com/maxmousse/cosmwasm-test/pull/3

GitHub

Added some notes on addresses in tests using MultiTest.
Fixed the tests.
Added some more example tests (that can be removed).
Run cargo clippy --all-targets and fixed warnings.
Upgraded dependencie...

fickle cobalt
fickle cobalt
tawdry sandal
#

oh no, it was that filter: '/injective.wasmx.v1.MsgExecuteContractCompat' doesen't work, needed to get rid of the starting /

distant idol
#

Has anyone ever managed to sign a transaction using injectived and a Ledger?
We keep getting this error: "Generating payload, please check your Ledger...
failed to pack and hash typedData primary type: there is extra data provided in the message (3 < 4)"

fickle cobalt
#

can you connect your ledger to say your browser software wallets / wallet connect?

reef fiber
#

For OLP, is MinDepth, or minimum notional order size, calculated per order, or summed across orders on the same side and market from the same participant? Can a participant with 600 at spread 0.2% and 400 at spread 0.4% qualify to generate points for Total Score?

wraith drift
wraith drift
honest geyser
#

@fickle cobalt
Is there a way to filter fetch tx from explorer.
So that:
We can give both receiver and sender address.
It returns all tx involving both addresses.
Now the problem with fetching one address all tx or last 100 tx is. It doesn't mean the required tx is in last 100 we fetching.

Eg:
Address a sent 1 inj to address b.
Then address c sent to address b
So on 101 tx.
Now address b have 101 tx.
If we fetch 100 tx , the tx in which the address a sent inj to address b will not be included. As it's 101th tx backwards.

So I wanna fetch tx in a way I can input two address not one

#

In this way if a address is receiver of thousands of tx. Then we wanna find tx with a single sender which can be 1000th in tx backwards. Instead of fetching a thousand tx, we gotta fetch only one tx with both receiver and sender already inputted

wraith drift
# fickle cobalt No such plans

what do you mean by no such plans? although the node has an incorrect gaslimit for its query function submitted, it will not consider to fix it?

wraith drift
honest geyser
fickle cobalt
distant idol
honest geyser
#

i think u understand what i mean, i hope to get answer soon

wraith drift
topaz seal
gray trout
#

Hi, can anyone please point me to a code sample that shows how to get the token metadata (name, symbol, decimals, supply, etc) from a CW20 token address both inside a smart contract and outside it.

fickle cobalt
gray trout
#

But is there any way to access this data inside a smart contract?

fickle cobalt
gray trout
#

Interesting.

rustic token
#

i am having issues installing injective-py

#

any sol?

fickle cobalt
#

what's your platform?

rustic token
#

ubuntu

fickle cobalt
#

could you please provide pip3 -v logs

#

also, are you using fresh env?

rustic token
distant idol
#

Hi, we have a cw20 token which somehow doesn't appear on the injective testnet explorer. We have the marketing info object populated but the token doesn't show. Any idea why?

rustic token
dire dune
hot marten
fickle cobalt
fickle cobalt
rustic token
rustic token
distant idol
sharp cradle
#

Do not DM or use any unsupported link

#

You can convert to Inj and bridge to Injective mainnet

fickle cobalt
#

Also, please do not use this thread for user-related questions. That's for devs and builders in the ecosystem.

honest geyser
#

i was seeing docs to find denom details fetcher. i can fetch donoms and balances using poorfolio fetch function, but i now have denoms, but dont know their decimals, etc, so i will like to fetch each denom details before showing it supply to users with correct decimals

#

in hrt wher is denom details fetcher func in docs?

#

as pavel is offline, ihope @topaz seal can help, appriciated!

#

i want some method where i can give token denom or token facotry id to get details such as display name, decimals etc

#

`import { ChainGrpcTokenFactoryApi } from '@injectivelabs/sdk-ts'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'

const endpoints = getNetworkEndpoints(Network.Testnet)
const chainGrpcTokenFactoryApi = new ChainGrpcTokenFactoryApi(endpoints.grpc)

const creator = 'inj...'
const subdenom = 'NINJA'
const metadata = await chainGrpcTokenFactoryApi.fetchDenomAuthorityMetadata(
creator,
subdenom,
)

console.log(metadata)`

Found above code, but it only gives creator or admin of token, i need a way to fetch token details using token id

honest geyser
#

I mean inj itself explorer not fetching from chain, but from a varcel app

#

I am successfully getting tken owner or aadmin, but like thats useless info to show in a list like in following screenshot, we just need denom decimals

#

@topaz seal

#

list is shown by fetching portfolio, input is address, output it balances, but the tokens supply is raw without decimals

honest geyser
#

token station code uses this to fetch token metadata:
`const { bankApi, tokenFactoryApi } = useChainService()

const denomMetadata = await bankApi.fetchDenomMetadata(
denom
)
`

where Bankapi is ChainGrpcBankApi from injective sdk ts, i made this same functin in my app:

`
import {
ChainGrpcTokenFactoryApi,
ChainGrpcBankApi,
} from "@injectivelabs/sdk-ts";

const logTokenDetails = async (denom) => {
console.log("Token details for:", denom);
const denomMetadata = await ChainGrpcBankApi.fetchDenomMetadata(denom);
console.log(denomMetadata)
};`

but it gives error fetchdenom, metaddata is not a functin

#

@fickle cobalt

#

const logTokenDetails = async (denom) => { console.log("Token details for:", denom); const endpoints = getNetworkEndpoints(Network.TestnetSentry); const chainGrpcBankApi = new ChainGrpcBankApi(endpoints.indexer); const denomMetadata = await chainGrpcBankApi.fetchDenomMetadata(denom); console.log(denomMetadata); };

Updated my func, now it takes it as a func, but 404 error now

reef fiber
#

how can I find out detailed historical trades, with their precise timestamp or block?
So far I have found https://sentry.lcd.injective.network/injective/exchange/v1beta1/historical_trade_records?market_id=0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0
which gives their trade timestamp to the second, however the timestamps are not precise enough.

Comparing it to order book data, I also suspect that it is sometimes inaccurate (not the closest second to the actual trade, and can't reconcile with order book too often).
Is there any way to get better trade data? Thanks!

wraith drift
distant idol
#

Is here the best place to report a bug on the explorer? the one at testnet[.]explorer[.]injective[.]network

distant idol
#

We have a transaction who's message was malformed and that broke the explorer for our contract.
In the browser console we see messages such as "SyntaxError: Unexpected token 'c', "compound_rewards" is not valid JSON"

#

and the page shows this

sharp cradle
#

Do no DM anyone

fickle cobalt
distant idol
#

Hi @fickle cobalt we were trying to call a contract method from python but had to try a few times to get it right. The sc address is inj1zp0ac48kpp5cpu29p7a9wureydz7374h0wqy0a. Name won't help as we deployed many with the same name

fickle cobalt
honest geyser
fickle cobalt
forest ibex
#

hey guys, trying to optimize contract with using docker

error[E0599]: no function or associated item named new_custom found for struct AppBuilder in the current scope
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cw-multi-test-2.2.0/src/app.rs:130:17
|
130 | AppBuilder::new_custom().build(init_fn)
| ^^^^^^^^^^ function or associated item not found in AppBuilder<_, _, _, _, _, _, _, _, _, _>
|
::: /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cw-multi-test-2.2.0/src/app_builder.rs:46:1
|
46 | pub struct AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> {
| ------------------------------------------------------------------------------------------- function or associated item new_custom not found for this struct

?

distant idol
fickle cobalt
topaz seal
distant idol
#

Also, how long after our token has been merged into injective-lists can I expect to see it on the testnet explorer?

steel sparrow
#

I am a passionate and skilled blockchain and web3 frontend developer
is there anyone looking for developer?

honest geyser
#

Like if we create a token on token station, then go to manage, we can see token details from chain, even if it's not in this public repo.

forest ibex
topaz seal
honest geyser
honest geyser
honest geyser
topaz seal
#

But denom metadata is not automatically added. So if anyone created a token using token factory, or migrated a token from other chain using IBC or Peggy, and did not create a denom metadata entry for the token, it won't be there

honest geyser
agile sequoia
#

Did someone think about making an FTMO challenge in Injective or did injective devs think about adding like an FTMO challenge in helix
that's will bring a lot of new traders and made a lof of gains to Inj chain especially that 90% of users fail those challenges.
I was watching the InjectiveSummit today and thought about why Tradfi have those challenges but not Defi
Sadly i'm not a Dev to work on that but i'm glad to help.
If that is not the correct place to propose this idea, please forward it to the team.

honest geyser
reef fiber
# topaz seal That is the only information you can easily access. The other option would be to...

May I know a bit more detail on how I can go through the trade events in each block/transaction?
I am currently querying my own node, the equivalent of https://sentry.lcd.injective.network/injective/exchange/v1beta1/historical_trade_records, with every block height, then removing duplicates anyway.
Would like to find out how much work it would be to do it right. Deriving the trade times and taker's side (bid/ask) by the order book is inaccurate and also much work anyway.

reef fiber
topaz seal
fickle cobalt
# reef fiber Yes, the resolution of the timestamps are too low. It tells what timestamp to th...
GitHub

Injective Exchange API for Python clients. Contribute to InjectiveLabs/sdk-python development by creating an account on GitHub.

reef fiber
honest geyser
#

@topaz seal kindly reply my q too. Thanks

fickle cobalt
honest geyser
#

But it's python, is there a method to do same in ts sdk, to use in js

#

I need to do in next app

fickle cobalt
#

but I'd not say this higher resolution has any phsyical sense for granularity less than 640 ms, which is a block time delta

#

so your precision should be around 0.1 s. 0.01 s does not make a lot of sense

reef fiber
reef fiber
topaz seal
honest geyser
dire dune
dire dune
reef fiber
torpid gale
#

G

fickle cobalt
# forest ibex ? please

I need more context on the smart contract you're testing. As far as I understand, you're using test tube. What guide do you follow?

honest geyser
# honest geyser Yes yes yes, 😀

Sorry to mention guys. But I am developing it, I need this func. I will be happy to get reply . Thanks again.
@fickle cobalt @topaz seal

#

The js method to fetch a token details by its denom

mossy elk
#

If you are looking for developer, let's connect!
I am a passionate blockchain and web developer.
My major skills are blockchain-based web and mobile application development.
I've worked on various blockchain projects (socialFi, gamingFi, DeFi) on different blockchains (Ethereum, Solana, Near, Ton, BNB and Polygon etc).
I mainly use Solidity, Rust, Node.js, React, Typescript, truffle, Next as a stack.

honest geyser
#

Bro i am asking same q from 3 days now, kindly answer it or tell me that ans is not available, No one answers my qs, and keep answering others.

I mentioned several times, no reply.

All i needed was js method to fetch on chain metadata of a token in js sdk.

Kindly reply thanks

#

@topaz seal

fickle cobalt
honest geyser
# fickle cobalt https://github.com/InjectiveLabs/injective-ts/blob/dev/packages/sdk-ts/src/clien...

exactly, i am using same, Like this Following func:

const logTokenDetails = async (denom) => { console.log("Token details for:", denom); const endpoints = getNetworkEndpoints(Network.TestnetSentry); const chainGrpcBankApi = new ChainGrpcBankApi(endpoints.indexer); const denomMetadata = await chainGrpcBankApi.fetchDenomMetadata(denom); console.log(denomMetadata); };

but this gives this error in browser console:

Fetching Token details for: factory/inj1ef5ddgx4q83a8mmap2gxsc7w5q5pj6rmfhjaex/XCV
POST https://testnet.sentry.exchange.grpc-web.injective.network/cosmos.bank.v1beta1.Query/DenomMetadata 404 (Not Found)
ChainGrpcBankApi.js:189 Uncaught (in promise) GrpcUnaryRequestException at Object.onEnd (

honest geyser
#

oh endpoint is need to be grpc, not indexer, good good

#

solved

#

thanks for point to repo though

honest geyser
#

@fickle cobalt , is there a way to fetch all holders of a token, on inj chain, by inputting just the Token denom.

Some bank fetch func like we give denom, it give holders of denom

fickle cobalt
honest geyser
#

trippy inj have an app which shows token holders, i think he uses some kind of api or something, but thats works, i cant dig out exact func that do this, he have a folder token holderview, which have 3 files in tsx, each like3k lines

#

tried to reverse engenier the index logic, but like it dont have bank calls as of what i kow now, still reading it

honest geyser
fickle cobalt
#

Have you changed the sc code? What're your OS and Rust versions?

#

@sharp cradle pls remove the above. Tagging for nothing is not nice

sharp cradle
#

Done

distant idol
distant idol
honest geyser
reef fiber
#

What's the best way to process each block to get trade events with exact timestamps? Are there tools or functions that can help? I am most comfortable with python, and don't mind running a node to get the data, if that matters. Thanks!

fickle cobalt
honest geyser
#

I was a sui dev before , around a yr ago. Their devs were so rude I left sui. I always am amazed by politeness of inj dev team

#

Salute from heart ninja🥷

daring rapids
#

Hi @kind flare .
Does the smart contract function InjectiveQuerier::query_spot_market_mid_price_and_tob get the real time spot price on Helix?

topaz seal
daring rapids
fickle cobalt
#

mainly exchange module is invovled

daring rapids
#

I see. Thanks.

daring rapids
#

I'm playing with the fn query_spot_market_mid_price_and_tob from exchange module on testnet. I'm confused about the unit of the price values.

For example,
I got HDRO/INJ price = 1149000000 from the above function. It shows 0.001149 on Helix Testnet Ui.
In another query,
I got INJ/USDT price = 0.000000000943756. It was 943.756 on Helix. The unit of the price is not standardized.
I was thinking that this is due to the difference between token decimals?

What's the best way to standardize it?

daring rapids
spice island
#

I admire developers your brains are always hot..

broken current
#

Hey everyone,

I am trying to check the bank balance of an address on testnet:
(see screenshot as Discord doesn't allow to share links)
address is:
inj1c96uqheyh5zxug0cdjtq0svs5g56g0lked3edg

I receive the following error:

Error: wrong ID: no ID

What could be the problem?

fickle cobalt
topaz seal
broken current
# fickle cobalt could you pls paste in plain text

Discord doesn't allow me to paste links here is without HTTPS

injectived query bank balances inj1c96uqheyh5zxug0cdjtq0svs5g56g0lked3edg --node testnet.sentry.lcd.injective.network:443 --chain-id injective-888

broken current
fickle cobalt
#
balances:
- amount: "10000000000"
  denom: factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/atom
- amount: "10000000000"
  denom: factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc
- amount: "5000000000"
  denom: factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/weth
- amount: "10000000000000000000"
  denom: inj
- amount: "10000000000"
  denom: peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5
pagination:
  total: "5"```
broken current
#

ok so the URL is wrong

#

it works now!

#

thank you!

daring rapids
fickle cobalt
daring rapids
forest ibex
fickle cobalt
toxic forge
#

I can't seem to get MsgBroadcaster to work with a WalletStrategy that uses Wallet.PrivateKey. Says that it's "not enabled/available" -- should I just scrap working with MsgBroadcaster and fall back on implementing the lower level logic for creating and sending tx's? ```ts
new WalletStrategy({
chainId: ChainId.Mainnet,
wallet: Wallet.PrivateKey,
options: { privateKey },
});

#

I'm trying to create this on the BE, so I'm not trying to use any kind of browser wallet here

#

Is there a recommended alternative client nowadays?

#

Just noticed an entirely separate MsgBroadcasterWithPk class. Will give this a shot

toxic forge
#

✅ Worked

forest ibex
fallow steeple
#

Hi, how can I run hummingbot with a stable connection? Do I just need my own node, or do I need additional services?

fickle cobalt
shell topaz
#

Hey guys, mobile dev here

#

open to collaboration

wet pilot
#

Can someone help

wet pilot
#

Check pic

topaz seal
fickle cobalt
#

Try cloning with ssh

topaz seal
oblique socket
#

currently, I am trying to see if I can migrate cw20 to native but I think cli can help but in tokenstation, it say 5 mins to register but the base denom haven't appeared yet 24hrs. Lahn helped me to fine the factory but still not appearing not Launch Market on Tokenstation. Can somebody help me with it?

oblique socket
fickle cobalt
oblique socket
oblique socket
#

It says it would take 5 mins to show up and cost 0.1 inj to rigister and i did but its not appearing yet. Its been morethat 24hrs.

oblique socket
fickle cobalt
oblique socket
honest geyser
honest geyser
#

@topaz seal , i mean can we do 30k addresses at once in one tx?

bitter hinge
fickle cobalt
bitter hinge
honest geyser
#

users can add addresses like this:
addy1,
addy2,
soooo on

#

so how much i should allow, and if it exceeds i should give error, thats addresses exceed max limit, do multiple tx for more addresses

honest geyser
#

but i dont asked that, i need max, limt, like a number above which address are not allowed

bitter hinge
fickle cobalt
#

do you have a custom smart contract?

honest geyser
#

so same here, 2500 is threshold, ok, will add this as the failsafe limit

#

thanks

#

@fickle cobalt

if i wanna fetch all inj addresses ( to send a tx to them) like quants did, they sent each inj address a airdrop.

how can i fetch that big list? of addresses

topaz seal
honest geyser
topaz seal
honest geyser
honest geyser
topaz seal
#

Check the API docs and the functions in there to get blocks

wet pilot
#

where can get open ai api key

honest geyser
oblique socket
oblique socket
wet pilot
#

python3 agent_server.py --port 5000
Traceback (most recent call last):
File "agent_server.py", line 3, in <module>
from dotenv import load_dotenv
ModuleNotFoundError: No module named 'dotenv' can someone help me in this

topaz seal
wet pilot
#

sorry i installed i was installing iagents bcz of dependencies it was not installing

grave kayak
#

Hello, how can I get token price and market cap from coinhall using api?

fickle cobalt
#

We don’t provide direct support for Coinhall API. You can read their docs

oblique socket
orchid burrow
#

Hey

primal hill
#

anyone know how to make dis work

topaz seal
primal hill
topaz seal
#

Dev question is any question related to how the chain works or the API. This is a question about a tool (a non-dev tool to be more specific)

primal hill
topaz seal
oblique socket
forest ibex
#

Guys, can you help me?
this error occurs after optimization via docker:
docker run --rm -v "$(pwd)":/code
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry
cosmwasm/optimizer:0.16.0

error[E0599]: no function or associated item named new_custom found for struct AppBuilder in the current scope
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cw-multi-test-2.2.0/src/app.rs:130:17
|
130 | AppBuilder::new_custom().build(init_fn)
| ^^^^^^^^^^ function or associated item not found in AppBuilder<_, _, _, _, _, _, _, _, _, _>
|
::: /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cw-multi-test-2.2.0/src/app_builder.rs:46:1
|
46 | pub struct AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> {
| ------------------------------------------------------------------------------------------- function or associated item new_custom not found for this struct

all versions have been updated to the new ones
all integration tests are performed

I don't use AppBuilder anywhere, where does it find it?

new_custom method is missing in the current version of cw-multi-test. This method has either been deleted or renamed?

fickle cobalt
#

i think the issue could be with the tokenstation itself (??)

fickle cobalt
oblique socket
jovial notch
#

Hi all! Does anyone know where i can find a documentation for the TokenStation?

coarse python
#

Dunno what the ish is.
Trying to use this command python agent_server.py --port 5000 to run the agent

#

That's the error I see after trying to install required packages

fickle cobalt
#

idk, you should contact them directly

fickle cobalt
fickle cobalt
coarse python
oblique socket
solar marsh
#

yooo devs

#

issue with starting up an iAgent

#

@coarse python you here...how's it going please

coarse python
coarse python
sharp cradle
fervent ridge
#

Hi devs.

#

I want launch an nfts collection of 10 nfts on test, can someone please suggest me where can i find the documentation.. in Solana its easy to find, we have metaplex's candy machine..

#

please guide me, how to do it on Injective

solar marsh
#

so i left it

sharp cradle
daring dew
#

Bit of a n00b question -- I had a long running bot tracking staking info using '@injectivelabs/sdk-ts'. Now that I've come back to the project, I'm getting weird errors. If I leave the old versions, the grpc library dependency throws GrpcUnaryRequestException when trying to make any query.

If I update to Node 18.0 or higher and newest version of the '@injectivelabs/sdk-ts' I get a lot of issues with imports.

node:internal/modules/esm/resolve:259
    throw new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base), String(resolved));
          ^

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/home/nkrs/Documents/js/injective-scraper/node_modules/@injectivelabs/sdk-ts/dist/esm/utils' is not supported resolving ES modules imported from /home/nkrs/Documents/js/injective-scraper/node_modules/@injectivelabs/sdk-ts/dist/esm/core/modules/wasm/exec-args/ExecArgNeptuneWithdraw.js

What is the correct way to use / import this npm package. Do I need to be using the absolute newest Node?

#

Even when I run with the --experimental-specifier-resolution=node flag, still getting this.

#

Using Node 18.20.5, I am able to get past the above, but then it complains about imports with other sub-dependencies:

mport { Base64 } from 'jscrypto/Base64.js';
         ^^^^^^
SyntaxError: Named export 'Base64' not found. The requested module 'jscrypto/Base64.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'jscrypto/Base64.js';
const { Base64 } = pkg;
fickle cobalt
#

but that's an old node version still

daring dew
#

I've tried also with Node 20 and 22. Still getting the same error. I looked into the code and it does try to import a folder called 'utils'. I've tried the experimental node flags, but no luck.

daring dew
#

Will try again with a fresh environment

fickle cobalt
#

you can contact me

oblique socket
#

If we launch a dApp, do we usually discuss with injective team ot just launch it on injective by creating smart contract or anything we can do. may I know the process, please?

oblique socket
topaz seal
#

Injective is a descentralized chain. You don't need to discuss with anyone. Just send a gov proposal and the stakers will vote

oblique socket
#

so, we need votes to launch?

topaz seal
#

No, you need a gov proposal to deploy a new contract

#

You can find the details in the documentation page

oblique socket
topaz seal
#

Venture Group is just a VC. You can contact them if you need funding, but that has nothing to do with deploying a smart contract

toxic forge
#

Anyone have an example of querying an account for an existing fee grant via Injective-ts?

#

I've made several attempts but no success

toxic forge
#

There are a bunch of Grpc modules for querying this and that in injective-ts, but I can't seem to find one for fetching a fee grant allowance

#

If anyone legit can help, would be much appreciated 🙏

lime ruin
lime ruin
# toxic forge Anyone have an example of querying an account for an existing fee grant via Inje...

You wanna query the grantee account for a certain granter address? This might help:

https://sentry.lcd.injective.network/swagger/#/Query/AllowancesByGranter

If you wanna fetch the granter accounts for a certain grantee address:

https://sentry.lcd.injective.network/swagger/#/Query/Allowances

If you wanna info about the allowance about a certain granter & grantee pair:

https://sentry.lcd.injective.network/swagger/#/Query/Allowance

Not sure if you can do this using TS SDK though.

#

You might get answers faster over there.

rustic token
#

What is the best API for getting factory token price and market data?

rustic token
broken current
#

Hi, I am trying to query with tx a transaction to get the logs but I got strange error.
Command is as screenshot.
Text is:
injectived query tx --output json e160da467a3d962c596fdc3053163d43730f113e5e68a2c695ca674462abd43a --node=HTTPS...testnet.sentry.tm.injective.network:443

Error:
Error: error unmarshalling result: illegal base64 data at input byte 4

The hash is correct.

grave kayak
#

Hello, eveyone
Can I ask some question fetching token price and market from mito or dojo swap on injective while developing trading bot.
As a software engineer, wanna correct api or packages to get token price and market cap etc just token info.
Thank you

fickle cobalt
broken current
rustic token
#

Anyone trying to build with py sdk don't do it most of the methods are unimplemented

topaz seal
rustic token
#

can u guide me how to fetch cw20 balances in pythonsdk ?

rustic token
#

why there is huge price difference

#

i am trying to make a bot and i have same issue

#

price is lagged out.

topaz seal
#

CW20 balance? You need to interact with the CW20 contract instance that handles the token you are interested in

#

the contract must have an endpoint you can query to get the info

#

Once you know what is the endpoint you are querying, you can use the MsgExecuteContract example to interact with the contract

rustic token
#

cant get this func to work! for some reason

#

indeed

topaz seal
#

@lime ruin please help us here banning this scammer

rustic token
topaz seal
#

The most accurate way would be to get that info from the CW20 contract if it provides an endpoint. The second best option is to use the Indexer endpoint (the one in the example you mentioned). Is that not working for you?

topaz seal
#

Regarding price, the pair price would be the last traded price in the spot market for the pair

#

You can also use the best bid, or best ask

#

If that is not what you want, you can also query the oracle info, if there is any oracle for the pair you are insterested in

rustic token
#

Thanks for info i will try it out.

rustic token
#

import asyncio
import grpc
from pyinjective.client.indexer.grpc.indexer_grpc_explorer_api import IndexerGrpcExplorerApi
from pyinjective.core.network import Network

async def get_cw20_balance(address):

network = Network.mainnet()
network.grpc_endpoint = "injective-grpc.publicnode.com:443"
network.chain_stream_endpoint="injective-chainstream.publicnode.com:443"
channel = grpc.aio.secure_channel(
    network.grpc_endpoint, 
    network.grpc_channel_credentials
)

explorer_api = IndexerGrpcExplorerApi(channel, network.explorer_cookie_assistant)

try:
    balance_response = await explorer_api.fetch_cw20_balance(
        address=address,
        pagination=None 
    )
    return balance_response
finally:
    await channel.close()

async def run():
balance = await get_cw20_balance('inj1s3cnqfavah8kpwzycu57upggqqrt4p6w4p5daj')
print(balance)

asyncio.run(run())

#

File "/home/sku11/Desktop/injecto/venv/lib/python3.12/site-packages/pyinjective/utils/grpc_api_request_assistant.py", line 16, in execute_call
response = await grpc_call
^^^^^^^^^^^^^^^
File "/home/sku11/Desktop/injecto/venv/lib/python3.12/site-packages/grpc/aio/_call.py", line 327, in await
raise _create_rpc_error(
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
status = StatusCode.UNIMPLEMENTED
details = "unknown service injective_explorer_rpc.InjectiveExplorerRPC"
debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"unknown service injective_explorer_rpc.InjectiveExplorerRPC", grpc_status:12, created_time:"2024-12-03T22:21:44.033726672+05:00"}"

#

what am i doing wrong?

topaz seal
#

you don't seem to be creating the channel correctly

rustic token
#

🙃

topaz seal
#

I see. In that case you can try instantiating the channel as the AsyncClient class does to get a channel for the Indexer Explorer endpoints

coarse python
#

Been having this error for days now

agile vine
#

Hello everyone, I've been reading through some Injective docs and skimming the GitHub repos and one thing I noticed is there doesn't seem to be a repo with the entire chain source code anywhere. I see the chain releases repo which seems to contain the binaries and this is what is mentioned in the docs for setting up a local devnet.

Is there any way to compile the binary locally? The reason I ask is that I wanted to use a replace statement in the chains go.mod to test functionality from a local copy of a dependency.

grave kayak
#

hello, everyone
While developing about a trading bot on injective , have a trouble at @injectivelabs/sdk-ts

CLI Watching for changes in "."
CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
file:///home/kira/InjTradingBot/node_modules/.pnpm/@injectivelabs+sdk-ts@1.14.33_bufferutil@4.0.8_react-dom@16.13.1_react@16.13.1__react@16.13.1_utf-8-validate@5.0.10/node_modules/@injectivelabs/sdk-ts/dist/esm/utils/crypto.js:3
import { Base64 } from 'jscrypto/Base64.js';
         ^^^^^^
SyntaxError: Named export 'Base64' not found. The requested module 'jscrypto/Base64.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'jscrypto/Base64.js';
const { Base64 } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:146:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:229:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)
#

we faced this after install packages by yarn and try to run the project.
It seems, couldn't be imported this part correctly.

fickle cobalt
fickle cobalt
#

as well as last stable versions of node, yarn etc

agile vine
fickle cobalt
pearl hound
agile vine
# fickle cobalt afaik 08-wasm is not integrated rn

any plans to in the near future as more and more ecosystems outside of Cosmos adopt IBC? in most of these cases they will be writing their contracts in languages that compile to wasm and need to be run via the 08-wasm module.

agile vine
zealous stream
#

Hey guys I have some question about inEVM.
So inEVM is a rollup where you can deploy contract in sol and can interact with injective?
which means account in injective can interact with inEVM smart contract?

fickle cobalt
fickle cobalt
agile vine
agile vine
limpid fern
#

HI guys, How do I use sdk-go to send a 10inj transaction? Most of the examples given are for 1inj. When I send 10inj, it always reports: cannot use 10000000000000000000 (untyped int constant) as int64 value in argument to big.NewInt (overflows)

#

No matter what you do, it will exceed the amount.

agile vine
# limpid fern

The SDK coin type uses it’s own Int type from an internal math package.l so you need to use that instead of Go’s Int.

The error you see is coming from the Go big Int type though because iirc it expect an int64 but you are passing in a constant value that is interpreted as an unsigned integer

#

You should import the SDK’s math package then do something like

sdkmath.NewInt(int64(10000))

subtle idol
#

https://api.injective.exchange/#injectivespotexchangerpc-subaccountorderslist
I want to get the transaction history on helixapp, using this method in the documentation, the result is null 😂 , can someone help me? thanks

agile vine
agile vine
# limpid fern How can i do ,bro

you should be able to import the math package using go get which should add it to your go.mod file that way you can use it in your custom packages that you are working on. once you have it imported you should be able to use the various constructors that it contains for instantiating a sdkmath.Int

e.g. sdkmath.NewInt()

broken current
#

Hello,
I am building a custom derivative instrument with CosmWasm, is there a market on Injective where I can propose it and deploy it or I shall build my own dApp/UI?

fickle cobalt
#

but you can deploy whatever sc / dApp you want, if it's some new type of derivative markets

broken current
broken current
lethal light
broken current
#

Thank you, 🙏 I have read those already and have a contract implemented but how can I plug in to an existing “exchange”?

lethal light
#

Or any option to open a ticket?

fickle cobalt
fickle cobalt
lethal light
lethal light
#

Thanks

#

Nice when people looking for a help but even mod does not care. Nice

#

Thank you @fickle cobalt for top answer.

devout aspen
sharp cradle
lethal light
fickle cobalt
#

also by making your question public you increase the probability of finding the right solution

#

this chat has a lot of experienced comunity devs, not only injective engineers

lethal light
fickle cobalt
lethal light
#

Thats why man. I know always scammers writi g on dms, but atm I do not have chosee..

lethal light
limpid fern
#

My node's latest_block_height always cannot catch up with the latest height in the block explorer. What's going on? I have been running the node for 3 days. "earliest_block_height":"96994901", waz wrong? Bros

limpid fern
#

6CPU 12GRAM 2TBSSD

limpid fern
fickle cobalt
scenic pivot
fickle cobalt
scenic pivot
limpid fern
fickle cobalt
#

Recom says 128) also I’d recommend baremetal, 4 ghz cpu and nvme arrays for disks

calm helm
#

is the sentry rpc down atm?

fickle cobalt
limpid fern
#

Run a node is toooooooo hard

#

Omg

#

Waste my money to purchase 3 vps that not enough to run full node.

atomic glacier
#

That's why there are so few people who hold nodes, try to do everything slowly, may to help you

mental glade
#

Hoho, does anybody know how up-to-date this the injective whitepaper from December 2018 is? I can't share the link, because I am level 1

fickle cobalt
mental glade
#

So far everything I read there was pretty high level

#

where for example would I find up to date informatino regarding the Mind Module?

fickle cobalt
#

here are the docs for our modules

mental glade
#

That was a brain fart I wanted to write Side chain implementation. Was reading at the same time as writing

cerulean snow
#

I am getting errors about margin while I try to send derivative orders using python SDK

fickle cobalt
cerulean snow
# fickle cobalt could you please send the examples of your code / orders?
                market_id=self.marketId,
                sender=self._address.to_acc_bech32(),
                subaccount_id=self._subaccount_id,
                fee_recipient=self._address.to_acc_bech32(),
                price=Decimal(str(price_)),
                quantity=Decimal(str(qty)),
                margin=Decimal(str(margin_)),
                order_type=self.sideToInjectiveSide(side),
                trigger_price=Decimal('1')
            )```
#

here is a sample code that I am sending to simulate, I can't understand the margin term here, it is not leverage right?

#

Here are the values

#

Here is the error I get:

    status = StatusCode.UNKNOWN
    details = "failed to execute message; message index: 0: InitialMarginRatio Check: need at least 649892100.000000000000000000 but got 666582.400000000000000000: insufficient margin [/src/injective-chain/modules/exchange/types/derivative_orders.go:279] With gas wanted: '50000000' and gas used: '71765' "
    debug_error_string = "UNKNOWN:Error received from peer ipv4:15.204.65.64:443 {created_time:"2024-12-18T13:07:27.282407+03:00", grpc_status:2, grpc_message:"failed to execute message; message index: 0: InitialMarginRatio Check: need at least 649892100.000000000000000000 but got 666582.400000000000000000: insufficient margin [/src/injective-chain/modules/exchange/types/derivative_orders.go:279] With gas wanted: \'50000000\' and gas used: \'71765\' "}"
>```
#

I can get success from the transaction with certain values but I need to calculate the margin programmatically so I am trying to figure out what it actually is within the Injective ecosystem

sharp cradle
#

@cerulean snow don't reply to random DMS and don't click any link from strangers

fickle cobalt
#

Leverage = (Total Position Value) / (Margin)

#

to calc propper margin pls use

#
            quantity=Decimal(0.1), price=Decimal(50000), leverage=Decimal(1), is_reduce_only=False
        ),```
#

that's how you can derive the margin parameter from the quantity, price and leverage inputs

#

in your case, you have low price, so the margin should be several orders higher. error logs points at this fact

cerulean snow
#

ohh that's great, I will let you know the results

cerulean snow
# fickle cobalt ```margin=composer.calculate_margin( quantity=Decimal(0.1), price=De...

I tried this code piece but getting the same error:

    status = StatusCode.UNKNOWN
    details = "failed to execute message; message index: 0: Sell MarkPriceThreshold Check: mark/trigger price 216701018.941502228103000000 must be LTE 40670441.754198804600685113: insufficient margin [/src/injective-chain/modules/exchange/types/derivative_orders.go:300] With gas wanted: '50000000' and gas used: '71785' "
    debug_error_string = "UNKNOWN:Error received from peer ipv4:15.204.65.64:443 {created_time:"2024-12-18T17:22:54.379424+03:00", grpc_status:2, grpc_message:"failed to execute message; message index: 0: Sell MarkPriceThreshold Check: mark/trigger price 216701018.941502228103000000 must be LTE 40670441.754198804600685113: insufficient margin [/src/injective-chain/modules/exchange/types/derivative_orders.go:300] With gas wanted: \'50000000\' and gas used: \'71785\' "}"
>```
#

I am testing in the testnet sol/usdt perp pair, the best buy limit order is 24.3 and I am sending a market order with worst price 22, however still getting the same error

#

I guess the price is the issue as you said, but since I am sending a market order, I don't know the exact price and I can't calculate the exact margin.

fickle cobalt
#

ah, testnet, sorry. i also see that the current price is very different from the mark price. that's not a typical situation. i'd suggest using another market for testing

modest ingot
#

I want to query the smart contract but I'm stuck trying to access it with Python

fickle cobalt
modest ingot
vocal plume
#

Hello can I please have some.e help from someone of you guys 🙏

fickle cobalt
#

we're here sir

cerulean snow
topaz seal
#

@ᓚᘏᗢ | Injective @lime mountain please help banning this scammer

foggy gate
#

I have it working; just the commands don't work. Where are you in the development ? @coarse python

foggy gate
#

Now, I was able to run the command switch_agent <name of agent> then run the clear command I get the following: and then get the connection error in red:

#

Ok, I got it to recognize the command by switching to 127.0.0,1

lime kestrel
#

Is there anywhere that help with iagent is provided? or anywhere with additional documentation for troubleshooting, setting it up, etc other than the iAgent github? I am having the same issues as @foggy gate above

foggy gate
#

@lime kestrel the default model they wrote in their python scripts were incorrect.

fickle cobalt
#

I'm looking into issues with iAgent now

fickle cobalt
#

for anyone seeking to use inj iAgent in its current state pls 1) ensure to puchase some OpenAI credits 2) create a separate project for the agent (do not use the default one) 3) obtain the API key for this dedicated project and pass it to the agent

cold shadow
#

hey folks - do any of the testnet faucets work? I got the acknowledgement, but i never received funds.

fickle cobalt
cold shadow
#

I am trying to establish a connection between quicksilver and injective testnets - so a decent amount if possible ser

#

inj1sc9pq3p7v02jtk25hzh08k426fyfy3kcrrgyng

cold shadow
#

yes, sorry 😄

cold shadow
#

thank you kindly

coral zealot
#

Is there a way to get Keplr working on Mobile on Chrome or the native browser? Or you absolutly need something like Brave? I am doing a Connect button on a website.

dusk sparrow
coral zealot
#

Yeah no solution for chrome right?

sharp cradle
#

You can use these browser's for extension on mobile
Mises
kiwi
Yandex

stark hornet
#

I need help

severe thorn
stark hornet
#

I how to start with deploying injective is there a guide

void tusk
sharp cradle
coral zealot
#

I need help, I have created a market with 0.00001 as price tick size.

#

All was fine, but after 10 min it did change to 10 INJ!

#

Who can help me?

fickle cobalt
#

with market greated

fickle cobalt
coral zealot
stark hornet
#

Launch an app

coral zealot
#

I have lost my wallet

#

Scammer asked me to create a ticket

#

Took over my wallet in 1 min

#

Lost everything, my coin too

unreal wyvern
#

worth how much?

coral zealot
#

100 INJ

#

Good that I have all in Binance

#

But why I create a market and it is a 10 INJ tick when I asked 0.0001?

#

You guys can see the screenshot, I entered 0.0001 and it changed to 10 INJ who is going to spend 10 INJ on a new coin?

#

I entered the same as DOJO.

#

Do you have a bug when you need to use a coma , and not a dot . ?

#

It is a dot here

#

Also is it possible to block a wallet somehow? I have my wallet address

fickle cobalt
#

After that i'd use ui to replicate the issue

#

What's ur wallet address?

stark hornet
#

It's this guy

#

Kick him out rn

coral zealot
#

I have a good news. I locked the wallet fast enough

#

I got access again and secured the funds, lost nothing

coral zealot
# stark hornet

yes this is it. I am not a beginner, but when you need help, you can easily rush and click

stark hornet
#

Don't click any links

coral zealot
#

Back to my problem, the tick size was 0.00001, I took a screenshot. Then it changed to 10 INJ which is impossible to trade.

coral zealot
#

Who is going to trade that?

hot marten
coral zealot
#

ahhh yes true

#

1 min

topaz seal
#

@coral zealot what site/web app did you use to launch the market?

coral zealot
#

Token Station

topaz seal
# coral zealot Token Station

But Token Station is a third party application. Why are you asking for help or reporting a bug here? We have nothing to do with that app

coral zealot
#

This I don't know

#

I thought it was an injective product

#

Once a market is created, it is not possible to modify it?

#

Because this error is bad

topaz seal
coral zealot
#

haaaa

topaz seal
coral zealot
#

Ok

#

Just to be clear, this means that no one can trade a transaction is less than 10 INJ right?

topaz seal
#

Yes, that is correct

#

Not the transaction, the order price

coral zealot
#

I want to be sure to understand. Order price. That mean that if I want to buy ZOB, I need to spend >=10 INJ

#

If I want to buy 1 INJ worth of ZOB , it will not work

coral zealot
topaz seal
#

No, that is not the price concept. If there is a box which price is $10, if you want to put an order to buy 5 the price is still $10, the total is $50

coral zealot
#

Yes that what I was thinking, so 0.00001 was correct

#

10 INJ is impossible to trade

#

I cannot find any support or TG for Tokenstation

topaz seal
sly parrot
#

Hey everyone, I was looking into developing a decentralized exchange and wanted to use the injective helix demo repository as a base case. I cloned the repository using git and began installing dependencies using "yarn install" but I got the following error:

"Couldn't find match for "814495d7b416e6811070bee6e67420a4337904ff in refs/heads/chore/esm-refactor,refs/heads/master,refs/heads/refactor/wallet-ts for
InjectiveLabs/shared-packages".

#

I searched the branches in the repository and I couldn't find any that had that specific code for a branch I could use to replace the branch that was being referenced in the json file

fickle cobalt
sly parrot
#

I used a new machine and fresh installs for nodejs and yarn
Nodejs: V22.12.0
Yarn: V1.22.22

#

I was thinking I might try reinstalling Nodejs to see if that was the issue

sly parrot
sly parrot
#

If those aren't the issue then would be something with the repo as the error code said?

fickle cobalt
wide sparrow
#

Hello, everyone!
I am currently working on a DEX platform integrated with the Injective testnet. The platform uses both Keplr and Leap wallets for interacting with smart contracts. While the integration works perfectly with Keplr, I am encountering issues with Leap.
Specifically, when I connect Leap wallet and try to create a bid order, the wallet interface appears, allowing me to approve the transaction. However, after approval, the transaction fails with the error:
TransactionException: Failed to fetch
Has anyone experienced similar issues with Leap on Injective testnet or have insights into resolving this? Any guidance or suggestions would be greatly appreciated!
Thank you!

fickle cobalt
#

sorry, leap is cosmos

wide sparrow
#

Sorry could you plz explain what mgs is?

sly parrot
fickle cobalt
# wide sparrow Sorry could you plz explain what mgs is?

In Cosmos every chain node has some state. State of the node is defined by the state of chain modules. Injective has a unique exchange module. Clearly, some trade is a change of the state in this module. The order submission is defined as a special msg which is packed into your tx to be submitted on chain and executed by the nodes.

worldly fox
#

Hello love the project. I do day trading and was inquiring if you could list your project on "Chainspect"? (which is a blockchain analytics platform focused on technical metrics). A bit of the analytics that are laid out guide me with my strategy. If you don't want to list it for what ever reason I fully understand. It would be much apreciated if you could you atleast tell me the TTF of the project (Time To Finality (TTF) is the duration of time it takes for a transaction to be considered final in a blockchain network. It’s essentially the time it takes for a transaction to become permanent in a blockchain’s ledger)? Thank you for reading, hope to hear back from you, have a good rest of your day.

worldly fox
#

@strong violet I don't have a one for injective yet. Trying to do research on weather it's worth trading or not

topaz seal
muted hull
#

I'm not much aware on this but its something that was addressed in one X space

cerulean snow
#

Hey there, I can't bridge to Ethereum my usdt on inj, I am getting an internal json-rpc error on the ui, any ideas?

errant lodge
#

@topaz seal
Codespace “sdk”
Code: 11
Raw: out of gas in location: write per byte; gas wanted 82239 gas used 84656 out of gas

#

Do you know why gas used is greater than gas wanted and it still failed with this message?

#

Thanks

topaz seal
#

Gas wanted is the gas you decided to spend (the one you configured when broadcasting your message). Gas used was the amount used by the chain to process the message (either to process it fully, or in your case, since it failed, to process until it stopped because the processing was requiring more gas than the amount provided)

errant lodge
#

@topaz seal thanks for great explanation much appreciated

amber summit
lyric egret
#

Hey!
Trying to instantiate a wasm code but the node seems down

#

Nevermind, used injective-rpc.publicnode . com:443

versed tulip
#

Hi guys! can someone send me testnet balance please. Im still on the faucet queue for almost 6 hours

#

inj1lx3rstgfu3azam7nrwvkksej29qt6xdexa64am

hot marten
versed tulip
misty geode
versed tulip
topaz seal
broken current
#

Hi @topaz seal @fickle cobalt
I spoke with Pavel before the holidays about the smart contract and general product we are building on Injective. He suggested someone from the leadership team to review our technical case and provide feedback. I have built a presentation of the architecture and problem we are solving with Injective. Would it be possible to connect and discuss it as suggested by @fickle cobalt ?

Thank you!

primal terrace
ebon quail
#

Hi,
I’m fetching the order book data for a market using the Injective API, but the prices returned (0.9 for buy, 1 for sell) are different from the actual market prices (0.9887 for buy, 0.9888 for sell).

Could you help ? how I can fetch the accurate best bid and ask prices in real-time?

tall plover
#

I can't find a working faucet for testnet. Does anyone have recommendations? Or if you have some testnet INJ to spare, I just need enough for gas on a couple test transactions. inj1l3a0fxuq4ncyzazrv6czyuspju3ujnuuzu45yn

tall plover
unique fable
#

Hey Ninja Devs!

I've been patiently waiting for the testnet faucet to send me some INJ to play around with my little dapp, but unfortunately, nothing has come through.

If anyone has some spare testnet INJ, I'd really appreciate it! Here's my address:
inj1ex9dxlfqdr9rguxpapwa6akl6nccg42yvzla6c

Thanks in advance! 🚀

unique fable
hybrid heart
#

Hey just wanted to know ,it takes 100INJ tokens to get create the voting for the smart contract deployment on mainnet , so whether we can get the deposited tokens back if contracts gets approved ?

misty geode
hybrid heart
#

Hey team , I need to swap my tokens from arbitrum to INJ , can you suggest some good bridge for it

stoic trench
#

GM! I need help with developing a smart contract and would appreciate any advice on how to approach its implementation, along with suggestions on where I can read more detailed information.

Contract requirements:

Listing NFTs on the platform for sale.
Selling NFTs through the platform.
Allowing sellers to withdraw NFTs from the platform.
An important detail: the sale of NFTs should be conducted using FT tokens.

I would be grateful for any guidance on the simplest way to implement this, as my previous attempts haven’t been successful.

Proposed contract structure:
I envision implementing it with four methods, but I’ve encountered some challenges with their development:

NFT Listing Method: Accepts the token ID and the price at which the token will be sold. Question: how can I initiate the transfer of the specified NFT token to the contract’s address within this method?

Price Update Method: Accepts the new token price as a parameter.

NFT Purchase Method: Accepts the token ID. Problem: I don’t yet understand how to set up payment in FT tokens to ensure they’re transferred to the seller.

Token Withdrawal Method: Removes the NFT from the listing.

If anyone can explain the approach in simple terms or suggest where to explore this topic in more depth, I’d be very grateful!\

unique fable
#

gm, gm

anyone can point me to where I can stake test injective?

misty geode
unique fable
earnest cliff
#

Hello, I want to use Node.js code to transfer INR, but I don't know how to write the specific code or what the RPC address is. Do you have a demonstration? Thank you, can you take a look at my code?

sly parrot
#

I'm currently working on the frontend of my D'app and I'm trying to plot price info of ETH/INJ on a candlestick chart using the lightweight charts module.

I've tried streaming data from the IndexerGrpcSpotStream and IndexerGrpcSpotApi modules but when I view the data in the console log I'm not finding any OHLC data. Any ideas?

kind flare
astral kiln
#

How much disk space is needed to run a mainet node with indexer?

astral kiln
#

Are those the correct steps for the node with indexer?

#

I'm in step 5 initializing MongoDB and disk usage is growing very fast, I'm not sure how much is needed

misty geode
#

cc @kind flare

topaz seal
gray trout
#

Hi, is there any reference code to call a contract deployed to inj from rust only with the schema.json file?

#

I could only find tutorials on calling contracts from another contract, would appreciate any resources on this.

topaz seal
gray trout
topaz seal
winged island
#

By any chance, are you looking to add more developers to your project?

misty geode
timid flicker
#

Is the relayer between Osmosis and Injective down? I've been trying to IBC transfer USDT(peggy) from Osmosis chain to Injective chain for about 2 days, and it always gets refunded.

frank rose
#

Hello, will it be possible in the future to swap USDT to INJ and vv on the Injective hub or it's better to swap to USDC?

severe thorn
frank rose
#

Ok, thank you.

lapis cosmos
#

and if so, why do you need eliza if you already integrated fetch?

civic holly
#

Hi @brave quail I am an AI developer and I have built an interactive Bitcoin whitepaper using AI tools. I want to implement this for Injective's docs/whitepaper.

coral gale
#

Hi, I wanted to ask something about the injective ai agent hackathon. Are submissions built on inEVM also acceptable or only the ones built on injective cosmwasm?

ebon quail
#

Hi there, i'm trying to fetch hinj/inj orderbook prices but it only gives me this values : {'orderbooks': [{'marketId': '0x2d7f47811527bd721ce2e4e0ff27b0f3a281f65abcd41758baf157c8ddfcd910', 'orderbook': {'buys': [{'price': '0.9', 'quantity': '1950872000000000000000', 'timestamp': '1712416677130'}, {'price': '0.7', 'quantity': '20000000000000000000', 'timestamp': '1712412012298'}], 'sells': [{'price': '1.001', 'quantity': '100000000000000000000', 'timestamp': '1709187671874'}, {'price': '1', 'quantity': '906932000000000000000', 'timestamp': '1709188121176'}], 'timestamp': '-62135596800000', 'sequence': '0'}}]} it's not what's in the orderbook , what am I doing wrong please ...

topaz seal
ebon quail
#

i used this request : import asyncio

from pyinjective.async_client import AsyncClient
from pyinjective.core.network import Network

async def main() -> None:
network = Network.testnet()
client = AsyncClient(network)
market_ids = [
"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe",
"0x7a57e705bb4e09c88aecfc295569481dbf2fe1d5efe364651fbe72385938e9b0",
]
orderbooks = await client.fetch_spot_orderbooks_v2(market_ids=market_ids)
print(orderbooks)

if name == "main":
asyncio.get_event_loop().run_until_complete(main())

topaz seal
#

ok, you are getting the info for testnet. Why are you saying the info is wrong?

ebon quail
#

OMG you 're right I didn't pay attention... sorry

topaz seal
#

@severe thorn please help us banning this scammer

coral gale
lime ruin
#

It is but iAgent supports Native Injective network.

#

Also with Injective's native EVM coming soon, InEVM will be a thing of past.