ETH Price: $3,248.84 (+4.66%)
Gas: 56 Gwei

Token

Maple Token (MPL)
 

Overview

Max Total Supply

11,000,000 MPL

Holders

3

Total Transfers

-

Market

Fully Diluted Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

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

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
MapleTokenProxy

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion
File 1 of 3 : MapleTokenProxy.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.18;

import { IMapleTokenInitializerLike, IGlobalsLike } from "./interfaces/Interfaces.sol";
import { IMapleTokenProxy }                         from "./interfaces/IMapleTokenProxy.sol";

contract MapleTokenProxy is IMapleTokenProxy {

    bytes32 internal constant GLOBALS_SLOT        = bytes32(uint256(keccak256("eip1967.proxy.globals")) - 1);
    bytes32 internal constant IMPLEMENTATION_SLOT = bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1);

    constructor(address globals_, address implementation_, address initializer_, address tokenMigrator_) {
        _setAddress(GLOBALS_SLOT, globals_);
        _setAddress(IMPLEMENTATION_SLOT, implementation_);

        ( bool success_, ) = initializer_.delegatecall(abi.encodeWithSelector(
            IMapleTokenInitializerLike(initializer_).initialize.selector,
            tokenMigrator_,
            IGlobalsLike(globals_).mapleTreasury()
        ));

        require(success_, "MTP:INIT_FAILED");
    }

    /**************************************************************************************************************************************/
    /*** Overridden Functions                                                                                                           ***/
    /**************************************************************************************************************************************/

    function setImplementation(address newImplementation_) override external {
        IGlobalsLike globals_ = IGlobalsLike(_globals());

        require(msg.sender == globals_.governor(), "MTP:SI:NOT_GOVERNOR");

        bool isScheduledCall_ = globals_.isValidScheduledCall(msg.sender, address(this), "MTP:SET_IMPLEMENTATION", msg.data);

        require(isScheduledCall_, "MTP:SI:NOT_SCHEDULED");

        globals_.unscheduleCall(msg.sender, "MTP:SET_IMPLEMENTATION", msg.data);

        _setAddress(IMPLEMENTATION_SLOT, newImplementation_);

        emit ImplementationSet(newImplementation_);
    }

    /**************************************************************************************************************************************/
    /*** View Functions                                                                                                                 ***/
    /**************************************************************************************************************************************/

    function _globals() internal view returns (address globals_) {
        globals_ = _getAddress(GLOBALS_SLOT);
    }

    function _implementation() internal view returns (address implementation_) {
        implementation_ = _getAddress(IMPLEMENTATION_SLOT);
    }

    /**************************************************************************************************************************************/
    /*** Utility Functions                                                                                                              ***/
    /**************************************************************************************************************************************/

    function _setAddress(bytes32 slot_, address value_) internal {
        assembly {
            sstore(slot_, value_)
        }
    }

    function _getAddress(bytes32 slot_) internal view returns (address value_) {
        assembly {
            value_ := sload(slot_)
        }
    }

    /**************************************************************************************************************************************/
    /*** Fallback Function                                                                                                              ***/
    /**************************************************************************************************************************************/

    fallback() external {
        address implementation_ = _implementation();

        require(implementation_.code.length != 0, "MTP:F:NO_CODE_ON_IMPLEMENTATION");

        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())
            }
        }
    }

}

File 2 of 3 : Interfaces.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.18;

interface IERC20Like {

    function burn(address from, uint256 value) external;

    function mint(address to, uint256 value) external;

    function totalSupply() external view returns (uint256 totalSupply);

}

interface IGlobalsLike {

    function governor() external view returns (address governor);

    function isInstanceOf(bytes32 instanceKey, address instance) external view returns (bool isInstance);

    function isValidScheduledCall(
        address          caller,
        address          target,
        bytes32          functionId,
        bytes   calldata callData
    ) external view returns (bool isValidScheduledCall);

    function mapleTreasury() external view returns (address mapleTreasury);

    function unscheduleCall(address caller, bytes32 functionId, bytes calldata callData) external;

}

interface IMapleTokenInitializerLike {

    function initialize(address migrator, address treasury) external;

}

interface IMapleTokenLike is IERC20Like {

    function globals() external view returns (address globals);

}

File 3 of 3 : IMapleTokenProxy.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.18;

interface IMapleTokenProxy {

    /**
     *  @dev   Emitted when the implementation address is set.
     *  @param implementation The address of the new implementation.
     */
    event ImplementationSet(address indexed implementation);

    /**
     *  @dev   Sets the implementation address.
     *  @param newImplementation The address to set the implementation to.
     */
    function setImplementation(address newImplementation) external;

}

Settings
{
  "remappings": [
    "address-registry/=modules/address-registry/contracts/",
    "contract-test-utils/=modules/globals/modules/contract-test-utils/contracts/",
    "ds-test/=modules/forge-std/lib/ds-test/src/",
    "erc20/=modules/erc20/",
    "forge-std/=modules/forge-std/src/",
    "globals/=modules/globals/",
    "migrator/=modules/migrator/modules/erc20-helper/src/",
    "non-transparent-proxy/=modules/globals/modules/non-transparent-proxy/",
    "ntp/=modules/ntp/"
  ],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"globals_","type":"address"},{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"address","name":"initializer_","type":"address"},{"internalType":"address","name":"tokenMigrator_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"ImplementationSet","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"address","name":"newImplementation_","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162000db138038062000db18339818101604052810190620000379190620002db565b6200007d60017ff4037508c8ed7f0e515b497cc593e8b40edb624ea4250275737be9ad17ecd74360001c6200006d919062000386565b60001b856200026a60201b60201c565b620000c360017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd60001c620000b3919062000386565b60001b846200026a60201b60201c565b60008273ffffffffffffffffffffffffffffffffffffffff1663485cc95560e01b838773ffffffffffffffffffffffffffffffffffffffff1663a5a276056040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c1565b6040516024016200016a92919062000404565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051620001d69190620004aa565b600060405180830381855af49150503d806000811462000213576040519150601f19603f3d011682016040523d82523d6000602084013e62000218565b606091505b50509050806200025f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002569062000524565b60405180910390fd5b505050505062000546565b8082555050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002a38262000276565b9050919050565b620002b58162000296565b8114620002c157600080fd5b50565b600081519050620002d581620002aa565b92915050565b60008060008060808587031215620002f857620002f762000271565b5b60006200030887828801620002c4565b94505060206200031b87828801620002c4565b93505060406200032e87828801620002c4565b92505060606200034187828801620002c4565b91505092959194509250565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000393826200034d565b9150620003a0836200034d565b9250828203905081811115620003bb57620003ba62000357565b5b92915050565b600060208284031215620003da57620003d962000271565b5b6000620003ea84828501620002c4565b91505092915050565b620003fe8162000296565b82525050565b60006040820190506200041b6000830185620003f3565b6200042a6020830184620003f3565b9392505050565b600081519050919050565b600081905092915050565b60005b83811015620004675780820151818401526020810190506200044a565b60008484015250505050565b6000620004808262000431565b6200048c81856200043c565b93506200049e81856020860162000447565b80840191505092915050565b6000620004b8828462000473565b915081905092915050565b600082825260208201905092915050565b7f4d54503a494e49545f4641494c45440000000000000000000000000000000000600082015250565b60006200050c600f83620004c3565b91506200051982620004d4565b602082019050919050565b600060208201905081810360008301526200053f81620004fd565b9050919050565b61085b80620005566000396000f3fe608060405234801561001057600080fd5b506004361061002f5760003560e01c8063d784d426146100bc57610030565b5b600061003a6100d8565b905060008173ffffffffffffffffffffffffffffffffffffffff163b03610096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161008d9061046c565b60405180910390fd5b3660008037600080366000845af43d6000803e80600081146100b7573d6000f35b3d6000fd5b6100d660048036038101906100d191906104ef565b61011a565b005b600061011560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd60001c61010d9190610555565b60001b6103bb565b905090565b60006101246103c6565b90508073ffffffffffffffffffffffffffffffffffffffff16630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015610171573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610195919061059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610202576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101f990610617565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663fd4c5b3733306000366040518563ffffffff1660e01b815260040161024494939291906106ca565b602060405180830381865afa158015610261573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610285919061074e565b9050806102c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102be906107c7565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663b5ab6dee336000366040518463ffffffff1660e01b8152600401610305939291906107e7565b600060405180830381600087803b15801561031f57600080fd5b505af1158015610333573d6000803e3d6000fd5b5050505061037360017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd60001c61036a9190610555565b60001b84610408565b8273ffffffffffffffffffffffffffffffffffffffff167fab64f92ab780ecbf4f3866f57cee465ff36c89450dcce20237ca7a8d81fb7d1360405160405180910390a2505050565b600081549050919050565b600061040360017ff4037508c8ed7f0e515b497cc593e8b40edb624ea4250275737be9ad17ecd74360001c6103fb9190610555565b60001b6103bb565b905090565b8082555050565b600082825260208201905092915050565b7f4d54503a463a4e4f5f434f44455f4f4e5f494d504c454d454e544154494f4e00600082015250565b6000610456601f8361040f565b915061046182610420565b602082019050919050565b6000602082019050818103600083015261048581610449565b9050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104bc82610491565b9050919050565b6104cc816104b1565b81146104d757600080fd5b50565b6000813590506104e9816104c3565b92915050565b6000602082840312156105055761050461048c565b5b6000610513848285016104da565b91505092915050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006105608261051c565b915061056b8361051c565b925082820390508181111561058357610582610526565b5b92915050565b600081519050610598816104c3565b92915050565b6000602082840312156105b4576105b361048c565b5b60006105c284828501610589565b91505092915050565b7f4d54503a53493a4e4f545f474f5645524e4f5200000000000000000000000000600082015250565b600061060160138361040f565b915061060c826105cb565b602082019050919050565b60006020820190508181036000830152610630816105f4565b9050919050565b610640816104b1565b82525050565b7f4d54503a5345545f494d504c454d454e544154494f4e00000000000000000000815250565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b60006106a9838561066c565b93506106b683858461067d565b6106bf8361068c565b840190509392505050565b60006080820190506106df6000830187610637565b6106ec6020830186610637565b6106f860408301610646565b818103606083015261070b81848661069d565b905095945050505050565b60008115159050919050565b61072b81610716565b811461073657600080fd5b50565b60008151905061074881610722565b92915050565b6000602082840312156107645761076361048c565b5b600061077284828501610739565b91505092915050565b7f4d54503a53493a4e4f545f5343484544554c4544000000000000000000000000600082015250565b60006107b160148361040f565b91506107bc8261077b565b602082019050919050565b600060208201905081810360008301526107e0816107a4565b9050919050565b60006060820190506107fc6000830186610637565b61080860208301610646565b818103604083015261081b81848661069d565b905094935050505056fea2646970667358221220583bc74da5eb153a3c39d44b79854cf31b170a60f8abeb6a6a1442eefade426164736f6c63430008120033000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c0000000000000000000000002feb650302d54c227bb56361005ca3ec7265a40d0000000000000000000000007f3c3636208a18c7941bf051807db568640614650000000000000000000000007b0267c13b994cdb58b8ed3a65b7a09a07432a76

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002f5760003560e01c8063d784d426146100bc57610030565b5b600061003a6100d8565b905060008173ffffffffffffffffffffffffffffffffffffffff163b03610096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161008d9061046c565b60405180910390fd5b3660008037600080366000845af43d6000803e80600081146100b7573d6000f35b3d6000fd5b6100d660048036038101906100d191906104ef565b61011a565b005b600061011560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd60001c61010d9190610555565b60001b6103bb565b905090565b60006101246103c6565b90508073ffffffffffffffffffffffffffffffffffffffff16630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015610171573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610195919061059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610202576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101f990610617565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663fd4c5b3733306000366040518563ffffffff1660e01b815260040161024494939291906106ca565b602060405180830381865afa158015610261573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610285919061074e565b9050806102c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102be906107c7565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663b5ab6dee336000366040518463ffffffff1660e01b8152600401610305939291906107e7565b600060405180830381600087803b15801561031f57600080fd5b505af1158015610333573d6000803e3d6000fd5b5050505061037360017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd60001c61036a9190610555565b60001b84610408565b8273ffffffffffffffffffffffffffffffffffffffff167fab64f92ab780ecbf4f3866f57cee465ff36c89450dcce20237ca7a8d81fb7d1360405160405180910390a2505050565b600081549050919050565b600061040360017ff4037508c8ed7f0e515b497cc593e8b40edb624ea4250275737be9ad17ecd74360001c6103fb9190610555565b60001b6103bb565b905090565b8082555050565b600082825260208201905092915050565b7f4d54503a463a4e4f5f434f44455f4f4e5f494d504c454d454e544154494f4e00600082015250565b6000610456601f8361040f565b915061046182610420565b602082019050919050565b6000602082019050818103600083015261048581610449565b9050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104bc82610491565b9050919050565b6104cc816104b1565b81146104d757600080fd5b50565b6000813590506104e9816104c3565b92915050565b6000602082840312156105055761050461048c565b5b6000610513848285016104da565b91505092915050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006105608261051c565b915061056b8361051c565b925082820390508181111561058357610582610526565b5b92915050565b600081519050610598816104c3565b92915050565b6000602082840312156105b4576105b361048c565b5b60006105c284828501610589565b91505092915050565b7f4d54503a53493a4e4f545f474f5645524e4f5200000000000000000000000000600082015250565b600061060160138361040f565b915061060c826105cb565b602082019050919050565b60006020820190508181036000830152610630816105f4565b9050919050565b610640816104b1565b82525050565b7f4d54503a5345545f494d504c454d454e544154494f4e00000000000000000000815250565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b60006106a9838561066c565b93506106b683858461067d565b6106bf8361068c565b840190509392505050565b60006080820190506106df6000830187610637565b6106ec6020830186610637565b6106f860408301610646565b818103606083015261070b81848661069d565b905095945050505050565b60008115159050919050565b61072b81610716565b811461073657600080fd5b50565b60008151905061074881610722565b92915050565b6000602082840312156107645761076361048c565b5b600061077284828501610739565b91505092915050565b7f4d54503a53493a4e4f545f5343484544554c4544000000000000000000000000600082015250565b60006107b160148361040f565b91506107bc8261077b565b602082019050919050565b600060208201905081810360008301526107e0816107a4565b9050919050565b60006060820190506107fc6000830186610637565b61080860208301610646565b818103604083015261081b81848661069d565b905094935050505056fea2646970667358221220583bc74da5eb153a3c39d44b79854cf31b170a60f8abeb6a6a1442eefade426164736f6c63430008120033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c0000000000000000000000002feb650302d54c227bb56361005ca3ec7265a40d0000000000000000000000007f3c3636208a18c7941bf051807db568640614650000000000000000000000007b0267c13b994cdb58b8ed3a65b7a09a07432a76

-----Decoded View---------------
Arg [0] : globals_ (address): 0x804a6F5F667170F545Bf14e5DDB48C70B788390C
Arg [1] : implementation_ (address): 0x2feb650302d54C227Bb56361005CA3Ec7265a40D
Arg [2] : initializer_ (address): 0x7f3C3636208A18c7941BF051807db56864061465
Arg [3] : tokenMigrator_ (address): 0x7b0267C13B994cdb58b8ED3a65b7A09a07432A76

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c
Arg [1] : 0000000000000000000000002feb650302d54c227bb56361005ca3ec7265a40d
Arg [2] : 0000000000000000000000007f3c3636208a18c7941bf051807db56864061465
Arg [3] : 0000000000000000000000007b0267c13b994cdb58b8ed3a65b7a09a07432a76


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.