-
Notifications
You must be signed in to change notification settings - Fork 52
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
added Router Protocol adapter to the Hashi's pool of adapters #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting the PR!
bytes memory requestMetadata = getRequestMetadata(); | ||
|
||
uint256 iSendFee = ROUTER_GATEWAY.iSendDefaultFee(); | ||
if (msg.value < iSendFee) revert InsufficientFeePassed(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this would break the integration with Yaho
because it doesn't handle the distribution of msg.values among adapters. I suggest adding a payable function that accepts ETH so that a user can directly pay the adapter before calling Yaho.dispatchMessageToAdapters
.
Basically, instead of checking the msg.value
here, you can check the contract balance:
if (address(this).balance < iSendFee) revert ....
Added the suggested changes to the adapter @allemanfredi. Please review and merge. |
return hex""; | ||
} | ||
|
||
function iAck(uint256, bool, bytes memory) external override { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fx can be restricted to pure
Restricted it to pure. |
Thanks for the PR! |
No description provided.