Collection of ABIs, Addresses and Solidity Interfaces that is integrated with opty.fi's earn protocol
- Using
npm
$ npm install @optyfi/defi-legos
- Using
yarn
$ yarn add @optyfi/defi-legos
Once installed, you can use the legos in the library by importing them:
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
import "@optyfi/ethereum/curve/contracts/ICurveAddressProvider.sol";
import "@optyfi/ethereum/curve/contracts/CurveAddresses.sol";
contract CurveDepositAdapter {
function getCurveRegistry() public view returns (address) {
return ICurveAddressProvider(CurveAddresses.ADDRESS_PROVIDER).get_registry();
}
}
The library of defi legos is maintained by core developers and builder community of opty.fi. Opty.fi's defi legos are used in building defi adapters and subgraphs for the yield generating protocol of opty.fi called earn-protocol
The reason behind building defi legos' library is to achieve opty.fi's philosophy of simple, modular and seamless integration of defi protocols to its yield generating protocol.
Opty.fi's defi legos is being developed - thanks to the open source smart contracts of various defi protocols and builder community. Check out the contribution guide in order to participate to this library!
Inspired by the incredible OpenZeppelin Contracts and money-legos
Opty.fi's defi-legos is released under the MIT License.