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

Feat: enso api prices #50

Merged
merged 3 commits into from
Jan 17, 2025
Merged

Feat: enso api prices #50

merged 3 commits into from
Jan 17, 2025

Conversation

TxCorpi0x
Copy link
Contributor

Description

Please include a summary of the changes and the related issue.

Adds integration to Enso API prices endpoint to retrieve the token price by chain ID and contract address of token

Type of Change

  • Bugfix
  • New Feature
  • Improvement
  • Documentation Update

Checklist

  • I have read the contributing guidelines.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Related Issue

Closes #[issue number]

Copy link
Collaborator

@hyacinthus hyacinthus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can AI know the chain ID?

Additionally, please forgive my lack of understanding regarding enso. Does it have to be cross-chain, or is cross-chain optional? Have you talked to Eric about the chain? Is it possible to limit the functionality to a single chain? For example, if a user sets the base, can it only operate on that base?

We can enhance its stability by reducing the scope of skills. If cross-chain is necessary, we can also provide it with a whitelist.

@TxCorpi0x
Copy link
Contributor Author

How can AI know the chain ID?

Additionally, please forgive my lack of understanding regarding enso. Does it have to be cross-chain, or is cross-chain optional? Have you talked to Eric about the chain? Is it possible to limit the functionality to a single chain? For example, if a user sets the base, can it only operate on that base?

We can enhance its stability by reducing the scope of skills. If cross-chain is necessary, we can also provide it with a whitelist.

The chain id is optional and its default value is 1 which is Ethereum mainnet, I have not seen the rest of the chains in their results so far, and the concentration is on Ethereum mainnet.
Enso Wallet Approval smart router contract is on Ethereum and so far it has been all around mainnet. I put the chainId as 1 by default to prevent confusion of AI side. but if the user asks a particular chain id, it will be handled by the tool and will set int he API call input.
Whitelisting the Chain IDs is a great option which can be added as an enhancement in the future.

hyacinthus
hyacinthus previously approved these changes Jan 17, 2025
@TxCorpi0x TxCorpi0x merged commit dd5694a into main Jan 17, 2025
4 checks passed
@TxCorpi0x TxCorpi0x deleted the feat/enso-prices branch January 17, 2025 08:46
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