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

[BLCKCHN-217] Add Cronos ID #38 #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[BLCKCHN-217] Add Cronos ID #38 #39

wants to merge 1 commit into from

Conversation

leejw51crypto
Copy link
Collaborator

Add resolveCronosId functionality

  • Introduced new parameters for resolving a CronosId to its corresponding wallet address in chain-ai.helpers.ts.
  • Updated agent.constants.ts to include the new function in the tools list.
  • Modified agent.interfaces.ts to define the new ResolveCronosId function and its associated data structure.

This enhancement allows users to resolve CronosIds, improving the functionality of the agent service.

@@ -154,3 +154,14 @@ export const getErc20BalanceParameters = {
},
required: ['address', 'contractAddress'],
};

export const resolveCronosIdParameters = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need an additional function tool call to resolve cronosId parameters?

Would it be not easier to accept strings that end with .cro and wallet addresses directly in the functions that accept cro ID?

For example, query -> "send 10 eth to user.cro" -> TransferToken -> if string ends with .cro, resolve cronosId and send to that user.

What that work as well? LEts me know your thoughts @leejw51crypto

Copy link
Collaborator Author

@leejw51crypto leejw51crypto Jan 8, 2025

Choose a reason for hiding this comment

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

yes, it's currently, done in backend level by @yeehan-crypto-com
send 10 cro to user.cro (for an example) is working (only for cronos yet)

so this pr is checking cronos id and use resolved wallet-addresses

  • bring wallet address, and use for contracts etc
  • resolve cronosid <- to check cronosid is valid
  • reverse resolve cronosid <- to check validity of returned wallet address

resoving cronosid would be useful to check validity of cronosid, before making transactions. (cross-checking)

Add resolveCronosId functionality

- Introduced new parameters for resolving a CronosId to its corresponding wallet address in `chain-ai.helpers.ts`.
- Updated `agent.constants.ts` to include the new function in the tools list.
- Modified `agent.interfaces.ts` to define the new `ResolveCronosId` function and its associated data structure.

This enhancement allows users to resolve CronosIds, improving the functionality of the agent service.

Remove unused `ResolveCronosIdData` interface from `agent.interfaces.ts`

This change cleans up the code by eliminating the `ResolveCronosIdData` interface, which is no longer needed following recent updates to the agent service functionality. This helps maintain a more streamlined and efficient codebase.

[BLCKCHN-217] Add ReverseResolveCronosId functionality

- Introduced `reverseResolveCronosId` parameters in `chain-ai.helpers.ts` to resolve a wallet address to its corresponding CronosId.
- Updated `agent.constants.ts` to include the new function in the tools list.
- Modified `agent.interfaces.ts` to define the new `ReverseResolveCronosId` function.
- Enhanced `agent.service.ts` to implement the reverse resolution logic, allowing users to retrieve CronosIds from wallet addresses.

This addition improves the agent service's capabilities, providing users with more comprehensive blockchain interaction features.

tidy up

tidy up
@leejw51crypto
Copy link
Collaborator Author

added reverse resolve id

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