Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
12.144418732454317821 mo-vAMM-SOLID/WETH
Holders
4
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Minimal Proxy Contract for 0x6ab83013bbdb721bc5f44b16bbdd5a2a41545f56
Contract Name:
DepositToken
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "./interfaces/IERC20.sol"; import "./interfaces/INFTHolder.sol"; contract DepositToken is IERC20 { string public name; string public symbol; uint8 public constant decimals = 18; mapping(address => mapping(address => uint256)) public override allowance; ILpDepositor public depositor; address public pool; constructor() { // set to prevent the implementation contract from being initialized pool = address(0xdead); } /** @dev Initializes the contract after deployment via a minimal proxy */ function initialize(address _pool) external returns (bool) { require(pool == address(0)); pool = _pool; depositor = ILpDepositor(msg.sender); string memory _symbol = IERC20(pool).symbol(); name = string(abi.encodePacked("Monolith ", _symbol, " Deposit")); symbol = string(abi.encodePacked("mo-", _symbol)); return true; } function balanceOf(address account) external view returns (uint256) { return depositor.userBalances(account, pool); } function totalSupply() external view returns (uint256) { return depositor.totalBalances(pool); } function approve(address _spender, uint256 _value) external override returns (bool) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** shared logic for transfer and transferFrom */ function _transfer(address _from, address _to, uint256 _value) internal { if (_value > 0) { depositor.transferDeposit(pool, _from, _to, _value); } emit Transfer(_from, _to, _value); } /** @notice Transfer tokens to a specified address @param _to The address to transfer to @param _value The amount to be transferred @return Success boolean */ function transfer(address _to, uint256 _value) public override returns (bool) { _transfer(msg.sender, _to, _value); return true; } /** @notice Transfer tokens from one address to another @param _from The address which you want to send tokens from @param _to The address which you want to transfer to @param _value The amount of tokens to be transferred @return Success boolean */ function transferFrom( address _from, address _to, uint256 _value ) public override returns (bool) { require(allowance[_from][msg.sender] >= _value, "Insufficient allowance"); if (allowance[_from][msg.sender] != type(uint).max) { allowance[_from][msg.sender] -= _value; } _transfer(_from, _to, _value); return true; } /** @dev Only callable ty `LpDepositor`. Used to trigger a `Transfer` event upon deposit of LP tokens, to aid accounting in block explorers. */ function mint(address _to, uint256 _value) external returns (bool) { require(msg.sender == address(depositor)); emit Transfer(address(0), _to, _value); return true; } /** @dev Only callable ty `LpDepositor`. Used to trigger a `Transfer` event upon withdrawal of LP tokens, to aid accounting in block explorers. */ function burn(address _from, uint256 _value) external returns (bool) { require(msg.sender == address(depositor)); emit Transfer(_from, address(0), _value); return true; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /** * Based on the OpenZeppelin IER20 interface: * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol * * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); function mint(address _to, uint256 _value) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; interface ILpDepositor { function tokenID() external view returns (uint256); function setTokenID(uint256 tokenID) external returns (bool); function userBalances(address user, address pool) external view returns (uint256); function totalBalances(address pool) external view returns (uint256); function transferDeposit( address pool, address from, address to, uint256 amount ) external returns (bool); function votingWindow() external returns (uint256); function enterSplitMode(uint256 workTimeLimit) external; function detachGauges(address[] memory gaugeAddresses) external; function reattachGauges(address[] memory gaugeAddresses) external; }
{ "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositor","outputs":[{"internalType":"contract ILpDepositor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"name":"initialize","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.