ETH Price: $3,353.53 (-2.79%)
Gas: 2 Gwei

Contract

0x00000000AA467EbA42a3d604B3d74d63B2b6C6Cb
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To Value
199121542024-05-20 15:52:4743 days ago1716220367  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RelayReceiver

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 1 : RelayReceiver.sol
// 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 FundsForwarded();
    event FundsForwardedWithData(bytes data);

    // --- Fields ---

    address private immutable SOLVER;

    // --- Constructor ---

    constructor(address solver) {
        SOLVER = solver;
    }

    // --- Public methods ---

    receive() external payable {
        send(SOLVER, msg.value);
        emit FundsForwarded();
    }

    fallback() external payable {
        send(SOLVER, msg.value);
        emit FundsForwarded();
    }

    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();
        }
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "solady/=lib/solady/",
    "magic-spend/=lib/magic-spend/",
    "multicaller/=lib/multicaller/",
    "v2-core/=lib/v2-core/",
    "v2-periphery/=lib/v2-periphery/",
    "permit2/=lib/permit2/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts/security/=lib/magic-spend/lib/openzeppelin-contracts/contracts/utils/",
    "FreshCryptoLib/=lib/magic-spend/lib/smart-wallet/lib/FreshCryptoLib/solidity/src/",
    "Multicaller/=lib/Multicaller/src/",
    "account-abstraction/=lib/magic-spend/lib/account-abstraction/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
    "forge-std/=lib/forge-std/src/",
    "fuzzlib/=lib/magic-spend/lib/fuzzlib/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "p256-verifier/=lib/magic-spend/lib/smart-wallet/lib/p256-verifier/",
    "smart-wallet/=lib/magic-spend/lib/smart-wallet/",
    "solmate/=lib/permit2/lib/solmate/",
    "webauthn-sol/=lib/magic-spend/lib/smart-wallet/lib/webauthn-sol/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"solver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallFailed","type":"error"},{"inputs":[],"name":"NativeTransferFailed","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[],"name":"FundsForwarded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"FundsForwardedWithData","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"forward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct RelayReceiver.Call[]","name":"calls","type":"tuple[]"}],"name":"makeCalls","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a03461007757601f6104b538819003918201601f19168301916001600160401b0383118484101761007c5780849260209460405283398101031261007757516001600160a01b0381168103610077576080526040516104229081610093823960805181818160b801528181610160015261037c0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040526004361015610026575b361561001e5761001c610376565b005b61001c610376565b6000803560e01c908163d948d46814610049575063dd4ed8370361000e57610110565b602036600319011261010d5767ffffffffffffffff60043581811161010957366023820112156101095780600401359182116101095736602483830101116101095760406024917f936c2ca3b35d2d0b24057b0675c459e4515f48fe132d138e213ae59ffab7f53e936100dc347f00000000000000000000000000000000000000000000000000000000000000006103c7565b8083519485936020855282602086015201848401378181018301869052601f01601f19168101030190a180f35b8280fd5b80fd5b6020806003193601126102095760049067ffffffffffffffff9082358281116102095736602382011215610209578060040135928311610209576024810190602436918560051b010111610209577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101f85760005b83811061019a57005b6101ad6101a882868561020e565b6102c3565b805160009081906001600160a01b0316926040938785830151920151918883519301915af16101da610350565b50156101e95750600101610191565b51633204506f60e01b81528590fd5b6040516282b42960e81b8152600490fd5b600080fd5b91908110156102305760051b81013590605e1981360301821215610209570190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b604051906060820182811067ffffffffffffffff82111761027c57604052565b610246565b6040519190601f01601f1916820167ffffffffffffffff81118382101761027c57604052565b67ffffffffffffffff811161027c57601f01601f191660200190565b606081360312610209576102d561025c565b9080356001600160a01b03811681036102095782526020908181013567ffffffffffffffff81116102095781019136601f840112156102095782359061032261031d836102a7565b610281565b9180835236828287010111610209578181600092826040980183870137840101528401520135604082015290565b3d15610371573d9061036461031d836102a7565b9182523d6000602084013e565b606090565b6103a0347f00000000000000000000000000000000000000000000000000000000000000006103c7565b7f4c995d67adb0cb7b809d0281cf3388fc87502a20f2ca89a171173633592cfd06600080a1565b60008080938193620186a0f1156103da57565b604051633d2cec6f60e21b8152600490fdfea26469706673582212205e9fade547f920b402ac9661b11b71dc809a70200e397449e9d1e8378991b34664736f6c63430008170033000000000000000000000000f70da97812cb96acdf810712aa562db8dfa3dbef

Deployed Bytecode

0x60806040526004361015610026575b361561001e5761001c610376565b005b61001c610376565b6000803560e01c908163d948d46814610049575063dd4ed8370361000e57610110565b602036600319011261010d5767ffffffffffffffff60043581811161010957366023820112156101095780600401359182116101095736602483830101116101095760406024917f936c2ca3b35d2d0b24057b0675c459e4515f48fe132d138e213ae59ffab7f53e936100dc347f000000000000000000000000f70da97812cb96acdf810712aa562db8dfa3dbef6103c7565b8083519485936020855282602086015201848401378181018301869052601f01601f19168101030190a180f35b8280fd5b80fd5b6020806003193601126102095760049067ffffffffffffffff9082358281116102095736602382011215610209578060040135928311610209576024810190602436918560051b010111610209577f000000000000000000000000f70da97812cb96acdf810712aa562db8dfa3dbef6001600160a01b031633036101f85760005b83811061019a57005b6101ad6101a882868561020e565b6102c3565b805160009081906001600160a01b0316926040938785830151920151918883519301915af16101da610350565b50156101e95750600101610191565b51633204506f60e01b81528590fd5b6040516282b42960e81b8152600490fd5b600080fd5b91908110156102305760051b81013590605e1981360301821215610209570190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b604051906060820182811067ffffffffffffffff82111761027c57604052565b610246565b6040519190601f01601f1916820167ffffffffffffffff81118382101761027c57604052565b67ffffffffffffffff811161027c57601f01601f191660200190565b606081360312610209576102d561025c565b9080356001600160a01b03811681036102095782526020908181013567ffffffffffffffff81116102095781019136601f840112156102095782359061032261031d836102a7565b610281565b9180835236828287010111610209578181600092826040980183870137840101528401520135604082015290565b3d15610371573d9061036461031d836102a7565b9182523d6000602084013e565b606090565b6103a0347f000000000000000000000000f70da97812cb96acdf810712aa562db8dfa3dbef6103c7565b7f4c995d67adb0cb7b809d0281cf3388fc87502a20f2ca89a171173633592cfd06600080a1565b60008080938193620186a0f1156103da57565b604051633d2cec6f60e21b8152600490fdfea26469706673582212205e9fade547f920b402ac9661b11b71dc809a70200e397449e9d1e8378991b34664736f6c63430008170033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000f70da97812cb96acdf810712aa562db8dfa3dbef

-----Decoded View---------------
Arg [0] : solver (address): 0xf70da97812CB96acDF810712Aa562db8dfA3dbEF

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f70da97812cb96acdf810712aa562db8dfa3dbef


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.