Overview [ERC-20]
Price
$0.98 @ 0.000319 Eth (-0.33%)
Fully Diluted Market Cap
Max Total Supply:
26,960.59244167 MIM
Holders:
12,721 ( 0.039%)
Transfers:
-
Contract:
Decimals:
18
Official Site:
[ Download CSV Export ]
[ Download CSV Export ]
OVERVIEW
abracadabra.money is a lending protocol that allows users to borrow a USD-pegged Stablecoin (MIM) using interest-bearing tokens as collateral.Market
Volume (24H) | : | $286,415.00 |
Market Capitalization | : | $55,417,808.00 |
Circulating Supply | : | 55,611,861.00 MIM |
Market Data Source: Coinmarketcap |
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x6bf837c1d07806ef23a4dccb2b3aa28927341d12 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
MintableBurnableERC20
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 800 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "solmate/tokens/ERC20.sol"; import "mixins/OperatableV2.sol"; import "interfaces/IMintableBurnable.sol"; /// @title MintableBurnableERC20 /// @notice MintableBurnableERC20 is an ERC20 token with mint, burn functions. /// In this context, operators are allowed minters and burners. contract MintableBurnableERC20 is ERC20, OperatableV2, IMintableBurnable { constructor( address _owner, string memory name_, string memory symbol_, uint8 decimals_ ) ERC20(name_, symbol_, decimals_) OperatableV2(_owner) {} function burn(address from, uint256 amount) external onlyOperators returns (bool) { _burn(from, amount); return true; } function mint(address to, uint256 amount) external onlyOperators returns (bool) { _mint(to, amount); return true; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "solmate/auth/Owned.sol"; /// @title OperatableV2 /// @notice OperatableV2 is a contract that allows operator management. /// The difference with OperatableV1 apart from using solmate `Owned` vs `BoringOwnable` is that /// the constructor is taking in the owner except of using msg.sender. /// This allows ensuring that the owner is right one. /// For example, when deploying from a CREATE2 factory, the msg.sender would the factory address /// which is usually not what we want. contract OperatableV2 is Owned { event OperatorChanged(address indexed, bool); error NotAllowedOperator(); mapping(address => bool) public operators; constructor(address _owner) Owned(_owner) { operators[_owner] = true; } modifier onlyOperators() { if (!operators[msg.sender]) { revert NotAllowedOperator(); } _; } function setOperator(address operator, bool status) external onlyOwner { operators[operator] = status; emit OperatorChanged(operator, status); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface IMintableBurnable { function burn(address from, uint256 amount) external returns (bool); function mint(address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Simple single owner authorization mixin. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol) abstract contract Owned { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event OwnershipTransferred(address indexed user, address indexed newOwner); /*////////////////////////////////////////////////////////////// OWNERSHIP STORAGE //////////////////////////////////////////////////////////////*/ address public owner; modifier onlyOwner() virtual { require(msg.sender == owner, "UNAUTHORIZED"); _; } /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(address _owner) { owner = _owner; emit OwnershipTransferred(address(0), _owner); } /*////////////////////////////////////////////////////////////// OWNERSHIP LOGIC //////////////////////////////////////////////////////////////*/ function transferOwnership(address newOwner) public virtual onlyOwner { owner = newOwner; emit OwnershipTransferred(msg.sender, newOwner); } }
{ "remappings": [ "/=src/", "BoringSolidity/=lib/BoringSolidity/contracts/", "ExcessivelySafeCall/=lib/ExcessivelySafeCall/src/", "cauldrons/=src/cauldrons/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-deploy/=lib/forge-deploy/contracts/", "forge-std/=lib/forge-std/src/", "generated/=generated/", "interfaces/=src/interfaces/", "lenses/=src/lenses/", "libraries/=src/libraries/", "mixins/=src/mixins/", "openzeppelin-contracts-upgradeabl/=lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "oracles/=src/oracles/", "periphery/=src/periphery/", "solady/=lib/solady/src/", "solmate/=lib/solmate/src/", "strategies/=src/strategies/", "surl/=lib/surl/src/", "swappers/=src/swappers/", "tokens/=src/tokens/", "utils/=utils/" ], "optimizer": { "enabled": true, "runs": 800 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotAllowedOperator","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"OperatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"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":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","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":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","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":"amount","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":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101365760003560e01c806370a08231116100b25780639dc29fac11610081578063d505accf11610066578063d505accf146102cb578063dd62ed3e146102de578063f2fde38b1461030957600080fd5b80639dc29fac146102a5578063a9059cbb146102b857600080fd5b806370a08231146102325780637ecebe00146102525780638da5cb5b1461027257806395d89b411461029d57600080fd5b806323b872dd116101095780633644e515116100ee5780633644e5151461020257806340c10f191461020a578063558a72971461021d57600080fd5b806323b872dd146101b6578063313ce567146101c957600080fd5b806306fdde031461013b578063095ea7b31461015957806313e7c9d81461017c57806318160ddd1461019f575b600080fd5b61014361031c565b6040516101509190610b8d565b60405180910390f35b61016c610167366004610bf7565b6103aa565b6040519015158152602001610150565b61016c61018a366004610c21565b60076020526000908152604090205460ff1681565b6101a860025481565b604051908152602001610150565b61016c6101c4366004610c43565b610417565b6101f07f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610150565b6101a8610509565b61016c610218366004610bf7565b610564565b61023061022b366004610c7f565b6105a7565b005b6101a8610240366004610c21565b60036020526000908152604090205481565b6101a8610260366004610c21565b60056020526000908152604090205481565b600654610285906001600160a01b031681565b6040516001600160a01b039091168152602001610150565b610143610654565b61016c6102b3366004610bf7565b610661565b61016c6102c6366004610bf7565b61069b565b6102306102d9366004610cbb565b610713565b6101a86102ec366004610d2e565b600460209081526000928352604080842090915290825290205481565b610230610317366004610c21565b610966565b6000805461032990610d61565b80601f016020809104026020016040519081016040528092919081815260200182805461035590610d61565b80156103a25780601f10610377576101008083540402835291602001916103a2565b820191906000526020600020905b81548152906001019060200180831161038557829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906104059086815260200190565b60405180910390a35060015b92915050565b6001600160a01b038316600090815260046020908152604080832033845290915281205460001981146104735761044e8382610db1565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b0385166000908152600360205260408120805485929061049b908490610db1565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104f69087815260200190565b60405180910390a3506001949350505050565b60007f0000000000000000000000000000000000000000000000000000000000002105461461053f5761053a610a13565b905090565b507fadef779444295a84a0ce4478c2296b05214cc2cf3218c4e85d407b3fae44568090565b3360009081526007602052604081205460ff166105945760405163de19c8b360e01b815260040160405180910390fd5b61059e8383610aad565b50600192915050565b6006546001600160a01b031633146105f55760405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b60448201526064015b60405180910390fd5b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f193de8d500b5cb7b720089b258a39e9c1d0b840019a73ae7c51c3f9101732b02910160405180910390a25050565b6001805461032990610d61565b3360009081526007602052604081205460ff166106915760405163de19c8b360e01b815260040160405180910390fd5b61059e8383610b19565b336000908152600360205260408120805483919083906106bc908490610db1565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104059086815260200190565b428410156107635760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064016105ec565b6000600161076f610509565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561087b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906108b15750876001600160a01b0316816001600160a01b0316145b6108fd5760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016105ec565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b6006546001600160a01b031633146109af5760405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b60448201526064016105ec565b600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03831690811790915560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610a459190610dc4565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b8060026000828254610abf9190610e63565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91015b60405180910390a35050565b6001600160a01b03821660009081526003602052604081208054839290610b41908490610db1565b90915550506002805482900390556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b0d565b600060208083528351808285015260005b81811015610bba57858101830151858201604001528201610b9e565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610bf257600080fd5b919050565b60008060408385031215610c0a57600080fd5b610c1383610bdb565b946020939093013593505050565b600060208284031215610c3357600080fd5b610c3c82610bdb565b9392505050565b600080600060608486031215610c5857600080fd5b610c6184610bdb565b9250610c6f60208501610bdb565b9150604084013590509250925092565b60008060408385031215610c9257600080fd5b610c9b83610bdb565b915060208301358015158114610cb057600080fd5b809150509250929050565b600080600080600080600060e0888a031215610cd657600080fd5b610cdf88610bdb565b9650610ced60208901610bdb565b95506040880135945060608801359350608088013560ff81168114610d1157600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215610d4157600080fd5b610d4a83610bdb565b9150610d5860208401610bdb565b90509250929050565b600181811c90821680610d7557607f821691505b602082108103610d9557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561041157610411610d9b565b600080835481600182811c915080831680610de057607f831692505b60208084108203610dff57634e487b7160e01b86526022600452602486fd5b818015610e135760018114610e2857610e55565b60ff1986168952841515850289019650610e55565b60008a81526020902060005b86811015610e4d5781548b820152908501908301610e34565b505084890196505b509498975050505050505050565b8082018082111561041157610411610d9b56fea264697066735822122043ef96d833673df97b1401c2afb81b369cf17c52f386417e33a981b4a0d1b7d464736f6c63430008140033