Contract

0xE3374041F173FFCB0026A82C6EEf94409F713Cf9

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Init22426232025-01-02 9:36:593 days ago1735810619IN
0xE3374041...09F713Cf9
0 S0.000157721.39285714
Init Proxy22426202025-01-02 9:36:573 days ago1735810617IN
0xE3374041...09F713Cf9
0 S0.000068171.39285714

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Proxy

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
No with 200 runs

Other Settings:
shanghai EvmVersion
File 1 of 4 : Proxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import "../base/UpgradeableProxy.sol";
import "../../interfaces/IControllable.sol";
import "../../interfaces/IProxy.sol";

/// @title Proxy for Stability Platform core contracts.
/// @dev ERC-1967: Proxy Storage Slots used.
/// @author JodsMigel (https://github.com/JodsMigel)
contract Proxy is UpgradeableProxy, IProxy {
    /// @inheritdoc IProxy
    function initProxy(address logic_) external override {
        _init(logic_);
    }

    /// @inheritdoc IProxy
    //slither-disable-next-line naming-convention
    function upgrade(address _newImplementation) external override {
        if (IControllable(address(this)).platform() != msg.sender) {
            revert IControllable.NotPlatform();
        }
        _upgradeTo(_newImplementation);
        // the new contract must have the same ABI and you must have the power to change it again
        if (IControllable(address(this)).platform() != msg.sender) {
            revert IControllable.NotPlatform();
        }
    }

    /// @inheritdoc IProxy
    function implementation() external view override returns (address) {
        return _implementation();
    }
}

File 2 of 4 : UpgradeableProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

/// @title Simple ERC-1967 upgradeable proxy implementation
abstract contract UpgradeableProxy {
    error ImplementationIsNotContract();

    /// @dev This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
    bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /// @dev Emitted when the implementation is upgraded.
    event Upgraded(address indexed implementation);

    constructor() {
        assert(_IMPLEMENTATION_SLOT == bytes32(uint(keccak256("eip1967.proxy.implementation")) - 1));
    }

    /// @dev Post deploy initialisation for compatability with EIP-1167 factory
    function _init(address _logic) internal {
        // nosemgrep
        require(_implementation() == address(0), "Already inited");
        _setImplementation(_logic);
    }

    /// @dev Returns the current implementation address.
    function _implementation() internal view virtual returns (address impl) {
        bytes32 slot = _IMPLEMENTATION_SLOT;
        // solhint-disable-next-line no-inline-assembly
        //slither-disable-next-line assembly
        assembly {
            impl := sload(slot)
        }
    }

    /// @dev Upgrades the proxy to a new implementation.
    function _upgradeTo(address newImplementation) internal virtual {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /// @dev Stores a new address in the EIP1967 implementation slot.
    function _setImplementation(address newImplementation) private {
        if (newImplementation.code.length == 0) revert ImplementationIsNotContract();
        bytes32 slot = _IMPLEMENTATION_SLOT;
        // solhint-disable-next-line no-inline-assembly
        //slither-disable-next-line assembly
        assembly {
            sstore(slot, newImplementation)
        }
    }

    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _delegate(address implementation) internal virtual {
        //slither-disable-next-line assembly
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
            // delegatecall returns 0 on error.
            case 0 { revert(0, returndatasize()) }
            default { return(0, returndatasize()) }
        }
    }

    /**
     * @dev Delegates the current call to the address returned by `_implementation()`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _delegate(_implementation());
    }

    /// @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
    /// function in the contract matches the call data.
    //slither-disable-next-line locked-ether
    fallback() external payable virtual {
        _fallback();
    }

    /// @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
    /// is empty.
    //slither-disable-next-line locked-ether
    receive() external payable virtual {
        _fallback();
    }
}

File 3 of 4 : IControllable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

/// @dev Base core interface implemented by most platform contracts.
///      Inherited contracts store an immutable Platform proxy address in the storage,
///      which provides authorization capabilities and infrastructure contract addresses.
/// @author Alien Deployer (https://github.com/a17)
/// @author JodsMigel (https://github.com/JodsMigel)
interface IControllable {
    //region ----- Custom Errors -----
    error IncorrectZeroArgument();
    error IncorrectMsgSender();
    error NotGovernance();
    error NotMultisig();
    error NotGovernanceAndNotMultisig();
    error NotOperator();
    error NotFactory();
    error NotPlatform();
    error NotVault();
    error IncorrectArrayLength();
    error AlreadyExist();
    error NotExist();
    error NotTheOwner();
    error ETHTransferFailed();
    error IncorrectInitParams();
    //endregion -- Custom Errors -----

    event ContractInitialized(address platform, uint ts, uint block);

    /// @notice Stability Platform main contract address
    function platform() external view returns (address);

    /// @notice Version of contract implementation
    /// @dev SemVer scheme MAJOR.MINOR.PATCH
    //slither-disable-next-line naming-convention
    function VERSION() external view returns (string memory);

    /// @notice Block number when contract was initialized
    function createdBlock() external view returns (uint);
}

File 4 of 4 : IProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

/// @dev Proxy of core contract implementation
interface IProxy {
    /// @dev Initialize proxy logic. Need to call after deploy new proxy.
    /// @param logic Address of core contract implementation
    function initProxy(address logic) external;

    /// @notice Upgrade proxy implementation (contract logic).
    /// @dev Upgrade execution allowed only for Platform contract.
    /// An upgrade of any core contract proxy is always part of a platform time locked upgrade,
    /// with a change in the platform version.
    /// @param newImplementation New implementation address
    function upgrade(address newImplementation) external;

    /// @notice Return current logic implementation
    /// @return Address of implementation contract
    function implementation() external view returns (address);
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@solady/=lib/solady/src/",
    "ds-test/=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/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "solady/=lib/solady/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ImplementationIsNotContract","type":"error"},{"inputs":[],"name":"NotPlatform","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"logic_","type":"address"}],"name":"initProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newImplementation","type":"address"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561000f575f80fd5b5060017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd5f1c61003f91906100ad565b5f1b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b14610072576100716100e0565b5b61010d565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6100b782610077565b91506100c283610077565b92508282039050818111156100da576100d9610080565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52600160045260245ffd5b6105dd8061011a5f395ff3fe608060405260043610610037575f3560e01c80630900f010146100505780635c60da1b146100785780639c020061146100a257610046565b36610046576100446100ca565b005b61004e6100ca565b005b34801561005b575f80fd5b506100766004803603810190610071919061049d565b6100dc565b005b348015610083575f80fd5b5061008c61028a565b60405161009991906104d7565b60405180910390f35b3480156100ad575f80fd5b506100c860048036038101906100c3919061049d565b610298565b005b6100da6100d56102a4565b6102d3565b565b3373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16634bde38c86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561013c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101609190610504565b73ffffffffffffffffffffffffffffffffffffffff16146101ad576040517fb5eff68000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101b6816102f2565b3373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16634bde38c86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610216573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061023a9190610504565b73ffffffffffffffffffffffffffffffffffffffff1614610287576040517fb5eff68000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b5f6102936102a4565b905090565b6102a181610341565b50565b5f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b9050805491505090565b365f80375f80365f845af43d5f803e805f81146102ee573d5ff35b3d5ffd5b6102fb816103c2565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b5f73ffffffffffffffffffffffffffffffffffffffff166103606102a4565b73ffffffffffffffffffffffffffffffffffffffff16146103b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ad90610589565b60405180910390fd5b6103bf816103c2565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff163b03610412576040517fe84f0f9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b90508181555050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61046c82610443565b9050919050565b61047c81610462565b8114610486575f80fd5b50565b5f8135905061049781610473565b92915050565b5f602082840312156104b2576104b161043f565b5b5f6104bf84828501610489565b91505092915050565b6104d181610462565b82525050565b5f6020820190506104ea5f8301846104c8565b92915050565b5f815190506104fe81610473565b92915050565b5f602082840312156105195761051861043f565b5b5f610526848285016104f0565b91505092915050565b5f82825260208201905092915050565b7f416c726561647920696e697465640000000000000000000000000000000000005f82015250565b5f610573600e8361052f565b915061057e8261053f565b602082019050919050565b5f6020820190508181035f8301526105a081610567565b905091905056fea2646970667358221220e54e6b5b8574b868877b23f395a22b5012e20dc93ebe20a2ce5e9f18eece6fd364736f6c63430008170033

Deployed Bytecode

0x608060405260043610610037575f3560e01c80630900f010146100505780635c60da1b146100785780639c020061146100a257610046565b36610046576100446100ca565b005b61004e6100ca565b005b34801561005b575f80fd5b506100766004803603810190610071919061049d565b6100dc565b005b348015610083575f80fd5b5061008c61028a565b60405161009991906104d7565b60405180910390f35b3480156100ad575f80fd5b506100c860048036038101906100c3919061049d565b610298565b005b6100da6100d56102a4565b6102d3565b565b3373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16634bde38c86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561013c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101609190610504565b73ffffffffffffffffffffffffffffffffffffffff16146101ad576040517fb5eff68000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101b6816102f2565b3373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16634bde38c86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610216573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061023a9190610504565b73ffffffffffffffffffffffffffffffffffffffff1614610287576040517fb5eff68000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b5f6102936102a4565b905090565b6102a181610341565b50565b5f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b9050805491505090565b365f80375f80365f845af43d5f803e805f81146102ee573d5ff35b3d5ffd5b6102fb816103c2565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b5f73ffffffffffffffffffffffffffffffffffffffff166103606102a4565b73ffffffffffffffffffffffffffffffffffffffff16146103b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ad90610589565b60405180910390fd5b6103bf816103c2565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff163b03610412576040517fe84f0f9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b90508181555050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61046c82610443565b9050919050565b61047c81610462565b8114610486575f80fd5b50565b5f8135905061049781610473565b92915050565b5f602082840312156104b2576104b161043f565b5b5f6104bf84828501610489565b91505092915050565b6104d181610462565b82525050565b5f6020820190506104ea5f8301846104c8565b92915050565b5f815190506104fe81610473565b92915050565b5f602082840312156105195761051861043f565b5b5f610526848285016104f0565b91505092915050565b5f82825260208201905092915050565b7f416c726561647920696e697465640000000000000000000000000000000000005f82015250565b5f610573600e8361052f565b915061057e8261053f565b602082019050919050565b5f6020820190508181035f8301526105a081610567565b905091905056fea2646970667358221220e54e6b5b8574b868877b23f395a22b5012e20dc93ebe20a2ce5e9f18eece6fd364736f6c63430008170033

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.