Conversation
| const data = getDataForCrossChain(BTC_ZRC20, encodedBitcoinWalletAddress); | ||
| return data; | ||
| }; | ||
|
|
There was a problem hiding this comment.
Thanks for sharing . Will update the logic
| 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 |
There was a problem hiding this comment.
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.
|
|
||
| export default { | ||
| tools, | ||
| functions, |
There was a problem hiding this comment.
here main protocol description for AI. Add slightly more info.
| description: 'Account address that will execute the example', | ||
| }, | ||
| { | ||
| name: 'destToken', |
There was a problem hiding this comment.
Do you consider create resolve function for get proper zrc20 from chainName for example or users must know zrc20 addresses?
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Do you consider create get function for check how much btc I can get for 1 ETH for example?
There was a problem hiding this comment.
Yes, for sure. Will add a getter function that shows the estimated amount of BTC that user will receive after bridging

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