ClaimsProxy

Description:

Proxy contract enabling upgradeable smart contract patterns. Delegates calls to an implementation contract.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "proxy.sol": {
      "content": "// SPDX-License-Identifier: MIT\r
pragma solidity ^0.8.20;\r
\r
/* -------------------------------------------------------------------------- */\r
/*                     Minimal ERC1967 Proxy (for UUPS)                       */\r
/* -------------------------------------------------------------------------- */\r
contract ClaimsProxy {\r
    bytes32 private constant IMPLEMENTATION_SLOT =\r
        0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\r
\r
    constructor(address _logic, bytes memory _data) {\r
        _setImplementation(_logic);\r
        if (_data.length > 0) {\r
            (bool ok, ) = _logic.delegatecall(_data);\r
            require(ok, "init failed");\r
        }\r
    }\r
\r
    function _implementation() internal view returns (address impl) {\r
        bytes32 slot = IMPLEMENTATION_SLOT;\r
        assembly {\r
            impl := sload(slot)\r
        }\r
    }\r
\r
    function _setImplementation(address newImpl) private {\r
        require(newImpl != address(0), "bad impl");\r
        bytes32 slot = IMPLEMENTATION_SLOT;\r
        assembly {\r
            sstore(slot, newImpl)\r
        }\r
    }\r
\r
    fallback() external payable {\r
        _delegate(_implementation());\r
    }\r
\r
    receive() external payable {\r
        _delegate(_implementation());\r
    }\r
\r
    function _delegate(address impl) internal {\r
        assembly {\r
            calldatacopy(0, 0, calldatasize())\r
            let result := delegatecall(gas(), impl, 0, calldatasize(), 0, 0)\r
            returndatacopy(0, 0, returndatasize())\r
            switch result\r
            case 0 {\r
                revert(0, returndatasize())\r
            }\r
            default {\r
                return(0, returndatasize())\r
            }\r
        }\r
    }\r
}"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "remappings": []
  }
}}

Tags:
Proxy, Upgradeable, Factory|addr:0x6eed1ce777f9ab8a75245d6538640ab71b27c106|verified:true|block:23687790|tx:0xb01ed9b5a43fd840410560ef5306708ab005b7c8925b0c3cb39b60396044e66c|first_check:1761825072

Submitted on: 2025-10-30 12:51:15

Comments

Log in to comment.

No comments yet.