Проверенный контрактТочноеMIT
SmartWalletDelegate
Адрес0xcb317abd096f7f2d0fd5d760c559a57feda80dac
- Баланс
0 ETH
- Транзакций
1
- Компилятор
solc 0.8.25
- Тот же код
Только этот контракт
Подробности
- Компилятор
- solc 0.8.25+commit.b61c2a91
- Язык
- solidity
- Оптимизация
- Да, 200 прогонов
- Версия EVM
- cancun
- Лицензия
- MIT
- Совпадение
- Точноекод создания: да, код в сети: да
- Проверен на Sourcify
- Создан в блоке
- 26 492 354
- Транзакция создания
- 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()) }
}
}
}
Настройки компилятораПоказать
{
"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/"
]
}Исходный код и метаданные: Sourcify.
Исходный код принадлежит авторам контракта.