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

Create Connext Mocks for local testing #3640

Open
just-a-node opened this issue Mar 1, 2023 · 7 comments · May be fixed by connext/chain-abstraction-integration#8
Open

Create Connext Mocks for local testing #3640

just-a-node opened this issue Mar 1, 2023 · 7 comments · May be fixed by connext/chain-abstraction-integration#8
Labels
Enhance 🧘 Issue type: Enhancement Request integrations

Comments

@just-a-node
Copy link
Collaborator

just-a-node commented Mar 1, 2023

Background

Create Connext Mocks that can be easily imported for local testing.

From Derby:

"So basically, this is our cross chain setup. The most important picture is the second picture on this page: https://derby-finance.gitbook.io/derby-finance-docs/developers/architecture/cross-chain which shows all the external triggers that need to be initiated by a keeper network. These triggers are all cross chain actions except from the trigger represented by arrow 8.

We work with cross chain provider contracts (XProvider.sol) which sit between Connext.sol and our contracts. This is shown in the 3rd picture on the same page.

To simulate all cross chain stuff we basically only need to simulate xcall in Connext.sol because that’s the only point of interaction with your technology. Since local testing all takes place on the same simulated local blockchain the Connext.sol Mock contract in our repo only just routes the function calls. You can see it implemented here: derby-yield-optimiser/contracts/Mocks/Connext/ ConnextMock.sol

Note that the 2nd picture could be simplified if we would use callbacks and if we would use authenticated messaging and transferring of funds in 1 call (instead now those have been done in two separate calls).

So again, the ConnextMock.sol is a very basic setup (maybe almost the most minimalistic setup possible). Hope the idea is clear, and hope you agree with this setup. Any feedback is always more than welcome!!"

Connext Mock: https://github.com/derbyfinance/derby-yield-optimiser/blob/master/contracts/Mocks/Connext/ConnextMock.sol

@rhlsthrm
Copy link
Collaborator

rhlsthrm commented Apr 6, 2023

Complexity: 13
See the discussion in Sprint Poker #​​26

Powered by Parabol

@rhlsthrm
Copy link
Collaborator

rhlsthrm commented Apr 6, 2023

Impact: 4
See the discussion in Sprint Poker #​​27

Powered by Parabol

@rhlsthrm
Copy link
Collaborator

rhlsthrm commented Apr 6, 2023

Urgency: 3
See the discussion in Sprint Poker #​​27

Powered by Parabol

@rhlsthrm
Copy link
Collaborator

Complexity: 13
See the discussion in Sprint Poker #​​29

Powered by Parabol

@rhlsthrm
Copy link
Collaborator

Impact: 4
See the discussion in Sprint Poker #​​30

Powered by Parabol

@rhlsthrm
Copy link
Collaborator

Urgency: 3
See the discussion in Sprint Poker #​​30

Powered by Parabol

@rhlsthrm
Copy link
Collaborator

Started on this, building a sharable framework for e2e mock testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhance 🧘 Issue type: Enhancement Request integrations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants