List a new interchain token on Squid
-
The command starts by prompting the user for information.
- It asks if the token has been registered via the ITS portal.
- It requests the URL of the token details, including the token address and environment.
-
It constructs API URLs to search for the token and fetch its details.
-
It performs API requests to search for the token and fetch its details. If the API requests fail, it proceeds with empty data.
-
It parses the fetched token details into an interchain token configuration.
-
The command asks the user if they want to save the configuration to a local file.
-
If the user chooses to save the configuration, it updates the local token list configuration with the new token.
-
It checks if the token already exists in the token list. If it does, the command exits with an error.
-
If the user chooses to create a PR, it performs the following actions:
- Creates a new Git branch.
- Adds the updated token list configuration to the branch.
- Commits the changes.
- Pushes the branch to the remote repository.