ETH Price: $3,608.38 (+6.95%)

Token

Fidelity Digital Interest Token (FDIT)
 

Overview

Max Total Supply

235,380,680.87 FDIT

Holders

3 (0.00%)

Transfers

-
0

Market

Price

$1.00 @ 0.000277 ETH

Onchain Market Cap

$235,380,680.87

Circulating Supply Market Cap

$235,380,681.00

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Fidelity® Treasury Digital Fund seeks to obtain as high a level of current income as is consistent with preservation of capital and liquidity. Ownership in the Fund is represented by FDIT.

# Exchange Pair Price  24H Volume % Volume

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x2312767e...C638f8C8E
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ERC20RevocableComplianceToken

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 9 : ERC20RevocableComplianceToken.sol
// Copyright 2024 DTCC All Rights Reserved
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;

// prettier-ignore
import { 
    ERC20RevocableComplianceTokenStorageLib 
} from "contracts/registry-layer/tokens-factory/tokens/ERC-20-revocable-compliance/ERC20RevocableComplianceTokenStorageLib.sol";
import { IERC20Events } from "contracts/registry-layer/tokens-factory/tokens/interfaces/IERC20Events.sol";
import { IERC20TokenInit } from "contracts/registry-layer/tokens-factory/tokens/interfaces/IERC20TokenInit.sol";
import { IERC20RevocableComplianceErrors } from "contracts/registry-layer/tokens-factory/tokens/interfaces/IERC20RevocableComplianceErrors.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { ShortStrings } from "@openzeppelin/contracts/utils/ShortStrings.sol";
import { UpgradabilityStorageLib } from "core-contexts-contracts/contracts/common/contracts/upgradability/UpgradabilityStorageLib.sol";

/// @title Compliance Aware Token Framework (ERC-20)
/// @dev This contract implements the ERC-20 token standard, which includes basic, controlled, and clawback functions.
contract ERC20RevocableComplianceToken is IERC20Events, IERC20RevocableComplianceErrors {
    /// @notice ERC20 token constructor
    /// @param name_ Token name
    /// @param symbol_ Token symbol
    /// @param decimals_ Token decimals
    /// @param totalSupply_ Total supply of tokens
    /// @param tokensRecipient_ Address to receive the tokens
    /// @param setup_ Setup contract address
    /// @param initializationOwner Address of the initialization owner
    constructor(
        string memory name_,
        string memory symbol_,
        uint8 decimals_,
        uint256 totalSupply_,
        address tokensRecipient_,
        address setup_,
        address initializationOwner
    ) {
        // upgradability storage - ERC-7201
        UpgradabilityStorageLib.UpgradabilityStorage storage upgradabilityStorage = UpgradabilityStorageLib
            ._getUpgradabilityStorage();

        ERC20RevocableComplianceTokenStorageLib.ERC20RevocableComplianceTokenStorage
            storage revStorage = ERC20RevocableComplianceTokenStorageLib._getRevComplianceTokenStorage();

        if (setup_ == address(0)) revert ERC20RevocableComplianceNoSetupError();
        if (
            (bytes(symbol_).length == 0) ||
            (bytes(symbol_).length >= ERC20RevocableComplianceTokenStorageLib.MAX_SYMBOL_LENGTH)
        ) revert ERC20RevocableComplianceSymbolLengthError();
        if (decimals_ == 0) revert ERC20RevocableComplianceInvalidDecimalsError();
        if (bytes(name_).length == 0) revert ERC20RevocableComplianceEmptyNameError();
        if (initializationOwner == address(0)) revert ERC20RevocableComplianceEmptyInitializationOwnerError();

        upgradabilityStorage._initializationOwnerAddress = initializationOwner;
        upgradabilityStorage._methodsImplementations[IERC20TokenInit.initialize.selector] = setup_;
        upgradabilityStorage._methodsImplementations[IERC165.supportsInterface.selector] = setup_;

        revStorage._tokenName = name_;
        revStorage._symbol = symbol_;
        revStorage._decimals = decimals_;
        revStorage._transferEnabled = true; // By default, transfers are enabled

        if (totalSupply_ > 0) {
            if (tokensRecipient_ == address(0)) {
                revert ERC20RevocableComplianceEmptyRecipientError();
            }

            revStorage._totalSupply = totalSupply_;
            revStorage._balances[tokensRecipient_] = totalSupply_;

            emit Transfer(address(0), tokensRecipient_, totalSupply_);
        }

        string memory version = "1";
        revStorage._name = ShortStrings.toShortStringWithFallback(name_, revStorage._nameFallback);
        revStorage._version = ShortStrings.toShortStringWithFallback(version, revStorage._versionFallback);
        revStorage._hashedName = keccak256(bytes(name_));
        revStorage._hashedVersion = keccak256(bytes(version));
        revStorage._cachedChainId = block.chainid;
        revStorage._cachedThis = address(this);
    }

    /// @notice Fallback function to reject Ether deposits
    // solhint-disable-next-line comprehensive-interface
    receive() external payable {
        revert ERC20RevocableComplianceEtherDepositError();
    }

    /// @notice Fallback function allowing delegatecall.
    /// @notice This function will return whatever the implementation call returns
    fallback() external payable {
        address _impl = UpgradabilityStorageLib._getUpgradabilityStorage()._methodsImplementations[msg.sig];
        if (_impl == address(0)) {
            revert ERC20RevocableComplianceNoMethodFoundError();
        }

        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(gas(), _impl, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())
            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ShortStrings.sol)

pragma solidity ^0.8.20;

import {StorageSlot} from "./StorageSlot.sol";

// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |
// | length  | 0x                                                              BB |
type ShortString is bytes32;

/**
 * @dev This library provides functions to convert short memory strings
 * into a `ShortString` type that can be used as an immutable variable.
 *
 * Strings of arbitrary length can be optimized using this library if
 * they are short enough (up to 31 bytes) by packing them with their
 * length (1 byte) in a single EVM word (32 bytes). Additionally, a
 * fallback mechanism can be used for every other case.
 *
 * Usage example:
 *
 * ```solidity
 * contract Named {
 *     using ShortStrings for *;
 *
 *     ShortString private immutable _name;
 *     string private _nameFallback;
 *
 *     constructor(string memory contractName) {
 *         _name = contractName.toShortStringWithFallback(_nameFallback);
 *     }
 *
 *     function name() external view returns (string memory) {
 *         return _name.toStringWithFallback(_nameFallback);
 *     }
 * }
 * ```
 */
library ShortStrings {
    // Used as an identifier for strings longer than 31 bytes.
    bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;

    error StringTooLong(string str);
    error InvalidShortString();

    /**
     * @dev Encode a string of at most 31 chars into a `ShortString`.
     *
     * This will trigger a `StringTooLong` error is the input string is too long.
     */
    function toShortString(string memory str) internal pure returns (ShortString) {
        bytes memory bstr = bytes(str);
        if (bstr.length > 31) {
            revert StringTooLong(str);
        }
        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
    }

    /**
     * @dev Decode a `ShortString` back to a "normal" string.
     */
    function toString(ShortString sstr) internal pure returns (string memory) {
        uint256 len = byteLength(sstr);
        // using `new string(len)` would work locally but is not memory safe.
        string memory str = new string(32);
        assembly ("memory-safe") {
            mstore(str, len)
            mstore(add(str, 0x20), sstr)
        }
        return str;
    }

    /**
     * @dev Return the length of a `ShortString`.
     */
    function byteLength(ShortString sstr) internal pure returns (uint256) {
        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
        if (result > 31) {
            revert InvalidShortString();
        }
        return result;
    }

    /**
     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
     */
    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
        if (bytes(value).length < 32) {
            return toShortString(value);
        } else {
            StorageSlot.getStringSlot(store).value = value;
            return ShortString.wrap(FALLBACK_SENTINEL);
        }
    }

    /**
     * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     */
    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
            return toString(value);
        } else {
            return store;
        }
    }

    /**
     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using
     * {setWithFallback}.
     *
     * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
     */
    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
            return byteLength(value);
        } else {
            return bytes(store).length;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC-1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * TIP: Consider using this library along with {SlotDerivation}.
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct Int256Slot {
        int256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Int256Slot` with member `value` located at `slot`.
     */
    function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        assembly ("memory-safe") {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns a `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        assembly ("memory-safe") {
            r.slot := store.slot
        }
    }
}

File 5 of 9 : ERC20RevocableComplianceTokenStorageLib.sol
// Copyright 2024 DTCC All Rights Reserved
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;

import { ShortStrings, ShortString } from "@openzeppelin/contracts/utils/ShortStrings.sol";

/// @title ERC-20 Revocable Compliance Token Storage Lib
/// @dev This contract stores the state variables and mappings for the ERC-20 Revocable Compliance Token.
library ERC20RevocableComplianceTokenStorageLib {
    using ShortStrings for *;
    /// @dev Typehash for the permit signature
    bytes32 internal constant PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /// @dev Maximum symbol length
    uint256 internal constant MAX_SYMBOL_LENGTH = 13;

    // keccak256(abi.encode(uint256(keccak256("ERC20RevocableComplianceToken")) - 1)) & ~bytes32(uint256(0xff));
    bytes32 private constant ERC20_REVOCABLE_COMPLIANCE_TOKEN_STORAGE =
        0x59c84f74e8795e95cfd01b0c712622439ce9a0b5f8b037d0deaff99670e24100;

    /// @dev Mapping of token holder to their nonce
    bytes32 internal constant TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    /// @dev Storage of the ERC20RevocableComplianceToken contract.
    /// It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
    /// when using with upgradeable contracts.
    /// @custom:storage-location erc7201:ERC20RevocableComplianceToken
    // solhint-disable-next-line ordering
    struct ERC20RevocableComplianceTokenStorage {
        /// @dev Number of decimal places for the token
        uint8 _decimals;
        /// @dev Flag indicating if the token transfers are enabled
        bool _transferEnabled;
        /// @dev Whitelist context address
        address _complianceAddress;
        /// @dev Total supply of the token
        uint256 _totalSupply;
        /// @dev Name of the token
        string _tokenName;
        /// @dev Symbol of the token
        string _symbol;
        /// @dev Flag indicating if an address is frozen
        mapping(address walletAddress => bool frozenFlag) _frozen;
        /// @dev Balances of token holders
        mapping(address tokenHolder => uint256 tokenBalance) _balances;
        /// @dev Amount of tokens frozen for an address
        mapping(address tokenHolder => uint256 frozenBalance) _frozenAmounts;
        /// @dev Allowed token transfers between addresses
        mapping(address owner => mapping(address spender => uint256 tokenAmount)) _allowed;
        /// @dev Cache the domain separator
        bytes32 _cachedDomainSeparator;
        /// @dev cache the chain id
        uint256 _cachedChainId;
        /// @dev cache the this address
        address _cachedThis;
        /// @dev cache the name hash
        bytes32 _hashedName;
        /// @dev cache the version hash
        bytes32 _hashedVersion;
        /// @dev Short string for the name
        ShortString _name;
        /// @dev Short string for the version
        ShortString _version;
        /// @dev Short string for the version
        string _versionFallback;
        /// @dev Short string for the name
        string _nameFallback;
        /// @dev Nonces for permit
        mapping(address => uint256) _nonces;
    }

    /// @dev Returns the storage slot for the ERC20RevocableComplianceTokenStorage struct.
    function _getRevComplianceTokenStorage() internal pure returns (ERC20RevocableComplianceTokenStorage storage s) {
        bytes32 position = ERC20_REVOCABLE_COMPLIANCE_TOKEN_STORAGE;
        assembly {
            s.slot := position
        }
    }
}

File 6 of 9 : IERC20Events.sol
// Copyright 2024 DTCC All Rights Reserved
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;

/// @title Interface for ERC-20 ERC20 token events
/// @dev This interface defines the events related to ERC-20 ERC20 tokens.
interface IERC20Events {
    /// @notice Emit when tokens are transferred
    /// @param from The address tokens are transferred from
    /// @param to The address tokens are transferred to
    /// @param value The amount of tokens transferred
    event Transfer(address indexed from, address indexed to, uint256 value);

    /// @notice Emit when approval occurs
    /// @param owner The address that approves the tokens
    /// @param spender The address that is approved to spend the tokens
    /// @param value The amount of tokens approved
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 7 of 9 : IERC20RevocableComplianceErrors.sol
// SPDX-License-Identifier: BUSL-1.1
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)

pragma solidity 0.8.22;

/// @title CAT-20 Revocable Compliance Errors
interface IERC20RevocableComplianceErrors {
    /// @dev Error thrown when no setup is performed for ERC20RevocableCompliance.
    error ERC20RevocableComplianceNoSetupError();

    /// @dev Error thrown when the decimals value is invalid for ERC20RevocableCompliance.
    error ERC20RevocableComplianceInvalidDecimalsError();

    /// @dev Error thrown when the name is empty for ERC20RevocableCompliance.
    error ERC20RevocableComplianceEmptyNameError();

    /// @dev Error thrown when the initialization owner address is empty for ERC20RevocableCompliance.
    error ERC20RevocableComplianceEmptyInitializationOwnerError();

    /// @dev Error thrown when the recipient address is empty for ERC20RevocableCompliance.
    error ERC20RevocableComplianceEmptyRecipientError();

    /// @dev Error thrown when minting to an empty address for ERC20RevocableCompliance.
    error ERC20RevocableComplianceMintToEmptyAddressError();

    /// @dev Error thrown when no method is found for ERC20RevocableCompliance.
    error ERC20RevocableComplianceNoMethodFoundError();

    /// @dev Error thrown when an ether deposit is made for ERC20RevocableCompliance.
    error ERC20RevocableComplianceEtherDepositError();

    /// @dev Error thrown when the symbol length is invalid for ERC20RevocableCompliance.
    error ERC20RevocableComplianceSymbolLengthError();

    /// @dev Error thrown when the address is invalid for ERC20RevocableCompliance.
    error ERC20RevocableComplianceInvalidAddressError();

    /// @dev Error thrown when the spender is the same as the owner for ERC20RevocableCompliance.
    error ERC20RevocableComplianceSameSpenderError();

    /// @dev Error thrown when the spender has insufficient token balance.
    error ERC20RevocableComplianceInsufficientBalanceError();

    /// @dev Error thrown when the address is zero for ERC20RevocableCompliance contract.
    error ERC20RevocableComplianceZeroAddressError();

    /// @dev Error thrown when transfer is not allowed for ERC20RevocableCompliance.
    error ERC20RevocableComplianceTransferNotAllowedError();

    /// @dev Error thrown when the value is invalid for ERC20RevocableCompliance.
    error ERC20RevocableComplianceInvalidValueError();

    /// @dev Error thrown when no admin role is found for ERC20RevocableCompliance.
    error ERC20RevocableComplianceNoAdminRoleError();

    /// @dev Error thrown when the input array lengths are inconsistent for ERC20RevocableCompliance contract.
    error ERC20RevocableComplianceInconsistentInputArrayLengthsError();

    /// @dev Error thrown when the array lengths are inconsistent for ERC20RevocableCompliance.
    error ERC20RevocableComplianceInconsistentArrayLengths();

    /// @dev Error thrown when the owner address is empty for ERC20RevocableCompliance.
    error ERC20RevocableComplianceEmptyOwnerAddressError();

    /// @dev Error thrown when the updates repository address is empty for ERC20RevocableCompliance.
    error ERC20RevocableComplianceEmptyUpdatesRepositoryError();

    /// @dev Error thrown when the account is not frozen for ERC20RevocableCompliance.
    error ERC20RevocableComplianceAccountNotFrozen();

    /// @dev Error thrown when the address is not whitelisted for ERC20RevocableCompliance.
    error ERC20RevocableComplianceAddressNotWhitelisted();

    /// @dev Error thrown when an unsupported interface is encountered for ERC20RevocableCompliance.
    error ERC20RevocableComplianceUnsupportedInterface();

    /// @dev Error thrown when the address is empty.
    error ERC20RevocableComplianceEmptyAddressError(string error);

    /// @dev Error thrown when a frozen address is encountered for ERC20RevocableCompliance contract.
    error ERC20RevocableComplianceFrozenAddress();

    /// @dev Error thrown when the same context is encountered for ERC20RevocableCompliance.
    error ERC20RevocableComplianceSameContextError();

    /// @dev Error thrown when invalid account nonce is encountered for ERC20RevocableCompliance contract.
    error InvalidAccountNonce(address account, uint256 currentNonce);

    /// @dev error thrown when the transfer is not enabled for ERC20RevocableCompliance.
    error ERC20RevocableComplianceTransferNotEnabled();

    /// @dev Error thrown when the transfer is already disabled for ERC20RevocableCompliance.
    error ERC20RevocableComplianceTransferAlreadyDisabled();

    /// @dev Error thrown when the transfer is already enabled for ERC20RevocableCompliance.
    error ERC20RevocableComplianceTransferAlreadyEnabled();
}

File 8 of 9 : IERC20TokenInit.sol
// Copyright 2024 DTCC All Rights Reserved
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;

/// @title ERC-20 token init package interface
/// @dev This interface defines the functions for initializing a ERC-20 token smart contract.
interface IERC20TokenInit {
    /// @notice Initialize smart contract with msg sender as owner
    /// @param name Token name
    /// @param description Token description
    /// @param updatesRepository Updates repository address
    /// @param controller Token controller
    /// @param extraBytes Extra bytes
    function initialize(
        string calldata name,
        string calldata description,
        address updatesRepository,
        address controller,
        bytes memory extraBytes
    ) external;
}

// Copyright 2024 DTCC All Rights Reserved
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;

/// @title UpgradabilityStorage
/// @notice Storage contract for upgradable contracts.
library UpgradabilityStorageLib {
    // keccak256(abi.encode(uint256(keccak256("Upgradability")) - 1)) & ~bytes32(uint256(0xff));
    bytes32 private constant UPGRADABILITY_STORAGE_LOCATION =
        0x79e2f5364a1794e543a069ea9d772e7a103a0756ed0aae5fe6d593fa5df39f00;

    /// @dev Storage of the Upgradability contract.
    /// It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
    /// when using with upgradeable contracts.
    /// @custom:storage-location erc7201:upgradability
    // solhint-disable-next-line ordering
    struct UpgradabilityStorage {
        // Address of the initialization owner
        address _initializationOwnerAddress;
        // Address of the updates repository
        address _updatesRepositoryAddress;
        // Mapping of method selectors to their implementation addresses
        mapping(bytes4 methodSelector => address implementationAddress) _methodsImplementations;
        // packageAddress => functionSelectors
        mapping(address packageAddress => bytes4[] functionSelectors) _packageFunctionSelectors;
        // Mapping of interface identifiers to their support status
        mapping(bytes4 interfaceId => bool isSupported) _supportedInterfaces;
    }

    /// @notice Returns the storage slot of UpgradabilityStorage struct
    function _getUpgradabilityStorage() internal pure returns (UpgradabilityStorage storage _storage) {
        assembly {
            _storage.slot := UPGRADABILITY_STORAGE_LOCATION
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200,
    "details": {
      "yul": false
    }
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"uint256","name":"totalSupply_","type":"uint256"},{"internalType":"address","name":"tokensRecipient_","type":"address"},{"internalType":"address","name":"setup_","type":"address"},{"internalType":"address","name":"initializationOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ERC20RevocableComplianceAccountNotFrozen","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceAddressNotWhitelisted","type":"error"},{"inputs":[{"internalType":"string","name":"error","type":"string"}],"name":"ERC20RevocableComplianceEmptyAddressError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceEmptyInitializationOwnerError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceEmptyNameError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceEmptyOwnerAddressError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceEmptyRecipientError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceEmptyUpdatesRepositoryError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceEtherDepositError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceFrozenAddress","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceInconsistentArrayLengths","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceInconsistentInputArrayLengthsError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceInsufficientBalanceError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceInvalidAddressError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceInvalidDecimalsError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceInvalidValueError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceMintToEmptyAddressError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceNoAdminRoleError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceNoMethodFoundError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceNoSetupError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceSameContextError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceSameSpenderError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceSymbolLengthError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceTransferAlreadyDisabled","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceTransferAlreadyEnabled","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceTransferNotAllowedError","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceTransferNotEnabled","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceUnsupportedInterface","type":"error"},{"inputs":[],"name":"ERC20RevocableComplianceZeroAddressError","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

0x608060405234801561001057600080fd5b506040516108aa3803806108aa83398101604081905261002f916104ac565b7f79e2f5364a1794e543a069ea9d772e7a103a0756ed0aae5fe6d593fa5df39f007f59c84f74e8795e95cfd01b0c712622439ce9a0b5f8b037d0deaff99670e241006001600160a01b0384166100985760405163654222bf60e01b815260040160405180910390fd5b875115806100a85750600d885110155b156100c657604051633c4f672360e01b815260040160405180910390fd5b8660ff166000036100ea57604051636d5ad1a760e01b815260040160405180910390fd5b885160000361010c57604051636504034160e11b815260040160405180910390fd5b6001600160a01b0383166101335760405163293757d560e21b815260040160405180910390fd5b81546001600160a01b038085166001600160a01b0319928316178455633bff838760e21b6000908152600280860160205260408083208054948a16948616851790556301ffc9a760e01b8352909120805490931690911790915581016101998a82610661565b50600381016101a88982610661565b50805461ffff191660ff8816176101001781558515610244576001600160a01b0385166101e857604051630e2c52df60e01b815260040160405180910390fd5b600181018690556001600160a01b0385166000818152600583016020526040808220899055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061023b908a90610724565b60405180910390a35b6040805180820190915260018152603160f81b60208201526102698a601084016102c2565b600d83015561027b81600f84016102c2565b600e830155895160209a8b0120600b8301558051990198909820600c8901555050466009870155505050600a90920180546001600160a01b03191630179055506107c39050565b60006020835110156102de576102d7836102f5565b90506102ef565b816102e98482610661565b5060ff90505b92915050565b600080829050601f81511115610329578260405163305a27a960e01b81526004016103209190610762565b60405180910390fd5b805161033482610784565b179392505050565b90565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b038211171561037a5761037a61033f565b6040525050565b600061038c60405190565b90506103988282610355565b919050565b60006001600160401b038211156103b6576103b661033f565b601f19601f83011660200192915050565b60005b838110156103e25781810151838201526020016103ca565b50506000910152565b60006103fe6103f98461039d565b610381565b90508281526020810184848401111561041957610419600080fd5b6104248482856103c7565b509392505050565b600082601f83011261044057610440600080fd5b81516104508482602086016103eb565b949350505050565b60ff81165b811461046857600080fd5b50565b80516102ef81610458565b8061045d565b80516102ef81610476565b60006001600160a01b0382166102ef565b61045d81610487565b80516102ef81610498565b600080600080600080600060e0888a0312156104ca576104ca600080fd5b87516001600160401b038111156104e3576104e3600080fd5b6104ef8a828b0161042c565b97505060208801516001600160401b0381111561050e5761050e600080fd5b61051a8a828b0161042c565b965050604061052b8a828b0161046b565b955050606061053c8a828b0161047c565b945050608061054d8a828b016104a1565b93505060a061055e8a828b016104a1565b92505060c061056f8a828b016104a1565b91505092959891949750929550565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806105a857607f821691505b6020821081036105ba576105ba61057e565b50919050565b60006102ef61033c8381565b6105d5836105c0565b815460001960089490940293841b1916921b91909117905550565b60006105fd8184846105cc565b505050565b8181101561061d576106156000826105f0565b600101610602565b5050565b601f8211156105fd576000818152602090206020601f850104810160208510156106485750805b61065a6020601f860104830182610602565b5050505050565b81516001600160401b0381111561067a5761067a61033f565b6106848254610594565b61068f828285610621565b6020601f8311600181146106c357600084156106ab5750858201515b600019600886021c198116600286021786555061071c565b600085815260208120601f198616915b828110156106f357888501518255602094850194600190920191016106d3565b8683101561070f5784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b818152602081016102ef565b600061073a825190565b8084526020840193506107518185602086016103c7565b601f01601f19169290920192915050565b602080825281016107738184610730565b9392505050565b60006102ef825190565b600061078e825190565b6020830161079b8161077a565b925060208210156107bc576107b7600019836020036008021b90565b831692505b5050919050565b60d9806107d16000396000f3fe608060405236602157604051632941de4360e11b815260040160405180910390fd5b600080356001600160e01b03191681527f79e2f5364a1794e543a069ea9d772e7a103a0756ed0aae5fe6d593fa5df39f0260205260409020546001600160a01b0316806080576040516322dda0d360e01b815260040160405180910390fd5b3660008037600080366000845af43d6000803e808015609e573d6000f35b3d6000fdfea264697066735822122014a95a1f66f3a336ee9018fa1a810ef840ca651150e210ce33b173e3e4d9307d64736f6c6343000816003300000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000627a42797a007939c750df07d57520f405b52a9c00000000000000000000000037116dc2b2d8cc1a26446288ce193bd2ca25f632000000000000000000000000e4526f097a318212fb39988b685abd6455d8335e000000000000000000000000000000000000000000000000000000000000001f466964656c697479204469676974616c20496e74657265737420546f6b656e0000000000000000000000000000000000000000000000000000000000000000044644495400000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405236602157604051632941de4360e11b815260040160405180910390fd5b600080356001600160e01b03191681527f79e2f5364a1794e543a069ea9d772e7a103a0756ed0aae5fe6d593fa5df39f0260205260409020546001600160a01b0316806080576040516322dda0d360e01b815260040160405180910390fd5b3660008037600080366000845af43d6000803e808015609e573d6000f35b3d6000fdfea264697066735822122014a95a1f66f3a336ee9018fa1a810ef840ca651150e210ce33b173e3e4d9307d64736f6c63430008160033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.