Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Sponsored
Loading...
Loading
Contract Name:
ElevatedMinterBurner
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.0; import "mixins/Operatable.sol"; import "interfaces/IMintableBurnable.sol"; /// @title ElevatedMinterBurner /// @notice ElevatedMinterBurner is a periphery contract for minting and burning tokens and executing arbitrary calls. contract ElevatedMinterBurner is IMintableBurnable, Operatable { IMintableBurnable public immutable token; constructor(IMintableBurnable token_) { token = token_; } function burn(address from, uint256 amount) external override onlyOperators returns (bool) { return token.burn(from, amount); } function mint(address to, uint256 amount) external override onlyOperators returns (bool) { return token.mint(to, amount); } function exec(address target, bytes calldata data) external onlyOwner { (bool success, bytes memory result) = target.call(data); if (!success) { if (result.length == 0) revert(); assembly { revert(add(32, result), mload(result)) } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "BoringSolidity/interfaces/IERC20.sol"; import "BoringSolidity/BoringOwnable.sol"; contract Operatable is BoringOwnable { event OperatorChanged(address indexed, bool); error NotAllowedOperator(); mapping(address => bool) public operators; constructor() { operators[msg.sender] = 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: MIT pragma solidity ^0.8.0; interface IERC20 { // transfer and tranferFrom have been removed, because they don't work on all tokens (some aren't ERC20 complaint). // By removing them you can't accidentally use them. // name, symbol and decimals have been removed, because they are optional and sometimes wrongly implemented (MKR). // Use BoringERC20 with `using BoringERC20 for IERC20` and call `safeTransfer`, `safeTransferFrom`, etc instead. function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); /// @notice EIP 2612 function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; } interface IStrictERC20 { // This is the strict ERC20 interface. Don't use this, certainly not if you don't control the ERC20 token you're calling. function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address _owner) external view returns (uint256 balance); function transfer(address _to, uint256 _value) external returns (bool success); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); function approve(address _spender, uint256 _value) external returns (bool success); function allowance(address _owner, address _spender) external view returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); /// @notice EIP 2612 function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol + Claimable.sol // Simplified by BoringCrypto contract BoringOwnableData { address public owner; address public pendingOwner; } contract BoringOwnable is BoringOwnableData { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /// @notice `owner` defaults to msg.sender on construction. constructor() { owner = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } /// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner. /// Can only be invoked by the current `owner`. /// @param newOwner Address of the new owner. /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`. /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise. function transferOwnership( address newOwner, bool direct, bool renounce ) public onlyOwner { if (direct) { // Checks require(newOwner != address(0) || renounce, "Ownable: zero address"); // Effects emit OwnershipTransferred(owner, newOwner); owner = newOwner; pendingOwner = address(0); } else { // Effects pendingOwner = newOwner; } } /// @notice Needs to be called by `pendingOwner` to claim ownership. function claimOwnership() public { address _pendingOwner = pendingOwner; // Checks require(msg.sender == _pendingOwner, "Ownable: caller != pending owner"); // Effects emit OwnershipTransferred(owner, _pendingOwner); owner = _pendingOwner; pendingOwner = address(0); } /// @notice Only allows the `owner` to execute the function. modifier onlyOwner() { require(msg.sender == owner, "Ownable: caller is not the owner"); _; } }
{ "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": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IMintableBurnable","name":"token_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotAllowedOperator","type":"error"},{"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"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":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"exec","outputs":[],"stateMutability":"nonpayable","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":[{"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":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IMintableBurnable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"direct","type":"bool"},{"internalType":"bool","name":"renounce","type":"bool"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161090638038061090683398101604081905261002f91610099565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3336000908152600260205260409020805460ff191660011790556001600160a01b03166080526100c9565b6000602082840312156100ab57600080fd5b81516001600160a01b03811681146100c257600080fd5b9392505050565b6080516108146100f26000396000818161018701528181610317015261052801526108146000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b1461011e5780639dc29fac14610149578063be6002c21461015c578063e30c39781461016f578063fc0c546a1461018257600080fd5b8063078dfbe7146100a357806313e7c9d8146100b857806340c10f19146100f05780634e71e0c814610103578063558a72971461010b575b600080fd5b6100b66100b1366004610634565b6101a9565b005b6100db6100c636600461067d565b60026020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100db6100fe366004610698565b6102c1565b6100b661038c565b6100b66101193660046106c2565b610449565b600054610131906001600160a01b031681565b6040516001600160a01b0390911681526020016100e7565b6100db610157366004610698565b6104d2565b6100b661016a3660046106f9565b610557565b600154610131906001600160a01b031681565b6101317f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031633146101dc5760405162461bcd60e51b81526004016101d39061077c565b60405180910390fd5b811561029f576001600160a01b0383161515806101f65750805b61023a5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b60448201526064016101d3565b600080546040516001600160a01b03808716939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b3360009081526002602052604081205460ff166102f15760405163de19c8b360e01b815260040160405180910390fd5b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f19906044015b6020604051808303816000875af1158015610361573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038591906107b1565b9392505050565b6001546001600160a01b03163381146103e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e657260448201526064016101d3565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b6000546001600160a01b031633146104735760405162461bcd60e51b81526004016101d39061077c565b6001600160a01b038216600081815260026020908152604091829020805460ff191685151590811790915591519182527f193de8d500b5cb7b720089b258a39e9c1d0b840019a73ae7c51c3f9101732b02910160405180910390a25050565b3360009081526002602052604081205460ff166105025760405163de19c8b360e01b815260040160405180910390fd5b604051632770a7eb60e21b81526001600160a01b038481166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401610342565b6000546001600160a01b031633146105815760405162461bcd60e51b81526004016101d39061077c565b600080846001600160a01b0316848460405161059e9291906107ce565b6000604051808303816000865af19150503d80600081146105db576040519150601f19603f3d011682016040523d82523d6000602084013e6105e0565b606091505b5091509150816106005780516000036105f857600080fd5b805181602001fd5b5050505050565b80356001600160a01b038116811461061e57600080fd5b919050565b801515811461063157600080fd5b50565b60008060006060848603121561064957600080fd5b61065284610607565b9250602084013561066281610623565b9150604084013561067281610623565b809150509250925092565b60006020828403121561068f57600080fd5b61038582610607565b600080604083850312156106ab57600080fd5b6106b483610607565b946020939093013593505050565b600080604083850312156106d557600080fd5b6106de83610607565b915060208301356106ee81610623565b809150509250929050565b60008060006040848603121561070e57600080fd5b61071784610607565b9250602084013567ffffffffffffffff8082111561073457600080fd5b818601915086601f83011261074857600080fd5b81358181111561075757600080fd5b87602082850101111561076957600080fd5b6020830194508093505050509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156107c357600080fd5b815161038581610623565b818382376000910190815291905056fea2646970667358221220532cce66c2f626814b52a86dbf0e7ef0db94e971310fd8b9d642df30d9bbc45564736f6c6343000810003300000000000000000000000049a0400587a7f65072c87c4910449fdcc5c47242
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b1461011e5780639dc29fac14610149578063be6002c21461015c578063e30c39781461016f578063fc0c546a1461018257600080fd5b8063078dfbe7146100a357806313e7c9d8146100b857806340c10f19146100f05780634e71e0c814610103578063558a72971461010b575b600080fd5b6100b66100b1366004610634565b6101a9565b005b6100db6100c636600461067d565b60026020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100db6100fe366004610698565b6102c1565b6100b661038c565b6100b66101193660046106c2565b610449565b600054610131906001600160a01b031681565b6040516001600160a01b0390911681526020016100e7565b6100db610157366004610698565b6104d2565b6100b661016a3660046106f9565b610557565b600154610131906001600160a01b031681565b6101317f00000000000000000000000049a0400587a7f65072c87c4910449fdcc5c4724281565b6000546001600160a01b031633146101dc5760405162461bcd60e51b81526004016101d39061077c565b60405180910390fd5b811561029f576001600160a01b0383161515806101f65750805b61023a5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b60448201526064016101d3565b600080546040516001600160a01b03808716939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b3360009081526002602052604081205460ff166102f15760405163de19c8b360e01b815260040160405180910390fd5b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f00000000000000000000000049a0400587a7f65072c87c4910449fdcc5c4724216906340c10f19906044015b6020604051808303816000875af1158015610361573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038591906107b1565b9392505050565b6001546001600160a01b03163381146103e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e657260448201526064016101d3565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b6000546001600160a01b031633146104735760405162461bcd60e51b81526004016101d39061077c565b6001600160a01b038216600081815260026020908152604091829020805460ff191685151590811790915591519182527f193de8d500b5cb7b720089b258a39e9c1d0b840019a73ae7c51c3f9101732b02910160405180910390a25050565b3360009081526002602052604081205460ff166105025760405163de19c8b360e01b815260040160405180910390fd5b604051632770a7eb60e21b81526001600160a01b038481166004830152602482018490527f00000000000000000000000049a0400587a7f65072c87c4910449fdcc5c472421690639dc29fac90604401610342565b6000546001600160a01b031633146105815760405162461bcd60e51b81526004016101d39061077c565b600080846001600160a01b0316848460405161059e9291906107ce565b6000604051808303816000865af19150503d80600081146105db576040519150601f19603f3d011682016040523d82523d6000602084013e6105e0565b606091505b5091509150816106005780516000036105f857600080fd5b805181602001fd5b5050505050565b80356001600160a01b038116811461061e57600080fd5b919050565b801515811461063157600080fd5b50565b60008060006060848603121561064957600080fd5b61065284610607565b9250602084013561066281610623565b9150604084013561067281610623565b809150509250925092565b60006020828403121561068f57600080fd5b61038582610607565b600080604083850312156106ab57600080fd5b6106b483610607565b946020939093013593505050565b600080604083850312156106d557600080fd5b6106de83610607565b915060208301356106ee81610623565b809150509250929050565b60008060006040848603121561070e57600080fd5b61071784610607565b9250602084013567ffffffffffffffff8082111561073457600080fd5b818601915086601f83011261074857600080fd5b81358181111561075757600080fd5b87602082850101111561076957600080fd5b6020830194508093505050509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156107c357600080fd5b815161038581610623565b818382376000910190815291905056fea2646970667358221220532cce66c2f626814b52a86dbf0e7ef0db94e971310fd8b9d642df30d9bbc45564736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000049a0400587a7f65072c87c4910449fdcc5c47242
-----Decoded View---------------
Arg [0] : token_ (address): 0x49a0400587A7F65072c87c4910449fDcC5c47242
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000049a0400587a7f65072c87c4910449fdcc5c47242
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.