#🚀・dev-support
1 messages · Page 11 of 1
i think u use fetchContractHistory
@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
How do we query a token smart contract with go-sdk?
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
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
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 😄
It'll automatically arrive in your wallet after the unbonding period ends.
Thanks!
Another question...anyone knows the fastest rpc out there for Injective? Also paid ones
hey guys, Injective SC dev looking for short term fixed projects here
Good one, I don't know about the fastest because it depend network condition and use case. But u can check Allnodes, Goldsky or Nownodes.
if u looking for teammates check #🤝︲find-teammates this is for questions!
In your opinion is faster your own private node or some third party services like the ones you mentioned?
Well my opinion is your own private node can be fater, you have direct control over hardware and network setup. but third is also very fast it can help you running smoothly. But if u want fast then i will choose private node.
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 🥲
Hello, did you installed the node polyfills in your app?
I think the chain upgrade changed the default ports for gRPC and REST. Also, it's possible that your local chain setup is wrong. What are you using to spawn the chain?
Nope, could you point me to some docs for doing that?
Well that would be nice to know xD which ports? It's weird tho because I saw those ports on the config files. The chain setup should be ok because I tested the grpc from cli using grpcurl and it worked fine
We don't usually use localhost lol, we mostly use our own internal shared testnet environments to develop so I don't know why it stopped working after the chain upgrade. I can have a look in the next few days
@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)
Hi fren.. what transaction is that?
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?
ser, please use #🆘・help-and-support
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
hello team can i give some input on the development of inj.fun dapps?
This looks like it will bring some progress to our dapps in the future
I need help please, why the following function returns absolutely nothing ? For no market ?
https://api.injective.exchange/#injectivespotexchangerpc-streamorderbooksv2
Same here, are the devs aware of the problem?
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 ?
Hello @ocean arch. Do you have an example of the script you are using? I am running the example in the docs with different markets in mainnet and I see new snapshots comming from the stream constantly
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.
From the script I see you are using the public servers. Please remember the comment we have made countless times in the past: public servers are in general overloaded and should not be used for professional or even semi professional scenarios. If you need reliable responses and stable connections, you should be connecting to a private node/indexer
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:
- https://github.com/InjectiveLabs/test-tube/blob/bc32fa4bf66c1496610ada958d5dd0dd9476958d/packages/injective-test-tube/src/module/bank.rs#L28-L30
- https://github.com/InjectiveLabs/test-tube/blob/latest/packages/injective-test-tube/src/module/staking.rs
But note that those are queries in your integration test, not from your contract. That is what you need?
Is there a private node / indexer that streams the orderbook of market like in the example above ?
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
I won't run my own node I think, I'll take look at the private node. Is it possible to get the stream of the order book with any of them ?
You will have to double check in each provider's docs
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.
this should definitely be possible via test-tube, whats the panic? where does it panic? can you share the respective code?
Yeah I figured out the issue. The address returned by app.get_first_validator_address() does not pass the deps.api.addr_validate(), but converting it to bech32 obv changes the address and means staking won't work. So removing the validation fixed it, thank you!
@frosty kiln Where do I submit a proposal for a bounty? I emailed rfp@injective.foundation yesterday.
cc @topaz seal
Bounty? I am not aware of any bounty program to be honest
The 'automate injective yield strategies challenge' on dorahacks.
It's under hackathons but states that it should be treated as a bounty that you need approval to work on.
cc: @jolly pulsar
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.
I sent you a DM, Can you check plz 🙏
Hello @elder dune. In general we don't reply DMs. If the question can be asked in public please post it here
Sure
Can you plz confirm if the amount of this prop is 0 ?
https://www.mintscan.io/injective/proposals/445
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"
}
}
OMG, I used the mintscan UI to submit it, looks like they have an issue
hm
Might be best to submit it directly in CLI then, if you have the binary installed somewhere and/or a node running
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
You can check the gov proposal details yourself in the Hub page https://hub.injective.network/proposal/445
Im sure I added the amount in the mintscan ui, thats why I asked if its only a query issue
but yes, the problem is from mintscan
Thank you so much G!
@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.
Unfortunately I don't have info about that. We need @jolly pulsar help on this topic
Ok @jolly pulsar can you let me know so I can start to work asap🫡
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?
wdym by cron module @toxic forge ? Like cron job ? (thats not native sdk module)
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.
Hello, Injective is not natively supported using Cosm JS, it is highly recommended to use the normal Injective TS SDK to interact with Injective.
Unable to get a response as yet. Is there someone else I can contact?
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...
GM !
Can i check if Injective blocktime is deterministic .65s or is it the average block time ?
The SDK is designed to interact with full nodes. There is no support for providers using REST requests in the SDK
That is the average block time. There is no way to have a deterministic time in a descentralized network
You can try Pyth's Benchmarks API.
https://benchmarks.pyth.network/docs#/TradingView/tradingview_history_route_v1_shims_tradingview_history_get
You can find the symbol here: https://www.pyth.network/developers/price-feed-ids#pyth-evm-stable
Hello everyone, tell me how can I use a proxy in the inj SDK? (python)
you'll generally be working with HTTP libraries such as requests, which allow you to route your network traffic through a proxy server.
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
You don't need to use any of Injective SDKs to interact with Injective chain. But you will have to implement yourself the abstractions the SDKs already implement.
Please check the docs: https://api.injective.exchange/#clients-for-other-languages
Regarding the use of gRPC, we don't provide documentation for that. Developers should use gRPC docs for that
@topaz seal Did you manage to check my proposal for the Dorahacks thing? I'm unable to get through to Shayan
Hello @true torrent. I asked Shayan to take a look at the question
hi @topaz seal apologies could you explain that in more detail? i downloaded the for example c# zip and it contains a bunch of .cs files, how should i interact with those?
regarding implementing the abstractions already implemented by the SDKs, are u referring to if we use the programming languages not supported by the SDKs?
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
i see, and would you guys be able to provide the protobuf underlying files?
They are in published in the same repo
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.
Kindly refer to this link for the burner address: https://docs.injective.network/develop/cheat-sheet/#burner-address
Nice, that's exactly what I was looking for
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!
#🆘・help-and-support — For non dev related support, please block all the DMs you may get.
do you have some wallet other than metamask installed?
Hello, i have some tokens in my contract, but i don't have function to withdraw tokens. Can i somehow get these tokens back?
hi
are you the owner of the smart contract? can you please share the address or source code, if possible so that I could look more into it?
Can i send you in DM?
And yes, i'm the deployer
Does mongo as deployed from the provided docker image trim its own size?
do you mean this docker compose file: https://raw.githubusercontent.com/InjectiveLabs/injective-chain-releases/refs/heads/master/docker/docker-compose.yaml
it does not set any explicit limits
they Dockerfile that we use to build it also does not set any limits
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
Ok
I have a contract where stored some factory tokens, but unfortunately i've send wrong tokens to contract. I don't have direct function to withdraw these tokens and i don't have defined admin. But i'm the deployer of this contract. Is there any possibility to withdraw these tokens in any way? Maybe there is some destruction mechanism that transfers all tokens to deployer?
I see, thanks for your reply. Would it be recommended to set limits by creating capped collections, or is there a better way? Because I see that there are instructions to manage injective node storage, but mongo size isn't covered.
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
if the contract does not have this function and you don't admin contract, it's only one way - you can try to create a gov proposal and migrate the contract to new version or set you as the contract administrator.
But if it's not a big funds, then maybe forget it and count it as payment for the lesson.
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!
Hello sir my withdrawal is pending from last day inj to eth please help me
Could you please share your text file using paste bin or GitHub gist ?
sure, its here:
https://pastebin.com/f5Yy9Dv5
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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.
Any dev please help
Hey, your issue has already been reported
Now wait for a response
cc @lime ruin
My guess is that our setup guide for additional components like event provider and exchange provider is heavily optimized for our snapshots. So nobody can guarantee how it's going to work with Polkachu's snapshots. Polkachu is a validator, so he prunes the snapshots to optimize for his needs. He does not run additional infra components like event and exchange providers.
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
Please move your node related question to #🔩・node-operators channel
This channel is for technical questions from developers. For assistance and support please use the #🆘・help-and-support channel
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
Needs to be in milliseconds
of the request using UNIX.
I have set it so that the timestamp is in UNIX format.
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.
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.
Iyessss mbak ?
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
The React app was created using create-react-app or vite?
create-react-app
Don't think the React apps created using create-react-app works with Injective TS SDK, works fine with vite.
https://docs.ts.injective.network/building-dapps/configuring-react
Thanks for the docs i will migrate to vite and then check with it
aahhh...I see!
Thanks mate!
I'll try this one.
will inform if I got another stuck or if it's works.
Thanks a lot!
Have a good day!
sudah bang.
Mau coba dulu solusi yg td di share.
hehe
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)
Hello devs i am working on deposit logic 😅 when i click send in keplr wallet i get that TransactionException: empty error
@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.
Are you using the correct endpoints?
are you following this example: https://docs.ts.injective.network/transactions/transactions-cosmos?
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
Salam, qardas 🙂
@fickle cobalt selam
hey team, is there any way to check market open interest data?
check out this example: https://gist.github.com/PavelInjective/5374242e327b13dce1660471a2020c27
@unique jungle please also look at this example: https://github.com/PavelInjective/keplr-example
thanks for the snippet, first time injective user here
would appreciate if you could provide a complete python snippet for me to run it :), no idea how to run the snippet above
hey pavel thanks for giving the link to resource i have tested the deposit functionality and it worked well thanks
but it's almost a full fledged program. to get more comfartbale with our API and Python3 async def take a look at these examples: https://api.injective.exchange/#injectivespotexchangerpc
last try @fickle cobalt
forwarded to our core chain team
is it possible to change the rpc to a certain block like few months ago to get the historical open interest?
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.
Hi, community! I've noticed that the project has a lot of potential for further development. Is the team currently open to bringing on new developers?
If so, could you please let me know whom I should reach out to?
hi guy i'm want to use module feegrant in injective does it exist ?
Hello everyone!
Do we have mainnet cw20-adapter contract address?
but please double check yourself with smart contract search here: https://explorer.injective.network/contracts/
hi i only found this sample for basic allowance
Can i set a periodic allowannce ?
What will happen to this?!!
Wrong channel. Please use #🆘・help-and-support. Also please ignore any DM you might receive, and block anyone sending you solutions or impersonating InjectiveLabs team members
ofc
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
If you get any private messages then please block.
You can use #1276292376570237107 channel for this.
Oh cool thank you
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",
i found that support til 1.12
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
Not yet, i think i need to patch cosmjs ver 32.4 with inj pubkey derivation
check out our blog post on scaling: https://blog.injective.com/en/a-new-era-of-injective-limitless-scale/#:~:text=Enshrining Instant Finality,seconds following the latest upgrade.
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
do we have an idea when we will start get weekly snapshots from October? Thanks!
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 😦
USDC & USDC Legacy are same but that USDC is just not used on Injective anymore, Injective mainly supports the USDC from Noble.
thank you! 
i'll try to collect data and if I get confuse, let's discuss at Injective Summit in Thailand
Hello devs , for interacting with helix for placing limit spot orders is this documentation fine or is there any other docs available?
from where can i get marketid of a pair?
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.
@fickle seal You have all historical injective data ?
Not currently. I'm just guaging interest as this is an upcoming service for us and will ofc need people to play around with it initially
I am getting subaccount id is not valid error used msgdeposit logic
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)
this endpoint is for mainnet i thin and you're working with testnet
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
Issue solved i changed index to 1
HELLO
yeah, maybe this message does not work in case if you want to transfer from the addrress (ala subaccount 0) to subaccount 0 (explicitly as a parameter)
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
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
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
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
That seems like the same example that can be found in the TS SDK documentation page. Please show the code you are running if you need it checked. It won't be possible to investigate without knowing how you are getting the market information if you are following that example
also for ts calculations pls explore this https://docs.ts.injective.network/calculations
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
💡Learn how to onboard to Injective using Wormhole.
This article will use SOL as an example, but you are free to bridge any asset from any chain (Solana, Polygon, etc.) that Wormhole supports of your choice!
This article is for informational purposes only and is not financial or investment advice.
as for assets on the wormhole side, you should ask in their discord
@lime ruin @lime mountain could you please ban the users spamming this channel?
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
Use TxRestApi instead of TxRestClient
please stop tagging multiple people, we are following this chat all the time and will answer when we can
sure mate, i will less tag, thanks for answer,
lemme update my code
passed the test, wow, lemme update whole code base.
Btw, do u know any effective method of changing a const name like this throughout entire next app. instead of manually going to each util and comp where its called?
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.
Search and replace in your code editor
Nevr Mind found that vscode has this feature, just needed to search a bit, thats a lot, your help worked all tx working great.
yeah just did, thanks for helping
This class was deprecated in favor of TxRestApi and was removed in the latest version
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.
https://github.com/InjectiveLabs/swap-contract Helix's swap contract is open sourced and you can use it
Am actually making an Everything app on iinj.
Token maker ready.
Launchpad ready
Aidroppad ready.
but like swapsa were really difficult.
Now i am going to sweep this code to mine app. very very thanks for help
btw, dojo also uses same contracts, hallswap too? or they custom built their own?
custom
like if we swap on coinhall, we get different contract than dojo, even though pair of coins we swapped is same
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
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
as for smart contract testnet deployment, check out this: https://docs.injective.network/develop/guides/injective-101/testnet-deployment-guide#1-compile-cosmwasm-contracts
as i understand, you're interested in the https://www.tokenstation.app/ source code
token station is not a launchpad smart contract on the whole. it's just web app
you can create your tokens programmatically
no no, thats already done by me, made this easily.
Now i have a my own front end for creating tokens, bu thats not what i waned.
I wanted to make a smart contract, which can be executed.
it should:
Take in user inj
send user tokens which are in launchpad contract, then send inj to two addresses.
in short a launchpad contraxct
yes, you can implement this as a part of your custom cosmwasm logic.
also, we have this: https://docs.mito.fi/products/launchpad
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
yeah, wanna make same but mine
with phases suport, whitelist support etc
and some other features
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
yeah just looked upon it.
Its like tooo complex for someone as me (I dont know rust, docker yet)
As i mostly used sdks, in js, to make web apps. in next js.
So i think for now its better to keep launchpad this half on chain, half offchain way. as i know whats going on.
Later if dapp becomes big i can learn rust and do that.
maybe you can create your own app in front of the mito vaults (a unique vault per each stage per each project)
hmm, thanks for this info, for this the above link to see right
yes. at all you need is typescript knowledge
Like bro, is not there a way to write smart contracts in js?
yeah thankfully i have that atleast
but not rust, docker etc, i just learnt whole vps custom host niginx, 5 days ago. so rust is too far for now
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
me: thinking rust is some very very advanced thing.
My inj helper: why dont u build world first js to rust compiler
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
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
then why go nerd mode to learn rust.
using keplr, ninji and leap.
db is public already as no emails ip, etc stored, so hacker cant in fact "LEAK" data
yup, user sign, then api checks tx, then api sends tokens to user simple
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
Sounds like a web3 empire …
Not until I learn rust and use smart contracts, instead of using backend apis
Till then it's pretty basic dapp
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
Golang, Python3 for APIs; Typescript for frontend; Rust for smart contracts
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
This error arise from Injective-helix-demo repo, may I share the url to the file and line here?
const queryAllRoutesResponse = await wasmApi.fetchSmartContractState( SWAP_CONTRACT_ADDRESS, new QueryAllRoutes({}).toPayload() )
will just a raw query for this smart contract work?
what's your node version?
what's the address of the contract?
Url to the repo and line:
https://github.com/InjectiveLabs/injective-helix-demo/blob/d6befe5b2a95df037aabe44342751c810ba23d4d/store/swap/index.ts#L58
I don't think so? Because some queries require the swap router to determine the best route & quote.
the error could be seen in this lcd query:
https://lcd.injective.network/cosmwasm/wasm/v1/contract/inj12yj3mtjarujkhcp6lg3klxjjfrx2v7v8yswgp9/smart/eyJnZXRfYWxsX3JvdXRlcyI6e319
address: inj12yj3mtjarujkhcp6lg3klxjjfrx2v7v8yswgp9
queryData: eyJnZXRfYWxsX3JvdXRlcyI6e319
I am not running a node but querying from Network.Mainnet provided by InjectiveSDK.
FYI:
endpoints: {
indexer: 'https://sentry.exchange.grpc-web.injective.network',
grpc: 'https://sentry.chain.grpc-web.injective.network',
rpc: 'https://sentry.tm.injective.network',
rest: 'https://sentry.lcd.injective.network',
chronos: 'https://sentry.exchange.grpc-web.injective.network',
explorer: 'https://sentry.explorer.grpc-web.injective.network',
cacheGrpc: 'https://sentry.chain.grpc-web.injective.network',
cacheRest: 'https://staging.gateway.grpc-web.injective.network',
web3gw: 'https://sentry.exchange.grpc-web.injective.network',
campaign: 'https://k8s.mainnet.campaigns.grpc-web.injective.network'
}
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
Yes it is, currently there are only 3 validator REST endpoints that does not face this problem, would love to see sentry endpoint be usable again.
Do you have any alternatives as to how to smart query the swap router smart contract?
Since the helix app is running fine, I suppose there's a fix for the helix-demo-app?
are you working with testnet?
you shall replace our default endpoints with the ones that work all over the demo app
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
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
@lime mountain please help us banning this scammer
should I make multi-test and fix the bug there, or is this a problem in my contract?
i see some discussion on the similar issue in this thread: https://github.com/CosmWasm/book/issues/66
can it be that there're no such messages for the block you're looking at?
oh no, it was that filter: '/injective.wasmx.v1.MsgExecuteContractCompat' doesen't work, needed to get rid of the starting /
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)"
what's your os?
can you connect your ledger to say your browser software wallets / wallet connect?
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?
No, I've been using the sentry endpoints for mainnnet for quite a while now.
well, it returned incorrect data sometimes... so, could you let me know if the gasLimit on sentry node has been increased?
No such plans
@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
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?
do you know of and mind sharing an alternative as to smart querying the swap router contract?
Not this mate.
I mean I wanna fetch tx hash, I don't have tx hash. I wanna get tx hash of a tx, by giving both receiver and sender address
smart contract calls are tricky, that's why we want to keep gas limit low at least on sentry nodes
Hi, it's MacOS and I can connect with Keplr no problem
ohoo, i know thi due, i wanna fetch txwith two addresses not one
i think u understand what i mean, i hope to get answer soon
is there any other ways to query a smart contract on my own? any docs to read on?
The available messages are the ones in the wasm module, and they are actually described in the documentation https://api.injective.exchange/#wasm
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.
I would recommend to follow injective lists repo
I see, thank you that should take care of off chain resolution.
But is there any way to access this data inside a smart contract?
i don't know any direct way to do that.
Oh there is no way to get that data from a smart contract.
Interesting.
what's your platform?
ubuntu
yes
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?
anyone here to help!
I have same issue. Is there any way to access fund? It happened due to keplr bug .
here's a discussion around the issue which you're having: https://t.me/joininjective/637627
This solved the issue for another person which had it: https://github.com/InjectiveLabs/injective-ts/issues/507#issuecomment-2385664031
which version of python3 are you using?
do you mean this tab https://explorer.injective.network/assets/?ref=blog.injective.com?
you need to make an entry to this repo: https://github.com/InjectiveLabs/injective-lists
A place to store JSON lists for different purposes. - InjectiveLabs/injective-lists
3(.)9
i just fixed the issue: pip install --prefer-binary safe-pysha3
Thanks @fickle cobalt I created one now
Do not DM or use any unsupported link
You can convert to Inj and bridge to Injective mainnet
Also, please do not use this thread for user-related questions. That's for devs and builders in the ecosystem.
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
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
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
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!
Cool, thanks for taking time to response!
Is here the best place to report a bug on the explorer? the one at testnet[.]explorer[.]injective[.]network
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
Do no DM anyone
could you please describe the sc, tx; also tx hash and sc address + name in the sc list on the explorer would be great
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
This endpoint is served by injectived chain binary itself, which looks up data in its internal storage rather than indexer. Essentially, it should be precise. Could you please give some examples of "the timestamps are not precise enough"? Do you mean the resolution of timestamps is not enough or what?
@fickle cobalt kindly see this
please, explore: https://docs.ts.injective.network/readme/assets/injective-list
here's a lot of tokens metadata: https://github.com/InjectiveLabs/injective-lists/tree/master/tokens
A place to store JSON lists for different purposes. - InjectiveLabs/injective-lists
Interesting story we're looking into it. I noticed that some sc msgs are not correctly unpacked by our python3 sdk (that's expected for wasm msgs; our sdk is more trading-enabled). You also mentioned "trying to call a contract method from python3". What exactly did you do?
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
?
Yes, we're using pyinjective.async_client to create and send transactions from a job that runs daily. It works well, it's just that for a certain method we weren't sure what the msg data was supposed to look like.
In the end, a message that has no parameters at all should have double quotes AND single quotes and no curly braces.
what exactly are you trying to do?
That is the only information you can easily access. The other option would be to go through the trade events in each block/transaction on chain
Also, how long after our token has been merged into injective-lists can I expect to see it on the testnet explorer?
I am a passionate and skilled blockchain and web3 frontend developer
is there anyone looking for developer?
As I told above, I already read this. The git repo don't have on chain data, like if I wanna show details of a token just created, it will not be in repo. I simply wanna get two lines of func code, the code of function which takes in denom, return on chain details, not from git repo
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.
cosmwasm rust optimization (docker)
To get token information from the chain you depend on someone adding a Token Metadata entry with the token's info. So even when querying tokens from the chain the info could not be there.
Check the token metadata query in the API documentation to find examples
Then how does, the totek station get it, even if token is not added to GitHub yet.
I seen token station code, it uses grpc bank api . fetchDenomMetadata function to do this, but using same func in my app gives 404 error.
This is function I made, after seeing code in token station.
Token station have this code segment that fetch details
Well I mentioned the token metadata (or denom metadata) endpoint before in my reply. You are basically saying what I said
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
Yeah, in docs there is no example for querying metadata, just one example to query authority metadata (token admin address)
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.
Could you kindly provide specific page link in docs which have function code to fetch metadata of a denom.from.chain
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.
Yes, the resolution of the timestamps are too low. It tells what timestamp to the second it happened at, but there are many blocks in that second. If I can get the block of the transaction, it would be best.
Furthermore, I would like to know which side the taker was on too, if possible.
I would suggest using the search tool in the API documentation page before doing the statement that something is not documented https://api.injective.exchange/#bank-denomsmetadata
you can go through account tx history filtering out certain types of msgs: https://github.com/InjectiveLabs/sdk-python/blob/cc6beeca73bb152ca24da0e837c95c9ff84119fb/examples/exchange_client/explorer_rpc/2_AccountTxs.py#L24
I see, that would be just for an account/address, though, right? I am trying to get all the historical trades in the market for backtest and hft research.
@topaz seal kindly reply my q too. Thanks
This one ⬆️
do you mean this: https://api.injective.exchange/#bank-denomsmetadata
then you'd need to iterate block by block filtering all the msgs in txs
Yes yes yes, 😀
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
timestamps within block have higher resolution: 2024-11-16T10:31:41.186361514Z
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
I see, thanks! Looking through the blocks (just from the explorer for now, I assume it contains all the info), I find "transactions" containing orders, but not the trades themselves. Is there a way to access trades, or do I have to infer them from past orders?
I see, thanks, that granularity is good enough, it can't be even more granular than the block-time right?
Or can it? I recall seeing something called atomic orders for apps - would that result in trades between blocks?
Process the events in the block, not the messages. You will see that for trades there are trade events
Waiting for response @topaz seal , @fickle cobalt . Thanks 😀
Ok ser… But my account was created using keplr many yrs ago. I hve paraphrase but I don’t have pvt key. What is the solution? This app needs private key.
Thanks ser… god bless you. I got my life savings which was lost yrs back. 🙏
?
please
I see, thanks for the answer. How would you recommend I get the trade events? 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!
G
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?
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
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.
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
Do you mean this fetch denom metadata method?
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 (
oh endpoint is need to be grpc, not indexer, good good
solved
thanks for point to repo though
@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
i think you'd need to index the entire block history.
whoa, thats hella resource usage, i think there will be some easier way.
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
if he is doing it, i think u might know already the method to do it
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
Done
Hi, have you managed to find a solution for the explorer issue with some of our transactions?
Also, we had a token merged on injective-lists last week, do you know when the explorer will be able to show the token data?
There's an issue with the explorer, I think. Is it okay for you to use API in the meanwhile? https://testnet.lcd.injective.network/cosmwasm/wasm/v1/contract/inj1zp0ac48kpp5cpu29p7a9wureydz7374h0wqy0a/state
yes for sure, thanks a lot for the link
@fickle cobalt kindly see this
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!
for each tx you have some event list
see for example this on the explorer
you can parse this array
here's the method to fetch the denom holders: https://github.com/InjectiveLabs/injective-ts/blob/4f9415bbd398b8a510513694a34279b265975e47/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.ts#L333
Exactly very very thanks sir. Ninjas will rise
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🥷
Hi @kind flare .
Does the smart contract function InjectiveQuerier::query_spot_market_mid_price_and_tob get the real time spot price on Helix?
Helix does not have markets and prices itself. It uses the markets on chain
So it's the injective exchange module?
yes
mainly exchange module is invovled
I see. Thanks.
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?
There isn't a way to query token decimal inside smart contracts from what I understood.
So is it normal that one has to convert the unit of the price for every spot pair?
I admire developers your brains are always hot..
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?
could you pls paste in plain text
I think you are missing the chain id parameter
we have an endpoint for that as well: https://sentry.lcd.injective.network/swagger/#/Query/DenomDecimal
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
tried with injective-888 same result
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"```
Is there any smart contract query for that though?
i'm afraid that's not possible. we have at least 4 types of denoms; idk how smart contract for example would get know about peggy denoms metadata etc
Ok thanks. Just to make sure.
It was the case I checked about a year ago
windows 19044
rust 1.82.0
what do you mean by talking about sc code?
I want to know if you have used the original code from the guides, or modified smth
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?
My private key hex starts with the typical 0x prefix, but I notice in the docs here https://docs.ts.injective.network/transactions/private-key#example-prepare--sign--broadcast that the prefix is not included. Already tried removing the prefix but no success.
Just noticed an entirely separate MsgBroadcasterWithPk class. Will give this a shot
✅ Worked
I used the official guide and started by generating a template
of course, I changed the logic to suit my needs, there may be some dependencies during the course of the project
Hi, how can I run hummingbot with a stable connection? Do I just need my own node, or do I need additional services?
for our python-sdk you also need indexer
Please what is the link for
Can someone help
Check pic
Yes, you can ran a node yourself (the official node docker image includes the Indexer mentioned by Pavel) or you can use any of the nodes providers. You can find the list of node providers in the documantion page
Please paste cli commands and outputs with text
Try cloning with ssh
It seems like an error using git to clone a repository. We should let him check the git man page
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?
@severe thorn here. I think this is hokage from tg channel.
What’s your address? Can you send screen shots of what you’ve done etc ?
Can I dm?
I'll dm the address
I create cw20 through dojoswap and tried to rigister it on tokenstation to launch market in stead of coding.
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.
I dmed you my address and cw20 CA
does your denom have non-zero supply?
Non-zero supply? It has supply like 998,000,000.
whats limit of addresses in multisend?
How many addresses u can send to in a single MsgMultisend?
@topaz seal , i mean can we do 30k addresses at once in one tx?
https://www.tokenstation.app/tokens/cw20/inj1axxw5jy32mhyvpllmtulnff2taut6zr7uxu42x
Convert 1 token from cw20 to native
The limit of addresses in a MsgMultiSend transaction is determined by the block gas limit and the gas consumption of the transaction.
I suggest doing 2,500 each.
so like for type safe, whats maximum number i should allow users to add?
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
thanks
but i dont asked that, i need max, limt, like a number above which address are not allowed
No limit but as Pavel said: "The limit of addresses in a MsgMultiSend transaction is determined by the block gas limit and the gas consumption of the transaction." - for me
When I tested it, there was a maximum of 2500 addresses in a single transaction - then there were issues
pls see this adapter to allow exchanging cw20 sc token for injective issued token factory tokens and vice versa: https://docs.injective.network/developers/cosmwasm-developers/page-1
do you have a custom smart contract?
ok, pavel said same for chars limit of memo in tx, but max 222 chars usually go, above that tx fails
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
Analyze past blocks, their TXs, and you can get addresses that way.
We don't provide tools to help projects spam people with unsolicited tokens.
we cannot analyze past all blocks, we just need all active nj addresses list.
(Not for smapping, making an instant airdrop tool, where users can do airdrops no code, need there
If you can't analyze blocks, then there is no helper function or tool to do what you want
Like a btn there like airdrop to all inj adresses instead of upload
ok, so eeasier way to analyze all inj blocks, so that like we can get resulting inj addresses obj in like 2-3 sec
Check the API docs and the functions in there to get blocks
where can get open ai api key
i know there is already usng for some things in app, but thats takes a lot of time, means a very very lot of time
I have read it. The issues is as I registered, it didn't appear in Base denom yet. I tried to register again but it says it's already registered. I converted in Manage token too, I converted 900000000 and it appeared 0.09 in Native.
I converted almost all and still appearing 0.09
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
Please check your dependencies. But since the question you are asking is not Injective related (but Python development related) this is not the proper place to ask that question
Hello, how can I get token price and market cap from coinhall using api?
same q from me
We don’t provide direct support for Coinhall API. You can read their docs
Let me know if something is up @fickle cobalt
Hey
Sorry, this channel is for technical (dev) questions only
isnt this dev queestion.
why does it says that help is not recognized?
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)
so where can i get answer to this question
please try the #🆘・help-and-support channel
Hello @fickle cobalt
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?
I lost the context. So you had a cw20 token, you converted it to a tokenfactory format, but the token did not appear in the base denom for market laych
i think the issue could be with the tokenstation itself (??)
hm, i can see this method on the upstream: https://github.com/search?q=repo%3ACosmWasm%2Fcw-multi-test new_custom&type=code
Then, I can only launh it by coding?
Hi all! Does anyone know where i can find a documentation for the TokenStation?
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
it's a separate team
idk, you should contact them directly
can you please share your python3 pip freeze? do you have open ai package installed?
it's a sep as i mentioned above
I thought the second command installs all those packages ?
So, how do we naturaly provide token launching here? Let me know and share me some recourse to lauch it on injective.
yooo devs
issue with starting up an iAgent
@coarse python you here...how's it going please
Not going well imo
Okay okay 👌🏻
Actually Dev questions are asked here
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
lol endy didn't get twas a joke
so i left it
@sharp cradle
You can try filling in this application: https://injective.talis.art/apply
Or better join Talis protocol (the Nft marketplace on Injective) discord for more information: https://discord.gg/dzPRf9tY
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;
but that's an old node version still
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.
Will try again with a fresh environment
you can contact me
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?
how do they usually do to launch an idea of dApp on Injective blockchain?
Injective is a descentralized chain. You don't need to discuss with anyone. Just send a gov proposal and the stakers will vote
Yes, that's what I wanna know.
so, we need votes to launch?
No, you need a gov proposal to deploy a new contract
You can find the details in the documentation page
is this the place to apply? https://injective.com/venturegroup/
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
Anyone have an example of querying an account for an existing fee grant via Injective-ts?
I've made several attempts but no success
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 🙏
Generally you'd start a discussion about your proposal on the governance forum: https://gov.injective.network/
Then depending on community response, you'd need to post an on-chain governance proposal to upload your smart contract code.
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.
Oh, and you might wanna join the builders group for the next time you're asking questions: https://t.me/+4vEYU3HqZAJkYTM1
You might get answers faster over there.
What is the best API for getting factory token price and market data?
Can u tell me something related to it in py injective sdk
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.
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
please add --chain-id injective-888
I receive the same error
Anyone trying to build with py sdk don't do it most of the methods are unimplemented
All the endpoints supported by both the Python and Go SDKs are documented in https://api.injective.exchange/
can u guide me how to fetch cw20 balances in pythonsdk ?
why there is huge price difference
i am trying to make a bot and i have same issue
price is lagged out.
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
yea i got that working already. swaps work perfectly. Utilized blockchain state for decimals. Only issues i have to deal are cw20 balances and price.
cant get this func to work! for some reason
indeed
Are you trying to get the token balance for a particular account? Or do you want to have the number of minted tokens?
@lime ruin please help us here banning this scammer
Done, thanks
yup for particular account, just like the fetch_bank_balances method
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?
yea its now working for me
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
Thanks for info i will try it out.
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?
If you are not sure what you are doing, you should not be using the IndexerGrpcExplorerApi component directly. You should be using the request through the AsyncClient
you don't seem to be creating the channel correctly
method is not available with asyncclient:
🙃
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
Been having this error for days now
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.
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.
chain is not fully open sourced
pls use ts config from here
as well as last stable versions of node, yarn etc
that is very unfortunate.
can you confirm which version of ibc-go Injective is currently using on testnet and if the 08-wasm light client proxy module is currently supported on Injective?
afaik 08-wasm is not integrated rn
https://github.com/InjectiveFoundation/injective-core
Not sure if this is fully updated, though
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.
oh interesting. looks like the last commit was a few months ago, is it probably safe to assume this is close to what is used in testnet/mainnet?
like for local testing purposes do you think that validating behaviors with a binary built from the source here would be an accurate enough depicting of what you could expect on testnet?
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?
i heard about this even two years ago. there were some guys trying to play with ibc on the smart contract level, but i do not see any serious movement hw.
yes, right. what was released pops up in this repo.
This is currently how Composable does the Cosmos<>Polkadot IBC integration. Avalanche coming online via this mechanism in 2025 and i believe there is work being done for Solana as well.
Few folks working on EVM implementations for IBC that iirc make use of the Wasm light client module as well
Thanks for confirming. This is helpful!
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.
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))
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
cosmossdk_io_math.Int is big.Int
How can i do ,bro
the SDK math Int type is a new type that contains a field member that is a big.Int, which is not the same as it being an alias to big.Int
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()
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?
we have native derivative markets as a prt of exachange module
but you can deploy whatever sc / dApp you want, if it's some new type of derivative markets
Could you send link to the docs? Can I add custom smart contract there?
Yes
Do you have a link so I can read more? Thanks
Please check DM. I have questions..
Thank you, 🙏 I have read those already and have a contract implemented but how can I plug in to an existing “exchange”?
My friend please look at DM..
Or any option to open a ticket?
if your wallet was compromised, you should reconsider your security policies. that's a builders chat, we don't cover this topic here.
i'd recommend creating cw20 adapter from your token to our tokenfactory tokens
Ok. It's not help what I am looking for... thanks mate... it not even answer
Builders... But I ha e question about staking... if you can just let me know person with experience which I can questions..
Thanks
Nice when people looking for a help but even mod does not care. Nice
Thank you @fickle cobalt for top answer.
😭😭😭😭😭
Why do you need to DM to ask your question?
Cus not sure if it safe to talk about this issue here.. for future dafe of users.
I will try find help on other server. Nw mate
topical questions for this chat are public as a matter of rule. usually only scammers would encourage in dms or whatever.
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
Of course. But with this issue priority is safe. If you do not want help its good..
But why I do not want to ask public? Cus I think scamm..er could be here... on the discord also.
you can ask without revealing your credentials
Thats why man. I know always scammers writi g on dms, but atm I do not have chosee..
No. I csnt like you see..
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
are you running testnet or mainnet? what's your hardware?
what snapshots do u use?
Please post your node related questions in #🔩・node-operators
Mainnet bro,
6CPU 12GRAM 2TBSSD
there are no body , i waited 3days , no body talk.
you need way more ram
Laptop or Desktop?
u need a proper server
Huh?
I upgrade my server to 64Gram, 16cpu, 2TSSD, but still hard synced block to lastest.
Recom says 128) also I’d recommend baremetal, 4 ghz cpu and nvme arrays for disks
is the sentry rpc down atm?
public rpc is under huge load rn, yes
Run a node is toooooooo hard
Omg
Waste my money to purchase 3 vps that not enough to run full node.
That's why there are so few people who hold nodes, try to do everything slowly, may to help you
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
the key fundamental principles do hold. for up to date tech read the docs: https://docs.injective.network/
So far everything I read there was pretty high level
where for example would I find up to date informatino regarding the Mind Module?
I don't see the mind module, at least in this doc: https://crebaco.com/planner/admin/uploads/whitepapers/8407166injective-protocol.pdf
here are the docs for our modules
That was a brain fart I wanted to write Side chain implementation. Was reading at the same time as writing
I am getting errors about margin while I try to send derivative orders using python SDK
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
@cerulean snow don't reply to random DMS and don't click any link from strangers
like, your order price is low.
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
ohh that's great, I will let you know the results
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.
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
Please check out our api docs: https://api.injective.exchange/#wasm-smartcontractstate
Thank you so much! Figured it out 🤝
Hello can I please have some.e help from someone of you guys 🙏
we're here sir
Any suggestions? İ tried some of them but the issue is the same. Does the margin works for the market order?
@ᓚᘏᗢ | Injective @lime mountain please help banning this scammer
I have it working; just the commands don't work. Where are you in the development ? @coarse python
Could you help with iAgent. Do I need to initialize these commands that are not working ?
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
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
@lime kestrel the default model they wrote in their python scripts were incorrect.
I'm looking into issues with iAgent now
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
hey folks - do any of the testnet faucets work? I got the acknowledgement, but i never received funds.
hey, it might not work. dm me ur address how much inj do u need
I am trying to establish a connection between quicksilver and injective testnets - so a decent amount if possible ser
inj1sc9pq3p7v02jtk25hzh08k426fyfy3kcrrgyng
relayer?
yes, sorry 😄
thank you kindly
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.
You can use kiwi browser or yandex browser
Yeah no solution for chrome right?
Extension doesn't work on chrome for mobile
You can use these browser's for extension on mobile
Mises
kiwi
Yandex
I need help
Ask ser
I how to start with deploying injective is there a guide
This should help
Thanks for playing ser
Have you gotten the help you needed?
You want to help?
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?
could you pls submit the original tx
with market greated
do u want to launch an app or run a node?
Let me look
Launch an app
then please have a look here: https://docs.ts.injective.network/building-dapps
I have lost my wallet
Scammer asked me to create a ticket
Took over my wallet in 1 min
Lost everything, my coin too
worth how much?
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
What's the tx? All the parameters should be in the tx that creates the market
After that i'd use ui to replicate the issue
What's ur wallet address?
I know who this scammer is
It's this guy
Kick him out rn
I have a good news. I locked the wallet fast enough
I got access again and secured the funds, lost nothing
yes this is it. I am not a beginner, but when you need help, you can easily rush and click
Don't click any links
This was another server with 25 members, but same tactic
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.
I got you g don't worry
Who is going to trade that?
Bro lets just end it here, pavel asked you for your INJ address
Yo Pavel chad
@coral zealot what site/web app did you use to launch the market?
Token Station
This
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
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
Please go to the bottom of their page and you will find this:
haaaa
It is possible to modify, of course, with a market update proposal. Please read the docs
Ok
Just to be clear, this means that no one can trade a transaction is less than 10 INJ right?
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
I sent you the tx in private mess
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
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
That is not a proposal, that is just a discussion. When you create a governance proposal it will be listed here https://hub.injective.network/governance
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
could you please describe your setup like node js, yarn versions etc
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
Hello
these are okay enough
If those aren't the issue then would be something with the repo as the error code said?
readme says you should just run yarn at the root. bu i still can see the injective-lists paths which are not up to date. we need to fix it
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!
i bet some mgs are not supported by the evm wallet
sorry, leap is cosmos
Sorry could you plz explain what mgs is?
is there a workaround for that can be used?
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.
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.
@strong violet I don't have a one for injective yet. Trying to do research on weather it's worth trading or not
Injective chain has instant finality. That is one of the main characteristics of the chain, and as such, it is clearly stated in the documentation page. Please try to read the docs before posting questions, to avoid repeated messages in the channel
Have we given up the parent contract? Or we can not due to the token mint/burn
I'm not much aware on this but its something that was addressed in one X space
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?
@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
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)
@topaz seal thanks for great explanation much appreciated
Hello team, I'm looking to fetch onchain data of trades & order placement. Is it something that we can fetch? Is there any documentation?
I've only seen this https://api.injective.exchange/#historical-queries which is not what I am interested in
Hey!
Trying to instantiate a wasm code but the node seems down
Nevermind, used injective-rpc.publicnode . com:443
Hi guys! can someone send me testnet balance please. Im still on the faucet queue for almost 6 hours
inj1lx3rstgfu3azam7nrwvkksej29qt6xdexa64am
sent 👍
Thanks!
sent
ok i think its enough guys, thanks so much!
Please check the indexer endpoints in the documentation page
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!
cc: @primal terrace
Hey @broken current, sure thing! Can u please message me on telegram to discuss?
achilleas_k
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?
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
sent!
Thank you!
cc @fickle cobalt 
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! 🚀
sent!
thank you so much!
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 ?
well, If the proposal passes then you get the deposit back. And If the proposal is rejected you get the deposit back as well, but if the proposal is voted as veto (Spam), the deposit is burned.
Hey team , I need to swap my tokens from arbitrum to INJ , can you suggest some good bridge for it
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!\
gm, gm
anyone can point me to where I can stake test injective?
thanks!
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?
cc @kind flare
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 
https://github.com/InjectiveLabs/injective-helix-demo Helix's code is open sourced
How much disk space is needed to run a mainet node with indexer?
Thanks I'm following the steps here: https://injective.notion.site/Injective-Exchange-Service-Setup-Guide-7e59980634d54991862300670583d46a
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
cc @kind flare
Please ask your node related question in #🔩・node-operators
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.
You can check the wasm section of the API documentation page
Do you mean https://api.injective.exchange/?python#wasm-contractsbycreator ?
But that only has a code example for python.
I think the MsgExecuteContract will be more useful for the scenario you describe (https://api.injective.exchange/#wasm-contractsbycreator).
The examples are in the languajes we provide SDKs for. But you should be able to apply the same logic to any languaje (you can check implementations in any of our SDKs, they are all open source projects)
By any chance, are you looking to add more developers to your project?
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.
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?
I believe you can trade both pairs, but on Helix... If I'm understanding you correctly
Ok, thank you.
hey abel. I saw that you recently integrated the eliza framework for ai agents. I was wondering if the partnership with fetch is still there and there are plans to build with their agents?
and if so, why do you need eliza if you already integrated fetch?
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.
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?
@topaz seal @eager plinth
@lime ruin
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 ...
What requests are you using and why do you say that is not what you are looking for?
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())
ok, you are getting the info for testnet. Why are you saying the info is wrong?
OMG you 're right I didn't pay attention... sorry
@severe thorn please help us banning this scammer
Native Injective network.
But inEVM is also a part of the injective network right?


