Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 1.83 KB

README.md

File metadata and controls

58 lines (35 loc) · 1.83 KB

Header

defi-legos

Collection of ABIs, Addresses and Solidity Interfaces that is integrated with opty.fi's earn protocol

Overview

Installation

  • Using npm
$ npm install @optyfi/defi-legos
  • Using yarn
$ yarn add @optyfi/defi-legos

Usage

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();
  }
}

Security

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.

Contribute

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!

Credits

Inspired by the incredible OpenZeppelin Contracts and money-legos

License

Opty.fi's defi-legos is released under the MIT License.