ETH Price: $2,021.74 (+0.02%)

Transaction Decoder

Block:
21458586 at Dec-22-2024 02:18:47 PM +UTC
Transaction Fee:
0.00024734629231095 ETH $0.50
Gas Used:
32,650 Gas / 7.575690423 Gwei

Emitted Events:

226 RelayReceiver.FundsForwardedWithData( data=0x1819473D70C78025D679FFD7A8388693CFFF4C9865CB3139B0708B91AE360E27 )

Account State Difference:

  Address   Before After State Difference Code
0x040b8028...A123F0887
0.032026209720469775 Eth
Nonce: 140
0.031348449044158825 Eth
Nonce: 141
0.00067776067631095
(Titan Builder)
9.10389519114195416 Eth9.10392471175268436 Eth0.0000295206107302
0xf70da978...8dfA3dbEF
(Relay: Solver)
79.587570231793022744 Eth79.588000646177022744 Eth0.000430414384

Execution Trace

ETH 0.000430414384 RelayReceiver.1819473d( )
  • ETH 0.000430414384 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();
            }
        }
    }