Contract 0x640f843f8e6c3be066a58702a763a91ad1022982

Contract Overview

Balance:
0 tCRO
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x1c5b0c0042c79b475544ee8b1d242595555882ae2e47c0641993147a4284d371Set Handler61306662022-11-17 2:31:2272 days 17 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO0.0955551635210
0x184794362531074d005a2e1a33fe8b9b630b9f015f66dd008368b864eb0b81330x6080604061306522022-11-17 2:30:0772 days 17 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  Contract Creation0 tCRO1.5774893274870
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:575 hrs 56 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xea15d5d3345f5b8402cdd5d9d291c055829f69e1015b3ea9e1e2291ef56dced972760712023-01-28 13:42:266 hrs 13 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xba6772d7286facfcb1e8adde652162082143f33bc01159e5023c5b33cd83282872738372023-01-28 10:19:489 hrs 36 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x1088a23b3d048ee7d957fc8a5b9a40d5333d864bae65668e274ae96d7d9a572f72738342023-01-28 10:19:329 hrs 36 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x31a5d47e3fb5b01855357a940a69dfd95484411211bc49a885649b10103e12cc72738232023-01-28 10:18:339 hrs 37 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xab251d01c7d672b1f8e04ec616e5dd6dfd1d8eb3e20db60408d75003db425d1872738212023-01-28 10:18:229 hrs 37 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x041f33b9134e13e784b7f04b296e8936d1ac96e3c427b0f542a095c3a3cdea2772737052023-01-28 10:07:529 hrs 48 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x6fd88ca59406b89f28c06352e78fcfe5be3f226a4a5e9ecafdb02eb85a49166f72736912023-01-28 10:06:359 hrs 49 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xe96fde1413b608095194e80369e6a653b89df4cdf85ac9ae8f244844773333f672736772023-01-28 10:05:199 hrs 51 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x364037a2665dcba2fefbc7eac159b23943e8d2ebaeb055323faffbee6f8b107072721022023-01-28 7:42:2212 hrs 13 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xdbd02913a9d674b7117f17faa16c9ddd6cf4d1d691d28c7390b0cffb96029fcd72720752023-01-28 7:39:5512 hrs 16 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xdbd02913a9d674b7117f17faa16c9ddd6cf4d1d691d28c7390b0cffb96029fcd72720752023-01-28 7:39:5512 hrs 16 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xb95774b05ede443f7f43e12be4ab2bcdfb77d97f7684a46cd9c2a969c4e9318f72720542023-01-28 7:38:0112 hrs 18 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x0ad40d710d7098320248beee7e4da69865f394d94c7fb7dbbf79f91ac49206a572720432023-01-28 7:37:0112 hrs 19 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x57458e87534226d76b8d6da1cbf1bb28b0195c7c04cbb9b3628aeabf23c2b92272687632023-01-28 2:39:2717 hrs 16 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x366c350f8ad35dbca93fbfd1752b728887fad4a4f98efcc6e112aadfbfb540c972533652023-01-27 3:22:231 day 16 hrs ago 0x63a64503779baa41ebc6f63ad1b37154041fe6eb 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xbb26182b76238431c630c3d874f0501836bfbbeb8e5229933558a42845ecb04072527652023-01-27 2:27:551 day 17 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x561f22556c28cf39d603b530a7b5e2a7180a4018e6ec00c34a2b4d8a2d2ea3c172527492023-01-27 2:26:281 day 17 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x4955b10765851acb0cd8e18c396ce842aca7230ef07401c96e9043874e2a1cec72527112023-01-27 2:23:011 day 17 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x5f05827d4af62744c7ba56e1723d050df0826331dc5cfdb1bd6eba07a9dcb01872399152023-01-26 7:01:282 days 12 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xee11075793a0ddef44e78cc9fae217bacd5e7933065d0eaa4c2d9fe2f57a3d7f72397582023-01-26 6:47:132 days 13 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x7d2c93e367704b956fb8ff062856181db56cc50da00ed1c074a7ff878f5b306172397502023-01-26 6:46:292 days 13 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x623b3635675fe4fb23270ce1842e6daa207ce09f4760fa9a904d943c87b7932872397342023-01-26 6:45:022 days 13 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0x3c19c05d7c1ec2e9c974b51fa878c3ec5f9017e5b436844fe5761b397ba7a1d072396142023-01-26 6:34:082 days 13 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
0xd114fa8bbe2a4c6901e627cdd0592c7aadd1d4e9129056f35eb28e7fc389998472369692023-01-26 2:33:572 days 17 hrs ago 0x80da155776c91f9da570928981c837ad470c3700 0x640f843f8e6c3be066a58702a763a91ad10229820 tCRO
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x614Ab4846A112F20509e487C8f105A425A560C2f

Contract Name:
ReferralStorage

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 5 : ReferralStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../libraries/math/SafeMath.sol";

import "../access/Governable.sol";
import "../peripherals/interfaces/ITimelock.sol";

import "./interfaces/IReferralStorage.sol";

contract ReferralStorage is Governable, IReferralStorage {
    using SafeMath for uint256;

    struct Tier {
        uint256 totalRebate; // e.g. 2400 for 24%
        uint256 discountShare; // 5000 for 50%/50%, 7000 for 30% rebates/70% discount
    }

    uint256 public constant BASIS_POINTS = 10000;

    mapping (address => uint256) public referrerDiscountShares; // to override default value in tier
    mapping (address => uint256) public referrerTiers; // link between user <> tier
    mapping (uint256 => Tier) public tiers;

    mapping (address => bool) public isHandler;

    mapping (bytes32 => address) public override codeOwners;
    mapping (address => bytes32) public traderReferralCodes;

    event SetHandler(address handler, bool isActive);
    event SetTraderReferralCode(address account, bytes32 code);
    event SetTier(uint256 tierId, uint256 totalRebate, uint256 discountShare);
    event SetReferrerTier(address referrer, uint256 tierId);
    event SetReferrerDiscountShare(address referrer, uint256 discountShare);
    event RegisterCode(address account, bytes32 code);
    event SetCodeOwner(address account, address newAccount, bytes32 code);
    event GovSetCodeOwner(bytes32 code, address newAccount);

    modifier onlyHandler() {
        require(isHandler[msg.sender], "ReferralStorage: forbidden");
        _;
    }

    function setHandler(address _handler, bool _isActive) external onlyGov {
        isHandler[_handler] = _isActive;
        emit SetHandler(_handler, _isActive);
    }

    function setTier(uint256 _tierId, uint256 _totalRebate, uint256 _discountShare) external override onlyGov {
        require(_totalRebate <= BASIS_POINTS, "ReferralStorage: invalid totalRebate");
        require(_discountShare <= BASIS_POINTS, "ReferralStorage: invalid discountShare");

        Tier memory tier = tiers[_tierId];
        tier.totalRebate = _totalRebate;
        tier.discountShare = _discountShare;
        tiers[_tierId] = tier;
        emit SetTier(_tierId, _totalRebate, _discountShare);
    }

    function setReferrerTier(address _referrer, uint256 _tierId) external override onlyGov {
        referrerTiers[_referrer] = _tierId;
        emit SetReferrerTier(_referrer, _tierId);
    }

    function setReferrerDiscountShare(uint256 _discountShare) external {
        require(_discountShare <= BASIS_POINTS, "ReferralStorage: invalid discountShare");

        referrerDiscountShares[msg.sender] = _discountShare;
        emit SetReferrerDiscountShare(msg.sender, _discountShare);
    }

    function setTraderReferralCode(address _account, bytes32 _code) external override onlyHandler {
        _setTraderReferralCode(_account, _code);
    }

    function setTraderReferralCodeByUser(bytes32 _code) external {
        _setTraderReferralCode(msg.sender, _code);
    }

    function registerCode(bytes32 _code) external {
        require(_code != bytes32(0), "ReferralStorage: invalid _code");
        require(codeOwners[_code] == address(0), "ReferralStorage: code already exists");

        codeOwners[_code] = msg.sender;
        emit RegisterCode(msg.sender, _code);
    }

    function setCodeOwner(bytes32 _code, address _newAccount) external {
        require(_code != bytes32(0), "ReferralStorage: invalid _code");

        address account = codeOwners[_code];
        require(msg.sender == account, "ReferralStorage: forbidden");

        codeOwners[_code] = _newAccount;
        emit SetCodeOwner(msg.sender, _newAccount, _code);
    }

    function govSetCodeOwner(bytes32 _code, address _newAccount) external override onlyGov {
        require(_code != bytes32(0), "ReferralStorage: invalid _code");

        codeOwners[_code] = _newAccount;
        emit GovSetCodeOwner(_code, _newAccount);
    }

    function getTraderReferralInfo(address _account) external override view returns (bytes32, address) {
        bytes32 code = traderReferralCodes[_account];
        address referrer;
        if (code != bytes32(0)) {
            referrer = codeOwners[code];
        }
        return (code, referrer);
    }

    function _setTraderReferralCode(address _account, bytes32 _code) private {
        traderReferralCodes[_account] = _code;
        emit SetTraderReferralCode(_account, _code);
    }
}

File 2 of 5 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 3 of 5 : Governable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

contract Governable {
    address public gov;

    constructor() public {
        gov = msg.sender;
    }

    modifier onlyGov() {
        require(msg.sender == gov, "Governable: forbidden");
        _;
    }

    function setGov(address _gov) external onlyGov {
        gov = _gov;
    }
}

File 4 of 5 : ITimelock.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface ITimelock {
    function setAdmin(address _admin) external;
    function enableLeverage(address _vault) external;
    function disableLeverage(address _vault) external;
    function setIsLeverageEnabled(address _vault, bool _isLeverageEnabled) external;
    function signalSetGov(address _target, address _gov) external;
}

File 5 of 5 : IReferralStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IReferralStorage {
    function codeOwners(bytes32 _code) external view returns (address);
    function getTraderReferralInfo(address _account) external view returns (bytes32, address);
    function setTraderReferralCode(address _account, bytes32 _code) external;
    function setTier(uint256 _tierId, uint256 _totalRebate, uint256 _discountShare) external;
    function setReferrerTier(address _referrer, uint256 _tierId) external;
    function govSetCodeOwner(bytes32 _code, address _newAccount) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"code","type":"bytes32"},{"indexed":false,"internalType":"address","name":"newAccount","type":"address"}],"name":"GovSetCodeOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bytes32","name":"code","type":"bytes32"}],"name":"RegisterCode","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"newAccount","type":"address"},{"indexed":false,"internalType":"bytes32","name":"code","type":"bytes32"}],"name":"SetCodeOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"handler","type":"address"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"SetHandler","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"discountShare","type":"uint256"}],"name":"SetReferrerDiscountShare","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"tierId","type":"uint256"}],"name":"SetReferrerTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tierId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalRebate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"discountShare","type":"uint256"}],"name":"SetTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bytes32","name":"code","type":"bytes32"}],"name":"SetTraderReferralCode","type":"event"},{"inputs":[],"name":"BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"codeOwners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getTraderReferralInfo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_code","type":"bytes32"},{"internalType":"address","name":"_newAccount","type":"address"}],"name":"govSetCodeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isHandler","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referrerDiscountShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referrerTiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_code","type":"bytes32"}],"name":"registerCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_code","type":"bytes32"},{"internalType":"address","name":"_newAccount","type":"address"}],"name":"setCodeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_handler","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountShare","type":"uint256"}],"name":"setReferrerDiscountShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referrer","type":"address"},{"internalType":"uint256","name":"_tierId","type":"uint256"}],"name":"setReferrerTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tierId","type":"uint256"},{"internalType":"uint256","name":"_totalRebate","type":"uint256"},{"internalType":"uint256","name":"_discountShare","type":"uint256"}],"name":"setTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bytes32","name":"_code","type":"bytes32"}],"name":"setTraderReferralCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_code","type":"bytes32"}],"name":"setTraderReferralCodeByUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiers","outputs":[{"internalType":"uint256","name":"totalRebate","type":"uint256"},{"internalType":"uint256","name":"discountShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"traderReferralCodes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610d59806100326000396000f3fe608060405234801561001057600080fd5b50600436106100f15760003560e01c8063039af9eb146100f657806312d43a511461012c5780631582a0181461015057806336def2c8146101885780633fb8b323146101a757806346ea87af146101d3578063534ef8831461020d57806356b4b2ad1461025457806371a6a79014610280578063836a0187146102a657806385725b58146102cf5780639c8e2de9146102f55780639cb7de4b14610312578063c8b3c46014610340578063cfad57a21461035d578063dfcfa25014610383578063e1e01bf3146103af578063e1f1c4a7146103cc578063ed843134146103d4575b600080fd5b6101136004803603602081101561010c57600080fd5b5035610400565b6040805192835260208301919091528051918290030190f35b610134610419565b604080516001600160a01b039092168252519081900360200190f35b6101766004803603602081101561016657600080fd5b50356001600160a01b0316610428565b60408051918252519081900360200190f35b6101a56004803603602081101561019e57600080fd5b503561043a565b005b6101a5600480360360408110156101bd57600080fd5b506001600160a01b03813516906020013561052e565b6101f9600480360360208110156101e957600080fd5b50356001600160a01b03166105d4565b604080519115158252519081900360200190f35b6102336004803603602081101561022357600080fd5b50356001600160a01b03166105e9565b604080519283526001600160a01b0390911660208301528051918290030190f35b6101a56004803603604081101561026a57600080fd5b506001600160a01b03813516906020013561062f565b6101766004803603602081101561029657600080fd5b50356001600160a01b031661069e565b6101a5600480360360608110156102bc57600080fd5b50803590602081013590604001356106b0565b610176600480360360208110156102e557600080fd5b50356001600160a01b0316610805565b6101a56004803603602081101561030b57600080fd5b5035610817565b6101a56004803603604081101561032857600080fd5b506001600160a01b03813516906020013515156108a7565b6101346004803603602081101561035657600080fd5b5035610958565b6101a56004803603602081101561037357600080fd5b50356001600160a01b0316610973565b6101a56004803603604081101561039957600080fd5b50803590602001356001600160a01b03166109e2565b6101a5600480360360208110156103c557600080fd5b5035610ad7565b610176610ae4565b6101a5600480360360408110156103ea57600080fd5b50803590602001356001600160a01b0316610aea565b6003602052600090815260409020805460019091015482565b6000546001600160a01b031681565b60026020526000908152604090205481565b8061047a576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b6000818152600560205260409020546001600160a01b0316156104ce5760405162461bcd60e51b8152600401808060200182810382526024815260200180610cda6024913960400191505060405180910390fd5b60008181526005602090815260409182902080546001600160a01b03191633908117909155825190815290810183905281517f04f82286a2a3b2ee5c8555de8304dfe2ea70991613213184b73a9e408d2d8029929181900390910190a150565b6000546001600160a01b0316331461057b576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152600260209081526040918290208490558151928352820183905280517f7696855cdbb94bb5a44cb0a95caff6f29173aa1cbfba193834b12b90827ce2bc9281900390910190a15050565b60046020526000908152604090205460ff1681565b6001600160a01b038116600090815260066020526040812054819081811561062557506000818152600560205260409020546001600160a01b03165b9092509050915091565b3360009081526004602052604090205460ff16610690576040805162461bcd60e51b815260206004820152601a6024820152792932b332b93930b629ba37b930b3b29d103337b93134b23232b760311b604482015290519081900360640190fd5b61069a8282610c02565b5050565b60016020526000908152604090205481565b6000546001600160a01b031633146106fd576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b61271082111561073e5760405162461bcd60e51b8152600401808060200182810382526024815260200180610c966024913960400191505060405180910390fd5b61271081111561077f5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cfe6026913960400191505060405180910390fd5b610787610c5b565b50600083815260036020818152604080842081518083018352878152808401878152958990529383528351815593516001909401939093558251868152908101859052808301849052915190917f4ebd23a492b2bd79586cb57cae40d7793408265f20320f68b478b971e696f4c7919081900360600190a150505050565b60066020526000908152604090205481565b6127108111156108585760405162461bcd60e51b8152600401808060200182810382526026815260200180610cfe6026913960400191505060405180910390fd5b336000818152600160209081526040918290208490558151928352820183905280517fbd224f3917462b0fa80805fe3ec29be3a37f664955aad6224e5ece036224c4299281900390910190a150565b6000546001600160a01b031633146108f4576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b6001600160a01b038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517fd373464a39404e5f98fdb4b152b8ba9a094561e97e5c4b4ea11eb18cd9e6695e9281900390910190a15050565b6005602052600090815260409020546001600160a01b031681565b6000546001600160a01b031633146109c0576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a2f576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b81610a6f576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b60008281526005602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518581529182015281517f6431f88c655dd0e2b8d09b6405c007c515c66d67f2998e69c902873a8c8f3e97929181900390910190a15050565b610ae13382610c02565b50565b61271081565b81610b2a576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b6000828152600560205260409020546001600160a01b0316338114610b93576040805162461bcd60e51b815260206004820152601a6024820152792932b332b93930b629ba37b930b3b29d103337b93134b23232b760311b604482015290519081900360640190fd5b60008381526005602090815260409182902080546001600160a01b0386166001600160a01b0319909116811790915582513381529182015280820185905290517f5640856798d41ce9ca0a109b54c20a06eb99ba9c36ab4547115dafb8473cf3979181900360600190a1505050565b6001600160a01b0382166000818152600660209081526040918290208490558151928352820183905280517f43825f14567dda057e821be2e51a5aa79aa51f3907a647e3ed2bd486a01050f19281900390910190a15050565b60405180604001604052806000815260200160008152509056fe476f7665726e61626c653a20666f7262696464656e0000000000000000000000526566657272616c53746f726167653a20696e76616c696420746f74616c526562617465526566657272616c53746f726167653a20696e76616c6964205f636f64650000526566657272616c53746f726167653a20636f646520616c726561647920657869737473526566657272616c53746f726167653a20696e76616c696420646973636f756e745368617265a264697066735822122085d1b1d706bef2b2aaa6429c5ca7e099372c9d46790d98f6f0de3963e771af4164736f6c634300060c0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading