-
Notifications
You must be signed in to change notification settings - Fork 172
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
Create Connext Mocks for local testing #3640
Comments
Complexity: 13 Powered by Parabol |
Impact: 4 Powered by Parabol |
Urgency: 3 Powered by Parabol |
Complexity: 13 Powered by Parabol |
Impact: 4 Powered by Parabol |
Urgency: 3 Powered by Parabol |
Started on this, building a sharable framework for e2e mock testing. |
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
The text was updated successfully, but these errors were encountered: