ETH Price: $2,447.38 (+10.09%)

Transaction Decoder

Block:
19985854 at May-30-2024 11:12:23 PM +UTC
Transaction Fee:
0.000327196111173246 ETH $0.80
Gas Used:
43,389 Gas / 7.540992214 Gwei

Account State Difference:

  Address   Before After State Difference Code
0x0eAe7281...77dD0D638
0.112352145777664529 Eth
Nonce: 16
0.102024949666491283 Eth
Nonce: 17
0.010327196111173246
3.634077345813275571 Eth3.634098390773654166 Eth0.000021044960378595
0x6378e394...C785D616f 0.006151416751859652 Eth0.010788723654050694 Eth0.004637306902191042
0xb8D1a255...bcA811Dcd 0.006088745111174206 Eth0.011451438208983164 Eth0.005362693097808958

Execution Trace

ETH 0.01 BatchTransfer.distribute( recipients=[0xb8D1a255E0bBc75E1066b5e78172782bcA811Dcd, 0x6378e39475265d4BE93319595fe4787C785D616f], amounts=[5362693097808958, 4637306902191042] )
  • ETH 0.005362693097808958 0xb8d1a255e0bbc75e1066b5e78172782bca811dcd.CALL( )
  • ETH 0.004637306902191042 0x6378e39475265d4be93319595fe4787c785d616f.CALL( )
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    
    contract BatchTransfer {
        function distribute(address[] calldata recipients, uint256[] calldata amounts) external payable {
            require(recipients.length == amounts.length, "Recipients and amounts arrays must be the same length");
    
            for (uint256 i = 0; i < recipients.length; i++) {
                require(address(this).balance >= amounts[i], "Insufficient contract balance");
                payable(recipients[i]).transfer(amounts[i]);
            }
        }
    
        // Fallback function to receive ETH
        receive() external payable {}
    }