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: Eddy Finance #46

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

Conversation

SarveshLimaye
Copy link

⚠️ IMPORTANT

Pull Requests are only allowed to modify files in the /projects directory.
Any changes outside of this directory will be rejected automatically.

Files Changed

  1. projects/...
  2. projects/...

const data = getDataForCrossChain(BTC_ZRC20, encodedBitcoinWalletAddress);
return data;
};

Copy link
Contributor

Choose a reason for hiding this comment

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

If you need symbol of native, then you can use this
image

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for sharing . Will update the logic

Copy link
Author

Choose a reason for hiding this comment

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

@OoXooOx Fixed in 990282d

if (!chainId) return toResult(`Unsupported chain name: ${chainName}`, true);
if (!supportedChains.includes(chainId)) return toResult(`Eddy Finance is not supported on ${chainName}`, true);

// Validate amount
Copy link
Contributor

@OoXooOx OoXooOx Jan 30, 2025

Choose a reason for hiding this comment

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

Do you consider add checks for enough balance on account of native currency Because if not, then we will have attempt of transaction execution and revert due insufficient balance in viem staticcall and possible not really clear error.

Copy link
Author

Choose a reason for hiding this comment

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

Sure, I'll add them.

Copy link
Author

Choose a reason for hiding this comment

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

@OoXooOx Done in - 35498fb


export default {
tools,
functions,
Copy link
Contributor

Choose a reason for hiding this comment

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

here main protocol description for AI. Add slightly more info.

Copy link
Author

Choose a reason for hiding this comment

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

Sure

Copy link
Author

Choose a reason for hiding this comment

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

@OoXooOx Fixed in e38c30e

description: 'Account address that will execute the example',
},
{
name: 'destToken',
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you consider create resolve function for get proper zrc20 from chainName for example or users must know zrc20 addresses?

Copy link
Author

@SarveshLimaye SarveshLimaye Jan 31, 2025

Choose a reason for hiding this comment

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

Yes, I will create a resolver function that maps tokenSymbol to zrc20 address .

The flow will be something like this -

User prompts - Bridge 0.1 ETH from Base to USDC on Etherem 

// @notice : The resolver function here will convert usdc address on ethereum to zrc20 address
resolverFunction(USDC) => return usdc_zrc20

],
},
{
name: 'bridgeToBitcoin',
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you consider create get function for check how much btc I can get for 1 ETH for example?

Copy link
Author

@SarveshLimaye SarveshLimaye Jan 31, 2025

Choose a reason for hiding this comment

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

Yes, for sure. Will add a getter function that shows the estimated amount of BTC that user will receive after bridging

@SarveshLimaye SarveshLimaye changed the title feat: Eddy Finance (WIP 🚧 ) feat: Eddy Finance Feb 3, 2025
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.

None yet

2 participants