@majora-finance/curve-blocks

0.0.17 • Public • Published

Majora Blocks

This repository contains the smart contract blocks for the Majora Finance protocol. These blocks are modular components that can be composed together to create complex DeFi strategies.

Overview

The repository contains two main swap blocks:

  • MajoraCurveDepositBlock: A block to deposit in Curve pools
  • MajoraCurveGaugeBlock: A block to stake in Curve gauges
  • MajoraCurveHarvestBlock: A block to harvest Curve gauges

Installation

npm install --force

Development Setup

  1. Install dependencies:
npm install --force
  1. Create a .env file with the following variables:
POLYGON_RPC=<your-polygon-rpc-url>
  1. Compile contracts:
npx hardhat compile

Testing

Run the test suite:

npx hardhat coverage

Deployment

  1. Deploy blocks:
npx hardhat deploy --tags MajoraBlocks
  1. Register blocks:
npx hardhat deploy --tags RegisterBlocks

Block Configuration

Blocks can be configured using YAML files in the devkit-config directory. Example configuration:

BlockParameters:
  - attribute: token
    type: address
    value: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"
  - attribute: tokenInPercent
    type: uint256
    value: 100
  - attribute: tokenOut
    type: address
    value: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F"

Block Metadata

Block metadata is defined in YAML files in the blocks-metadata directory. This includes:

  • Block identification
  • Parameter definitions
  • Protocol information
  • Resolver configurations

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @majora-finance/curve-blocks

Weekly Downloads

5

Version

0.0.17

License

none

Unpacked Size

3.89 MB

Total Files

256

Last publish

Collaborators

  • murphylabs