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(symbiosis): add support for symbiosis bridge #85

Merged
merged 36 commits into from
Oct 30, 2023

Conversation

mmackz
Copy link
Collaborator

@mmackz mmackz commented Oct 25, 2023

Integration of symbiosis plugin for QuestDK

This PR introduces the symbiosis plugin integration for QuestDK.

About The Project

Symbiosis Bridge, is a cross-chain bridge protocol that is compatible with many networks.

Implementation Details

This plugin will support bridging of most stable coins and popular tokens on each chain. The filter takes into account the input token, the source chain and destination chain to determine if a transaction is valid. The output token can be chosen freely by the user and should not affect the validity of the transaction.

mmackz added 28 commits October 21, 2023 16:20
@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2023

🦋 Changeset detected

Latest commit: d41d31b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@rabbitholegg/questdk-plugin-symbiosis Minor
@rabbitholegg/questdk-plugin-registry Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -0,0 +1,53 @@
{
"name": "@rabbitholegg/questdk-plugin-symbiosis",
"private": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets remove this private setting so that this plugin can be published

Copy link
Member

@Quazia Quazia left a comment

Choose a reason for hiding this comment

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

LGTM - really good work I really love the new testing pattern you're using here.

})
})
describe('should pass filter with valid transactions', () => {
PASSING_TEST_TRANSACTIONS.forEach((testTransaction) => {
Copy link
Member

Choose a reason for hiding this comment

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

I love this pattern - NICE
Gotta convert the other plugins to use this this is slick

_metarouteTransaction: {
approvedTokens: tokenAddress ? [tokenAddress] : undefined, // if tokenAddress is undefined, any input token will pass filter
amount: amount,
otherSideCalldata: {
Copy link
Member

Choose a reason for hiding this comment

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

Right here you should be able to do

otherSideCalldata: {
    $abiAbstract: metaBurnABI,
    _metaBurnTransaction: {
        chainID: destinationChainId,
        chain2address: recipient,
    }
}

And that should work - I wouldn't bother cause this looks like it's working fine and it's more precise but just to see how you'd use that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like this solution much better, and it allows us to remove the abi for the metaSynthesize function.

Im going to go ahead and implement this.

@mmackz mmackz marked this pull request as ready for review October 26, 2023 04:36
@mmackz mmackz requested a review from a team as a code owner October 26, 2023 04:36
@mmackz
Copy link
Collaborator Author

mmackz commented Oct 26, 2023

Private setting is removed 👍

Moved the pr out of the draft state.

@Quazia Quazia merged commit 391468f into rabbitholegg:main Oct 30, 2023
@mmackz mmackz deleted the symbiosis-bridge branch November 12, 2023 06:38
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.

3 participants