Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 147 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Buy | 20869051 | 203 days ago | IN | 0 ETH | 0.00241433 | ||||
Burn | 20439469 | 263 days ago | IN | 0 ETH | 0.00015787 | ||||
Buy | 20439455 | 263 days ago | IN | 0 ETH | 0.00048029 | ||||
Burn | 20219351 | 294 days ago | IN | 0 ETH | 0.00045092 | ||||
Buy | 20219340 | 294 days ago | IN | 0 ETH | 0.00123413 | ||||
Burn | 20009494 | 323 days ago | IN | 0 ETH | 0.00053362 | ||||
Buy | 20005460 | 324 days ago | IN | 0 ETH | 0.00276885 | ||||
Burn | 19816911 | 350 days ago | IN | 0 ETH | 0.00040977 | ||||
Buy | 19816830 | 350 days ago | IN | 0 ETH | 0.0010199 | ||||
Buy | 19811242 | 351 days ago | IN | 0 ETH | 0.00121441 | ||||
Buy | 19805087 | 352 days ago | IN | 0 ETH | 0.00120235 | ||||
Buy | 19802886 | 352 days ago | IN | 0 ETH | 0.00079088 | ||||
Buy | 19802883 | 352 days ago | IN | 0 ETH | 0.00087834 | ||||
Buy | 19797258 | 353 days ago | IN | 0 ETH | 0.00109557 | ||||
Buy | 19797235 | 353 days ago | IN | 0 ETH | 0.00114403 | ||||
Buy | 19788157 | 354 days ago | IN | 0 ETH | 0.00094404 | ||||
Buy | 19782664 | 355 days ago | IN | 0 ETH | 0.00139454 | ||||
Buy | 19780771 | 355 days ago | IN | 0 ETH | 0.00121764 | ||||
Burn | 19704106 | 366 days ago | IN | 0 ETH | 0.00051713 | ||||
Buy | 19702322 | 366 days ago | IN | 0 ETH | 0.00108833 | ||||
Buy | 19702316 | 366 days ago | IN | 0 ETH | 0.00099885 | ||||
Buy | 19688415 | 368 days ago | IN | 0 ETH | 0.00128988 | ||||
Buy | 19675272 | 370 days ago | IN | 0 ETH | 0.00728241 | ||||
Buy | 19670424 | 371 days ago | IN | 0 ETH | 0.00144903 | ||||
Buy | 19666311 | 371 days ago | IN | 0 ETH | 0.00170445 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Swap Exact ETH F... | 20869051 | 203 days ago | 0.59 ETH | ||||
Transfer | 20869018 | 203 days ago | 0.6 ETH | ||||
Swap Exact ETH F... | 20439455 | 263 days ago | 1.59 ETH | ||||
Transfer | 20439442 | 263 days ago | 1.59 ETH | ||||
Swap Exact ETH F... | 20219340 | 294 days ago | 2.4 ETH | ||||
Transfer | 20211658 | 295 days ago | 2.428 ETH | ||||
Swap Exact ETH F... | 20005460 | 324 days ago | 2.94 ETH | ||||
Transfer | 20003400 | 324 days ago | 2.869 ETH | ||||
Swap Exact ETH F... | 19816830 | 350 days ago | 0.48 ETH | ||||
Swap Exact ETH F... | 19811242 | 351 days ago | 0.5654 ETH | ||||
Swap Exact ETH F... | 19805087 | 352 days ago | 0.5654 ETH | ||||
Swap Exact ETH F... | 19802886 | 352 days ago | 0.5654 ETH | ||||
Swap Exact ETH F... | 19802883 | 352 days ago | 0.5654 ETH | ||||
Swap Exact ETH F... | 19797258 | 353 days ago | 0.5654 ETH | ||||
Swap Exact ETH F... | 19797235 | 353 days ago | 0.5654 ETH | ||||
Swap Exact ETH F... | 19788157 | 354 days ago | 0.5654 ETH | ||||
Swap Exact ETH F... | 19782664 | 355 days ago | 0.5654 ETH | ||||
Swap Exact ETH F... | 19780771 | 355 days ago | 0.5654 ETH | ||||
Transfer | 19776660 | 356 days ago | 5.5047 ETH | ||||
Swap Exact ETH F... | 19702322 | 366 days ago | 0.15 ETH | ||||
Swap Exact ETH F... | 19702316 | 366 days ago | 0.6 ETH | ||||
Swap Exact ETH F... | 19688415 | 368 days ago | 0.28 ETH | ||||
Swap Exact ETH F... | 19675272 | 370 days ago | 0.28 ETH | ||||
Swap Exact ETH F... | 19670424 | 371 days ago | 0.28 ETH | ||||
Swap Exact ETH F... | 19666311 | 371 days ago | 0.28 ETH |
Loading...
Loading
Contract Name:
BoxBetBuyAndBurn
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); } interface IUniswapV2Router { function WETH() external pure returns (address); function swapExactETHForTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable returns ( uint[] memory amounts ); } contract BoxBetBuyAndBurn is Ownable { address public manager = 0x2045a2035253F672511a0E0a07A87D4B12FFC805; address constant burnAddress = 0x000000000000000000000000000000000000dEaD; IERC20 public token; IUniswapV2Router public uniswapRouter; event Buy(uint256 amount); event Burn(uint256 amount); modifier onlyManager() { require(msg.sender == manager, "Not the manager"); _; } constructor() { token = IERC20(0x33f289d91286535c47270C8479f6776Fb3AdEB3e); uniswapRouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); } receive() external payable {} function setManager(address _manager) external onlyOwner { manager = _manager; } function buy(uint256 amount, uint256 minAmount) external onlyManager { address[] memory path = new address[](2); path[0] = uniswapRouter.WETH(); path[1] = address(token); uniswapRouter.swapExactETHForTokens{ value: amount }( minAmount, path, address(this), block.timestamp ); emit Buy(amount); } function burn() external { uint256 contractTokenBalance = token.balanceOf(address(this)); token.transfer(burnAddress, contractTokenBalance); emit Burn(contractTokenBalance); } function withdraw() external onlyOwner { uint amount = address(this).balance; require(amount > 0, "Empty balance"); (bool success, ) = owner().call{value: amount}(""); require(success, "Transfer failed"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) 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() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) 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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "optimizer": { "enabled": true, "runs": 1 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Buy","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":[],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"address","name":"_manager","type":"address"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600180546001600160a01b031916732045a2035253f672511a0e0a07a87d4b12ffc80517905534801561003657600080fd5b506100403361008d565b600280546001600160a01b03199081167333f289d91286535c47270c8479f6776fb3adeb3e1790915560038054909116737a250d5630b4cf539739df2c5dacb4c659f2488d1790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109ad806100ec6000396000f3fe6080604052600436106100855760003560e01c80633ccfd60b1461009157806344df8e70146100a8578063481c6a75146100bd578063715018a6146100f3578063735de9f7146101085780638da5cb5b14610128578063d0ebdbe71461013d578063d6febde81461015d578063f2fde38b1461017d578063fc0c546a1461019d57600080fd5b3661008c57005b600080fd5b34801561009d57600080fd5b506100a66101bd565b005b3480156100b457600080fd5b506100a66102a8565b3480156100c957600080fd5b506001546100dd906001600160a01b031681565b6040516100ea919061075d565b60405180910390f35b3480156100ff57600080fd5b506100a66103e7565b34801561011457600080fd5b506003546100dd906001600160a01b031681565b34801561013457600080fd5b506100dd6103fb565b34801561014957600080fd5b506100a6610158366004610786565b61040a565b34801561016957600080fd5b506100a66101783660046107aa565b610434565b34801561018957600080fd5b506100a6610198366004610786565b610635565b3480156101a957600080fd5b506002546100dd906001600160a01b031681565b6101c56106ae565b47806102085760405162461bcd60e51b815260206004820152600d60248201526c456d7074792062616c616e636560981b60448201526064015b60405180910390fd5b60006102126103fb565b6001600160a01b03168260405160006040518083038185875af1925050503d806000811461025c576040519150601f19603f3d011682016040523d82523d6000602084013e610261565b606091505b50509050806102a45760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101ff565b5050565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906102d990309060040161075d565b60206040518083038186803b1580156102f157600080fd5b505afa158015610305573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032991906107cc565b60025460405163a9059cbb60e01b815261dead6004820152602481018390529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561037857600080fd5b505af115801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b091906107e5565b506040518181527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a150565b6103ef6106ae565b6103f9600061070d565b565b6000546001600160a01b031690565b6104126106ae565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146104805760405162461bcd60e51b815260206004820152600f60248201526e2737ba103a34329036b0b730b3b2b960891b60448201526064016101ff565b6040805160028082526060820183526000926020830190803683375050600354604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b1580156104e557600080fd5b505afa1580156104f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051d919061081d565b816000815181106105305761053061083a565b6001600160a01b0392831660209182029290920101526002548251911690829060019081106105615761056161083a565b6001600160a01b039283166020918202929092010152600354604051637ff36ab560e01b8152911690637ff36ab59085906105a6908690869030904290600401610850565b6000604051808303818588803b1580156105bf57600080fd5b505af11580156105d3573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526105fc91908101906108ba565b506040518381527f3e32821836f4caf5b64b2c8c6b460049a9797526960d31502f7575b8da39d5ae9060200160405180910390a1505050565b61063d6106ae565b6001600160a01b0381166106a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101ff565b6106ab8161070d565b50565b336106b76103fb565b6001600160a01b0316146103f95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ff565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0391909116815260200190565b6001600160a01b03811681146106ab57600080fd5b60006020828403121561079857600080fd5b81356107a381610771565b9392505050565b600080604083850312156107bd57600080fd5b50508035926020909101359150565b6000602082840312156107de57600080fd5b5051919050565b6000602082840312156107f757600080fd5b815180151581146107a357600080fd5b634e487b7160e01b600052604160045260246000fd5b60006020828403121561082f57600080fd5b81516107a381610771565b634e487b7160e01b600052603260045260246000fd5b600060808201868352602060808185015281875180845260a086019150828901935060005b8181101561089a5784516001600160a01b031683529383019391830191600101610875565b50506001600160a01b039690961660408501525050506060015292915050565b600060208083850312156108cd57600080fd5b82516001600160401b03808211156108e457600080fd5b818501915085601f8301126108f857600080fd5b81518181111561090a5761090a610807565b8060051b604051601f19603f8301168101818110858211171561092f5761092f610807565b60405291825284820192508381018501918883111561094d57600080fd5b938501935b8285101561096b57845184529385019392850192610952565b9897505050505050505056fea26469706673582212200b7a5b848d1abc1ce60c3ac58d29bd5f1af7c5abd8f5d67a0c0042b3a1a0fe1b64736f6c63430008090033
Deployed Bytecode
0x6080604052600436106100855760003560e01c80633ccfd60b1461009157806344df8e70146100a8578063481c6a75146100bd578063715018a6146100f3578063735de9f7146101085780638da5cb5b14610128578063d0ebdbe71461013d578063d6febde81461015d578063f2fde38b1461017d578063fc0c546a1461019d57600080fd5b3661008c57005b600080fd5b34801561009d57600080fd5b506100a66101bd565b005b3480156100b457600080fd5b506100a66102a8565b3480156100c957600080fd5b506001546100dd906001600160a01b031681565b6040516100ea919061075d565b60405180910390f35b3480156100ff57600080fd5b506100a66103e7565b34801561011457600080fd5b506003546100dd906001600160a01b031681565b34801561013457600080fd5b506100dd6103fb565b34801561014957600080fd5b506100a6610158366004610786565b61040a565b34801561016957600080fd5b506100a66101783660046107aa565b610434565b34801561018957600080fd5b506100a6610198366004610786565b610635565b3480156101a957600080fd5b506002546100dd906001600160a01b031681565b6101c56106ae565b47806102085760405162461bcd60e51b815260206004820152600d60248201526c456d7074792062616c616e636560981b60448201526064015b60405180910390fd5b60006102126103fb565b6001600160a01b03168260405160006040518083038185875af1925050503d806000811461025c576040519150601f19603f3d011682016040523d82523d6000602084013e610261565b606091505b50509050806102a45760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101ff565b5050565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906102d990309060040161075d565b60206040518083038186803b1580156102f157600080fd5b505afa158015610305573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032991906107cc565b60025460405163a9059cbb60e01b815261dead6004820152602481018390529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561037857600080fd5b505af115801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b091906107e5565b506040518181527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a150565b6103ef6106ae565b6103f9600061070d565b565b6000546001600160a01b031690565b6104126106ae565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146104805760405162461bcd60e51b815260206004820152600f60248201526e2737ba103a34329036b0b730b3b2b960891b60448201526064016101ff565b6040805160028082526060820183526000926020830190803683375050600354604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b1580156104e557600080fd5b505afa1580156104f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051d919061081d565b816000815181106105305761053061083a565b6001600160a01b0392831660209182029290920101526002548251911690829060019081106105615761056161083a565b6001600160a01b039283166020918202929092010152600354604051637ff36ab560e01b8152911690637ff36ab59085906105a6908690869030904290600401610850565b6000604051808303818588803b1580156105bf57600080fd5b505af11580156105d3573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526105fc91908101906108ba565b506040518381527f3e32821836f4caf5b64b2c8c6b460049a9797526960d31502f7575b8da39d5ae9060200160405180910390a1505050565b61063d6106ae565b6001600160a01b0381166106a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101ff565b6106ab8161070d565b50565b336106b76103fb565b6001600160a01b0316146103f95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ff565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0391909116815260200190565b6001600160a01b03811681146106ab57600080fd5b60006020828403121561079857600080fd5b81356107a381610771565b9392505050565b600080604083850312156107bd57600080fd5b50508035926020909101359150565b6000602082840312156107de57600080fd5b5051919050565b6000602082840312156107f757600080fd5b815180151581146107a357600080fd5b634e487b7160e01b600052604160045260246000fd5b60006020828403121561082f57600080fd5b81516107a381610771565b634e487b7160e01b600052603260045260246000fd5b600060808201868352602060808185015281875180845260a086019150828901935060005b8181101561089a5784516001600160a01b031683529383019391830191600101610875565b50506001600160a01b039690961660408501525050506060015292915050565b600060208083850312156108cd57600080fd5b82516001600160401b03808211156108e457600080fd5b818501915085601f8301126108f857600080fd5b81518181111561090a5761090a610807565b8060051b604051601f19603f8301168101818110858211171561092f5761092f610807565b60405291825284820192508381018501918883111561094d57600080fd5b938501935b8285101561096b57845184529385019392850192610952565b9897505050505050505056fea26469706673582212200b7a5b848d1abc1ce60c3ac58d29bd5f1af7c5abd8f5d67a0c0042b3a1a0fe1b64736f6c63430008090033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.