ETH Price: $2,439.26 (+0.71%)

Transaction Decoder

Block:
20213985 at Jul-01-2024 08:13:47 PM +UTC
Transaction Fee:
0.000258930180815868 ETH $0.63
Gas Used:
32,202 Gas / 8.040810534 Gwei

Emitted Events:

432 RelayReceiver.FundsForwardedWithData( data=0x01D92106 )

Account State Difference:

  Address   Before After State Difference Code
0x42982dAf...464844de1
0.12429748466979743 Eth
Nonce: 61
0.10903839687620027 Eth
Nonce: 62
0.01525908779359716
(Titan Builder)
6.912207703952553615 Eth6.912209314052553615 Eth0.0000016101
0xf70da978...8dfA3dbEF
(Relay: Solver)
283.968761312366261899 Eth283.983761469979043191 Eth0.015000157612781292

Execution Trace

ETH 0.015000157612781292 RelayReceiver.CALL( )
  • ETH 0.015000157612781292 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();
            }
        }
    }