ETH Price: $2,905.06 (+0.84%)

Contract

0xdEb3Fd776a935E09779CE37b763FbDC5647e2Ea9
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Mine77987912024-08-23 10:03:17521 days ago1724407397IN
0xdEb3Fd77...5647e2Ea9
0 ETH0.000125060.04686601
Mine77987102024-08-23 10:00:35521 days ago1724407235IN
0xdEb3Fd77...5647e2Ea9
0 ETH0.000125660.0470905

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BatchMiner

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;

import "../interfaces/IBlast.sol";
import "../interfaces/IHypersound.sol";

contract BatchMiner {
    address public immutable hypersoundContractAddress;
    address public immutable owner;
    IHypersound private immutable hypersoundContract;
    IBlast public constant BLAST = IBlast(0x4300000000000000000000000000000000000002);
    
    uint256 private constant transferFee = 50000000000000000;

    constructor() {
        owner = msg.sender;
        hypersoundContractAddress = 0x7E82481423B09c78e4fd65D9C1473a36E5aEd405;
        hypersoundContract = IHypersound(hypersoundContractAddress);
        BLAST.configureClaimableGas();
    }

    receive() external payable {}

    modifier onlyOwner {
        require(msg.sender == owner, "Caller is not the owner");
        _;
    }

    function claimMaxGas() external onlyOwner {
        BLAST.claimMaxGas(address(this), address(this));
    }

    function withdrawAll() external onlyOwner {
        require(address(this).balance > 0);
        payable(owner).transfer(address(this).balance);
    }

    function withdrawHypers() external onlyOwner {
        uint256 currentBalance = hypersoundContract.balanceOf(address(this));
        if (currentBalance > transferFee) {
            uint256 withdrawAmount = currentBalance - transferFee;
            hypersoundContract.transfer(owner, withdrawAmount);
        }
    }

    function mine(uint16 n1) external {
        for (uint16 n2; n2 < n1; n2++) {
            hypersoundContract.mine('');
        }
        
    }
	}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.21;

enum YieldMode {
    AUTOMATIC,
    VOID,
    CLAIMABLE
}

enum GasMode {
    VOID,
    CLAIMABLE 
}

interface IBlast{
    // configure
    function configureContract(address contractAddress, YieldMode _yield, GasMode gasMode, address governor) external;
    function configure(YieldMode _yield, GasMode gasMode, address governor) external;

    // base configuration options
    function configureClaimableYield() external;
    function configureClaimableYieldOnBehalf(address contractAddress) external;
    function configureAutomaticYield() external;
    function configureAutomaticYieldOnBehalf(address contractAddress) external;
    function configureVoidYield() external;
    function configureVoidYieldOnBehalf(address contractAddress) external;
    function configureClaimableGas() external;
    function configureClaimableGasOnBehalf(address contractAddress) external;
    function configureVoidGas() external;
    function configureVoidGasOnBehalf(address contractAddress) external;
    function configureGovernor(address _governor) external;
    function configureGovernorOnBehalf(address _newGovernor, address contractAddress) external;

    // claim yield
    function claimYield(address contractAddress, address recipientOfYield, uint256 amount) external returns (uint256);
    function claimAllYield(address contractAddress, address recipientOfYield) external returns (uint256);

    // claim gas
    function claimAllGas(address contractAddress, address recipientOfGas) external returns (uint256);
    function claimGasAtMinClaimRate(address contractAddress, address recipientOfGas, uint256 minClaimRateBips) external returns (uint256);
    function claimMaxGas(address contractAddress, address recipientOfGas) external returns (uint256);
    function claimGas(address contractAddress, address recipientOfGas, uint256 gasToClaim, uint256 gasSecondsToConsume) external returns (uint256);

    // read functions
    function readClaimableYield(address contractAddress) external view returns (uint256);
    function readYieldConfiguration(address contractAddress) external view returns (uint8);
    function readGasParams(address contractAddress) external view returns (uint256 etherSeconds, uint256 etherBalance, uint256 lastUpdated, GasMode);
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.21;

interface IHypersound {
    function mine(bytes calldata extraData) external;
    function transfer(address recipient, uint256 amount) external;
    function balanceOf(address account) external view returns (uint256);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BLAST","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimMaxGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hypersoundContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"n1","type":"uint16"}],"name":"mine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawHypers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e060405234801561001057600080fd5b503360a052737e82481423b09c78e4fd65d9c1473a36e5aed405608081905260c05260408051634e606c4760e01b8152905173430000000000000000000000000000000000000291634e606c4791600480830192600092919082900301818387803b15801561007e57600080fd5b505af1158015610092573d6000803e3d6000fd5b5050505060805160a05160c05161063b6100f46000396000818161034d0152818161042d01526104bf01526000818160f90152818161018b015281816101eb01528181610241015281816102f801526103fb015260006092015261063b6000f3fe6080604052600436106100745760003560e01c806397d757761161004e57806397d757761461011b578063b2b8c93f14610136578063c54cd6351461014b578063d444202a1461016057600080fd5b80636e09b53b14610080578063853828b6146100d05780638da5cb5b146100e757600080fd5b3661007b57005b600080fd5b34801561008c57600080fd5b506100b47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100dc57600080fd5b506100e5610180565b005b3480156100f357600080fd5b506100b47f000000000000000000000000000000000000000000000000000000000000000081565b34801561012757600080fd5b506100b46002604360981b0181565b34801561014257600080fd5b506100e5610236565b34801561015757600080fd5b506100e56102ed565b34801561016c57600080fd5b506100e561017b36600461053a565b61048f565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101d15760405162461bcd60e51b81526004016101c890610565565b60405180910390fd5b600047116101de57600080fd5b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016904780156108fc02916000818181858888f19350505050158015610233573d6000803e3d6000fd5b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461027e5760405162461bcd60e51b81526004016101c890610565565b60405163662aa11d60e01b8152306004820181905260248201526002604360981b019063662aa11d906044016020604051808303816000875af11580156102c9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610233919061059c565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103355760405162461bcd60e51b81526004016101c890610565565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c0919061059c565b905066b1a2bc2ec500008111156102335760006103e466b1a2bc2ec50000836105cb565b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401600060405180830381600087803b15801561047357600080fd5b505af1158015610487573d6000803e3d6000fd5b505050505050565b60005b8161ffff168161ffff16101561053657604051639091793d60e01b815260206004820152600060248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639091793d90604401600060405180830381600087803b15801561050b57600080fd5b505af115801561051f573d6000803e3d6000fd5b50505050808061052e906105e4565b915050610492565b5050565b60006020828403121561054c57600080fd5b813561ffff8116811461055e57600080fd5b9392505050565b60208082526017908201527f43616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b6000602082840312156105ae57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156105de576105de6105b5565b92915050565b600061ffff8083168181036105fb576105fb6105b5565b600101939250505056fea2646970667358221220790a97caaef816cbb3f01bf1a2fbc41e612a9f45d6e2306e9ab69c93b12955e064736f6c63430008150033

Deployed Bytecode

0x6080604052600436106100745760003560e01c806397d757761161004e57806397d757761461011b578063b2b8c93f14610136578063c54cd6351461014b578063d444202a1461016057600080fd5b80636e09b53b14610080578063853828b6146100d05780638da5cb5b146100e757600080fd5b3661007b57005b600080fd5b34801561008c57600080fd5b506100b47f0000000000000000000000007e82481423b09c78e4fd65d9c1473a36e5aed40581565b6040516001600160a01b03909116815260200160405180910390f35b3480156100dc57600080fd5b506100e5610180565b005b3480156100f357600080fd5b506100b47f000000000000000000000000c5432d61e0d785a9985f714bb440d92ae602b38581565b34801561012757600080fd5b506100b46002604360981b0181565b34801561014257600080fd5b506100e5610236565b34801561015757600080fd5b506100e56102ed565b34801561016c57600080fd5b506100e561017b36600461053a565b61048f565b336001600160a01b037f000000000000000000000000c5432d61e0d785a9985f714bb440d92ae602b38516146101d15760405162461bcd60e51b81526004016101c890610565565b60405180910390fd5b600047116101de57600080fd5b6040516001600160a01b037f000000000000000000000000c5432d61e0d785a9985f714bb440d92ae602b38516904780156108fc02916000818181858888f19350505050158015610233573d6000803e3d6000fd5b50565b336001600160a01b037f000000000000000000000000c5432d61e0d785a9985f714bb440d92ae602b385161461027e5760405162461bcd60e51b81526004016101c890610565565b60405163662aa11d60e01b8152306004820181905260248201526002604360981b019063662aa11d906044016020604051808303816000875af11580156102c9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610233919061059c565b336001600160a01b037f000000000000000000000000c5432d61e0d785a9985f714bb440d92ae602b38516146103355760405162461bcd60e51b81526004016101c890610565565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000007e82481423b09c78e4fd65d9c1473a36e5aed4056001600160a01b0316906370a0823190602401602060405180830381865afa15801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c0919061059c565b905066b1a2bc2ec500008111156102335760006103e466b1a2bc2ec50000836105cb565b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000c5432d61e0d785a9985f714bb440d92ae602b38581166004830152602482018390529192507f0000000000000000000000007e82481423b09c78e4fd65d9c1473a36e5aed4059091169063a9059cbb90604401600060405180830381600087803b15801561047357600080fd5b505af1158015610487573d6000803e3d6000fd5b505050505050565b60005b8161ffff168161ffff16101561053657604051639091793d60e01b815260206004820152600060248201527f0000000000000000000000007e82481423b09c78e4fd65d9c1473a36e5aed4056001600160a01b031690639091793d90604401600060405180830381600087803b15801561050b57600080fd5b505af115801561051f573d6000803e3d6000fd5b50505050808061052e906105e4565b915050610492565b5050565b60006020828403121561054c57600080fd5b813561ffff8116811461055e57600080fd5b9392505050565b60208082526017908201527f43616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b6000602082840312156105ae57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156105de576105de6105b5565b92915050565b600061ffff8083168181036105fb576105fb6105b5565b600101939250505056fea2646970667358221220790a97caaef816cbb3f01bf1a2fbc41e612a9f45d6e2306e9ab69c93b12955e064736f6c63430008150033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.