账户
0x00...b1a3
0x00...b1a3

0x00...b1a3

$500
此合同的源代码已经过验证!
合同元数据
编译器
0.8.17+commit.8df45f5f
语言
Solidity
合同源代码
文件 1 的 1:Proxy.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;

/**
 * @title Proxy // This is the user's Smart Account
 * @notice Basic proxy that delegates all calls to a fixed implementation contract.
 * @dev    Implementation address is stored in the slot defined by the Proxy's address
 */
contract Proxy {
    // To be compatible with 4337 not yet deployed network users can have the same address
    function setImpl(address _implementation) external {
        require(
            _implementation != address(0),
            "Invalid implementation address"
        );
        address oldImplementation;
        assembly {
            oldImplementation := sload(address())
        }
        require(oldImplementation == address(0), "Implementation already set");
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(address(), _implementation)
        }
    }

    fallback() external payable {
        address target;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            target := sload(address())
            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())
            }
        }
    }
}
设置
{
  "compilationTarget": {
    "contracts/Proxy.sol": "Proxy"
  },
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": []
}
ABI
[{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"name":"setImpl","outputs":[],"stateMutability":"nonpayable","type":"function"}]