ETH Price: $3,350.27 (-3.92%)

Token

Syrup Token (SYRUP)
 

Overview

Max Total Supply

1,154,930,098 SYRUP

Holders

2,430 ( 0.165%)

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
162.183166622531510187 SYRUP

Value
$0.00
0x860b2f8d682574ef508a94241d40a036877885b2
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Syrup is an onchain capital market, granting permisionless access to private credit.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
MapleTokenProxy

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes 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-helper/=modules/migrator/modules/erc20-helper/src/",
    "erc20/=modules/erc20/",
    "forge-std/=modules/forge-std/src/",
    "globals/=modules/globals/",
    "migrator/=modules/migrator/",
    "mpl-migration/=modules/xmpl/modules/mpl-migration/modules/erc20-helper/src/",
    "non-transparent-proxy/=modules/globals/modules/non-transparent-proxy/",
    "ntp/=modules/ntp/",
    "revenue-distribution-token/=modules/xmpl/modules/revenue-distribution-token/contracts/",
    "xmpl/=modules/xmpl/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "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"}]

608060405234801561001057600080fd5b5060405161081d38038061081d83398101604081905261002f91610214565b61006261005d60017ff4037508c8ed7f0e515b497cc593e8b40edb624ea4250275737be9ad17ecd743610268565b859055565b61009561009060017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610268565b849055565b6000826001600160a01b031663485cc95560e01b83876001600160a01b031663a5a276056040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010c919061028f565b6040516001600160a01b0392831660248201529116604482015260640160408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161016791906102b1565b600060405180830381855af49150503d80600081146101a2576040519150601f19603f3d011682016040523d82523d6000602084013e6101a7565b606091505b50509050806101ee5760405162461bcd60e51b815260206004820152600f60248201526e1355140e9253925517d19052531151608a1b604482015260640160405180910390fd5b50505050506102e0565b80516001600160a01b038116811461020f57600080fd5b919050565b6000806000806080858703121561022a57600080fd5b610233856101f8565b9350610241602086016101f8565b925061024f604086016101f8565b915061025d606086016101f8565b905092959194509250565b8181038181111561028957634e487b7160e01b600052601160045260246000fd5b92915050565b6000602082840312156102a157600080fd5b6102aa826101f8565b9392505050565b6000825160005b818110156102d257602081860181015185830152016102b8565b506000920191825250919050565b61052e806102ef6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d784d426146100bc575b60006100356100cf565b9050806001600160a01b03163b6000036100965760405162461bcd60e51b815260206004820152601f60248201527f4d54503a463a4e4f5f434f44455f4f4e5f494d504c454d454e544154494f4e0060448201526064015b60405180910390fd5b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b005b6100ba6100ca3660046103a2565b610108565b60006101036100ff60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6103c6565b5490565b905090565b600061011261035a565b9050806001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015610152573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017691906103ed565b6001600160a01b0316336001600160a01b0316146101cc5760405162461bcd60e51b815260206004820152601360248201527226aa281d29a49d2727aa2fa3a7ab22a92727a960691b604482015260640161008d565b60405163fd4c5b3760e01b81526000906001600160a01b0383169063fd4c5b3790610201903390309086903690600401610433565b602060405180830381865afa15801561021e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102429190610489565b9050806102885760405162461bcd60e51b81526020600482015260146024820152731355140e94d24e9393d517d4d0d211511553115160621b604482015260640161008d565b604051635ad5b6f760e11b81526001600160a01b0383169063b5ab6dee906102b990339060009036906004016104ab565b600060405180830381600087803b1580156102d357600080fd5b505af11580156102e7573d6000803e3d6000fd5b50610321925061031c9150600190507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6103c6565b849055565b6040516001600160a01b038416907fab64f92ab780ecbf4f3866f57cee465ff36c89450dcce20237ca7a8d81fb7d1390600090a2505050565b60006101036100ff60017ff4037508c8ed7f0e515b497cc593e8b40edb624ea4250275737be9ad17ecd7436103c6565b6001600160a01b038116811461039f57600080fd5b50565b6000602082840312156103b457600080fd5b81356103bf8161038a565b9392505050565b818103818111156103e757634e487b7160e01b600052601160045260246000fd5b92915050565b6000602082840312156103ff57600080fd5b81516103bf8161038a565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b038581168252841660208201527526aa281d29a2aa2fa4a6a82622a6a2a72a20aa24a7a760511b604082015260806060820181905260009061047f908301848661040a565b9695505050505050565b60006020828403121561049b57600080fd5b815180151581146103bf57600080fd5b6001600160a01b03841681527526aa281d29a2aa2fa4a6a82622a6a2a72a20aa24a7a760511b60208201526060604082018190526000906104ef908301848661040a565b9594505050505056fea2646970667358221220ea6d23136d2ab9eb69ba68aeb539a855c1335cbc8e3b677b90c52cf474053cdb64736f6c63430008120033000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c0000000000000000000000006ed767ebcff51533e5181f7bf818f2b9bd767aec000000000000000000000000fe4a4fd3bd2e0eb400355aef5aa1752bc54b30fc0000000000000000000000009c9499edd0cd2dcbc3c9dd5070baf54777ad8f2c

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d784d426146100bc575b60006100356100cf565b9050806001600160a01b03163b6000036100965760405162461bcd60e51b815260206004820152601f60248201527f4d54503a463a4e4f5f434f44455f4f4e5f494d504c454d454e544154494f4e0060448201526064015b60405180910390fd5b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b005b6100ba6100ca3660046103a2565b610108565b60006101036100ff60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6103c6565b5490565b905090565b600061011261035a565b9050806001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015610152573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017691906103ed565b6001600160a01b0316336001600160a01b0316146101cc5760405162461bcd60e51b815260206004820152601360248201527226aa281d29a49d2727aa2fa3a7ab22a92727a960691b604482015260640161008d565b60405163fd4c5b3760e01b81526000906001600160a01b0383169063fd4c5b3790610201903390309086903690600401610433565b602060405180830381865afa15801561021e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102429190610489565b9050806102885760405162461bcd60e51b81526020600482015260146024820152731355140e94d24e9393d517d4d0d211511553115160621b604482015260640161008d565b604051635ad5b6f760e11b81526001600160a01b0383169063b5ab6dee906102b990339060009036906004016104ab565b600060405180830381600087803b1580156102d357600080fd5b505af11580156102e7573d6000803e3d6000fd5b50610321925061031c9150600190507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6103c6565b849055565b6040516001600160a01b038416907fab64f92ab780ecbf4f3866f57cee465ff36c89450dcce20237ca7a8d81fb7d1390600090a2505050565b60006101036100ff60017ff4037508c8ed7f0e515b497cc593e8b40edb624ea4250275737be9ad17ecd7436103c6565b6001600160a01b038116811461039f57600080fd5b50565b6000602082840312156103b457600080fd5b81356103bf8161038a565b9392505050565b818103818111156103e757634e487b7160e01b600052601160045260246000fd5b92915050565b6000602082840312156103ff57600080fd5b81516103bf8161038a565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b038581168252841660208201527526aa281d29a2aa2fa4a6a82622a6a2a72a20aa24a7a760511b604082015260806060820181905260009061047f908301848661040a565b9695505050505050565b60006020828403121561049b57600080fd5b815180151581146103bf57600080fd5b6001600160a01b03841681527526aa281d29a2aa2fa4a6a82622a6a2a72a20aa24a7a760511b60208201526060604082018190526000906104ef908301848661040a565b9594505050505056fea2646970667358221220ea6d23136d2ab9eb69ba68aeb539a855c1335cbc8e3b677b90c52cf474053cdb64736f6c63430008120033

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

000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c0000000000000000000000006ed767ebcff51533e5181f7bf818f2b9bd767aec000000000000000000000000fe4a4fd3bd2e0eb400355aef5aa1752bc54b30fc0000000000000000000000009c9499edd0cd2dcbc3c9dd5070baf54777ad8f2c

-----Decoded View---------------
Arg [0] : globals_ (address): 0x804a6F5F667170F545Bf14e5DDB48C70B788390C
Arg [1] : implementation_ (address): 0x6eD767EBCfF51533E5181f7bf818F2b9bD767aec
Arg [2] : initializer_ (address): 0xfE4a4fd3bd2E0Eb400355aeF5Aa1752bC54B30FC
Arg [3] : tokenMigrator_ (address): 0x9c9499edD0cd2dCBc3C9Dd5070bAf54777AD8F2C

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c
Arg [1] : 0000000000000000000000006ed767ebcff51533e5181f7bf818f2b9bd767aec
Arg [2] : 000000000000000000000000fe4a4fd3bd2e0eb400355aef5aa1752bc54b30fc
Arg [3] : 0000000000000000000000009c9499edd0cd2dcbc3c9dd5070baf54777ad8f2c


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.