ETH Price: $2,281.58 (+3.62%)

Transaction Decoder

Block:
21232778 at Nov-21-2024 01:18:47 AM +UTC
Transaction Fee:
0.00024884364390475 ETH $0.57
Gas Used:
32,650 Gas / 7.621551115 Gwei

Emitted Events:

551 RelayReceiver.FundsForwardedWithData( data=0x05886A9E216DA384233D5E810D62C2EE478023AECF02F68DB10AF63E24A68297 )

Account State Difference:

  Address   Before After State Difference Code
0x7dF18303...0DD6059aF
0.00498422580041945 Eth
Nonce: 18
0.000333548640702759 Eth
Nonce: 19
0.004650677159716691
(beaverbuild)
17.133074758771727255 Eth17.133074791212930505 Eth0.00000003244120325
0xf70da978...8dfA3dbEF
(Relay: Solver)
227.338498510927273501 Eth227.342900344443085442 Eth0.004401833515811941

Execution Trace

ETH 0.004401833515811941 RelayReceiver.05886a9e( )
  • ETH 0.004401833515811941 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();
            }
        }
    }