Transaction Hash:
Block:
21641841 at Jan-17-2025 04:31:23 AM +UTC
Transaction Fee:
0.000117502500428832 ETH
$0.23
Gas Used:
33,424 Gas / 3.515512818 Gwei
Emitted Events:
| 600 |
RelayReceiver.FundsForwardedWithData( data=0xAF7F9FF2F33448C8FDC13C9267B78A9DB9671B35D33CC0B7DD6EF3F71AD44BB7AF7F9FF2F33448C8FDC13C9267B78A9DB9671B35D33CC0B7DD6EF3F71AD44BB7 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
|
0x95222290...5CC4BAfe5
Miner
| (beaverbuild) | 17.595074101276750289 Eth | 17.595075772476750289 Eth | 0.0000016712 | |
| 0xd89E142b...00318aE38 |
0.074691942457777196 Eth
Nonce: 829
|
0.071369330527748364 Eth
Nonce: 830
| 0.003322611930028832 | ||
| 0xf70da978...8dfA3dbEF | (Relay: Solver) | 326.290991030390797525 Eth | 326.294196139820397525 Eth | 0.0032051094296 |
Execution Trace
ETH 0.0032051094296
RelayReceiver.af7f9ff2( )
- ETH 0.0032051094296
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();
}
}
}