Verified contractExactMIT
SmartWalletDelegate
Address0xcb317abd096f7f2d0fd5d760c559a57feda80dac
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.25
- Same code
Only this contract
Details
- Compiler
- solc 0.8.25+commit.b61c2a91
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,492,354
- Creation transaction
- 0x4ba3bd7a48…92903c921b
src/SmartWalletDelegate.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
interface ISmartWalletBeacon {
function implementation() external view returns (address);
}
/// @notice Minimal delegate installed by EIP-7702 authorization.
///
/// It resolves the implementation from an immutable beacon and delegates all
/// calls. No mutable proxy-admin slot exists, which keeps the manifest's code
/// hash meaningful for the lifetime of a wallet.
contract SmartWalletDelegate {
address public immutable beacon;
error InvalidBeacon();
constructor(address beacon_) {
if (beacon_ == address(0)) revert InvalidBeacon();
beacon = beacon_;
}
receive() external payable { }
fallback() external payable {
address target = ISmartWalletBeacon(beacon).implementation();
assembly ("memory-safe") {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), target, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
}
Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.