caelum0x 2b68bde5d5 Predikt: full Polymarket-style prediction market — web + mobile + on-chain + bots
Working tree is now the canonical repo. Off-chain play-money + trustless on-chain
(FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution,
mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 23:29:50 +03:00

1.4 KiB

UUPSUpgradeable

UUPS proxy mixin.

Note:

  • This implementation is intended to be used with ERC1967 proxies. See: LibClone.deployERC1967 and related functions.
  • This implementation is NOT compatible with legacy OpenZeppelin proxies which do not store the implementation at _ERC1967_IMPLEMENTATION_SLOT.

Inherits:

Custom Errors

UpgradeFailed()

error UpgradeFailed()

The upgrade failed.

Events

Upgraded(address)

event Upgraded(address indexed implementation)

Emitted when the proxy's implementation is upgraded.

Storage

_ERC1967_IMPLEMENTATION_SLOT

bytes32 internal constant _ERC1967_IMPLEMENTATION_SLOT =
    0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc

The ERC-1967 storage slot for the implementation in the proxy.
uint256(keccak256("eip1967.proxy.implementation")) - 1.

UUPS Operations

upgradeToAndCall(address,bytes)

function upgradeToAndCall(address newImplementation, bytes calldata data)
    public
    payable
    virtual
    onlyProxy

Upgrades the proxy's implementation to newImplementation.

Emits a Upgraded event.
Note: Passing in empty data skips the delegatecall to newImplementation.