ETH Price: $2,074.28 (+4.45%)
Gas: 0.19 Gwei

Transaction Decoder

Block:
21439648 at Dec-19-2024 10:47:35 PM +UTC
Transaction Fee:
0.00047272355957845 ETH $0.98
Gas Used:
32,650 Gas / 14.478516373 Gwei

Emitted Events:

376 RelayReceiver.FundsForwardedWithData( data=0x0B5A59A2134B4975B9B8F53E47B6C5E189E5F64405299935A6E1A8193B46F517 )

Account State Difference:

  Address   Before After State Difference Code
0x64B436B5...D38C9001F
0.094358049805515266 Eth
Nonce: 3
0.093766178981536816 Eth
Nonce: 4
0.00059187082397845
(beaverbuild)
5.28712710906691737 Eth5.28717318964441737 Eth0.0000460805775
0xf70da978...8dfA3dbEF
(Relay: Solver)
231.12977344984154979 Eth231.12989259710594979 Eth0.0001191472644

Execution Trace

ETH 0.0001191472644 RelayReceiver.0b5a59a2( )
  • ETH 0.0001191472644 Relay: Solver.CALL( )
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.23;
    contract RelayReceiver {
        // --- Structs ---
        struct Call {
            address to;
            bytes data;
            uint256 value;
        }
        // --- Errors ---
        error CallFailed();
        error NativeTransferFailed();
        error Unauthorized();
        // --- Events ---
        event FundsForwardedWithData(bytes data);
        // --- Fields ---
        address private immutable SOLVER;
        // --- Constructor ---
        constructor(address solver) {
            SOLVER = solver;
        }
        // --- Public methods ---
        fallback() external payable {
            send(SOLVER, msg.value);
            emit FundsForwardedWithData(msg.data);
        }
        function forward(bytes calldata data) external payable {
            send(SOLVER, msg.value);
            emit FundsForwardedWithData(data);
        }
        // --- Restricted methods ---
        function makeCalls(Call[] calldata calls) external payable {
            if (msg.sender != SOLVER) {
                revert Unauthorized();
            }
            unchecked {
                uint256 length = calls.length;
                for (uint256 i; i < length; i++) {
                    Call memory c = calls[i];
                    (bool success, ) = c.to.call{value: c.value}(c.data);
                    if (!success) {
                        revert CallFailed();
                    }
                }
            }
        }
        // --- Internal methods ---
        function send(address to, uint256 value) internal {
            bool success;
            assembly {
                // Save gas by avoiding copying the return data to memory.
                // Provide at most 100k gas to the internal call, which is
                // more than enough to cover common use-cases of logic for
                // receiving native tokens (eg. SCW payable fallbacks).
                success := call(100000, to, value, 0, 0, 0, 0)
            }
            if (!success) {
                revert NativeTransferFailed();
            }
        }
    }