Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuff Documentation #189

Closed
Yselli opened this issue Dec 4, 2022 · 9 comments
Closed

Protobuff Documentation #189

Yselli opened this issue Dec 4, 2022 · 9 comments

Comments

@Yselli
Copy link

Yselli commented Dec 4, 2022

Hello guys,
I am working on an iOS App that relies on the Protobuff code from the Cosmostation iOS repository. I would like to query all information about a CW20 token contract like symbol or name on Juno chain.
I've seen that you guys implemented a query to fetch the balance for a wallet and I was wondering if you could send me the documentation about how to query these endpoints. I searched for it already but without success.
I would highly appreciate it if you could support!

Screenshot 2022-12-04 at 22 24 04
Screenshot 2022-12-04 at 22 24 34

@wannabit-yongjoo
Copy link
Member

that line is query for cw20 balance with gRPC

@Yselli
Copy link
Author

Yselli commented Dec 5, 2022

Yes, since you implemented it the c20 balance query successfully I asked for a documentation of the gRPC endpoints. I assume you have one.

@wannabit-yongjoo
Copy link
Member

wannabit-yongjoo commented Dec 6, 2022

Contract calls and queries are all in that grpc.

The rest follows the syntax of the contract.
There is no choice but to communicate in binary (query data).

@wannabit-yongjoo
Copy link
Member

https://github.com/CosmWasm/wasmd/blob/main/proto/cosmwasm/wasm/v1/query.proto

@Yselli
Copy link
Author

Yselli commented Dec 10, 2022

Thank you for sending me the wasm documentation. Where can I find the contract details tho? For example for the SmartContractStateRequest. How do I know what fields are offered that I can query for?

@Yselli
Copy link
Author

Yselli commented Dec 19, 2022

@wannabit-yongjoo friendly reminder :)

@wannabit-yongjoo
Copy link
Member

Oh I see :0 soory for miss understanding
You means how to check contract that deployed in Juno chain
And which field we can query about contract?

We crawling all deployed contract in juno chain.
some contract is famous like cw20(https://github.com/CosmWasm/cw-tokens)
so we can check query param

but some special contract case we don't know even crawling.
that need ABI file like eth.

@chicrock

@chicrock
Copy link
Member

chicrock commented Dec 20, 2022

@Yselli There is no way to easy to query. Cause all contracts can have different code.

If you want to know the all structure of the contract, you should get the origin code of the contract.
(Maybe you can get the origin code easily of public contract)
After get the code of the contract, find the ExecuteMsg of that contract.
That is the all message types of the contract.
Or you can get the schemes of that contract via build.
You can see the example of schema and origin code in Mintscan. (https://www.mintscan.io/juno/wasm/code/59)

If you cannot get the origin code of the contract, you can get only states of the contract by guess. (Not Tx..Just state query)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants