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

REST route endpoint standardization #1794

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

codebycarson
Copy link

Describe your changes and provide context

Currently, there is in-congruency in the Sei REST API endpoint’s routes for all the custom sei-protocol modules.

Typically REST endpoints have the format /{org}/{module}/{version}/, for example “/cosmwasm/wasm/v1/” or “/cosmos/feegrant/v1beta1/*”.

IBC routes have the format /{org}/{package}/{module}/{version}/, such as IBC “/ibc/apps/transfer/v1/”.

Some of the Sei routes use “sei-chain” as the package, while others use “seichain”.
Some have “sei-protocol” as the org prefix, while others do not have an org prefix.
Only mint contains versions, while the others do not.

This PR standardizes the REST routes and proto package names to be /org/module/version/** with "sei" as the org.

Example:

Old route:
http://localhost:1317/sei-protocol/sei-chain/oracle/slash_window

New route:
http://localhost:1317/sei/oracle/v1/slash_window

It is important to note that for backwards compatibility the old routes have been kept in this version. Once merged, docs and integration guides will be updated to use the newer routes formats.

Testing performed to validate your change

Tested locally on all custom module endpoints by two separate people

Due to naming and versioning inconsistencies, this PR updates all of the Sei custom modules to use a more traditional route and proto package naming convention. Additionally this PR regenerated the underlying code using the ignite CLI.

The following modules have been updated:
- epoch
- EVM
- TokenFactory
- Oracle
- Mint
- Fix broken query paths on oracle and tokenfactory
Regenerated files according to new REST routes
@cordt-sei
Copy link
Contributor

So this adds additional routes while keeping existing ones for compatibility?

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

Successfully merging this pull request may close these issues.

2 participants