ETH Price: $3,495.52 (+2.18%)

Contract

0x2024C59EE713dB918c9ba0Cb84C5e2C6c6f834C5
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
0x608060401586342024-02-28 13:31:23142 days ago1709127083IN
 Create: ThrusterMulticall
0 ETH0.000000560.00100025

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ThrusterMulticall

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion
File 1 of 4 : ThrusterMulticall.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
pragma abicoder v2;

import "contracts/ThrusterGas.sol";

/// @notice A fork of Multicall2 specifically tailored for Thruster
contract ThrusterMulticall is ThrusterGas {
    struct Call {
        address target;
        uint256 gasLimit;
        bytes callData;
    }

    struct Result {
        bool success;
        uint256 gasUsed;
        bytes returnData;
    }

    constructor(address _manager) ThrusterGas(_manager) {}

    function getCurrentBlockTimestamp() public view returns (uint256 timestamp) {
        timestamp = block.timestamp;
    }

    function getEthBalance(address addr) public view returns (uint256 balance) {
        balance = addr.balance;
    }

    function multicall(Call[] memory calls) public returns (uint256 blockNumber, Result[] memory returnData) {
        blockNumber = block.number;
        returnData = new Result[](calls.length);
        for (uint256 i = 0; i < calls.length; i++) {
            (address target, uint256 gasLimit, bytes memory callData) =
                (calls[i].target, calls[i].gasLimit, calls[i].callData);
            uint256 gasLeftBefore = gasleft();
            (bool success, bytes memory ret) = target.call{gas: gasLimit}(callData);
            uint256 gasUsed = gasLeftBefore - gasleft();
            returnData[i] = Result(success, gasUsed, ret);
        }
    }
}

File 2 of 4 : ThrusterGas.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity =0.7.6;

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

contract ThrusterGas is IThrusterGas {
    IBlast public constant BLAST = IBlast(0x4300000000000000000000000000000000000002);
    address public manager;

    modifier onlyManager() {
        require(msg.sender == manager, "FORBIDDEN");
        _;
    }

    constructor(address _manager) {
        BLAST.configureClaimableGas();
        manager = _manager;
    }

    function claimGas(address _recipient, uint256 _minClaimRateBips)
        external
        override
        onlyManager
        returns (uint256 amount)
    {
        if (_minClaimRateBips == 0) {
            amount = BLAST.claimMaxGas(address(this), _recipient);
        } else {
            amount = BLAST.claimGasAtMinClaimRate(address(this), _recipient, _minClaimRateBips);
        }
        emit ClaimGas(_recipient, amount);
    }

    function setManager(address _manager) external override onlyManager {
        manager = _manager;
    }
}

File 3 of 4 : IBlast.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

interface IBlast {
    enum YieldMode {
        AUTOMATIC,
        VOID,
        CLAIMABLE
    }

    enum GasMode {
        VOID,
        CLAIMABLE
    }

    // 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);
}

File 4 of 4 : IThrusterGas.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

interface IThrusterGas {
    event ClaimGas(address indexed recipient, uint256 amount);

    function claimGas(address _recipient, uint256 _minClaimRateBips) external returns (uint256 amount);

    function setManager(address _manager) external;
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@uniswap/lib/=lib/solidity-lib/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "solidity-lib/=lib/solidity-lib/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "istanbul",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimGas","type":"event"},{"inputs":[],"name":"BLAST","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_minClaimRateBips","type":"uint256"}],"name":"claimGas","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentBlockTimestamp","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getEthBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct ThrusterMulticall.Call[]","name":"calls","type":"tuple[]"}],"name":"multicall","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct ThrusterMulticall.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516108f93803806108f983398101604081905261002f916100bf565b807343000000000000000000000000000000000000026001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561007f57600080fd5b505af1158015610093573d6000803e3d6000fd5b5050600080546001600160a01b0319166001600160a01b039490941693909317909255506100ed915050565b6000602082840312156100d0578081fd5b81516001600160a01b03811681146100e6578182fd5b9392505050565b6107fd806100fc6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063481c6a751161005b578063481c6a75146100d45780634d2301cc146100e957806397d75776146100fc578063d0ebdbe7146101045761007d565b806305bafd92146100825780630f28c97d146100ab5780631749e1e3146100b3575b600080fd5b610095610090366004610531565b610119565b6040516100a291906106c8565b60405180910390f35b6100956102c2565b6100c66100c136600461055a565b6102c6565b6040516100a29291906106d1565b6100dc61043d565b6040516100a291906106b4565b6100956100f7366004610510565b61044c565b6100dc610459565b610117610112366004610510565b610464565b005b600080546001600160a01b03163314610165576040805162461bcd60e51b81526020600482015260096024820152682327a92124a22222a760b91b604482015290519081900360640190fd5b816101f2576040805163662aa11d60e01b81523060048201526001600160a01b038516602482015290516002604360981b019163662aa11d9160448083019260209291908290030181600087803b1580156101bf57600080fd5b505af11580156101d3573d6000803e3d6000fd5b505050506040513d60208110156101e957600080fd5b5051905061027d565b60408051630951888f60e01b81523060048201526001600160a01b03851660248201526044810184905290516002604360981b0191630951888f9160648083019260209291908290030181600087803b15801561024e57600080fd5b505af1158015610262573d6000803e3d6000fd5b505050506040513d602081101561027857600080fd5b505190505b6040805182815290516001600160a01b038516917f5eadc4013530f38d8b7709b47915d0cef30eee941dad69669a5b45e0686879fa919081900360200190a292915050565b4290565b8051439060609067ffffffffffffffff811180156102e357600080fd5b5060405190808252806020026020018201604052801561031d57816020015b61030a6104d1565b8152602001906001900390816103025790505b50905060005b835181101561043757600080600086848151811061033d57fe5b60200260200101516000015187858151811061035557fe5b60200260200101516020015188868151811061036d57fe5b60200260200101516040015192509250925060005a9050600080856001600160a01b031685856040516103a09190610698565b60006040518083038160008787f1925050503d80600081146103de576040519150601f19603f3d011682016040523d82523d6000602084013e6103e3565b606091505b509150915060005a84039050604051806060016040528084151581526020018281526020018381525089898151811061041857fe5b6020026020010181905250505050505050508080600101915050610323565b50915091565b6000546001600160a01b031681565b6001600160a01b03163190565b6002604360981b0181565b6000546001600160a01b031633146104af576040805162461bcd60e51b81526020600482015260096024820152682327a92124a22222a760b91b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051806060016040528060001515815260200160008152602001606081525090565b80356001600160a01b038116811461050b57600080fd5b919050565b600060208284031215610521578081fd5b61052a826104f4565b9392505050565b60008060408385031215610543578081fd5b61054c836104f4565b946020939093013593505050565b6000602080838503121561056c578182fd5b823567ffffffffffffffff80821115610583578384fd5b818501915085601f830112610596578384fd5b8135818111156105a257fe5b6105af8485830201610773565b81815284810190848601875b848110156106895781358701601f196060828e03820112156105db578a8bfd5b60408051606081018181108b821117156105f157fe5b82526105fe848d016104f4565b8152818401358c82015260608401358a811115610619578d8efd5b8085019450508e603f85011261062d578c8dfd5b8b8401358a81111561063b57fe5b61064b8d85601f84011601610773565b93508084528f83828701011115610660578d8efd5b808386018e86013783018c018d90529081019190915285525092870192908701906001016105bb565b50909998505050505050505050565b600082516106aa818460208701610797565b9190910192915050565b6001600160a01b0391909116815260200190565b90815260200190565b600060408083018584526020828186015281865180845260609350838701915083838202880101838901875b8381101561076357898303605f19018552815180511515845286810151878501528801518884018890528051888501819052608061074082828801858c01610797565b96880196601f91909101601f1916949094019093019250908501906001016106fd565b50909a9950505050505050505050565b60405181810167ffffffffffffffff8111828210171561078f57fe5b604052919050565b60005b838110156107b257818101518382015260200161079a565b838111156107c1576000848401525b5050505056fea26469706673582212205aa7517ce331b71aa83ff291f1c7fe42356037d01e198631fc81f9485d27eb2264736f6c634300070600330000000000000000000000003b143ca171194c97183ef51b0d56554aa68d0588

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063481c6a751161005b578063481c6a75146100d45780634d2301cc146100e957806397d75776146100fc578063d0ebdbe7146101045761007d565b806305bafd92146100825780630f28c97d146100ab5780631749e1e3146100b3575b600080fd5b610095610090366004610531565b610119565b6040516100a291906106c8565b60405180910390f35b6100956102c2565b6100c66100c136600461055a565b6102c6565b6040516100a29291906106d1565b6100dc61043d565b6040516100a291906106b4565b6100956100f7366004610510565b61044c565b6100dc610459565b610117610112366004610510565b610464565b005b600080546001600160a01b03163314610165576040805162461bcd60e51b81526020600482015260096024820152682327a92124a22222a760b91b604482015290519081900360640190fd5b816101f2576040805163662aa11d60e01b81523060048201526001600160a01b038516602482015290516002604360981b019163662aa11d9160448083019260209291908290030181600087803b1580156101bf57600080fd5b505af11580156101d3573d6000803e3d6000fd5b505050506040513d60208110156101e957600080fd5b5051905061027d565b60408051630951888f60e01b81523060048201526001600160a01b03851660248201526044810184905290516002604360981b0191630951888f9160648083019260209291908290030181600087803b15801561024e57600080fd5b505af1158015610262573d6000803e3d6000fd5b505050506040513d602081101561027857600080fd5b505190505b6040805182815290516001600160a01b038516917f5eadc4013530f38d8b7709b47915d0cef30eee941dad69669a5b45e0686879fa919081900360200190a292915050565b4290565b8051439060609067ffffffffffffffff811180156102e357600080fd5b5060405190808252806020026020018201604052801561031d57816020015b61030a6104d1565b8152602001906001900390816103025790505b50905060005b835181101561043757600080600086848151811061033d57fe5b60200260200101516000015187858151811061035557fe5b60200260200101516020015188868151811061036d57fe5b60200260200101516040015192509250925060005a9050600080856001600160a01b031685856040516103a09190610698565b60006040518083038160008787f1925050503d80600081146103de576040519150601f19603f3d011682016040523d82523d6000602084013e6103e3565b606091505b509150915060005a84039050604051806060016040528084151581526020018281526020018381525089898151811061041857fe5b6020026020010181905250505050505050508080600101915050610323565b50915091565b6000546001600160a01b031681565b6001600160a01b03163190565b6002604360981b0181565b6000546001600160a01b031633146104af576040805162461bcd60e51b81526020600482015260096024820152682327a92124a22222a760b91b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051806060016040528060001515815260200160008152602001606081525090565b80356001600160a01b038116811461050b57600080fd5b919050565b600060208284031215610521578081fd5b61052a826104f4565b9392505050565b60008060408385031215610543578081fd5b61054c836104f4565b946020939093013593505050565b6000602080838503121561056c578182fd5b823567ffffffffffffffff80821115610583578384fd5b818501915085601f830112610596578384fd5b8135818111156105a257fe5b6105af8485830201610773565b81815284810190848601875b848110156106895781358701601f196060828e03820112156105db578a8bfd5b60408051606081018181108b821117156105f157fe5b82526105fe848d016104f4565b8152818401358c82015260608401358a811115610619578d8efd5b8085019450508e603f85011261062d578c8dfd5b8b8401358a81111561063b57fe5b61064b8d85601f84011601610773565b93508084528f83828701011115610660578d8efd5b808386018e86013783018c018d90529081019190915285525092870192908701906001016105bb565b50909998505050505050505050565b600082516106aa818460208701610797565b9190910192915050565b6001600160a01b0391909116815260200190565b90815260200190565b600060408083018584526020828186015281865180845260609350838701915083838202880101838901875b8381101561076357898303605f19018552815180511515845286810151878501528801518884018890528051888501819052608061074082828801858c01610797565b96880196601f91909101601f1916949094019093019250908501906001016106fd565b50909a9950505050505050505050565b60405181810167ffffffffffffffff8111828210171561078f57fe5b604052919050565b60005b838110156107b257818101518382015260200161079a565b838111156107c1576000848401525b5050505056fea26469706673582212205aa7517ce331b71aa83ff291f1c7fe42356037d01e198631fc81f9485d27eb2264736f6c63430007060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003b143ca171194c97183ef51b0d56554aa68d0588

-----Decoded View---------------
Arg [0] : _manager (address): 0x3B143ca171194C97183eF51B0d56554AA68d0588

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003b143ca171194c97183ef51b0d56554aa68d0588


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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