Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Gaming
Overview
Max Total Supply
10,000,000,000 SYNR
Holders
9,421 (0.00%)
Market
Price
$0.00 @ 0.000000 ETH
Onchain Market Cap
$112,000.00
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.05 SYNRValue
$0.00 ( ~0 Eth) [0.0000%]Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SyndicateERC20
Compiler Version
v0.8.1+commit.df193b15
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.1; import "../utils/AddressUtils.sol"; import "../utils/AccessControl.sol"; import "./ERC20Receiver.sol"; /** * @title Syndicate (SYNR) ERC20 token * Original title: Illuvium (ILV) ERC20 token * * @notice Syndicate is a core ERC20 token powering the game. * It serves as an in-game currency, is tradable on exchanges, * it powers up the governance protocol (Syndicate DAO) and participates in Yield Farming. * * @dev Token Summary: * - Symbol: SYNR * - Name: Syndicate * - Decimals: 18 * - Initial token supply: 9,000,000,000 SYNR * - Maximum final token supply: 10,000,000,000 SYNR * - Up to 300,000,000 SYNR may get minted in 3 years period via yield farming * - Mintable: total supply may increase * - Burnable: total supply may decrease * * @dev ?? Token balances and total supply are effectively 192 bits long, meaning that maximum * possible total supply smart contract is able to track is 2^192 (close to 10^40 tokens) * * @dev Smart contract doesn't use safe math. All arithmetic operations are overflow/underflow safe. * Additionally, Solidity 0.8.1 enforces overflow/underflow safety. * * @dev ERC20: reviewed according to https://eips.ethereum.org/EIPS/eip-20 * * @dev ERC20: contract has passed OpenZeppelin ERC20 tests, * see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/test/token/ERC20/ERC20.behavior.js * see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/test/token/ERC20/ERC20.test.js * see adopted copies of these tests in the `test` folder * * @dev ERC223/ERC777: not supported; * send tokens via `safeTransferFrom` and implement `ERC20Receiver.onERC20Received` on the receiver instead * * @dev Multiple Withdrawal Attack on ERC20 Tokens (ISBN:978-1-7281-3027-9) - resolved * Related events and functions are marked with "ISBN:978-1-7281-3027-9" tag: * - event Transferred(address indexed _by, address indexed _from, address indexed _to, uint256 _value) * - event Approved(address indexed _owner, address indexed _spender, uint256 _oldValue, uint256 _value) * - function increaseAllowance(address _spender, uint256 _value) public returns (bool) * - function decreaseAllowance(address _spender, uint256 _value) public returns (bool) * See: https://ieeexplore.ieee.org/document/8802438 * See: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * @author Basil Gorin * Adapted for Syn City by Superpower Labs */ contract SyndicateERC20 is AccessControl { /** * @dev Smart contract unique identifier, a random number * @dev Should be regenerated each time smart contact source code is changed * and changes smart contract itself is to be redeployed * @dev Generated using https://www.random.org/bytes/ */ uint256 public constant TOKEN_UID = 0x83ecb176af7c4f35a45ff0018282e3a05a1018065da866182df12285866f5a2c; /** * @notice Name of the token: Syndicate * * @notice ERC20 name of the token (long name) * * @dev ERC20 `function name() public view returns (string)` * * @dev Field is declared public: getter name() is created when compiled, * it returns the name of the token. */ // solhint-disable-next-line string public constant name = "Syndicate Token"; /** * @notice Symbol of the token: SYNR * * @notice ERC20 symbol of that token (short name) * * @dev ERC20 `function symbol() public view returns (string)` * * @dev Field is declared public: getter symbol() is created when compiled, * it returns the symbol of the token */ // solhint-disable-next-line string public symbol = "SYNR"; event SymbolUpdated(string _symbol); /** * @notice Decimals of the token: 18 * * @dev ERC20 `function decimals() public view returns (uint8)` * * @dev Field is declared public: getter decimals() is created when compiled, * it returns the number of decimals used to get its user representation. * For example, if `decimals` equals `6`, a balance of `1,500,000` tokens should * be displayed to a user as `1,5` (`1,500,000 / 10 ** 6`). * * @dev NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including balanceOf() and transfer(). */ // solhint-disable-next-line uint8 public constant decimals = 18; /** * @notice Max total supply of the token: initially 70% of that max, * with the potential to grow up to the max during yield farming period (3 years) * * @dev ERC20 `function totalSupply() public view returns (uint256)` * * @dev Field is declared public: getter totalSupply() is created when compiled, * it returns the amount of tokens in existence. */ uint256 public maxTotalSupply; // is set up in the constructor /** * @notice Total supply of the token: initially 70% of maxTotalSupply * with the potential to grow up maxTotalSupply during yield farming period (3 years) * * @dev ERC20 `function totalSupply() public view returns (uint256)` * * @dev Field is declared public: getter totalSupply() is created when compiled, * it returns the amount of tokens in existence. */ uint256 public totalSupply; // is set to 700 million * 10^18 in the constructor /** * @dev A record of all the token balances * @dev This mapping keeps record of all token owners: * owner => balance */ mapping(address => uint256) public tokenBalances; /** * @notice A record of each account's voting delegate * * @dev Auxiliary data structure used to sum up an account's voting power * * @dev This mapping keeps record of all voting power delegations: * voting delegator (token owner) => voting delegate */ mapping(address => address) public votingDelegates; /** * @notice A voting power record binds voting power of a delegate to a particular * block when the voting power delegation change happened */ struct VotingPowerRecord { /* * @dev block.number when delegation has changed; starting from * that block voting power value is in effect */ uint64 blockNumber; /* * @dev cumulative voting power a delegate has obtained starting * from the block stored in blockNumber */ uint192 votingPower; } /** * @notice A record of each account's voting power * * @dev Primarily data structure to store voting power for each account. * Voting power sums up from the account's token balance and delegated * balances. * * @dev Stores current value and entire history of its changes. * The changes are stored as an array of checkpoints. * Checkpoint is an auxiliary data structure containing voting * power (number of votes) and block number when the checkpoint is saved * * @dev Maps voting delegate => voting power record */ mapping(address => VotingPowerRecord[]) public votingPowerHistory; /** * @dev A record of nonces for signing/validating signatures in `delegateWithSig` * for every delegate, increases after successful validation * * @dev Maps delegate address => delegate nonce */ mapping(address => uint256) public nonces; /** * @notice A record of all the allowances to spend tokens on behalf * @dev Maps token owner address to an address approved to spend * some tokens on behalf, maps approved address to that amount * @dev owner => spender => value */ mapping(address => mapping(address => uint256)) public transferAllowances; /** * @notice Enables ERC20 transfers of the tokens * (transfer by the token owner himself) * @dev Feature FEATURE_TRANSFERS must be enabled in order for * `transfer()` function to succeed */ uint32 public constant FEATURE_TRANSFERS = 0x0000_0001; /** * @notice Enables ERC20 transfers on behalf * (transfer by someone else on behalf of token owner) * @dev Feature FEATURE_TRANSFERS_ON_BEHALF must be enabled in order for * `transferFrom()` function to succeed * @dev Token owner must call `approve()` first to authorize * the transfer on behalf */ uint32 public constant FEATURE_TRANSFERS_ON_BEHALF = 0x0000_0002; /** * @dev Defines if the default behavior of `transfer` and `transferFrom` * checks if the receiver smart contract supports ERC20 tokens * @dev When feature FEATURE_UNSAFE_TRANSFERS is enabled the transfers do not * check if the receiver smart contract supports ERC20 tokens, * i.e. `transfer` and `transferFrom` behave like `unsafeTransferFrom` * @dev When feature FEATURE_UNSAFE_TRANSFERS is disabled (default) the transfers * check if the receiver smart contract supports ERC20 tokens, * i.e. `transfer` and `transferFrom` behave like `safeTransferFrom` */ uint32 public constant FEATURE_UNSAFE_TRANSFERS = 0x0000_0004; /** * @notice Enables token owners to burn their own tokens, * including locked tokens which are burnt first * @dev Feature FEATURE_OWN_BURNS must be enabled in order for * `burn()` function to succeed when called by token owner */ uint32 public constant FEATURE_OWN_BURNS = 0x0000_0008; /** * @notice Enables approved operators to burn tokens on behalf of their owners, * including locked tokens which are burnt first * @dev Feature FEATURE_OWN_BURNS must be enabled in order for * `burn()` function to succeed when called by approved operator */ uint32 public constant FEATURE_BURNS_ON_BEHALF = 0x0000_0010; /** * @notice Enables delegators to elect delegates * @dev Feature FEATURE_DELEGATIONS must be enabled in order for * `delegate()` function to succeed */ uint32 public constant FEATURE_DELEGATIONS = 0x0000_0020; /** * @notice Enables delegators to elect delegates on behalf * (via an EIP712 signature) * @dev Feature FEATURE_DELEGATIONS must be enabled in order for * `delegateWithSig()` function to succeed */ uint32 public constant FEATURE_DELEGATIONS_ON_BEHALF = 0x0000_0040; /** * @notice Token creator is responsible for creating (minting) * tokens to an arbitrary address * @dev Role ROLE_TOKEN_CREATOR allows minting tokens * (calling `mint` function) */ uint32 public constant ROLE_TOKEN_CREATOR = 0x0001_0000; /** * @notice Token destroyer is responsible for destroying (burning) * tokens owned by an arbitrary address * @dev Role ROLE_TOKEN_DESTROYER allows burning tokens * (calling `burn` function) */ uint32 public constant ROLE_TOKEN_DESTROYER = 0x0002_0000; /** * @notice ERC20 receivers are allowed to receive tokens without ERC20 safety checks, * which may be useful to simplify tokens transfers into "legacy" smart contracts * @dev When `FEATURE_UNSAFE_TRANSFERS` is not enabled addresses having * `ROLE_ERC20_RECEIVER` permission are allowed to receive tokens * via `transfer` and `transferFrom` functions in the same way they * would via `unsafeTransferFrom` function * @dev When `FEATURE_UNSAFE_TRANSFERS` is enabled `ROLE_ERC20_RECEIVER` permission * doesn't affect the transfer behaviour since * `transfer` and `transferFrom` behave like `unsafeTransferFrom` for any receiver * @dev ROLE_ERC20_RECEIVER is a shortening for ROLE_UNSAFE_ERC20_RECEIVER */ uint32 public constant ROLE_ERC20_RECEIVER = 0x0004_0000; /** * @notice ERC20 senders are allowed to send tokens without ERC20 safety checks, * which may be useful to simplify tokens transfers into "legacy" smart contracts * @dev When `FEATURE_UNSAFE_TRANSFERS` is not enabled senders having * `ROLE_ERC20_SENDER` permission are allowed to send tokens * via `transfer` and `transferFrom` functions in the same way they * would via `unsafeTransferFrom` function * @dev When `FEATURE_UNSAFE_TRANSFERS` is enabled `ROLE_ERC20_SENDER` permission * doesn't affect the transfer behaviour since * `transfer` and `transferFrom` behave like `unsafeTransferFrom` for any receiver * @dev ROLE_ERC20_SENDER is a shortening for ROLE_UNSAFE_ERC20_SENDER */ uint32 public constant ROLE_ERC20_SENDER = 0x0008_0000; uint32 public constant ROLE_WHITE_LISTED_SPENDER = 0x0010_0000; /** * @notice White listed treasury can swap sSYN to receive SYNR * @dev Role ROLE_TREASURY can get SYNR in exchange for sSYN */ uint32 public constant ROLE_TREASURY = 0x0020_0000; /** * @dev Magic value to be returned by ERC20Receiver upon successful reception of token(s) * @dev Equal to `bytes4(keccak256("onERC20Received(address,address,uint256,bytes)"))`, * which can be also obtained as `ERC20Receiver(address(0)).onERC20Received.selector` */ // solhint-disable-next-line bytes4 private constant ERC20_RECEIVED = 0x4fc35859; /** * @notice EIP-712 contract's domain typeHash, see https://eips.ethereum.org/EIPS/eip-712#rationale-for-typehash */ bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /** * @notice EIP-712 delegation struct typeHash, see https://eips.ethereum.org/EIPS/eip-712#rationale-for-typehash */ bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegate,uint256 nonce,uint256 expiry)"); /** * @dev Fired in transfer(), transferFrom() and some other (non-ERC20) functions * * @dev ERC20 `event Transfer(address indexed _from, address indexed _to, uint256 _value)` * * @param _from an address tokens were consumed from * @param _to an address tokens were sent to * @param _value number of tokens transferred */ event Transfer(address indexed _from, address indexed _to, uint256 _value); /** * @dev Fired in approve() and approveAtomic() functions * * @dev ERC20 `event Approval(address indexed _owner, address indexed _spender, uint256 _value)` * * @param _owner an address which granted a permission to transfer * tokens on its behalf * @param _spender an address which received a permission to transfer * tokens on behalf of the owner `_owner` * @param _value amount of tokens granted to transfer on behalf */ event Approval(address indexed _owner, address indexed _spender, uint256 _value); /** * @dev Fired in mint() function * * @param _by an address which minted some tokens (transaction sender) * @param _to an address the tokens were minted to * @param _value an amount of tokens minted */ event Minted(address indexed _by, address indexed _to, uint256 _value); /** * @dev Fired in burn() function * * @param _by an address which burned some tokens (transaction sender) * @param _from an address the tokens were burnt from * @param _value an amount of tokens burnt */ event Burnt(address indexed _by, address indexed _from, uint256 _value); /** * @dev Resolution for the Multiple Withdrawal Attack on ERC20 Tokens (ISBN:978-1-7281-3027-9) * * @dev Similar to ERC20 Transfer event, but also logs an address which executed transfer * * @dev Fired in transfer(), transferFrom() and some other (non-ERC20) functions * * @param _by an address which performed the transfer * @param _from an address tokens were consumed from * @param _to an address tokens were sent to * @param _value number of tokens transferred */ event Transferred(address indexed _by, address indexed _from, address indexed _to, uint256 _value); /** * @dev Resolution for the Multiple Withdrawal Attack on ERC20 Tokens (ISBN:978-1-7281-3027-9) * * @dev Similar to ERC20 Approve event, but also logs old approval value * * @dev Fired in approve() and approveAtomic() functions * * @param _owner an address which granted a permission to transfer * tokens on its behalf * @param _spender an address which received a permission to transfer * tokens on behalf of the owner `_owner` * @param _oldValue previously granted amount of tokens to transfer on behalf * @param _value new granted amount of tokens to transfer on behalf */ event Approved(address indexed _owner, address indexed _spender, uint256 _oldValue, uint256 _value); /** * @dev Notifies that a key-value pair in `votingDelegates` mapping has changed, * i.e. a delegator address has changed its delegate address * * @param _of delegator address, a token owner * @param _from old delegate, an address which delegate right is revoked * @param _to new delegate, an address which received the voting power */ event DelegateChanged(address indexed _of, address indexed _from, address indexed _to); /** * @dev Notifies that a key-value pair in `votingPowerHistory` mapping has changed, * i.e. a delegate's voting power has changed. * * @param _of delegate whose voting power has changed * @param _fromVal previous number of votes delegate had * @param _toVal new number of votes delegate has */ event VotingPowerChanged(address indexed _of, uint256 _fromVal, uint256 _toVal); /** * @dev Deploys the token smart contract, * assigns initial token supply to the address specified * * @param _initialHolder owner of the initial token supply * @param _maxTotalSupply max token supply without decimals */ constructor( address _initialHolder, uint256 _maxTotalSupply, address _superAdmin ) AccessControl(_superAdmin) { // verify initial holder address non-zero (is set) require(_initialHolder != address(0), "_initialHolder not set (zero address)"); require(_maxTotalSupply >= 10e9, "_maxTotalSupply less than minimum accepted amount"); maxTotalSupply = _maxTotalSupply * 10**18; // mint initial supply mint(_initialHolder, (maxTotalSupply * 9) / 10); } // ===== Start: ERC20/ERC223/ERC777 functions ===== /** * @notice Gets the balance of a particular address * * @dev ERC20 `function balanceOf(address _owner) public view returns (uint256 balance)` * * @param _owner the address to query the the balance for * @return balance an amount of tokens owned by the address specified */ function balanceOf(address _owner) public view returns (uint256 balance) { // read the balance and return return tokenBalances[_owner]; } /** * @notice Transfers some tokens to an external address or a smart contract * * @dev ERC20 `function transfer(address _to, uint256 _value) public returns (bool success)` * * @dev Called by token owner (an address which has a * positive token balance tracked by this smart contract) * @dev Throws on any error like * * insufficient token balance or * * incorrect `_to` address: * * zero address or * * self address or * * smart contract which doesn't support ERC20 * * @param _to an address to transfer tokens to, * must be either an external address or a smart contract, * compliant with the ERC20 standard * @param _value amount of tokens to be transferred, must * be greater than zero * @return success true on success, throws otherwise */ function transfer(address _to, uint256 _value) public returns (bool success) { // just delegate call to `transferFrom`, // `FEATURE_TRANSFERS` is verified inside it return transferFrom(msg.sender, _to, _value); } function updateSymbol(string memory _symbol) external { // caller must have a permission to update user roles require(isSenderInRole(ROLE_ACCESS_MANAGER), "insufficient privileges (ROLE_ACCESS_MANAGER required)"); symbol = _symbol; // fire an event emit SymbolUpdated(_symbol); } /** * @notice Transfers some tokens on behalf of address `_from' (token owner) * to some other address `_to` * * @dev ERC20 `function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)` * * @dev Called by token owner on his own or approved address, * an address approved earlier by token owner to * transfer some amount of tokens on its behalf * @dev Throws on any error like * * insufficient token balance or * * incorrect `_to` address: * * zero address or * * same as `_from` address (self transfer) * * smart contract which doesn't support ERC20 * * @param _from token owner which approved caller (transaction sender) * to transfer `_value` of tokens on its behalf * @param _to an address to transfer tokens to, * must be either an external address or a smart contract, * compliant with the ERC20 standard * @param _value amount of tokens to be transferred, must * be greater than zero * @return success true on success, throws otherwise */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool success) { // depending on `FEATURE_UNSAFE_TRANSFERS` we execute either safe (default) // or unsafe transfer // if `FEATURE_UNSAFE_TRANSFERS` is enabled // or receiver has `ROLE_ERC20_RECEIVER` permission // or sender has `ROLE_ERC20_SENDER` permission if ( isFeatureEnabled(FEATURE_UNSAFE_TRANSFERS) || isOperatorInRole(_to, ROLE_ERC20_RECEIVER) || isSenderInRole(ROLE_ERC20_SENDER) ) { // we execute unsafe transfer - delegate call to `unsafeTransferFrom`, // `FEATURE_TRANSFERS` is verified inside it unsafeTransferFrom(_from, _to, _value); } // otherwise - if `FEATURE_UNSAFE_TRANSFERS` is disabled // and receiver doesn't have `ROLE_ERC20_RECEIVER` permission else { // we execute safe transfer - delegate call to `safeTransferFrom`, passing empty `_data`, // `FEATURE_TRANSFERS` is verified inside it safeTransferFrom(_from, _to, _value, ""); } // both `unsafeTransferFrom` and `safeTransferFrom` throw on any error, so // if we're here - it means operation successful, // just return true return true; } /** * @notice Transfers some tokens on behalf of address `_from' (token owner) * to some other address `_to` * * @dev Inspired by ERC721 safeTransferFrom, this function allows to * send arbitrary data to the receiver on successful token transfer * @dev Called by token owner on his own or approved address, * an address approved earlier by token owner to * transfer some amount of tokens on its behalf * @dev Throws on any error like * * insufficient token balance or * * incorrect `_to` address: * * zero address or * * same as `_from` address (self transfer) * * smart contract which doesn't support ERC20Receiver interface * @dev Returns silently on success, throws otherwise * * @param _from token owner which approved caller (transaction sender) * to transfer `_value` of tokens on its behalf * @param _to an address to transfer tokens to, * must be either an external address or a smart contract, * compliant with the ERC20 standard * @param _value amount of tokens to be transferred, must * be greater than zero * @param _data [optional] additional data with no specified format, * sent in onERC20Received call to `_to` in case if its a smart contract */ function safeTransferFrom( address _from, address _to, uint256 _value, bytes memory _data ) public { // first delegate call to `unsafeTransferFrom` // to perform the unsafe token(s) transfer unsafeTransferFrom(_from, _to, _value); // after the successful transfer - check if receiver supports // ERC20Receiver and execute a callback handler `onERC20Received`, // reverting whole transaction on any error: // check if receiver `_to` supports ERC20Receiver interface if (AddressUtils.isContract(_to)) { // if `_to` is a contract - execute onERC20Received bytes4 response = ERC20Receiver(_to).onERC20Received(msg.sender, _from, _value, _data); // expected response is ERC20_RECEIVED require(response == ERC20_RECEIVED, "invalid onERC20Received response"); } } /** * @notice Transfers some tokens on behalf of address `_from' (token owner) * to some other address `_to` * * @dev In contrast to `safeTransferFrom` doesn't check recipient * smart contract to support ERC20 tokens (ERC20Receiver) * @dev Designed to be used by developers when the receiver is known * to support ERC20 tokens but doesn't implement ERC20Receiver interface * @dev Called by token owner on his own or approved address, * an address approved earlier by token owner to * transfer some amount of tokens on its behalf * @dev Throws on any error like * * insufficient token balance or * * incorrect `_to` address: * * zero address or * * same as `_from` address (self transfer) * @dev Returns silently on success, throws otherwise * * @param _from token owner which approved caller (transaction sender) * to transfer `_value` of tokens on its behalf * @param _to an address to transfer tokens to, * must be either an external address or a smart contract, * compliant with the ERC20 standard * @param _value amount of tokens to be transferred, must * be greater than zero */ function unsafeTransferFrom( address _from, address _to, uint256 _value ) public { // if `_from` is equal to sender, require transfers feature to be enabled // otherwise require transfers on behalf feature to be enabled require( (_from == msg.sender && isFeatureEnabled(FEATURE_TRANSFERS)) || (_from != msg.sender && (isFeatureEnabled(FEATURE_TRANSFERS_ON_BEHALF) || isSenderInRole(ROLE_WHITE_LISTED_SPENDER))), _from == msg.sender ? "transfers are disabled" : "transfers on behalf are disabled" ); // non-zero source address check - Zeppelin // obviously, zero source address is a client mistake // it's not part of ERC20 standard but it's reasonable to fail fast // since for zero value transfer transaction succeeds otherwise require(_from != address(0), "SYNR: transfer from the zero address"); // Zeppelin msg // non-zero recipient address check require(_to != address(0), "SYNR: transfer to the zero address"); // Zeppelin msg // sender and recipient cannot be the same require(_from != _to, "sender and recipient are the same (_from = _to)"); // sending tokens to the token smart contract itself is a client mistake require(_to != address(this), "invalid recipient (transfer to the token smart contract itself)"); // according to ERC-20 Token Standard, https://eips.ethereum.org/EIPS/eip-20 // "Transfers of 0 values MUST be treated as normal transfers and fire the Transfer event." if (_value == 0) { // emit an ERC20 transfer event emit Transfer(_from, _to, _value); // don't forget to return - we're done return; } // no need to make arithmetic overflow check on the _value - by design of mint() // in case of transfer on behalf if (_from != msg.sender) { // read allowance value - the amount of tokens allowed to transfer - into the stack uint256 _allowance = transferAllowances[_from][msg.sender]; // verify sender has an allowance to transfer amount of tokens requested require(_allowance >= _value, "SYNR: transfer amount exceeds allowance"); // Zeppelin msg // update allowance value on the stack _allowance -= _value; // update the allowance value in storage transferAllowances[_from][msg.sender] = _allowance; // emit an improved atomic approve event emit Approved(_from, msg.sender, _allowance + _value, _allowance); // emit an ERC20 approval event to reflect the decrease emit Approval(_from, msg.sender, _allowance); } // verify sender has enough tokens to transfer on behalf require(tokenBalances[_from] >= _value, "SYNR: transfer amount exceeds balance"); // Zeppelin msg // perform the transfer: // decrease token owner (sender) balance tokenBalances[_from] -= _value; // increase `_to` address (receiver) balance tokenBalances[_to] += _value; // move voting power associated with the tokens transferred __moveVotingPower(votingDelegates[_from], votingDelegates[_to], _value); // emit an improved transfer event emit Transferred(msg.sender, _from, _to, _value); // emit an ERC20 transfer event emit Transfer(_from, _to, _value); } /** * @notice Approves address called `_spender` to transfer some amount * of tokens on behalf of the owner * * @dev ERC20 `function approve(address _spender, uint256 _value) public returns (bool success)` * * @dev Caller must not necessarily own any tokens to grant the permission * * @param _spender an address approved by the caller (token owner) * to spend some tokens on its behalf * @param _value an amount of tokens spender `_spender` is allowed to * transfer on behalf of the token owner * @return success true on success, throws otherwise */ function approve(address _spender, uint256 _value) public returns (bool success) { // non-zero spender address check - Zeppelin // obviously, zero spender address is a client mistake // it's not part of ERC20 standard but it's reasonable to fail fast require(_spender != address(0), "SYNR: approve to the zero address"); // Zeppelin msg // if transfer on behave is not allowed, then approve is also not allowed, unless it's white listed require( isFeatureEnabled(FEATURE_TRANSFERS_ON_BEHALF) || isOperatorInRole(_spender, ROLE_WHITE_LISTED_SPENDER), "SYNR: spender not allowed" ); // read old approval value to emmit an improved event (ISBN:978-1-7281-3027-9) uint256 _oldValue = transferAllowances[msg.sender][_spender]; // perform an operation: write value requested into the storage transferAllowances[msg.sender][_spender] = _value; // emit an improved atomic approve event (ISBN:978-1-7281-3027-9) emit Approved(msg.sender, _spender, _oldValue, _value); // emit an ERC20 approval event emit Approval(msg.sender, _spender, _value); // operation successful, return true return true; } /** * @notice Returns the amount which _spender is still allowed to withdraw from _owner. * * @dev ERC20 `function allowance(address _owner, address _spender) public view returns (uint256 remaining)` * * @dev A function to check an amount of tokens owner approved * to transfer on its behalf by some other address called "spender" * * @param _owner an address which approves transferring some tokens on its behalf * @param _spender an address approved to transfer some tokens on behalf * @return remaining an amount of tokens approved address `_spender` can transfer on behalf * of token owner `_owner` */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { // read the value from storage and return return transferAllowances[_owner][_spender]; } // ===== End: ERC20/ERC223/ERC777 functions ===== // ===== Start: Resolution for the Multiple Withdrawal Attack on ERC20 Tokens (ISBN:978-1-7281-3027-9) ===== /** * @notice Increases the allowance granted to `spender` by the transaction sender * * @dev Resolution for the Multiple Withdrawal Attack on ERC20 Tokens (ISBN:978-1-7281-3027-9) * * @dev Throws if value to increase by is zero or too big and causes arithmetic overflow * * @param _spender an address approved by the caller (token owner) * to spend some tokens on its behalf * @param _value an amount of tokens to increase by * @return success true on success, throws otherwise */ function increaseAllowance(address _spender, uint256 _value) public virtual returns (bool) { // read current allowance value uint256 currentVal = transferAllowances[msg.sender][_spender]; // non-zero _value and arithmetic overflow check on the allowance require(currentVal + _value > currentVal, "zero value approval increase or arithmetic overflow"); // delegate call to `approve` with the new value return approve(_spender, currentVal + _value); } /** * @notice Decreases the allowance granted to `spender` by the caller. * * @dev Resolution for the Multiple Withdrawal Attack on ERC20 Tokens (ISBN:978-1-7281-3027-9) * * @dev Throws if value to decrease by is zero or is bigger than currently allowed value * * @param _spender an address approved by the caller (token owner) * to spend some tokens on its behalf * @param _value an amount of tokens to decrease by * @return success true on success, throws otherwise */ function decreaseAllowance(address _spender, uint256 _value) public virtual returns (bool) { // read current allowance value uint256 currentVal = transferAllowances[msg.sender][_spender]; // non-zero _value check on the allowance require(_value > 0, "zero value approval decrease"); // verify allowance decrease doesn't underflow require(currentVal >= _value, "SYNR: decreased allowance below zero"); // delegate call to `approve` with the new value return approve(_spender, currentVal - _value); } // ===== End: Resolution for the Multiple Withdrawal Attack on ERC20 Tokens (ISBN:978-1-7281-3027-9) ===== // ===== Start: Minting/burning extension ===== /** * @dev Mints (creates) some tokens to address specified * @dev The value specified is treated as is without taking * into account what `decimals` value is * @dev Behaves effectively as `mintTo` function, allowing * to specify an address to mint tokens to * @dev Requires sender to have `ROLE_TOKEN_CREATOR` permission * * @dev Throws on overflow, if totalSupply + _value doesn't fit into uint192 * * @param _to an address to mint tokens to * @param _value an amount of tokens to mint (create) */ function mint(address _to, uint256 _value) public { // check if caller has sufficient permissions to mint tokens require(isSenderInRole(ROLE_TOKEN_CREATOR), "insufficient privileges (ROLE_TOKEN_CREATOR required)"); // non-zero recipient address check require(_to != address(0), "SYNR: mint to the zero address"); // Zeppelin msg // non-zero _value and arithmetic overflow check on the total supply // this check automatically secures arithmetic overflow on the individual balance require(totalSupply + _value > totalSupply, "zero value mint or arithmetic overflow"); // uint192 overflow check (required by voting delegation) require(totalSupply + _value <= type(uint192).max, "total supply overflow (uint192)"); require(totalSupply + _value <= maxTotalSupply, "reached total max supply"); // perform mint: // increase total amount of tokens value totalSupply += _value; // increase `_to` address balance tokenBalances[_to] += _value; // create voting power associated with the tokens minted __moveVotingPower(address(0), votingDelegates[_to], _value); // fire a minted event emit Minted(msg.sender, _to, _value); // emit an improved transfer event emit Transferred(msg.sender, address(0), _to, _value); // fire ERC20 compliant transfer event emit Transfer(address(0), _to, _value); } /** * @dev Burns (destroys) some tokens from the address specified * @dev The value specified is treated as is without taking * into account what `decimals` value is * @dev Behaves effectively as `burnFrom` function, allowing * to specify an address to burn tokens from * @dev Requires sender to have `ROLE_TOKEN_DESTROYER` permission * * @param _from an address to burn some tokens from * @param _value an amount of tokens to burn (destroy) */ function burn(address _from, uint256 _value) public { // check if caller has sufficient permissions to burn tokens // and if not - check for possibility to burn own tokens or to burn on behalf if (!isSenderInRole(ROLE_TOKEN_DESTROYER)) { // if `_from` is equal to sender, require own burns feature to be enabled // otherwise require burns on behalf feature to be enabled require( (_from == msg.sender && isFeatureEnabled(FEATURE_OWN_BURNS)) || (_from != msg.sender && isFeatureEnabled(FEATURE_BURNS_ON_BEHALF)), _from == msg.sender ? "burns are disabled" : "burns on behalf are disabled" ); // in case of burn on behalf if (_from != msg.sender) { // read allowance value - the amount of tokens allowed to be burnt - into the stack uint256 _allowance = transferAllowances[_from][msg.sender]; // verify sender has an allowance to burn amount of tokens requested require(_allowance >= _value, "SYNR: burn amount exceeds allowance"); // Zeppelin msg // update allowance value on the stack _allowance -= _value; // update the allowance value in storage transferAllowances[_from][msg.sender] = _allowance; // emit an improved atomic approve event emit Approved(msg.sender, _from, _allowance + _value, _allowance); // emit an ERC20 approval event to reflect the decrease emit Approval(_from, msg.sender, _allowance); } } // at this point we know that either sender is ROLE_TOKEN_DESTROYER or // we burn own tokens or on behalf (in latest case we already checked and updated allowances) // we have left to execute balance checks and burning logic itself // non-zero burn value check require(_value != 0, "zero value burn"); // non-zero source address check - Zeppelin require(_from != address(0), "SYNR: burn from the zero address"); // Zeppelin msg // verify `_from` address has enough tokens to destroy // (basically this is a arithmetic overflow check) require(tokenBalances[_from] >= _value, "SYNR: burn amount exceeds balance"); // Zeppelin msg // perform burn: // decrease `_from` address balance tokenBalances[_from] -= _value; // decrease total amount of tokens value totalSupply -= _value; // destroy voting power associated with the tokens burnt __moveVotingPower(votingDelegates[_from], address(0), _value); // fire a burnt event emit Burnt(msg.sender, _from, _value); // emit an improved transfer event emit Transferred(msg.sender, _from, address(0), _value); // fire ERC20 compliant transfer event emit Transfer(_from, address(0), _value); } // ===== End: Minting/burning extension ===== // ===== Start: DAO Support (Compound-like voting delegation) ===== /** * @notice Gets current voting power of the account `_of` * @param _of the address of account to get voting power of * @return current cumulative voting power of the account, * sum of token balances of all its voting delegators */ function getVotingPower(address _of) public view returns (uint256) { // get a link to an array of voting power history records for an address specified VotingPowerRecord[] storage history = votingPowerHistory[_of]; // lookup the history and return latest element return history.length == 0 ? 0 : history[history.length - 1].votingPower; } /** * @notice Gets past voting power of the account `_of` at some block `_blockNum` * @dev Throws if `_blockNum` is not in the past (not the finalized block) * @param _of the address of account to get voting power of * @param _blockNum block number to get the voting power at * @return past cumulative voting power of the account, * sum of token balances of all its voting delegators at block number `_blockNum` */ function getVotingPowerAt(address _of, uint256 _blockNum) public view returns (uint256) { // make sure block number is not in the past (not the finalized block) require(_blockNum < block.number, "not yet determined"); // Compound msg // get a link to an array of voting power history records for an address specified VotingPowerRecord[] storage history = votingPowerHistory[_of]; // if voting power history for the account provided is empty if (history.length == 0) { // than voting power is zero - return the result return 0; } // check latest voting power history record block number: // if history was not updated after the block of interest if (history[history.length - 1].blockNumber <= _blockNum) { // we're done - return last voting power record return getVotingPower(_of); } // check first voting power history record block number: // if history was never updated before the block of interest if (history[0].blockNumber > _blockNum) { // we're done - voting power at the block num of interest was zero return 0; } // `votingPowerHistory[_of]` is an array ordered by `blockNumber`, ascending; // apply binary search on `votingPowerHistory[_of]` to find such an entry number `i`, that // `votingPowerHistory[_of][i].blockNumber <= _blockNum`, but in the same time // `votingPowerHistory[_of][i + 1].blockNumber > _blockNum` // return the result - voting power found at index `i` return history[__binaryLookup(_of, _blockNum)].votingPower; } /** * @dev Reads an entire voting power history array for the delegate specified * * @param _of delegate to query voting power history for * @return voting power history array for the delegate of interest */ function getVotingPowerHistory(address _of) public view returns (VotingPowerRecord[] memory) { // return an entire array as memory return votingPowerHistory[_of]; } /** * @dev Returns length of the voting power history array for the delegate specified; * useful since reading an entire array just to get its length is expensive (gas cost) * * @param _of delegate to query voting power history length for * @return voting power history array length for the delegate of interest */ function getVotingPowerHistoryLength(address _of) public view returns (uint256) { // read array length and return return votingPowerHistory[_of].length; } /** * @notice Delegates voting power of the delegator `msg.sender` to the delegate `_to` * * @dev Accepts zero value address to delegate voting power to, effectively * removing the delegate in that case * * @param _to address to delegate voting power to */ function delegate(address _to) public { // verify delegations are enabled require(isFeatureEnabled(FEATURE_DELEGATIONS), "delegations are disabled"); // delegate call to `__delegate` __delegate(msg.sender, _to); } /** * @notice Delegates voting power of the delegator (represented by its signature) to the delegate `_to` * * @dev Accepts zero value address to delegate voting power to, effectively * removing the delegate in that case * * @dev Compliant with EIP-712: Ethereum typed structured data hashing and signing, * see https://eips.ethereum.org/EIPS/eip-712 * * @param _to address to delegate voting power to * @param _nonce nonce used to construct the signature, and used to validate it; * nonce is increased by one after successful signature validation and vote delegation * @param _exp signature expiration time * @param v the recovery byte of the signature * @param r half of the ECDSA signature pair * @param s half of the ECDSA signature pair */ function delegateWithSig( address _to, uint256 _nonce, uint256 _exp, uint8 v, bytes32 r, bytes32 s ) public { // verify delegations on behalf are enabled require(isFeatureEnabled(FEATURE_DELEGATIONS_ON_BEHALF), "delegations on behalf are disabled"); // build the EIP-712 contract domain separator bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), block.chainid, address(this))); // build the EIP-712 hashStruct of the delegation message bytes32 hashStruct = keccak256(abi.encode(DELEGATION_TYPEHASH, _to, _nonce, _exp)); // calculate the EIP-712 digest "\x19\x01" ‖ domainSeparator ‖ hashStruct(message) bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, hashStruct)); // recover the address who signed the message with v, r, s address signer = ecrecover(digest, v, r, s); // perform message integrity and security validations require(signer != address(0), "invalid signature"); // Compound msg require(_nonce == nonces[signer], "invalid nonce"); // Compound msg require(block.timestamp < _exp, "signature expired"); // Compound msg // update the nonce for that particular signer to avoid replay attack nonces[signer]++; // delegate call to `__delegate` - execute the logic required __delegate(signer, _to); } /** * @dev Auxiliary function to delegate delegator's `_from` voting power to the delegate `_to` * @dev Writes to `votingDelegates` and `votingPowerHistory` mappings * * @param _from delegator who delegates his voting power * @param _to delegate who receives the voting power */ function __delegate(address _from, address _to) private { // read current delegate to be replaced by a new one address _fromDelegate = votingDelegates[_from]; // read current voting power (it is equal to token balance) uint256 _value = tokenBalances[_from]; // reassign voting delegate to `_to` votingDelegates[_from] = _to; // update voting power for `_fromDelegate` and `_to` __moveVotingPower(_fromDelegate, _to, _value); // emit an event emit DelegateChanged(_from, _fromDelegate, _to); } /** * @dev Auxiliary function to move voting power `_value` * from delegate `_from` to the delegate `_to` * * @dev Doesn't have any effect if `_from == _to`, or if `_value == 0` * * @param _from delegate to move voting power from * @param _to delegate to move voting power to * @param _value voting power to move from `_from` to `_to` */ function __moveVotingPower( address _from, address _to, uint256 _value ) private { // if there is no move (`_from == _to`) or there is nothing to move (`_value == 0`) if (_from == _to || _value == 0) { // return silently with no action return; } // if source address is not zero - decrease its voting power if (_from != address(0)) { // read current source address voting power uint256 _fromVal = getVotingPower(_from); // calculate decreased voting power // underflow is not possible by design: // voting power is limited by token balance which is checked by the callee uint256 _toVal = _fromVal - _value; // update source voting power from `_fromVal` to `_toVal` __updateVotingPower(_from, _fromVal, _toVal); } // if destination address is not zero - increase its voting power if (_to != address(0)) { // read current destination address voting power uint256 _fromVal = getVotingPower(_to); // calculate increased voting power // overflow is not possible by design: // max token supply limits the cumulative voting power uint256 _toVal = _fromVal + _value; // update destination voting power from `_fromVal` to `_toVal` __updateVotingPower(_to, _fromVal, _toVal); } } /** * @dev Auxiliary function to update voting power of the delegate `_of` * from value `_fromVal` to value `_toVal` * * @param _of delegate to update its voting power * @param _fromVal old voting power of the delegate * @param _toVal new voting power of the delegate */ function __updateVotingPower( address _of, uint256 _fromVal, uint256 _toVal ) private { // get a link to an array of voting power history records for an address specified VotingPowerRecord[] storage history = votingPowerHistory[_of]; // if there is an existing voting power value stored for current block if (history.length != 0 && history[history.length - 1].blockNumber == block.number) { // update voting power which is already stored in the current block history[history.length - 1].votingPower = uint192(_toVal); } // otherwise - if there is no value stored for current block else { // add new element into array representing the value for current block history.push(VotingPowerRecord(uint64(block.number), uint192(_toVal))); } // emit an event emit VotingPowerChanged(_of, _fromVal, _toVal); } /** * @dev Auxiliary function to lookup an element in a sorted (asc) array of elements * * @dev This function finds the closest element in an array to the value * of interest (not exceeding that value) and returns its index within an array * * @dev An array to search in is `votingPowerHistory[_to][i].blockNumber`, * it is sorted in ascending order (blockNumber increases) * * @param _to an address of the delegate to get an array for * @param n value of interest to look for * @return an index of the closest element in an array to the value * of interest (not exceeding that value) */ function __binaryLookup(address _to, uint256 n) private view returns (uint256) { // get a link to an array of voting power history records for an address specified VotingPowerRecord[] storage history = votingPowerHistory[_to]; // left bound of the search interval, originally start of the array uint256 i = 0; // right bound of the search interval, originally end of the array uint256 j = history.length - 1; // the iteration process narrows down the bounds by // splitting the interval in a half oce per each iteration while (j > i) { // get an index in the middle of the interval [i, j] uint256 k = j - (j - i) / 2; // read an element to compare it with the value of interest VotingPowerRecord memory cp = history[k]; // if we've got a strict equal - we're lucky and done if (cp.blockNumber == n) { // just return the result - index `k` return k; } // if the value of interest is bigger - move left bound to the middle else if (cp.blockNumber < n) { // move left bound `i` to the middle position `k` i = k; } // otherwise, when the value of interest is smaller - move right bound to the middle else { // move right bound `j` to the middle position `k - 1`: // element at position `k` is bigger and cannot be the result j = k - 1; } } // reaching that point means no exact match found // since we're interested in the element which is not bigger than the // element of interest, we return the lower bound `i` return i; } } // ===== End: DAO Support (Compound-like voting delegation) =====
// SPDX-License-Identifier: MIT pragma solidity 0.8.1; /** * @title Address Utils * * @dev Utility library of inline functions on addresses * * @author Basil Gorin */ library AddressUtils { /** * @notice Checks if the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the target address is a contract */ function isContract(address addr) internal view returns (bool) { // a variable to load `extcodesize` to uint256 size = 0; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 for more details about how this works. // TODO: Check this again before the Serenity release, because all addresses will be contracts. // solium-disable-next-line security/no-inline-assembly assembly { // retrieve the size of the code at address `addr` size := extcodesize(addr) } // positive size indicates a smart contract address return size > 0; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.1; // import "hardhat/console.sol"; /** * @title Access Control List * * @notice Access control smart contract provides an API to check * if specific operation is permitted globally and/or * if particular user has a permission to execute it. * * @notice It deals with two main entities: features and roles. * * @notice Features are designed to be used to enable/disable specific * functions (public functions) of the smart contract for everyone. * @notice User roles are designed to restrict access to specific * functions (restricted functions) of the smart contract to some users. * * @notice Terms "role", "permissions" and "set of permissions" have equal meaning * in the documentation text and may be used interchangeably. * @notice Terms "permission", "single permission" implies only one permission bit set. * * @dev This smart contract is designed to be inherited by other * smart contracts which require access control management capabilities. * * @author Basil Gorin */ contract AccessControl { /** * @notice Access manager is responsible for assigning the roles to users, * enabling/disabling global features of the smart contract * @notice Access manager can add, remove and update user roles, * remove and update global features * * @dev Role ROLE_ACCESS_MANAGER allows modifying user roles and global features * @dev Role ROLE_ACCESS_MANAGER has single bit at position 255 enabled */ uint256 public constant ROLE_ACCESS_MANAGER = 0x8000000000000000000000000000000000000000000000000000000000000000; /** * @dev Bitmask representing all the possible permissions (super admin role) * @dev Has all the bits are enabled (2^256 - 1 value) */ // solhint-disable-next-line uint256 private constant FULL_PRIVILEGES_MASK = type(uint256).max; // before 0.8.0: uint256(-1) overflows to 0xFFFF... /** * @notice Privileged addresses with defined roles/permissions * @notice In the context of ERC20/ERC721 tokens these can be permissions to * allow minting or burning tokens, transferring on behalf and so on * * @dev Maps user address to the permissions bitmask (role), where each bit * represents a permission * @dev Bitmask 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF * represents all possible permissions * @dev Zero address mapping represents global features of the smart contract */ mapping(address => uint256) public userRoles; /** * @dev Fired in updateRole() and updateFeatures() * * @param _by operator which called the function * @param _to address which was granted/revoked permissions * @param _requested permissions requested * @param _actual permissions effectively set */ event RoleUpdated(address indexed _by, address indexed _to, uint256 _requested, uint256 _actual); /** * @notice Creates an access control instance, * setting contract creator to have full privileges */ constructor(address _superAdmin) { userRoles[_superAdmin] = FULL_PRIVILEGES_MASK; userRoles[msg.sender] = FULL_PRIVILEGES_MASK; } /** * @notice Retrieves globally set of features enabled * * @dev Auxiliary getter function to maintain compatibility with previous * versions of the Access Control List smart contract, where * features was a separate uint256 public field * * @return 256-bit bitmask of the features enabled */ function features() public view returns (uint256) { // according to new design features are stored in zero address // mapping of `userRoles` structure return userRoles[address(0)]; } /** * @notice Updates set of the globally enabled features (`features`), * taking into account sender's permissions * * @dev Requires transaction sender to have `ROLE_ACCESS_MANAGER` permission * @dev Function is left for backward compatibility with older versions * * @param _mask bitmask representing a set of features to enable/disable */ function updateFeatures(uint256 _mask) public { // delegate call to `updateRole` updateRole(address(0), _mask); } /** * @notice Updates set of permissions (role) for a given user, * taking into account sender's permissions. * * @dev Setting role to zero is equivalent to removing an all permissions * @dev Setting role to `FULL_PRIVILEGES_MASK` is equivalent to * copying senders' permissions (role) to the user * @dev Requires transaction sender to have `ROLE_ACCESS_MANAGER` permission * * @param operator address of a user to alter permissions for or zero * to alter global features of the smart contract * @param role bitmask representing a set of permissions to * enable/disable for a user specified */ function updateRole(address operator, uint256 role) public { // caller must have a permission to update user roles require(isSenderInRole(ROLE_ACCESS_MANAGER), "insufficient privileges (ROLE_ACCESS_MANAGER required)"); // evaluate the role and reassign it userRoles[operator] = evaluateBy(msg.sender, userRoles[operator], role); // fire an event emit RoleUpdated(msg.sender, operator, role, userRoles[operator]); } /** * @notice Determines the permission bitmask an operator can set on the * target permission set * @notice Used to calculate the permission bitmask to be set when requested * in `updateRole` and `updateFeatures` functions * * @dev Calculated based on: * 1) operator's own permission set read from userRoles[operator] * 2) target permission set - what is already set on the target * 3) desired permission set - what do we want set target to * * @dev Corner cases: * 1) Operator is super admin and its permission set is `FULL_PRIVILEGES_MASK`: * `desired` bitset is returned regardless of the `target` permission set value * (what operator sets is what they get) * 2) Operator with no permissions (zero bitset): * `target` bitset is returned regardless of the `desired` value * (operator has no authority and cannot modify anything) * * @dev Example: * Consider an operator with the permissions bitmask 00001111 * is about to modify the target permission set 01010101 * Operator wants to set that permission set to 00110011 * Based on their role, an operator has the permissions * to update only lowest 4 bits on the target, meaning that * high 4 bits of the target set in this example is left * unchanged and low 4 bits get changed as desired: 01010011 * * @param operator address of the contract operator which is about to set the permissions * @param target input set of permissions to operator is going to modify * @param desired desired set of permissions operator would like to set * @return resulting set of permissions given operator will set */ function evaluateBy( address operator, uint256 target, uint256 desired ) public view returns (uint256) { // read operator's permissions uint256 p = userRoles[operator]; // taking into account operator's permissions, // 1) enable the permissions desired on the `target` target |= p & desired; // 2) disable the permissions desired on the `target` target &= FULL_PRIVILEGES_MASK ^ (p & (FULL_PRIVILEGES_MASK ^ desired)); // return calculated result return target; } /** * @notice Checks if requested set of features is enabled globally on the contract * * @param required set of features to check against * @return true if all the features requested are enabled, false otherwise */ function isFeatureEnabled(uint256 required) public view returns (bool) { // delegate call to `__hasRole`, passing `features` property return __hasRole(features(), required); } /** * @notice Checks if transaction sender `msg.sender` has all the permissions required * * @param required set of permissions (role) to check against * @return true if all the permissions requested are enabled, false otherwise */ function isSenderInRole(uint256 required) public view returns (bool) { // delegate call to `isOperatorInRole`, passing transaction sender return isOperatorInRole(msg.sender, required); } /** * @notice Checks if operator has all the permissions (role) required * * @param operator address of the user to check role for * @param required set of permissions (role) to check * @return true if all the permissions requested are enabled, false otherwise */ function isOperatorInRole(address operator, uint256 required) public view returns (bool) { // delegate call to `__hasRole`, passing operator's permissions (role) return __hasRole(userRoles[operator], required); } /** * @dev Checks if role `actual` contains all the permissions required `required` * * @param actual existent role * @param required required role * @return true if actual has required role (all permissions), false otherwise */ function __hasRole(uint256 actual, uint256 required) internal pure returns (bool) { // check the bitmask for the role required and return the result return actual & required == required; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.1; /** * @title ERC20 token receiver interface * * @dev Interface for any contract that wants to support safe transfers * from ERC20 token smart contracts. * @dev Inspired by ERC721 and ERC223 token standards * * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md * @dev See https://github.com/ethereum/EIPs/issues/223 * @author Basil Gorin * Adapted for Syn City by Superpower Labs */ interface ERC20Receiver { /** * @notice Handle the receipt of a ERC20 token(s) * @dev The ERC20 smart contract calls this function on the recipient * after a successful transfer (`safeTransferFrom`). * This function MAY throw to revert and reject the transfer. * Return of other than the magic value MUST result in the transaction being reverted. * @notice The contract address is always the message sender. * A wallet/broker/auction application MUST implement the wallet interface * if it will accept safe transfers. * @param _operator The address which called `safeTransferFrom` function * @param _from The address which previously owned the token * @param _value amount of tokens which is being transferred * @param _data additional data with no specified format * @return `bytes4(keccak256("onERC20Received(address,address,uint256,bytes)"))` unless throwing */ function onERC20Received( address _operator, address _from, uint256 _value, bytes calldata _data ) external returns (bytes4); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_initialHolder","type":"address"},{"internalType":"uint256","name":"_maxTotalSupply","type":"uint256"},{"internalType":"address","name":"_superAdmin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_by","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_of","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_by","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_by","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_requested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_actual","type":"uint256"}],"name":"RoleUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_symbol","type":"string"}],"name":"SymbolUpdated","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_by","type":"address"},{"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":"Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_of","type":"address"},{"indexed":false,"internalType":"uint256","name":"_fromVal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toVal","type":"uint256"}],"name":"VotingPowerChanged","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEATURE_BURNS_ON_BEHALF","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEATURE_DELEGATIONS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEATURE_DELEGATIONS_ON_BEHALF","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEATURE_OWN_BURNS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEATURE_TRANSFERS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEATURE_TRANSFERS_ON_BEHALF","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEATURE_UNSAFE_TRANSFERS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_ACCESS_MANAGER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_ERC20_RECEIVER","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_ERC20_SENDER","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_TOKEN_CREATOR","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_TOKEN_DESTROYER","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_TREASURY","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_WHITE_LISTED_SPENDER","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_UID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"remaining","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"uint256","name":"_exp","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateWithSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"target","type":"uint256"},{"internalType":"uint256","name":"desired","type":"uint256"}],"name":"evaluateBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"features","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_of","type":"address"}],"name":"getVotingPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_of","type":"address"},{"internalType":"uint256","name":"_blockNum","type":"uint256"}],"name":"getVotingPowerAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_of","type":"address"}],"name":"getVotingPowerHistory","outputs":[{"components":[{"internalType":"uint64","name":"blockNumber","type":"uint64"},{"internalType":"uint192","name":"votingPower","type":"uint192"}],"internalType":"struct SyndicateERC20.VotingPowerRecord[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_of","type":"address"}],"name":"getVotingPowerHistoryLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"}],"name":"isFeatureEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"required","type":"uint256"}],"name":"isOperatorInRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"}],"name":"isSenderInRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"transferAllowances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"unsafeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mask","type":"uint256"}],"name":"updateFeatures","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"role","type":"uint256"}],"name":"updateRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_symbol","type":"string"}],"name":"updateSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRoles","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"votingDelegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"votingPowerHistory","outputs":[{"internalType":"uint64","name":"blockNumber","type":"uint64"},{"internalType":"uint192","name":"votingPower","type":"uint192"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c0604052600460808190526329aca72960e11b60a09081526200002791600191906200068b565b503480156200003557600080fd5b506040516200389f3803806200389f833981016040819052620000589162000749565b6001600160a01b03808216600090815260208190526040808220600019908190553383529120558316620000a95760405162461bcd60e51b8152600401620000a09062000811565b60405180910390fd5b6402540be400821015620000d15760405162461bcd60e51b8152600401620000a090620007c0565b620000e582670de0b6b3a7640000620009ba565b600281905562000113908490600a9062000101906009620009ba565b6200010d919062000999565b6200011c565b50505062000a49565b6200012a6201000062000375565b620001495760405162461bcd60e51b8152600401620000a0906200088d565b6001600160a01b038216620001725760405162461bcd60e51b8152600401620000a09062000930565b6003546200018182826200097e565b11620001a15760405162461bcd60e51b8152600401620000a090620008ea565b6003546001600160c01b0390620001ba9083906200097e565b1115620001db5760405162461bcd60e51b8152600401620000a09062000789565b60025481600354620001ee91906200097e565b11156200020f5760405162461bcd60e51b8152600401620000a09062000856565b80600360008282546200022391906200097e565b90915550506001600160a01b03821660009081526004602052604081208054839290620002529084906200097e565b90915550506001600160a01b038083166000908152600560205260408120546200027e9216836200038b565b816001600160a01b0316336001600160a01b03167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f083604051620002c3919062000967565b60405180910390a3816001600160a01b031660006001600160a01b0316336001600160a01b03167f769254a71d2f67d8ac6cb44f2803c0d05cfbcf9effadb6a984f10ff9de3df6c3846040516200031b919062000967565b60405180910390a4816001600160a01b031660006001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405162000369919062000967565b60405180910390a35050565b600062000383338362000439565b90505b919050565b816001600160a01b0316836001600160a01b03161480620003aa575080155b15620003b65762000434565b6001600160a01b03831615620003f5576000620003d38462000465565b90506000620003e38383620009dc565b9050620003f2858383620004f0565b50505b6001600160a01b0382161562000434576000620004128362000465565b905060006200042283836200097e565b905062000431848383620004f0565b50505b505050565b6001600160a01b0382166000908152602081905260408120546200045e908362000684565b9392505050565b6001600160a01b0381166000908152600660205260408120805415620004dd57805481906200049790600190620009dc565b81548110620004b657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546801000000000000000090046001600160c01b0316620004e0565b60005b6001600160c01b03169392505050565b6001600160a01b03831660009081526006602052604090208054158015906200055e57508054439082906200052890600190620009dc565b815481106200054757634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160401b0316145b15620005ce578054829082906200057890600190620009dc565b815481106200059757634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160086101000a8154816001600160c01b0302191690836001600160c01b0316021790555062000639565b604080518082019091526001600160401b0343811682526001600160c01b0380851660208085019182528554600181018755600087815291909120945194018054915190921668010000000000000000029383166001600160401b0319909116179091169190911790555b836001600160a01b03167f53ed7954de66613e30dd29b46ab783aa594e6309d021d8854c76bb3325d03aa384846040516200067692919062000970565b60405180910390a250505050565b9081161490565b8280546200069990620009f6565b90600052602060002090601f016020900481019282620006bd576000855562000708565b82601f10620006d857805160ff191683800117855562000708565b8280016001018555821562000708579182015b8281111562000708578251825591602001919060010190620006eb565b50620007169291506200071a565b5090565b5b808211156200071657600081556001016200071b565b80516001600160a01b03811681146200038657600080fd5b6000806000606084860312156200075e578283fd5b620007698462000731565b925060208401519150620007806040850162000731565b90509250925092565b6020808252601f908201527f746f74616c20737570706c79206f766572666c6f77202875696e743139322900604082015260600190565b60208082526031908201527f5f6d6178546f74616c537570706c79206c657373207468616e206d696e696d756040820152701b481858d8d95c1d195908185b5bdd5b9d607a1b606082015260800190565b60208082526025908201527f5f696e697469616c486f6c646572206e6f742073657420287a65726f20616464604082015264726573732960d81b606082015260800190565b60208082526018908201527f7265616368656420746f74616c206d617820737570706c790000000000000000604082015260600190565b60208082526035908201527f696e73756666696369656e742070726976696c656765732028524f4c455f544f60408201527f4b454e5f43524541544f52207265717569726564290000000000000000000000606082015260800190565b60208082526026908201527f7a65726f2076616c7565206d696e74206f722061726974686d65746963206f766040820152656572666c6f7760d01b606082015260800190565b6020808252601e908201527f53594e523a206d696e7420746f20746865207a65726f20616464726573730000604082015260600190565b90815260200190565b918252602082015260400190565b6000821982111562000994576200099462000a33565b500190565b600082620009b557634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615620009d757620009d762000a33565b500290565b600082821015620009f157620009f162000a33565b500390565b60028104600182168062000a0b57607f821691505b6020821081141562000a2d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b612e468062000a596000396000f3fe608060405234801561001057600080fd5b50600436106103275760003560e01c80637ecebe00116101b8578063bb4d443611610104578063e62cac76116100a2578063eaeded5f1161007c578063eaeded5f14610651578063f63c2f8214610664578063f822d5aa1461066c578063fcc2c0781461067f57610327565b8063e62cac7614610639578063e7a324dc14610641578063e98f5ba71461064957610327565b8063c688d693116100de578063c688d693146105e0578063ce9517cf146105f3578063d5bb7f6714610613578063dd62ed3e1461062657610327565b8063bb4d4436146105bd578063c0d6568d146105d0578063c5ff500c146105d857610327565b806395d89b4111610171578063a9059cbb1161014b578063a9059cbb1461057c578063ae5b102e1461058f578063ae682e2e146105a2578063b88d4fde146105aa57610327565b806395d89b411461054e5780639dc29fac14610556578063a457c2d71461056957610327565b80637ecebe00146104ef5780637fd491b01461050257806384b34a31146105235780638a114e13146105365780638d4e57e61461053e5780638f6fba8c1461054657610327565b8063313ce5671161027757806359b961ef1161023057806363152a501161020a57806363152a50146104a357806370a08231146104b6578063725f3626146104c957806374d5e100146104dc57610327565b806359b961ef146104755780635c19a95c146104885780635d3d4a4e1461049b57610327565b8063313ce5671461040c57806339509351146104215780633e9c5f7e1461043457806340c10f191461043c578063523fba7f1461044f578063537f53121461046257610327565b80631e0fa234116102e4578063278ab5f6116102be578063278ab5f6146103ec5780632ab4d052146103f45780632b521416146103fc5780632d4c39ea1461040457610327565b80631e0fa234146103b157806320606b70146103d157806323b872dd146103d957610327565b806306fdde031461032c578063095ea7b31461034a57806315d2c2251461036a57806318160ddd1461037f5780631993f554146103945780631a0b04ea146103a9575b600080fd5b610334610692565b60405161034191906125ea565b60405180910390f35b61035d61035836600461231a565b6106bd565b6040516103419190612570565b61037d610378366004612375565b6107e6565b005b610387610a2e565b604051610341919061257b565b61039c610a34565b6040516103419190612cde565b61039c610a39565b6103c46103bf36600461221b565b610a3e565b60405161034191906124be565b610387610a59565b61035d6103e7366004612267565b610a7d565b61039c610ae8565b610387610aef565b610387610af5565b61039c610b22565b610414610b27565b6040516103419190612d11565b61035d61042f36600461231a565b610b2c565b61039c610b8e565b61037d61044a36600461231a565b610b93565b61038761045d36600461221b565b610db7565b61037d6104703660046123fb565b610dc9565b61037d610483366004612267565b610e40565b61037d61049636600461221b565b611286565b61039c6112b9565b6103876104b1366004612235565b6112c0565b6103876104c436600461221b565b6112dd565b61035d6104d7366004612440565b6112fc565b6103876104ea36600461221b565b61130f565b6103876104fd36600461221b565b611321565b61051561051036600461231a565b611333565b604051610341929190612cef565b61038761053136600461221b565b61137c565b610387611397565b61039c6113bb565b61039c6113c2565b6103346113c7565b61037d61056436600461231a565b611455565b61035d61057736600461231a565b61180e565b61035d61058a36600461231a565b61187d565b61037d61059d36600461231a565b611891565b61038761192f565b61037d6105b83660046122a2565b611937565b6103876105cb36600461221b565b611a11565b61039c611a92565b61039c611a97565b61035d6105ee36600461231a565b611a9e565b61060661060136600461221b565b611ac1565b604051610341919061250f565b61037d610621366004612440565b611b53565b610387610634366004612235565b611b5e565b61039c611b89565b610387611b90565b61039c611bb4565b61038761065f36600461231a565b611bbb565b61039c611cf3565b61038761067a366004612343565b611cf8565b61035d61068d366004612440565b611d23565b6040518060400160405280600f81526020016e29bcb73234b1b0ba32902a37b5b2b760891b81525081565b60006001600160a01b0383166106ee5760405162461bcd60e51b81526004016106e59061282d565b60405180910390fd5b6106f860026112fc565b8061070b575061070b8362100000611a9e565b6107275760405162461bcd60e51b81526004016106e5906125fd565b3360008181526008602090815260408083206001600160a01b0388168085529252918290208054908690559151919290917f71594b34a69973da9bff6f72cc0aad2c51069b6b8e9c70c0648b58d10d7bd84b906107879085908890612cd0565b60405180910390a3836001600160a01b0316336001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516107d2919061257b565b60405180910390a360019150505b92915050565b6107f060406112fc565b61080c5760405162461bcd60e51b81526004016106e5906126db565b604080518082018252600f81526e29bcb73234b1b0ba32902a37b5b2b760891b6020918201529051600091610889917f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866917fc51fe26291bae0bfb682883d38f58a18d41d250f7ddf5d5fb65cf90ed74aa1409146913091016125a8565b60405160208183030381529060405280519060200120905060007fff41620983935eb4d4a3c7384a066ca8c1d10cef9a5eca9eb97ca735cd14a7558888886040516020016108da9493929190612584565b604051602081830303815290604052805190602001209050600082826040516020016109079291906124a3565b60405160208183030381529060405280519060200120905060006001828888886040516000815260200160405260405161094494939291906125cc565b6020604051602081039080840390855afa158015610966573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166109995760405162461bcd60e51b81526004016106e590612634565b6001600160a01b03811660009081526007602052604090205489146109d05760405162461bcd60e51b81526004016106e5906128a5565b8742106109ef5760405162461bcd60e51b81526004016106e590612ca5565b6001600160a01b0381166000908152600760205260408120805491610a1383612da9565b9190505550610a22818b611d2f565b50505050505050505050565b60035481565b600481565b600881565b6005602052600090815260409020546001600160a01b031681565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6000610a8960046112fc565b80610a9c5750610a9c8362040000611a9e565b80610aae5750610aae62080000611d23565b15610ac357610abe848484610e40565b610ade565b610ade84848460405180602001604052806000815250611937565b5060019392505050565b6210000081565b60025481565b60008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb55490565b604081565b601281565b3360009081526008602090815260408083206001600160a01b038616845290915281205480610b5b8482612d1f565b11610b785760405162461bcd60e51b81526004016106e59061294a565b610b86846103588584612d1f565b949350505050565b602081565b610b9f62010000611d23565b610bbb5760405162461bcd60e51b81526004016106e5906128cc565b6001600160a01b038216610be15760405162461bcd60e51b81526004016106e590612bdb565b600354610bee8282612d1f565b11610c0b5760405162461bcd60e51b81526004016106e5906129d4565b6003546001600160c01b0390610c22908390612d1f565b1115610c405760405162461bcd60e51b81526004016106e5906126a4565b60025481600354610c519190612d1f565b1115610c6f5760405162461bcd60e51b81526004016106e59061286e565b8060036000828254610c819190612d1f565b90915550506001600160a01b03821660009081526004602052604081208054839290610cae908490612d1f565b90915550506001600160a01b03808316600090815260056020526040812054610cd8921683611dca565b816001600160a01b0316336001600160a01b03167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f083604051610d1b919061257b565b60405180910390a3816001600160a01b031660006001600160a01b0316336001600160a01b03167f769254a71d2f67d8ac6cb44f2803c0d05cfbcf9effadb6a984f10ff9de3df6c384604051610d71919061257b565b60405180910390a4816001600160a01b031660006001600160a01b0316600080516020612df183398151915283604051610dab919061257b565b60405180910390a35050565b60046020526000908152604090205481565b610dd6600160ff1b611d23565b610df25760405162461bcd60e51b81526004016106e590612a91565b8051610e059060019060208401906120f6565b507fee007fd2e1891a2f6c8408b57ade5b0550dea71a5a06cc4df7ded4646a4584a581604051610e3591906125ea565b60405180910390a150565b6001600160a01b03831633148015610e5d5750610e5d60016112fc565b80610e9357506001600160a01b0383163314801590610e935750610e8160026112fc565b80610e935750610e9362100000611d23565b6001600160a01b0384163314610ede576040518060400160405280602081526020017f7472616e7366657273206f6e20626568616c66206172652064697361626c6564815250610f0e565b604051806040016040528060168152602001751d1c985b9cd9995c9cc8185c9948191a5cd8589b195960521b8152505b90610f2c5760405162461bcd60e51b81526004016106e591906125ea565b506001600160a01b038316610f535760405162461bcd60e51b81526004016106e590612c12565b6001600160a01b038216610f795760405162461bcd60e51b81526004016106e590612a1a565b816001600160a01b0316836001600160a01b03161415610fab5760405162461bcd60e51b81526004016106e590612c56565b6001600160a01b038216301415610fd45760405162461bcd60e51b81526004016106e590612760565b8061101757816001600160a01b0316836001600160a01b0316600080516020612df18339815191528360405161100a919061257b565b60405180910390a3611281565b6001600160a01b038316331461112e576001600160a01b03831660009081526008602090815260408083203384529091529020548181101561106b5760405162461bcd60e51b81526004016106e590612b94565b6110758282612d57565b6001600160a01b03851660008181526008602090815260408083203380855292529091208390559192507f71594b34a69973da9bff6f72cc0aad2c51069b6b8e9c70c0648b58d10d7bd84b6110ca8585612d1f565b846040516110d9929190612cd0565b60405180910390a3336001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611124919061257b565b60405180910390a3505b6001600160a01b0383166000908152600460205260409020548111156111665760405162461bcd60e51b81526004016106e59061265f565b6001600160a01b0383166000908152600460205260408120805483929061118e908490612d57565b90915550506001600160a01b038216600090815260046020526040812080548392906111bb908490612d1f565b90915550506001600160a01b038084166000908152600560205260408082205485841683529120546111f292918216911683611dca565b816001600160a01b0316836001600160a01b0316336001600160a01b03167f769254a71d2f67d8ac6cb44f2803c0d05cfbcf9effadb6a984f10ff9de3df6c38460405161123f919061257b565b60405180910390a4816001600160a01b0316836001600160a01b0316600080516020612df183398151915283604051611278919061257b565b60405180910390a35b505050565b61129060206112fc565b6112ac5760405162461bcd60e51b81526004016106e590612b5d565b6112b63382611d2f565b50565b6220000081565b600860209081526000928352604080842090915290825290205481565b6001600160a01b0381166000908152600460205260409020545b919050565b60006107e0611309610af5565b83611e5f565b60006020819052908152604090205481565b60076020526000908152604090205481565b6006602052816000526040600020818154811061134f57600080fd5b6000918252602090912001546001600160401b0381169250600160401b90046001600160c01b0316905082565b6001600160a01b031660009081526006602052604090205490565b7f83ecb176af7c4f35a45ff0018282e3a05a1018065da866182df12285866f5a2c81565b6201000081565b600281565b600180546113d490612d6e565b80601f016020809104026020016040519081016040528092919081815260200182805461140090612d6e565b801561144d5780601f106114225761010080835404028352916020019161144d565b820191906000526020600020905b81548152906001019060200180831161143057829003601f168201915b505050505081565b61146162020000611d23565b611654576001600160a01b03821633148015611482575061148260086112fc565b806114a657506001600160a01b03821633148015906114a657506114a660106112fc565b6001600160a01b03831633146114f1576040518060400160405280601c81526020017f6275726e73206f6e20626568616c66206172652064697361626c65640000000081525061151d565b60405180604001604052806012815260200171189d5c9b9cc8185c9948191a5cd8589b195960721b8152505b9061153b5760405162461bcd60e51b81526004016106e591906125ea565b506001600160a01b0382163314611654576001600160a01b0382166000908152600860209081526040808320338452909152902054818110156115905760405162461bcd60e51b81526004016106e59061271d565b61159a8282612d57565b6001600160a01b0384166000818152600860209081526040808320338085529252909120839055919250907f71594b34a69973da9bff6f72cc0aad2c51069b6b8e9c70c0648b58d10d7bd84b6115f08585612d1f565b846040516115ff929190612cd0565b60405180910390a3336001600160a01b0316836001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161164a919061257b565b60405180910390a3505b806116715760405162461bcd60e51b81526004016106e590612921565b6001600160a01b0382166116975760405162461bcd60e51b81526004016106e590612a5c565b6001600160a01b0382166000908152600460205260409020548111156116cf5760405162461bcd60e51b81526004016106e590612b1c565b6001600160a01b038216600090815260046020526040812080548392906116f7908490612d57565b9250508190555080600360008282546117109190612d57565b90915550506001600160a01b0380831660009081526005602052604081205461173b92169083611dca565b816001600160a01b0316336001600160a01b03167fe8a89cc6e5096f9d9f43de82c077c1f4cfe707c0e0c2032176c68813b9ae6a5c8360405161177e919061257b565b60405180910390a360006001600160a01b0316826001600160a01b0316336001600160a01b03167f769254a71d2f67d8ac6cb44f2803c0d05cfbcf9effadb6a984f10ff9de3df6c3846040516117d4919061257b565b60405180910390a460006001600160a01b0316826001600160a01b0316600080516020612df183398151915283604051610dab919061257b565b3360009081526008602090815260408083206001600160a01b03861684529091528120548261184f5760405162461bcd60e51b81526004016106e59061299d565b8281101561186f5760405162461bcd60e51b81526004016106e5906127e9565b610b86846103588584612d57565b600061188a338484610a7d565b9392505050565b61189e600160ff1b611d23565b6118ba5760405162461bcd60e51b81526004016106e590612a91565b6001600160a01b0382166000908152602081905260409020546118df90339083611cf8565b6001600160a01b0383166000818152602081905260409081902083905551909133917f5a10526456f5116c0b7b80582c217d666243fd51b6a2d92c8011e601c2462e5f91610dab91869190612cd0565b600160ff1b81565b611942848484610e40565b61194b83611e66565b15611a0b57604051634fc3585960e01b81526000906001600160a01b03851690634fc35859906119859033908990889088906004016124d2565b602060405180830381600087803b15801561199f57600080fd5b505af11580156119b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d791906123d3565b90506001600160e01b03198116634fc3585960e01b14611a095760405162461bcd60e51b81526004016106e590612ae7565b505b50505050565b6001600160a01b0381166000908152600660205260408120805415611a7f5780548190611a4090600190612d57565b81548110611a5e57634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600160401b90046001600160c01b0316611a82565b60005b6001600160c01b03169392505050565b600181565b6204000081565b6001600160a01b03821660009081526020819052604081205461188a9083611e5f565b6001600160a01b0381166000908152600660209081526040808320805482518185028101850190935280835260609492939192909184015b82821015611b4857600084815260209081902060408051808201909152908401546001600160401b0381168252600160401b90046001600160c01b031681830152825260019092019101611af9565b505050509050919050565b6112b6600082611891565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6202000081565b7fff41620983935eb4d4a3c7384a066ca8c1d10cef9a5eca9eb97ca735cd14a75581565b6208000081565b6000438210611bdc5760405162461bcd60e51b81526004016106e5906127bd565b6001600160a01b03831660009081526006602052604090208054611c045760009150506107e0565b805483908290611c1690600190612d57565b81548110611c3457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160401b031611611c5f57611c5784611a11565b9150506107e0565b8281600081548110611c8157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160401b03161115611ca65760009150506107e0565b80611cb18585611e6c565b81548110611ccf57634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600160401b90046001600160c01b0316949350505050565b601081565b6001600160a01b03929092166000908152602081905260409020546000198084188216189216171690565b60006107e03383611a9e565b6001600160a01b0380831660009081526005602081815260408084208054600484529190942054929091528484166001600160a01b0319821617909255911690611d7a828483611dca565b826001600160a01b0316826001600160a01b0316856001600160a01b03167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a450505050565b816001600160a01b0316836001600160a01b03161480611de8575080155b15611df257611281565b6001600160a01b03831615611e2a576000611e0c84611a11565b90506000611e1a8383612d57565b9050611e27858383611f71565b50505b6001600160a01b03821615611281576000611e4483611a11565b90506000611e528383612d1f565b9050611a09848383611f71565b9081161490565b3b151590565b6001600160a01b0382166000908152600660205260408120805482908190611e9690600190612d57565b90505b81811115611f685760006002611eaf8484612d57565b611eb99190612d37565b611ec39083612d57565b90506000848281548110611ee757634e487b7160e01b600052603260045260246000fd5b6000918252602091829020604080518082019091529101546001600160401b038116808352600160401b9091046001600160c01b0316928201929092529150871415611f39575093506107e092505050565b80516001600160401b0316871115611f5357819350611f61565b611f5e600183612d57565b92505b5050611e99565b50949350505050565b6001600160a01b0383166000908152600660205260409020805415801590611fdb5750805443908290611fa690600190612d57565b81548110611fc457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160401b0316145b1561204657805482908290611ff290600190612d57565b8154811061201057634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160086101000a8154816001600160c01b0302191690836001600160c01b031602179055506120ad565b604080518082019091526001600160401b0343811682526001600160c01b03808516602080850191825285546001810187556000878152919091209451940180549151909216600160401b0293831667ffffffffffffffff19909116179091169190911790555b836001600160a01b03167f53ed7954de66613e30dd29b46ab783aa594e6309d021d8854c76bb3325d03aa384846040516120e8929190612cd0565b60405180910390a250505050565b82805461210290612d6e565b90600052602060002090601f016020900481019282612124576000855561216a565b82601f1061213d57805160ff191683800117855561216a565b8280016001018555821561216a579182015b8281111561216a57825182559160200191906001019061214f565b5061217692915061217a565b5090565b5b80821115612176576000815560010161217b565b60006001600160401b03808411156121a9576121a9612dda565b604051601f8501601f19908116603f011681019082821181831017156121d1576121d1612dda565b816040528093508581528686860111156121ea57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146112f757600080fd5b60006020828403121561222c578081fd5b61188a82612204565b60008060408385031215612247578081fd5b61225083612204565b915061225e60208401612204565b90509250929050565b60008060006060848603121561227b578081fd5b61228484612204565b925061229260208501612204565b9150604084013590509250925092565b600080600080608085870312156122b7578081fd5b6122c085612204565b93506122ce60208601612204565b92506040850135915060608501356001600160401b038111156122ef578182fd5b8501601f810187136122ff578182fd5b61230e8782356020840161218f565b91505092959194509250565b6000806040838503121561232c578182fd5b61233583612204565b946020939093013593505050565b600080600060608486031215612357578283fd5b61236084612204565b95602085013595506040909401359392505050565b60008060008060008060c0878903121561238d578182fd5b61239687612204565b95506020870135945060408701359350606087013560ff811681146123b9578283fd5b9598949750929560808101359460a0909101359350915050565b6000602082840312156123e4578081fd5b81516001600160e01b03198116811461188a578182fd5b60006020828403121561240c578081fd5b81356001600160401b03811115612421578182fd5b8201601f81018413612431578182fd5b610b868482356020840161218f565b600060208284031215612451578081fd5b5035919050565b60008151808452815b8181101561247d57602081850181015186830182015201612461565b8181111561248e5782602083870101525b50601f01601f19169290920160200192915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061250590830184612458565b9695505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561256357815180516001600160401b031685528601516001600160c01b031686850152928401929085019060010161252c565b5091979650505050505050565b901515815260200190565b90815260200190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b60006020825261188a6020830184612458565b60208082526019908201527f53594e523a207370656e646572206e6f7420616c6c6f77656400000000000000604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b60208082526025908201527f53594e523a207472616e7366657220616d6f756e7420657863656564732062616040820152646c616e636560d81b606082015260800190565b6020808252601f908201527f746f74616c20737570706c79206f766572666c6f77202875696e743139322900604082015260600190565b60208082526022908201527f64656c65676174696f6e73206f6e20626568616c66206172652064697361626c604082015261195960f21b606082015260800190565b60208082526023908201527f53594e523a206275726e20616d6f756e74206578636565647320616c6c6f77616040820152626e636560e81b606082015260800190565b6020808252603f908201527f696e76616c696420726563697069656e7420287472616e7366657220746f207460408201527f686520746f6b656e20736d61727420636f6e747261637420697473656c662900606082015260800190565b6020808252601290820152711b9bdd081e595d0819195d195c9b5a5b995960721b604082015260600190565b60208082526024908201527f53594e523a2064656372656173656420616c6c6f77616e63652062656c6f77206040820152637a65726f60e01b606082015260800190565b60208082526021908201527f53594e523a20617070726f766520746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526018908201527f7265616368656420746f74616c206d617820737570706c790000000000000000604082015260600190565b6020808252600d908201526c696e76616c6964206e6f6e636560981b604082015260600190565b60208082526035908201527f696e73756666696369656e742070726976696c656765732028524f4c455f544f6040820152744b454e5f43524541544f522072657175697265642960581b606082015260800190565b6020808252600f908201526e3d32b937903b30b63ab290313ab93760891b604082015260600190565b60208082526033908201527f7a65726f2076616c756520617070726f76616c20696e637265617365206f722060408201527261726974686d65746963206f766572666c6f7760681b606082015260800190565b6020808252601c908201527f7a65726f2076616c756520617070726f76616c20646563726561736500000000604082015260600190565b60208082526026908201527f7a65726f2076616c7565206d696e74206f722061726974686d65746963206f766040820152656572666c6f7760d01b606082015260800190565b60208082526022908201527f53594e523a207472616e7366657220746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252818101527f53594e523a206275726e2066726f6d20746865207a65726f2061646472657373604082015260600190565b60208082526036908201527f696e73756666696369656e742070726976696c656765732028524f4c455f4143604082015275434553535f4d414e414745522072657175697265642960501b606082015260800190565b6020808252818101527f696e76616c6964206f6e4552433230526563656976656420726573706f6e7365604082015260600190565b60208082526021908201527f53594e523a206275726e20616d6f756e7420657863656564732062616c616e636040820152606560f81b606082015260800190565b60208082526018908201527f64656c65676174696f6e73206172652064697361626c65640000000000000000604082015260600190565b60208082526027908201527f53594e523a207472616e7366657220616d6f756e74206578636565647320616c6040820152666c6f77616e636560c81b606082015260800190565b6020808252601e908201527f53594e523a206d696e7420746f20746865207a65726f20616464726573730000604082015260600190565b60208082526024908201527f53594e523a207472616e736665722066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252602f908201527f73656e64657220616e6420726563697069656e7420617265207468652073616d60408201526e6520285f66726f6d203d205f746f2960881b606082015260800190565b6020808252601190820152701cda59db985d1d5c9948195e1c1a5c9959607a1b604082015260600190565b918252602082015260400190565b63ffffffff91909116815260200190565b6001600160401b039290921682526001600160c01b0316602082015260400190565b60ff91909116815260200190565b60008219821115612d3257612d32612dc4565b500190565b600082612d5257634e487b7160e01b81526012600452602481fd5b500490565b600082821015612d6957612d69612dc4565b500390565b600281046001821680612d8257607f821691505b60208210811415612da357634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612dbd57612dbd612dc4565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122006950177339c38b6868b9ce4bebec4f72555bfaa425339e4a9a454971fbfb01b64736f6c63430008010033000000000000000000000000a71692d3dc79b0f5843cdb16b0eafb0b54e4dd0d00000000000000000000000000000000000000000000000000000002540be4000000000000000000000000008e75aee46961019a66a88670ec18f022b8ef815e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103275760003560e01c80637ecebe00116101b8578063bb4d443611610104578063e62cac76116100a2578063eaeded5f1161007c578063eaeded5f14610651578063f63c2f8214610664578063f822d5aa1461066c578063fcc2c0781461067f57610327565b8063e62cac7614610639578063e7a324dc14610641578063e98f5ba71461064957610327565b8063c688d693116100de578063c688d693146105e0578063ce9517cf146105f3578063d5bb7f6714610613578063dd62ed3e1461062657610327565b8063bb4d4436146105bd578063c0d6568d146105d0578063c5ff500c146105d857610327565b806395d89b4111610171578063a9059cbb1161014b578063a9059cbb1461057c578063ae5b102e1461058f578063ae682e2e146105a2578063b88d4fde146105aa57610327565b806395d89b411461054e5780639dc29fac14610556578063a457c2d71461056957610327565b80637ecebe00146104ef5780637fd491b01461050257806384b34a31146105235780638a114e13146105365780638d4e57e61461053e5780638f6fba8c1461054657610327565b8063313ce5671161027757806359b961ef1161023057806363152a501161020a57806363152a50146104a357806370a08231146104b6578063725f3626146104c957806374d5e100146104dc57610327565b806359b961ef146104755780635c19a95c146104885780635d3d4a4e1461049b57610327565b8063313ce5671461040c57806339509351146104215780633e9c5f7e1461043457806340c10f191461043c578063523fba7f1461044f578063537f53121461046257610327565b80631e0fa234116102e4578063278ab5f6116102be578063278ab5f6146103ec5780632ab4d052146103f45780632b521416146103fc5780632d4c39ea1461040457610327565b80631e0fa234146103b157806320606b70146103d157806323b872dd146103d957610327565b806306fdde031461032c578063095ea7b31461034a57806315d2c2251461036a57806318160ddd1461037f5780631993f554146103945780631a0b04ea146103a9575b600080fd5b610334610692565b60405161034191906125ea565b60405180910390f35b61035d61035836600461231a565b6106bd565b6040516103419190612570565b61037d610378366004612375565b6107e6565b005b610387610a2e565b604051610341919061257b565b61039c610a34565b6040516103419190612cde565b61039c610a39565b6103c46103bf36600461221b565b610a3e565b60405161034191906124be565b610387610a59565b61035d6103e7366004612267565b610a7d565b61039c610ae8565b610387610aef565b610387610af5565b61039c610b22565b610414610b27565b6040516103419190612d11565b61035d61042f36600461231a565b610b2c565b61039c610b8e565b61037d61044a36600461231a565b610b93565b61038761045d36600461221b565b610db7565b61037d6104703660046123fb565b610dc9565b61037d610483366004612267565b610e40565b61037d61049636600461221b565b611286565b61039c6112b9565b6103876104b1366004612235565b6112c0565b6103876104c436600461221b565b6112dd565b61035d6104d7366004612440565b6112fc565b6103876104ea36600461221b565b61130f565b6103876104fd36600461221b565b611321565b61051561051036600461231a565b611333565b604051610341929190612cef565b61038761053136600461221b565b61137c565b610387611397565b61039c6113bb565b61039c6113c2565b6103346113c7565b61037d61056436600461231a565b611455565b61035d61057736600461231a565b61180e565b61035d61058a36600461231a565b61187d565b61037d61059d36600461231a565b611891565b61038761192f565b61037d6105b83660046122a2565b611937565b6103876105cb36600461221b565b611a11565b61039c611a92565b61039c611a97565b61035d6105ee36600461231a565b611a9e565b61060661060136600461221b565b611ac1565b604051610341919061250f565b61037d610621366004612440565b611b53565b610387610634366004612235565b611b5e565b61039c611b89565b610387611b90565b61039c611bb4565b61038761065f36600461231a565b611bbb565b61039c611cf3565b61038761067a366004612343565b611cf8565b61035d61068d366004612440565b611d23565b6040518060400160405280600f81526020016e29bcb73234b1b0ba32902a37b5b2b760891b81525081565b60006001600160a01b0383166106ee5760405162461bcd60e51b81526004016106e59061282d565b60405180910390fd5b6106f860026112fc565b8061070b575061070b8362100000611a9e565b6107275760405162461bcd60e51b81526004016106e5906125fd565b3360008181526008602090815260408083206001600160a01b0388168085529252918290208054908690559151919290917f71594b34a69973da9bff6f72cc0aad2c51069b6b8e9c70c0648b58d10d7bd84b906107879085908890612cd0565b60405180910390a3836001600160a01b0316336001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516107d2919061257b565b60405180910390a360019150505b92915050565b6107f060406112fc565b61080c5760405162461bcd60e51b81526004016106e5906126db565b604080518082018252600f81526e29bcb73234b1b0ba32902a37b5b2b760891b6020918201529051600091610889917f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866917fc51fe26291bae0bfb682883d38f58a18d41d250f7ddf5d5fb65cf90ed74aa1409146913091016125a8565b60405160208183030381529060405280519060200120905060007fff41620983935eb4d4a3c7384a066ca8c1d10cef9a5eca9eb97ca735cd14a7558888886040516020016108da9493929190612584565b604051602081830303815290604052805190602001209050600082826040516020016109079291906124a3565b60405160208183030381529060405280519060200120905060006001828888886040516000815260200160405260405161094494939291906125cc565b6020604051602081039080840390855afa158015610966573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166109995760405162461bcd60e51b81526004016106e590612634565b6001600160a01b03811660009081526007602052604090205489146109d05760405162461bcd60e51b81526004016106e5906128a5565b8742106109ef5760405162461bcd60e51b81526004016106e590612ca5565b6001600160a01b0381166000908152600760205260408120805491610a1383612da9565b9190505550610a22818b611d2f565b50505050505050505050565b60035481565b600481565b600881565b6005602052600090815260409020546001600160a01b031681565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6000610a8960046112fc565b80610a9c5750610a9c8362040000611a9e565b80610aae5750610aae62080000611d23565b15610ac357610abe848484610e40565b610ade565b610ade84848460405180602001604052806000815250611937565b5060019392505050565b6210000081565b60025481565b60008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb55490565b604081565b601281565b3360009081526008602090815260408083206001600160a01b038616845290915281205480610b5b8482612d1f565b11610b785760405162461bcd60e51b81526004016106e59061294a565b610b86846103588584612d1f565b949350505050565b602081565b610b9f62010000611d23565b610bbb5760405162461bcd60e51b81526004016106e5906128cc565b6001600160a01b038216610be15760405162461bcd60e51b81526004016106e590612bdb565b600354610bee8282612d1f565b11610c0b5760405162461bcd60e51b81526004016106e5906129d4565b6003546001600160c01b0390610c22908390612d1f565b1115610c405760405162461bcd60e51b81526004016106e5906126a4565b60025481600354610c519190612d1f565b1115610c6f5760405162461bcd60e51b81526004016106e59061286e565b8060036000828254610c819190612d1f565b90915550506001600160a01b03821660009081526004602052604081208054839290610cae908490612d1f565b90915550506001600160a01b03808316600090815260056020526040812054610cd8921683611dca565b816001600160a01b0316336001600160a01b03167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f083604051610d1b919061257b565b60405180910390a3816001600160a01b031660006001600160a01b0316336001600160a01b03167f769254a71d2f67d8ac6cb44f2803c0d05cfbcf9effadb6a984f10ff9de3df6c384604051610d71919061257b565b60405180910390a4816001600160a01b031660006001600160a01b0316600080516020612df183398151915283604051610dab919061257b565b60405180910390a35050565b60046020526000908152604090205481565b610dd6600160ff1b611d23565b610df25760405162461bcd60e51b81526004016106e590612a91565b8051610e059060019060208401906120f6565b507fee007fd2e1891a2f6c8408b57ade5b0550dea71a5a06cc4df7ded4646a4584a581604051610e3591906125ea565b60405180910390a150565b6001600160a01b03831633148015610e5d5750610e5d60016112fc565b80610e9357506001600160a01b0383163314801590610e935750610e8160026112fc565b80610e935750610e9362100000611d23565b6001600160a01b0384163314610ede576040518060400160405280602081526020017f7472616e7366657273206f6e20626568616c66206172652064697361626c6564815250610f0e565b604051806040016040528060168152602001751d1c985b9cd9995c9cc8185c9948191a5cd8589b195960521b8152505b90610f2c5760405162461bcd60e51b81526004016106e591906125ea565b506001600160a01b038316610f535760405162461bcd60e51b81526004016106e590612c12565b6001600160a01b038216610f795760405162461bcd60e51b81526004016106e590612a1a565b816001600160a01b0316836001600160a01b03161415610fab5760405162461bcd60e51b81526004016106e590612c56565b6001600160a01b038216301415610fd45760405162461bcd60e51b81526004016106e590612760565b8061101757816001600160a01b0316836001600160a01b0316600080516020612df18339815191528360405161100a919061257b565b60405180910390a3611281565b6001600160a01b038316331461112e576001600160a01b03831660009081526008602090815260408083203384529091529020548181101561106b5760405162461bcd60e51b81526004016106e590612b94565b6110758282612d57565b6001600160a01b03851660008181526008602090815260408083203380855292529091208390559192507f71594b34a69973da9bff6f72cc0aad2c51069b6b8e9c70c0648b58d10d7bd84b6110ca8585612d1f565b846040516110d9929190612cd0565b60405180910390a3336001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611124919061257b565b60405180910390a3505b6001600160a01b0383166000908152600460205260409020548111156111665760405162461bcd60e51b81526004016106e59061265f565b6001600160a01b0383166000908152600460205260408120805483929061118e908490612d57565b90915550506001600160a01b038216600090815260046020526040812080548392906111bb908490612d1f565b90915550506001600160a01b038084166000908152600560205260408082205485841683529120546111f292918216911683611dca565b816001600160a01b0316836001600160a01b0316336001600160a01b03167f769254a71d2f67d8ac6cb44f2803c0d05cfbcf9effadb6a984f10ff9de3df6c38460405161123f919061257b565b60405180910390a4816001600160a01b0316836001600160a01b0316600080516020612df183398151915283604051611278919061257b565b60405180910390a35b505050565b61129060206112fc565b6112ac5760405162461bcd60e51b81526004016106e590612b5d565b6112b63382611d2f565b50565b6220000081565b600860209081526000928352604080842090915290825290205481565b6001600160a01b0381166000908152600460205260409020545b919050565b60006107e0611309610af5565b83611e5f565b60006020819052908152604090205481565b60076020526000908152604090205481565b6006602052816000526040600020818154811061134f57600080fd5b6000918252602090912001546001600160401b0381169250600160401b90046001600160c01b0316905082565b6001600160a01b031660009081526006602052604090205490565b7f83ecb176af7c4f35a45ff0018282e3a05a1018065da866182df12285866f5a2c81565b6201000081565b600281565b600180546113d490612d6e565b80601f016020809104026020016040519081016040528092919081815260200182805461140090612d6e565b801561144d5780601f106114225761010080835404028352916020019161144d565b820191906000526020600020905b81548152906001019060200180831161143057829003601f168201915b505050505081565b61146162020000611d23565b611654576001600160a01b03821633148015611482575061148260086112fc565b806114a657506001600160a01b03821633148015906114a657506114a660106112fc565b6001600160a01b03831633146114f1576040518060400160405280601c81526020017f6275726e73206f6e20626568616c66206172652064697361626c65640000000081525061151d565b60405180604001604052806012815260200171189d5c9b9cc8185c9948191a5cd8589b195960721b8152505b9061153b5760405162461bcd60e51b81526004016106e591906125ea565b506001600160a01b0382163314611654576001600160a01b0382166000908152600860209081526040808320338452909152902054818110156115905760405162461bcd60e51b81526004016106e59061271d565b61159a8282612d57565b6001600160a01b0384166000818152600860209081526040808320338085529252909120839055919250907f71594b34a69973da9bff6f72cc0aad2c51069b6b8e9c70c0648b58d10d7bd84b6115f08585612d1f565b846040516115ff929190612cd0565b60405180910390a3336001600160a01b0316836001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161164a919061257b565b60405180910390a3505b806116715760405162461bcd60e51b81526004016106e590612921565b6001600160a01b0382166116975760405162461bcd60e51b81526004016106e590612a5c565b6001600160a01b0382166000908152600460205260409020548111156116cf5760405162461bcd60e51b81526004016106e590612b1c565b6001600160a01b038216600090815260046020526040812080548392906116f7908490612d57565b9250508190555080600360008282546117109190612d57565b90915550506001600160a01b0380831660009081526005602052604081205461173b92169083611dca565b816001600160a01b0316336001600160a01b03167fe8a89cc6e5096f9d9f43de82c077c1f4cfe707c0e0c2032176c68813b9ae6a5c8360405161177e919061257b565b60405180910390a360006001600160a01b0316826001600160a01b0316336001600160a01b03167f769254a71d2f67d8ac6cb44f2803c0d05cfbcf9effadb6a984f10ff9de3df6c3846040516117d4919061257b565b60405180910390a460006001600160a01b0316826001600160a01b0316600080516020612df183398151915283604051610dab919061257b565b3360009081526008602090815260408083206001600160a01b03861684529091528120548261184f5760405162461bcd60e51b81526004016106e59061299d565b8281101561186f5760405162461bcd60e51b81526004016106e5906127e9565b610b86846103588584612d57565b600061188a338484610a7d565b9392505050565b61189e600160ff1b611d23565b6118ba5760405162461bcd60e51b81526004016106e590612a91565b6001600160a01b0382166000908152602081905260409020546118df90339083611cf8565b6001600160a01b0383166000818152602081905260409081902083905551909133917f5a10526456f5116c0b7b80582c217d666243fd51b6a2d92c8011e601c2462e5f91610dab91869190612cd0565b600160ff1b81565b611942848484610e40565b61194b83611e66565b15611a0b57604051634fc3585960e01b81526000906001600160a01b03851690634fc35859906119859033908990889088906004016124d2565b602060405180830381600087803b15801561199f57600080fd5b505af11580156119b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d791906123d3565b90506001600160e01b03198116634fc3585960e01b14611a095760405162461bcd60e51b81526004016106e590612ae7565b505b50505050565b6001600160a01b0381166000908152600660205260408120805415611a7f5780548190611a4090600190612d57565b81548110611a5e57634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600160401b90046001600160c01b0316611a82565b60005b6001600160c01b03169392505050565b600181565b6204000081565b6001600160a01b03821660009081526020819052604081205461188a9083611e5f565b6001600160a01b0381166000908152600660209081526040808320805482518185028101850190935280835260609492939192909184015b82821015611b4857600084815260209081902060408051808201909152908401546001600160401b0381168252600160401b90046001600160c01b031681830152825260019092019101611af9565b505050509050919050565b6112b6600082611891565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6202000081565b7fff41620983935eb4d4a3c7384a066ca8c1d10cef9a5eca9eb97ca735cd14a75581565b6208000081565b6000438210611bdc5760405162461bcd60e51b81526004016106e5906127bd565b6001600160a01b03831660009081526006602052604090208054611c045760009150506107e0565b805483908290611c1690600190612d57565b81548110611c3457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160401b031611611c5f57611c5784611a11565b9150506107e0565b8281600081548110611c8157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160401b03161115611ca65760009150506107e0565b80611cb18585611e6c565b81548110611ccf57634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600160401b90046001600160c01b0316949350505050565b601081565b6001600160a01b03929092166000908152602081905260409020546000198084188216189216171690565b60006107e03383611a9e565b6001600160a01b0380831660009081526005602081815260408084208054600484529190942054929091528484166001600160a01b0319821617909255911690611d7a828483611dca565b826001600160a01b0316826001600160a01b0316856001600160a01b03167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a450505050565b816001600160a01b0316836001600160a01b03161480611de8575080155b15611df257611281565b6001600160a01b03831615611e2a576000611e0c84611a11565b90506000611e1a8383612d57565b9050611e27858383611f71565b50505b6001600160a01b03821615611281576000611e4483611a11565b90506000611e528383612d1f565b9050611a09848383611f71565b9081161490565b3b151590565b6001600160a01b0382166000908152600660205260408120805482908190611e9690600190612d57565b90505b81811115611f685760006002611eaf8484612d57565b611eb99190612d37565b611ec39083612d57565b90506000848281548110611ee757634e487b7160e01b600052603260045260246000fd5b6000918252602091829020604080518082019091529101546001600160401b038116808352600160401b9091046001600160c01b0316928201929092529150871415611f39575093506107e092505050565b80516001600160401b0316871115611f5357819350611f61565b611f5e600183612d57565b92505b5050611e99565b50949350505050565b6001600160a01b0383166000908152600660205260409020805415801590611fdb5750805443908290611fa690600190612d57565b81548110611fc457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160401b0316145b1561204657805482908290611ff290600190612d57565b8154811061201057634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160086101000a8154816001600160c01b0302191690836001600160c01b031602179055506120ad565b604080518082019091526001600160401b0343811682526001600160c01b03808516602080850191825285546001810187556000878152919091209451940180549151909216600160401b0293831667ffffffffffffffff19909116179091169190911790555b836001600160a01b03167f53ed7954de66613e30dd29b46ab783aa594e6309d021d8854c76bb3325d03aa384846040516120e8929190612cd0565b60405180910390a250505050565b82805461210290612d6e565b90600052602060002090601f016020900481019282612124576000855561216a565b82601f1061213d57805160ff191683800117855561216a565b8280016001018555821561216a579182015b8281111561216a57825182559160200191906001019061214f565b5061217692915061217a565b5090565b5b80821115612176576000815560010161217b565b60006001600160401b03808411156121a9576121a9612dda565b604051601f8501601f19908116603f011681019082821181831017156121d1576121d1612dda565b816040528093508581528686860111156121ea57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146112f757600080fd5b60006020828403121561222c578081fd5b61188a82612204565b60008060408385031215612247578081fd5b61225083612204565b915061225e60208401612204565b90509250929050565b60008060006060848603121561227b578081fd5b61228484612204565b925061229260208501612204565b9150604084013590509250925092565b600080600080608085870312156122b7578081fd5b6122c085612204565b93506122ce60208601612204565b92506040850135915060608501356001600160401b038111156122ef578182fd5b8501601f810187136122ff578182fd5b61230e8782356020840161218f565b91505092959194509250565b6000806040838503121561232c578182fd5b61233583612204565b946020939093013593505050565b600080600060608486031215612357578283fd5b61236084612204565b95602085013595506040909401359392505050565b60008060008060008060c0878903121561238d578182fd5b61239687612204565b95506020870135945060408701359350606087013560ff811681146123b9578283fd5b9598949750929560808101359460a0909101359350915050565b6000602082840312156123e4578081fd5b81516001600160e01b03198116811461188a578182fd5b60006020828403121561240c578081fd5b81356001600160401b03811115612421578182fd5b8201601f81018413612431578182fd5b610b868482356020840161218f565b600060208284031215612451578081fd5b5035919050565b60008151808452815b8181101561247d57602081850181015186830182015201612461565b8181111561248e5782602083870101525b50601f01601f19169290920160200192915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061250590830184612458565b9695505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561256357815180516001600160401b031685528601516001600160c01b031686850152928401929085019060010161252c565b5091979650505050505050565b901515815260200190565b90815260200190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b60006020825261188a6020830184612458565b60208082526019908201527f53594e523a207370656e646572206e6f7420616c6c6f77656400000000000000604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b60208082526025908201527f53594e523a207472616e7366657220616d6f756e7420657863656564732062616040820152646c616e636560d81b606082015260800190565b6020808252601f908201527f746f74616c20737570706c79206f766572666c6f77202875696e743139322900604082015260600190565b60208082526022908201527f64656c65676174696f6e73206f6e20626568616c66206172652064697361626c604082015261195960f21b606082015260800190565b60208082526023908201527f53594e523a206275726e20616d6f756e74206578636565647320616c6c6f77616040820152626e636560e81b606082015260800190565b6020808252603f908201527f696e76616c696420726563697069656e7420287472616e7366657220746f207460408201527f686520746f6b656e20736d61727420636f6e747261637420697473656c662900606082015260800190565b6020808252601290820152711b9bdd081e595d0819195d195c9b5a5b995960721b604082015260600190565b60208082526024908201527f53594e523a2064656372656173656420616c6c6f77616e63652062656c6f77206040820152637a65726f60e01b606082015260800190565b60208082526021908201527f53594e523a20617070726f766520746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526018908201527f7265616368656420746f74616c206d617820737570706c790000000000000000604082015260600190565b6020808252600d908201526c696e76616c6964206e6f6e636560981b604082015260600190565b60208082526035908201527f696e73756666696369656e742070726976696c656765732028524f4c455f544f6040820152744b454e5f43524541544f522072657175697265642960581b606082015260800190565b6020808252600f908201526e3d32b937903b30b63ab290313ab93760891b604082015260600190565b60208082526033908201527f7a65726f2076616c756520617070726f76616c20696e637265617365206f722060408201527261726974686d65746963206f766572666c6f7760681b606082015260800190565b6020808252601c908201527f7a65726f2076616c756520617070726f76616c20646563726561736500000000604082015260600190565b60208082526026908201527f7a65726f2076616c7565206d696e74206f722061726974686d65746963206f766040820152656572666c6f7760d01b606082015260800190565b60208082526022908201527f53594e523a207472616e7366657220746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252818101527f53594e523a206275726e2066726f6d20746865207a65726f2061646472657373604082015260600190565b60208082526036908201527f696e73756666696369656e742070726976696c656765732028524f4c455f4143604082015275434553535f4d414e414745522072657175697265642960501b606082015260800190565b6020808252818101527f696e76616c6964206f6e4552433230526563656976656420726573706f6e7365604082015260600190565b60208082526021908201527f53594e523a206275726e20616d6f756e7420657863656564732062616c616e636040820152606560f81b606082015260800190565b60208082526018908201527f64656c65676174696f6e73206172652064697361626c65640000000000000000604082015260600190565b60208082526027908201527f53594e523a207472616e7366657220616d6f756e74206578636565647320616c6040820152666c6f77616e636560c81b606082015260800190565b6020808252601e908201527f53594e523a206d696e7420746f20746865207a65726f20616464726573730000604082015260600190565b60208082526024908201527f53594e523a207472616e736665722066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252602f908201527f73656e64657220616e6420726563697069656e7420617265207468652073616d60408201526e6520285f66726f6d203d205f746f2960881b606082015260800190565b6020808252601190820152701cda59db985d1d5c9948195e1c1a5c9959607a1b604082015260600190565b918252602082015260400190565b63ffffffff91909116815260200190565b6001600160401b039290921682526001600160c01b0316602082015260400190565b60ff91909116815260200190565b60008219821115612d3257612d32612dc4565b500190565b600082612d5257634e487b7160e01b81526012600452602481fd5b500490565b600082821015612d6957612d69612dc4565b500390565b600281046001821680612d8257607f821691505b60208210811415612da357634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612dbd57612dbd612dc4565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122006950177339c38b6868b9ce4bebec4f72555bfaa425339e4a9a454971fbfb01b64736f6c63430008010033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a71692d3dc79b0f5843cdb16b0eafb0b54e4dd0d00000000000000000000000000000000000000000000000000000002540be4000000000000000000000000008e75aee46961019a66a88670ec18f022b8ef815e
-----Decoded View---------------
Arg [0] : _initialHolder (address): 0xa71692D3Dc79B0F5843CDb16b0eafb0b54E4DD0d
Arg [1] : _maxTotalSupply (uint256): 10000000000
Arg [2] : _superAdmin (address): 0x8e75AEe46961019A66A88670ec18f022B8ef815E
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a71692d3dc79b0f5843cdb16b0eafb0b54e4dd0d
Arg [1] : 00000000000000000000000000000000000000000000000000000002540be400
Arg [2] : 0000000000000000000000008e75aee46961019a66a88670ec18f022b8ef815e
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.