Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
L2Burner
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "./interfaces/IChildToken.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract L2Burner is Ownable { address childToken; constructor(address _childToken) { childToken = _childToken; } function crossChainBurn() public onlyOwner { uint256 amount = IChildToken(childToken).balanceOf(address(this)); IChildToken(childToken).withdraw(amount); } function transfer(uint _amount) onlyOwner public { IERC20(childToken).transfer(owner(), _amount); } }
interface IChildToken { function deposit(address user, bytes calldata depositData) external; function withdraw(uint256 amount) external; /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_childToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"crossChainBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161062638038061062683398101604081905261002f916100b8565b61003f61003a610064565b610068565b600180546001600160a01b0319166001600160a01b03929092169190911790556100e6565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100c9578081fd5b81516001600160a01b03811681146100df578182fd5b9392505050565b610531806100f56000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806312514bba1461005c57806315500df714610071578063715018a6146100795780638da5cb5b14610081578063f2fde38b1461009f575b600080fd5b61006f61006a36600461041a565b6100b2565b005b61006f610187565b61006f6102ad565b6100896102f8565b604051610096919061044a565b60405180910390f35b61006f6100ad3660046103cc565b610307565b6100ba610378565b6001600160a01b03166100cb6102f8565b6001600160a01b0316146100fa5760405162461bcd60e51b81526004016100f1906104bd565b60405180910390fd5b6001546001600160a01b031663a9059cbb6101136102f8565b836040518363ffffffff1660e01b815260040161013192919061045e565b602060405180830381600087803b15801561014b57600080fd5b505af115801561015f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018391906103fa565b5050565b61018f610378565b6001600160a01b03166101a06102f8565b6001600160a01b0316146101c65760405162461bcd60e51b81526004016100f1906104bd565b6001546040516370a0823160e01b81526000916001600160a01b0316906370a08231906101f790309060040161044a565b60206040518083038186803b15801561020f57600080fd5b505afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610432565b600154604051632e1a7d4d60e01b81529192506001600160a01b031690632e1a7d4d906102789084906004016104f2565b600060405180830381600087803b15801561029257600080fd5b505af11580156102a6573d6000803e3d6000fd5b5050505050565b6102b5610378565b6001600160a01b03166102c66102f8565b6001600160a01b0316146102ec5760405162461bcd60e51b81526004016100f1906104bd565b6102f6600061037c565b565b6000546001600160a01b031690565b61030f610378565b6001600160a01b03166103206102f8565b6001600160a01b0316146103465760405162461bcd60e51b81526004016100f1906104bd565b6001600160a01b03811661036c5760405162461bcd60e51b81526004016100f190610477565b6103758161037c565b50565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156103dd578081fd5b81356001600160a01b03811681146103f3578182fd5b9392505050565b60006020828403121561040b578081fd5b815180151581146103f3578182fd5b60006020828403121561042b578081fd5b5035919050565b600060208284031215610443578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b9081526020019056fea2646970667358221220287f5fab0d86ab05c91e7c66271fecbfe9e682f6ac8eba6fa07f98531d644cad64736f6c63430008000033000000000000000000000000d1e6354fb05bf72a8909266203dab80947dceccf
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d1e6354fb05bf72a8909266203dab80947dceccf
-----Decoded View---------------
Arg [0] : _childToken (address): 0xd1e6354fb05bf72a8909266203dab80947dceccf
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d1e6354fb05bf72a8909266203dab80947dceccf
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.