Skip to content
Verified contractPartialGPL-3.0-only

PairBlockLendingFundRemoval

Address0x77499b9f96c8de0a68ecfc7e08c9e02f59bb9a2d
Balance

0 ETH

 

Transactions

0

 

Compiler

solc 0.8.34

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
Yes, 1 runs
EVM version
cancun
License
GPL-3.0-only
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,443,543
Creation transaction
0x9cd32fa72a…66ac29f585
Libraries
lib/core-v1/contracts/proxy/PairBlockLendingFundRemoval.sol:Interest0xfb98…371138lib/core-v1/contracts/proxy/PairBlockLendingFundRemoval.sol:Validation0x8df1…d88a5e

45 files

The source code is large: one file is shown at a time. Choose a file in the list.

lib/core-v1/contracts/interfaces/callbacks/IAmmalgamCallee.sol

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.34;

/**
 * @title ICallback Interface
 * @dev This interface should be implemented by anyone wishing to use callbacks in the
 * `swap`, `borrow`, and `borrowLiquidity` functions in the  IAmmalgamPair interface.
 */
interface ISwapCallback {
    /**
     * @notice Handles a swap call in the Ammalgam protocol.
     * @dev Callback passed as calldata to `swap` functions in `IAmmalgamPair`.
     * @param sender The address of the sender initiating the swap call.
     * @param amountXAssets The amount of token X involved in the swap.
     * @param amountYAssets The amount of token Y involved in the swap.
     * @param data The calldata provided to the swap function.
     */
    function ammalgamSwapCallV1(
        address sender,
        uint256 amountXAssets,
        uint256 amountYAssets,
        bytes calldata data
    ) external;
}

interface IBorrowCallback {
    /**
     * @notice The callback in the `AmmalgamPair.borrow()` function transfers borrowed `amountXAssets` and `amountYAssets`
     *         to the borrower which doesn't include the initial lending fee. The `amountXShares` and `amountYShares`
     *         minted debt shares for the `borrower` include the initial lending fee.
     * @param sender The address of the sender initiating the borrow call.
     * @param amountXAssets The amount of token X involved in the borrow.
     * @param amountYAssets The amount of token Y involved in the borrow.
     * @param amountXShares The shares of token X involved in the borrow including the initial lending fee.
     * @param amountYShares The shares of token Y involved in the borrow including the initial lending fee.
     * @param data The calldata provided to the borrow function.
     */
    function ammalgamBorrowCallV1(
        address sender,
        uint256 amountXAssets,
        uint256 amountYAssets,
        uint256 amountXShares,
        uint256 amountYShares,
        bytes calldata data
    ) external;

    /**
     * @notice The callback in the `AmmalgamPair.borrowLiquidity()` function transfers borrowed
     *         `amountXAssets` and `amountYAssets` to the borrower which doesn't include the initial lending fee.
     *         The `amountLShares` minted debt shares for the `borrower` include the initial lending fee.
     * @param sender The address of the sender initiating the borrow liquidity call.
     * @param amountXAssets The amount of token X involved in the borrow liquidity.
     * @param amountYAssets The amount of token Y involved in the borrow liquidity.
     * @param amountLShares The shares of liquidity involved in the borrow liquidity including the initial lending fee.
     * @param data The calldata provided to the borrow liquidity function.
     */
    function ammalgamBorrowLiquidityCallV1(
        address sender,
        uint256 amountXAssets,
        uint256 amountYAssets,
        uint256 amountLShares,
        bytes calldata data
    ) external;
}

interface ICallback is ISwapCallback, IBorrowCallback {}
Compiler settingsShow
{
  "viaIR": false,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "libraries": {
    "lib/core-v1/contracts/proxy/PairBlockLendingFundRemoval.sol": {
      "Interest": "0xfb9840519502cce354943cf6920538a30d371138",
      "Validation": "0x8df125dc481b6b42e03c0977398cd3b6ead88a5e"
    }
  },
  "optimizer": {
    "runs": 1,
    "enabled": true
  },
  "evmVersion": "cancun",
  "remappings": [
    "@core-v1/=lib/core-v1/",
    "@peripheral-v1/=lib/peripheral-v1/contracts/",
    "contracts/=lib/core-v1/contracts/",
    "utils/=lib/core-v1/utils/",
    "@openzeppelin/=lib/core-v1/lib/openzeppelin-contracts/",
    "@openzeppelin-upgradeable/=lib/core-v1/lib/openzeppelin-contracts-upgradeable/",
    "@1inch/=lib/core-v1/lib/1inch/",
    "@mangrovedao/mangrove-core/=lib/core-v1/lib/mangrove-core/",
    "@morpho-org/morpho-blue/=lib/core-v1/lib/morpho-blue/",
    "forge-std/=lib/core-v1/lib/forge-std/src/",
    "lib/ExcessivelySafeCall/=lib/core-v1/lib/ExcessivelySafeCall/",
    "lib/openzeppelin-contracts/=lib/core-v1/lib/openzeppelin-contracts/",
    "lib/1inch/=lib/core-v1/lib/1inch/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.