How to create new connector for new protocol

Synthetix Staking Connector
Anyone can create new connector for other protocol that we haven’t been integrated. Let’s take the Synthetix Staking Connector as example We have created deposit, withdraw and claimReward three functions.

Testing is critical for smart contract. But there’s issue with testing DSA account cast delegatecall with mainnet fork that it can’t connect to external contracts. That’s why our tests are using mock contracts for external protocols. And internal mock contract for passing the mock contract into our connector. You can take MockSyntheti.sol as example.

Remember to also check requirements

Anyone is welcome to create a PR to have the smart contract with test coverage for other protocol so that we can review and merge for more spells

1 Like

hey guys, this link is broken

Here’s another simple example:

With test here:

1 Like