npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mayflower-fi/solidity-interfaces

v0.0.3

Published

Solidity interfaces for May Prog EVM protocol - for use in smart contract development

Downloads

19

Readme

@mayflower-fi/solidity-interfaces

Pure Solidity interfaces for integrating with the May Prog EVM protocol. This package contains only the .sol interface files for use in Solidity smart contract development.

Note: For deployment, testing with bytecode, or TypeScript development, use @mayflower-fi/evm-bytecode instead.

Installation

npm install @mayflower-fi/solidity-interfaces

or with yarn:

yarn add @mayflower-fi/solidity-interfaces

Usage

Import the interfaces in your Solidity contracts:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "@mayflower-fi/solidity-interfaces/contracts/ITenant.sol";
import "@mayflower-fi/solidity-interfaces/contracts/IMarket.sol";
import "@mayflower-fi/solidity-interfaces/contracts/IMarketGroup.sol";

contract YourContract {
    ITenant public tenant;
    
    constructor(address tenantAddress) {
        tenant = ITenant(tenantAddress);
    }
    
    function createMarketGroup(
        address admin,
        uint256 buyFeeRate,
        uint256 sellFeeRate,
        uint256 borrowFeeRate,
        uint256 exerciseOptionsFeeRate
    ) external returns (address) {
        return tenant.createMarketGroup(
            admin,
            buyFeeRate,
            sellFeeRate,
            borrowFeeRate,
            exerciseOptionsFeeRate
        );
    }
}

Available Interfaces

Core Protocol Interfaces

  • ITenantFactory - Factory for creating tenant contracts
  • ITenant - Main tenant contract managing market groups and platform fees
  • IMarketGroup - Groups of markets with shared fee structures
  • IMarket - Individual bonding curve markets with trading functionality

Key Functions

ITenant

  • createMarketGroup() - Create a new market group
  • platformFeeRate() - Get platform fee rate
  • collectPlatformFees() - Collect accumulated platform fees

IMarketGroup

  • createMarket() - Deploy a new market with bonding curve
  • setFeeRates() - Update fee rates for the group
  • collectFeesFromMarket() - Collect fees from specific market

IMarket

  • buyWithExactBaseIn() - Buy tokens with exact input amount
  • sellWithExactTokenIn() - Sell tokens for base currency
  • buyCallOptions() - Purchase call options
  • exerciseCallOptions() - Exercise call options
  • depositCollateral() - Deposit tokens as collateral
  • borrow() - Borrow against collateral
  • repay() - Repay borrowed amount

Events

All interfaces include comprehensive events for monitoring on-chain activity:

event TokensBought(address indexed buyer, uint256 baseIn, uint256 tokensOut);
event TokensSold(address indexed seller, uint256 tokensIn, uint256 baseOut);
event CallOptionsBought(address indexed buyer, uint256 baseIn, uint256 optionsOut);
event CallOptionsExercised(address indexed holder, uint256 optionsIn, uint256 tokensOut);

Integration Example

Reading Market Data

IMarket market = IMarket(marketAddress);

// Get current price at supply
uint256 currentSupply = market.derivativeSupply();
uint256 price = market.getPriceAtSupply(currentSupply);

// Check available liquidity
uint256 liquidity = market.availableLiquidity();

// Get user position
(uint256 collateral, uint256 debt) = market.getPosition(userAddress);

Executing Trades

// Buy tokens
uint256 tokensOut = market.buyWithExactBaseIn(
    1000 * 10**18,  // 1000 base tokens in
    900 * 10**18,   // min tokens out (slippage protection)
    msg.sender      // recipient
);

// Sell tokens
uint256 baseOut = market.sellWithExactTokenIn(
    500 * 10**18,   // 500 tokens to sell
    450 * 10**18,   // min base out
    msg.sender      // recipient
);

Version Compatibility

  • Solidity: ^0.8.24
  • OpenZeppelin Contracts: ^5.0.0

License

MIT

Support

For questions and support, please contact Mayflower Finance.