Skip to content
Verified contractPartialMIT

ERC20LiquidityToken

Address0x72d015e116a965ed022c57dbc18a91f0bd329b65
Balance

0 ETH

 

Transactions

17

 

Compiler

solc 0.8.34

 

Same code

8 more contracts

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
Yes, 1 runs
EVM version
cancun
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
25,450,093
Creation transaction
0x562d519a7c…d524587fa8

56 files

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

lib/core-v1/contracts/tokens/ERC20LiquidityToken.sol

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

import {Math} from '@openzeppelin/contracts/utils/math/Math.sol';
import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';

import {IAmmalgamPair} from 'contracts/interfaces/IAmmalgamPair.sol';
import {ERC20Base, ERC20BaseConfig} from 'contracts/tokens/ERC20Base.sol';
import {DEPOSIT_L} from 'contracts/interfaces/tokens/ITokenController.sol';

contract ERC20LiquidityToken is ERC20Base {
    constructor(
        ERC20BaseConfig memory config
    ) ERC20Base(config) {}

    /**
     * @dev override {ERC20Base-ownerMint}.
     */
    function ownerMint(address sender, address to, uint256 assets, uint256 shares) public virtual override onlyOwner {
        emit Mint(sender, to, assets, shares);
        _mint(to, shares);
    }

    /**
     * @dev override {ERC20Base-ownerBurn}.
     */
    function ownerBurn(address sender, address to, uint256 assets, uint256 shares) public virtual override onlyOwner {
        emit Burn(sender, to, assets, shares);
        _burn(msg.sender, shares); // msg.sender is the pair who has been sent the token to be burned from the user
    }
}
Compiler settingsShow
{
  "viaIR": false,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "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.