Overview
Max Total Supply
0 SBADT
Holders
0
Transfers
-
0
Market
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
UUPSProxy
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 300 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;
import {UUPSUtils} from 'libs/UUPS/UUPSUtils.sol';
/// @title UUPSProxy
/// @notice Upgradeable proxy contract following the ERC-1967 and UUPS standards.
/// @dev Stores the implementation address in a specific storage slot to avoid conflicts with the implementation's storage layout.
contract UUPSProxy {
/* ======== Constructor ======== */
/// @notice Initializes the proxy with an initial implementation and optional setup call.
/// @param implementation The address of the initial implementation contract.
/// @param _data Optional initialization calldata to delegatecall to the implementation.
constructor(address implementation, bytes memory _data) payable {
UUPSUtils.upgradeToAndCall(implementation, _data);
}
/* ======== External/Public Functions ======== */
/// @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.
fallback() external payable {
_delegate(_implementation());
}
/* ======== Internal Functions ======== */
/// @notice Returns the current implementation address used by the proxy.
/// @return address of the current implementation contract.
function _implementation() internal view returns (address) {
return UUPSUtils.getImplementation();
}
/// @dev Delegates the current call to `implementation`.
/// Copies calldata, performs delegatecall, and returns or reverts with the returned data.
/// @param implementation The address of the contract to delegatecall to.
function _delegate(address implementation) internal {
// Use assembly to copy calldata and delegatecall in a simplest way.
// The assembly code performs the following actions:
// 1. Copies the calldata from the current environment to memory.
// 2. Performs a delegatecall to the implementation contract.
// 3. Copies the return data from the delegatecall to memory.
// 4. Returns or reverts based on the success of the delegatecall.
// solhint-disable-next-line no-inline-assembly
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(
gas(),
implementation,
0,
calldatasize(),
0,
0
)
returndatacopy(0, 0, returndatasize())
switch result
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
}// SPDX-License-Identifier: LicenseRef-SBA-DepositToken
pragma solidity ^0.8.28;
import {IERC1967} from './interface/IERC1967.sol';
import {IERC1822Proxiable} from './interface/IERC1822.sol';
/**
* @title UUPSUtils
* @notice Provides utility functions for UUPS proxies, including implementation retrieval, upgrade execution, and safety checks.
* @dev This library offers a collection of functions designed to simplify the implementation of UUPS (Universal Upgradeable Proxy Standard) proxies.
*/
library UUPSUtils {
/* ======== Custom Errors ======== */
error ERC1967InvalidImplementation(address implementation);
error ERC1967NonPayable();
error FailedCall();
error AddressEmptyCode(address target);
/* ======== Constants ======== */
/** @dev Storage slot for the implementation address (EIP-1967 standard).
* bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)
*/
bytes32 internal constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/** @dev The address of the current implementation. */
function getImplementation()
internal
view
returns (address implementation)
{
// Store the new implementation address in the ERC-1967 slot.
// solhint-disable-next-line no-inline-assembly
assembly ('memory-safe') {
implementation := sload(IMPLEMENTATION_SLOT)
}
}
/**
* @notice Upgrades the implementation and optionally performs a setup call.
* @param newImplementation The address of the new implementation contract.
* @param data Optional initialization calldata to delegatecall to the new implementation.
*/
function upgradeToAndCall(
address newImplementation,
bytes memory data
) internal {
_setImplementation(newImplementation);
emit IERC1967.Upgraded(newImplementation);
if (data.length > 0) {
_safeFunctionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/** @notice Reverts if msg.value is not zero. */
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
/**
* @notice Stores a new address in the ERC-1967 implementation slot.
* @param newImplementation The address to store as the new implementation.
*/
function _setImplementation(address newImplementation) private {
_checkValidImplementation(newImplementation);
// solhint-disable-next-line no-inline-assembly
assembly ('memory-safe') {
sstore(IMPLEMENTATION_SLOT, newImplementation)
}
}
/**
* @dev Ensures the function is not called through delegatecall.
* @notice This function checks that the provided address is a valid UUPS implementation contract by verifying its proxiableUUID.
* It reverts with `UUPSUtils.ERC1967InvalidImplementation` if the provided address is not a valid implementation.
* @param newImplementation The address of the new implementation contract.
*/
function _checkValidImplementation(address newImplementation) private view {
// Implementation address cannot be empty
if (newImplementation == address(0)) {
revert ERC1967InvalidImplementation(newImplementation);
}
// Implementation address must contain code
if (address(newImplementation).code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
// Check that the new implementation exposes the proxiableUUID function and that it returns the expected value.
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (
bytes32 slot
) {
if (slot != IMPLEMENTATION_SLOT) {
revert ERC1967InvalidImplementation(newImplementation);
}
} catch {
revert ERC1967InvalidImplementation(newImplementation);
}
}
/**
* @notice Performs a delegatecall to the target address with the given data and verifies the result.
* @param _target The address to delegatecall to.
* @param _data The data to send with the delegatecall.
* @return _returndata The data returned by the delegatecall.
* @dev Bubbles up revert reasons or custom errors if the call fails.
*/
function _safeFunctionDelegateCall(
address _target,
bytes memory _data
) private returns (bytes memory) {
// low level call is validate to prevent low-level call reentrancy or other low-level call errors
// solhint-disable-next-line avoid-low-level-calls
(bool _success, bytes memory _returndata) = _target.delegatecall(_data);
if (!_success) {
if (_returndata.length > 0) {
// solhint-disable-next-line no-inline-assembly
assembly ('memory-safe') {
let returndata_size := mload(_returndata)
revert(add(32, _returndata), returndata_size)
}
}
revert FailedCall();
}
if (_returndata.length == 0 && _target.code.length == 0) {
revert AddressEmptyCode(_target);
}
return _returndata;
}
}// SPDX-License-Identifier: LicenseRef-SBA-DepositToken
pragma solidity ^0.8.28;
/**
* @title IERC1967
* @dev Interface of ERC1967 events emitted by proxies.
*
* These events are emitted when the proxy's implementation, admin, or beacon are changed.
*/
interface IERC1967 {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation The address of the new implementation.
*/
event Upgraded(address indexed implementation);
}// SPDX-License-Identifier: LicenseRef-SBA-DepositToken
pragma solidity ^0.8.28;
/**
* @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822Proxiable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}{
"remappings": [
"@chainlink-contracts-1.3.0/=dependencies/@chainlink-contracts-1.3.0/",
"@gnosis-pm-safe-contracts-1.3.0/=dependencies/@gnosis-pm-safe-contracts-1.3.0/",
"forge-std/=dependencies/forge-std-1.9.4/src/",
"safe-global-safe-smart-account-1.4.1-3/=dependencies/safe-global-safe-smart-account-1.4.1-3/",
"solmate-6.8.0/=dependencies/solmate-6.8.0/",
"forge-std-1.9.4/=dependencies/forge-std-1.9.4/src/",
"@openzeppelin-contracts-5.3.0/=dependencies/@openzeppelin-contracts-5.3.0/"
],
"optimizer": {
"enabled": true,
"runs": 300
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"}]Contract Creation Code
6080604052604051610494380380610494833981016040819052610022916102da565b61002c8282610033565b50506103d6565b61003c82610091565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156100855761008082826100ab565b505050565b61008d610184565b5050565b61009a816101a5565b5f5160206104745f395f51905f5255565b60605f5f846001600160a01b0316846040516100c791906103a9565b5f60405180830381855af49150503d805f81146100ff576040519150601f19603f3d011682016040523d82523d5f602084013e610104565b606091505b5091509150816101375780511561011e5780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b805115801561014e57506001600160a01b0385163b155b1561017c57604051639996b31560e01b81526001600160a01b03861660048201526024015b60405180910390fd5b949350505050565b34156101a35760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b0381166101d757604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610173565b806001600160a01b03163b5f0361020c57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610173565b806001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610266575060408051601f3d908101601f19168201909252610263918101906103bf565b60015b61028e57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610173565b5f5160206104745f395f51905f52811461008d57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610173565b634e487b7160e01b5f52604160045260245ffd5b5f5f604083850312156102eb575f5ffd5b82516001600160a01b0381168114610301575f5ffd5b60208401519092506001600160401b0381111561031c575f5ffd5b8301601f8101851361032c575f5ffd5b80516001600160401b03811115610345576103456102c6565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610373576103736102c6565b60405281815282820160200187101561038a575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f82518060208501845e5f920191825250919050565b5f602082840312156103cf575f5ffd5b5051919050565b6092806103e25f395ff3fe60806040526010600c6012565b603f565b005b5f603a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905090565b365f5f375f5f365f845af43d5f5f3e8080156058573d5ff35b3d5ffdfea26469706673582212208b5bcbb830a71eb9fcdaaeeef1578a030d7e5d83013ce8d2852affb0154e25ac64736f6c634300081c0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc00000000000000000000000099305bdb702317b818db8650c8f035aed599b334000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a41f1af7f600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000120000000000000000000000000650d372f5f5defd4226a48e2217de09e01ebb8ec0000000000000000000000000000000000000000000000000000000000000011534241204465706f73697420546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000553424144540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000745286702187f9a49f14bde8d816bd87ff497a2a00000000000000000000000029f0d3e046e1660185f098b906beb0af4e5320bc000000000000000000000000c76297431207096bb3a4118073e52255f8a3c38600000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526010600c6012565b603f565b005b5f603a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905090565b365f5f375f5f365f845af43d5f5f3e8080156058573d5ff35b3d5ffdfea26469706673582212208b5bcbb830a71eb9fcdaaeeef1578a030d7e5d83013ce8d2852affb0154e25ac64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000099305bdb702317b818db8650c8f035aed599b334000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a41f1af7f600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000120000000000000000000000000650d372f5f5defd4226a48e2217de09e01ebb8ec0000000000000000000000000000000000000000000000000000000000000011534241204465706f73697420546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000553424144540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000745286702187f9a49f14bde8d816bd87ff497a2a00000000000000000000000029f0d3e046e1660185f098b906beb0af4e5320bc000000000000000000000000c76297431207096bb3a4118073e52255f8a3c38600000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : implementation (address): 0x99305BDb702317b818dB8650c8F035AEd599B334
Arg [1] : _data (bytes): 0x1f1af7f600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000120000000000000000000000000650d372f5f5defd4226a48e2217de09e01ebb8ec0000000000000000000000000000000000000000000000000000000000000011534241204465706f73697420546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000553424144540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000745286702187f9a49f14bde8d816bd87ff497a2a00000000000000000000000029f0d3e046e1660185f098b906beb0af4e5320bc000000000000000000000000c76297431207096bb3a4118073e52255f8a3c386
-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 00000000000000000000000099305bdb702317b818db8650c8f035aed599b334
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001a4
Arg [3] : 1f1af7f600000000000000000000000000000000000000000000000000000000
Arg [4] : 000000a000000000000000000000000000000000000000000000000000000000
Arg [5] : 000000e000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000001200000000000000000000000000000000000000000000000000000000
Arg [7] : 00000120000000000000000000000000650d372f5f5defd4226a48e2217de09e
Arg [8] : 01ebb8ec00000000000000000000000000000000000000000000000000000000
Arg [9] : 00000011534241204465706f73697420546f6b656e0000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000553424144540000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [13] : 00000003000000000000000000000000745286702187f9a49f14bde8d816bd87
Arg [14] : ff497a2a00000000000000000000000029f0d3e046e1660185f098b906beb0af
Arg [15] : 4e5320bc000000000000000000000000c76297431207096bb3a4118073e52255
Arg [16] : f8a3c38600000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.
Add Token to MetaMask (Web3)