ETH Price: $2,609.53 (+2.20%)

Transaction Decoder

Block:
21486834 at Dec-26-2024 01:07:47 PM +UTC
Transaction Fee:
0.00025816290539105 ETH $0.67
Gas Used:
32,650 Gas / 7.906980257 Gwei

Emitted Events:

113 RelayReceiver.FundsForwardedWithData( data=0xB45FF025221CA6ADDA9B7A9E8FDC4D4C3FC79A896DD835DCED92C0629F4E84F5 )

Account State Difference:

  Address   Before After State Difference Code
(beaverbuild)
11.605903785920553163 Eth11.605941526667250913 Eth0.00003774074669775
0x9b61E809...ba6874532
0.005842407737841448 Eth
Nonce: 16
0.004584244832450398 Eth
Nonce: 17
0.00125816290539105
0xf70da978...8dfA3dbEF 19.35861026172166305 Eth19.35961026172166305 Eth0.001

Execution Trace

ETH 0.001 RelayReceiver.b45ff025( )
  • ETH 0.001 0xf70da97812cb96acdf810712aa562db8dfa3dbef.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();
            }
        }
    }