Adding tokenfactory denom metadata endpoint#1444
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1444 +/- ##
==========================================
+ Coverage 62.64% 62.89% +0.25%
==========================================
Files 257 257
Lines 16867 16883 +16
==========================================
+ Hits 10566 10619 +53
+ Misses 5798 5757 -41
- Partials 503 507 +4
|
…7_add_tokenfcatory_denom_metadata_endpoint
proto/README.md
Outdated
| Your OS: darwin | ||
| Your arch: arm64 | ||
| Your go version: go version go1.22.0 darwin/arm64 | ||
| Your uname -a: Darwin Denyss-MacBook-Pro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:32:11 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T6030 arm64 |
There was a problem hiding this comment.
Do you want your username in here?
| Then, to generate the code, run the following command: | ||
|
|
||
| ```bash | ||
| ignite generate proto-go |
There was a problem hiding this comment.
Is this for generating the proto files or for generating the openapi yml?
There was a problem hiding this comment.
Its for both, will add another readme for docs generation in a separate PR
go.sum
Outdated
| google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= | ||
| google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= |
There was a problem hiding this comment.
I would make sure protocol team signs off on these version changes
go.mod
Outdated
| google.golang.org/protobuf v1.31.0 | ||
| google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe | ||
| google.golang.org/grpc v1.61.0 | ||
| google.golang.org/protobuf v1.33.0 |
There was a problem hiding this comment.
Is there a reason to bump protobuf version?
There was a problem hiding this comment.
hm, good question. I was not specifically looking to bump. But with ignite tools installed, I think this was done automatically on generation step. I can roll this back
| Then, to generate the code, run the following command: | ||
|
|
||
| ```bash | ||
| ignite generate proto-go |
Reverts #457 in favor of sei-protocol/sei-chain#1444 as tokenfactory is more appropriate module for the endpoint
Reverts sei-protocol/sei-cosmos#457 in favor of #1444 as tokenfactory is more appropriate module for the endpoint
Reverts sei-protocol/sei-cosmos#457 in favor of #1444 as tokenfactory is more appropriate module for the endpoint
Describe your changes and provide context
When we create tokens using token factory, denoms are created in the
factory/{owner_walltet_id}/{denom}formatE.g.
factory/sei1gxskuzvhr4s8sdm2rpruaf7yx2dnmjn0zfdu9q/NEWCOINWhen querying metadata via
/cosmos/bank/v1beta1/denoms_metadata/{denom}endpoint for such a denom we are getting error likeThis happens, because routing logic splits the denom uri param into 3 components rather then one and hence tries to router request to a non-existing handler. Url encoding does not help either as it still results in same issue. We would like to add additional endpoint to handle token factory created metadata retrieval, and move denom for the endpoint from uri param to query param.
so then for token factory created tokens the query would be
/sei-protocol/seichain/tokenfactory/denoms/metadata?denom=factory/{owner_walltet_id}/{denom}Testing performed to validate your change