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

added Router Protocol adapter to the Hashi's pool of adapters #49

Merged
merged 3 commits into from
Mar 26, 2024
Merged

added Router Protocol adapter to the Hashi's pool of adapters #49

merged 3 commits into from
Mar 26, 2024

Conversation

Shivam78288
Copy link
Contributor

No description provided.

Copy link
Collaborator

@allemanfredi allemanfredi left a 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();
Copy link
Collaborator

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 ....

@Shivam78288
Copy link
Contributor Author

Added the suggested changes to the adapter @allemanfredi. Please review and merge.

return hex"";
}

function iAck(uint256, bool, bytes memory) external override {
Copy link
Collaborator

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

@Shivam78288
Copy link
Contributor Author

Restricted it to pure.

@allemanfredi allemanfredi merged commit 2d80e92 into gnosis:feat/v0.2.0 Mar 26, 2024
1 check failed
@allemanfredi
Copy link
Collaborator

Thanks for the PR!

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