Transaction Hash:
Block:
22398081 at May-02-2025 07:03:47 PM +UTC
Transaction Fee:
0.000014215991918112 ETH
$0.03
Gas Used:
32,976 Gas / 0.431101162 Gwei
Emitted Events:
| 515 |
RelayReceiver.FundsForwardedWithData( data=0x4CA426D157EFBD9F1A153E088D52F53328FFE7E75E4061BE9BD024E8683F9FBC865D8597 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x76e2ca91...6bb7d9Fc4 |
0.010546254663295821 Eth
Nonce: 2
|
0.010520649101844395 Eth
Nonce: 3
| 0.000025605561451426 | ||
|
0x95222290...5CC4BAfe5
Miner
| (beaverbuild) | 15.297017366702973245 Eth | 15.297017389786173245 Eth | 0.0000000230832 | |
| 0xf70da978...8dfA3dbEF | (Relay: Solver) | 315.090257335012802275 Eth | 315.090268724582335589 Eth | 0.000011389569533314 |
Execution Trace
ETH 0.000011389569533314
RelayReceiver.4ca426d1( )
- ETH 0.000011389569533314
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();
}
}
}