ERC-20
Overview
Max Total Supply
63,744,037.242576027627427051 NEU
Holders
2,374 (0.00%)
Market
Price
$0.01 @ 0.000002 ETH (+0.75%)
Onchain Market Cap
$345,483.64
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 18 Decimals)
Balance
953.459206499210549719 NEUValue
$5.17 ( ~0.00227040614009283 Eth) [0.0015%]Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Neumark
Compiler Version
v0.4.15+commit.bbb8e64f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-11-08 */ pragma solidity 0.4.15; /// @title provides subject to role checking logic contract IAccessPolicy { //////////////////////// // Public functions //////////////////////// /// @notice We don't make this function constant to allow for state-updating access controls such as rate limiting. /// @dev checks if subject belongs to requested role for particular object /// @param subject address to be checked against role, typically msg.sender /// @param role identifier of required role /// @param object contract instance context for role checking, typically contract requesting the check /// @param verb additional data, in current AccessControll implementation msg.sig /// @return if subject belongs to a role function allowed( address subject, bytes32 role, address object, bytes4 verb ) public returns (bool); } /// @title enables access control in implementing contract /// @dev see AccessControlled for implementation contract IAccessControlled { //////////////////////// // Events //////////////////////// /// @dev must log on access policy change event LogAccessPolicyChanged( address controller, IAccessPolicy oldPolicy, IAccessPolicy newPolicy ); //////////////////////// // Public functions //////////////////////// /// @dev allows to change access control mechanism for this contract /// this method must be itself access controlled, see AccessControlled implementation and notice below /// @notice it is a huge issue for Solidity that modifiers are not part of function signature /// then interfaces could be used for example to control access semantics /// @param newPolicy new access policy to controll this contract /// @param newAccessController address of ROLE_ACCESS_CONTROLLER of new policy that can set access to this contract function setAccessPolicy(IAccessPolicy newPolicy, address newAccessController) public; function accessPolicy() public constant returns (IAccessPolicy); } contract StandardRoles { //////////////////////// // Constants //////////////////////// // @notice Soldity somehow doesn't evaluate this compile time // @dev role which has rights to change permissions and set new policy in contract, keccak256("AccessController") bytes32 internal constant ROLE_ACCESS_CONTROLLER = 0xac42f8beb17975ed062dcb80c63e6d203ef1c2c335ced149dc5664cc671cb7da; } /// @title Granular code execution permissions /// @notice Intended to replace existing Ownable pattern with more granular permissions set to execute smart contract functions /// for each function where 'only' modifier is applied, IAccessPolicy implementation is called to evaluate if msg.sender belongs to required role for contract being called. /// Access evaluation specific belong to IAccessPolicy implementation, see RoleBasedAccessPolicy for details. /// @dev Should be inherited by a contract requiring such permissions controll. IAccessPolicy must be provided in constructor. Access policy may be replaced to a different one /// by msg.sender with ROLE_ACCESS_CONTROLLER role contract AccessControlled is IAccessControlled, StandardRoles { //////////////////////// // Mutable state //////////////////////// IAccessPolicy private _accessPolicy; //////////////////////// // Modifiers //////////////////////// /// @dev limits function execution only to senders assigned to required 'role' modifier only(bytes32 role) { require(_accessPolicy.allowed(msg.sender, role, this, msg.sig)); _; } //////////////////////// // Constructor //////////////////////// function AccessControlled(IAccessPolicy policy) internal { require(address(policy) != 0x0); _accessPolicy = policy; } //////////////////////// // Public functions //////////////////////// // // Implements IAccessControlled // function setAccessPolicy(IAccessPolicy newPolicy, address newAccessController) public only(ROLE_ACCESS_CONTROLLER) { // ROLE_ACCESS_CONTROLLER must be present // under the new policy. This provides some // protection against locking yourself out. require(newPolicy.allowed(newAccessController, ROLE_ACCESS_CONTROLLER, this, msg.sig)); // We can now safely set the new policy without foot shooting. IAccessPolicy oldPolicy = _accessPolicy; _accessPolicy = newPolicy; // Log event LogAccessPolicyChanged(msg.sender, oldPolicy, newPolicy); } function accessPolicy() public constant returns (IAccessPolicy) { return _accessPolicy; } } contract AccessRoles { //////////////////////// // Constants //////////////////////// // NOTE: All roles are set to the keccak256 hash of the // CamelCased role name, i.e. // ROLE_LOCKED_ACCOUNT_ADMIN = keccak256("LockedAccountAdmin") // may setup LockedAccount, change disbursal mechanism and set migration bytes32 internal constant ROLE_LOCKED_ACCOUNT_ADMIN = 0x4675da546d2d92c5b86c4f726a9e61010dce91cccc2491ce6019e78b09d2572e; // may setup whitelists and abort whitelisting contract with curve rollback bytes32 internal constant ROLE_WHITELIST_ADMIN = 0xaef456e7c864418e1d2a40d996ca4febf3a7e317fe3af5a7ea4dda59033bbe5c; // May issue (generate) Neumarks bytes32 internal constant ROLE_NEUMARK_ISSUER = 0x921c3afa1f1fff707a785f953a1e197bd28c9c50e300424e015953cbf120c06c; // May burn Neumarks it owns bytes32 internal constant ROLE_NEUMARK_BURNER = 0x19ce331285f41739cd3362a3ec176edffe014311c0f8075834fdd19d6718e69f; // May create new snapshots on Neumark bytes32 internal constant ROLE_SNAPSHOT_CREATOR = 0x08c1785afc57f933523bc52583a72ce9e19b2241354e04dd86f41f887e3d8174; // May enable/disable transfers on Neumark bytes32 internal constant ROLE_TRANSFER_ADMIN = 0xb6527e944caca3d151b1f94e49ac5e223142694860743e66164720e034ec9b19; // may reclaim tokens/ether from contracts supporting IReclaimable interface bytes32 internal constant ROLE_RECLAIMER = 0x0542bbd0c672578966dcc525b30aa16723bb042675554ac5b0362f86b6e97dc5; // represents legally platform operator in case of forks and contracts with legal agreement attached. keccak256("PlatformOperatorRepresentative") bytes32 internal constant ROLE_PLATFORM_OPERATOR_REPRESENTATIVE = 0xb2b321377653f655206f71514ff9f150d0822d062a5abcf220d549e1da7999f0; // allows to deposit EUR-T and allow addresses to send and receive EUR-T. keccak256("EurtDepositManager") bytes32 internal constant ROLE_EURT_DEPOSIT_MANAGER = 0x7c8ecdcba80ce87848d16ad77ef57cc196c208fc95c5638e4a48c681a34d4fe7; } contract IEthereumForkArbiter { //////////////////////// // Events //////////////////////// event LogForkAnnounced( string name, string url, uint256 blockNumber ); event LogForkSigned( uint256 blockNumber, bytes32 blockHash ); //////////////////////// // Public functions //////////////////////// function nextForkName() public constant returns (string); function nextForkUrl() public constant returns (string); function nextForkBlockNumber() public constant returns (uint256); function lastSignedBlockNumber() public constant returns (uint256); function lastSignedBlockHash() public constant returns (bytes32); function lastSignedTimestamp() public constant returns (uint256); } /** * @title legally binding smart contract * @dev General approach to paring legal and smart contracts: * 1. All terms and agreement are between two parties: here between legal representation of platform operator representative and platform investor. * 2. Parties are represented by public Ethereum addresses. Platform investor is and address that holds and controls funds and receives and controls Neumark token * 3. Legal agreement has immutable part that corresponds to smart contract code and mutable part that may change for example due to changing regulations or other externalities that smart contract does not control. * 4. There should be a provision in legal document that future changes in mutable part cannot change terms of immutable part. * 5. Immutable part links to corresponding smart contract via its address. * 6. Additional provision should be added if smart contract supports it * a. Fork provision * b. Bugfixing provision (unilateral code update mechanism) * c. Migration provision (bilateral code update mechanism) * * Details on Agreement base class: * 1. We bind smart contract to legal contract by storing uri (preferably ipfs or hash) of the legal contract in the smart contract. It is however crucial that such binding is done by platform operator representation so transaction establishing the link must be signed by respective wallet ('amendAgreement') * 2. Mutable part of agreement may change. We should be able to amend the uri later. Previous amendments should not be lost and should be retrievable (`amendAgreement` and 'pastAgreement' functions). * 3. It is up to deriving contract to decide where to put 'acceptAgreement' modifier. However situation where there is no cryptographic proof that given address was really acting in the transaction should be avoided, simplest example being 'to' address in `transfer` function of ERC20. * **/ contract Agreement is AccessControlled, AccessRoles { //////////////////////// // Type declarations //////////////////////// /// @notice agreement with signature of the platform operator representative struct SignedAgreement { address platformOperatorRepresentative; uint256 signedBlockTimestamp; string agreementUri; } //////////////////////// // Immutable state //////////////////////// IEthereumForkArbiter private ETHEREUM_FORK_ARBITER; //////////////////////// // Mutable state //////////////////////// // stores all amendments to the agreement, first amendment is the original SignedAgreement[] private _amendments; // stores block numbers of all addresses that signed the agreement (signatory => block number) mapping(address => uint256) private _signatories; //////////////////////// // Events //////////////////////// event LogAgreementAccepted( address indexed accepter ); event LogAgreementAmended( address platformOperatorRepresentative, string agreementUri ); //////////////////////// // Modifiers //////////////////////// /// @notice logs that agreement was accepted by platform user /// @dev intended to be added to functions that if used make 'accepter' origin to enter legally binding agreement modifier acceptAgreement(address accepter) { if(_signatories[accepter] == 0) { require(_amendments.length > 0); _signatories[accepter] = block.number; LogAgreementAccepted(accepter); } _; } //////////////////////// // Constructor //////////////////////// function Agreement(IAccessPolicy accessPolicy, IEthereumForkArbiter forkArbiter) AccessControlled(accessPolicy) internal { require(forkArbiter != IEthereumForkArbiter(0x0)); ETHEREUM_FORK_ARBITER = forkArbiter; } //////////////////////// // Public functions //////////////////////// function amendAgreement(string agreementUri) public only(ROLE_PLATFORM_OPERATOR_REPRESENTATIVE) { SignedAgreement memory amendment = SignedAgreement({ platformOperatorRepresentative: msg.sender, signedBlockTimestamp: block.timestamp, agreementUri: agreementUri }); _amendments.push(amendment); LogAgreementAmended(msg.sender, agreementUri); } function ethereumForkArbiter() public constant returns (IEthereumForkArbiter) { return ETHEREUM_FORK_ARBITER; } function currentAgreement() public constant returns ( address platformOperatorRepresentative, uint256 signedBlockTimestamp, string agreementUri, uint256 index ) { require(_amendments.length > 0); uint256 last = _amendments.length - 1; SignedAgreement storage amendment = _amendments[last]; return ( amendment.platformOperatorRepresentative, amendment.signedBlockTimestamp, amendment.agreementUri, last ); } function pastAgreement(uint256 amendmentIndex) public constant returns ( address platformOperatorRepresentative, uint256 signedBlockTimestamp, string agreementUri, uint256 index ) { SignedAgreement storage amendment = _amendments[amendmentIndex]; return ( amendment.platformOperatorRepresentative, amendment.signedBlockTimestamp, amendment.agreementUri, amendmentIndex ); } function agreementSignedAtBlock(address signatory) public constant returns (uint256) { return _signatories[signatory]; } } contract NeumarkIssuanceCurve { //////////////////////// // Constants //////////////////////// // maximum number of neumarks that may be created uint256 private constant NEUMARK_CAP = 1500000000000000000000000000; // initial neumark reward fraction (controls curve steepness) uint256 private constant INITIAL_REWARD_FRACTION = 6500000000000000000; // stop issuing new Neumarks above this Euro value (as it goes quickly to zero) uint256 private constant ISSUANCE_LIMIT_EUR_ULPS = 8300000000000000000000000000; // approximate curve linearly above this Euro value uint256 private constant LINEAR_APPROX_LIMIT_EUR_ULPS = 2100000000000000000000000000; uint256 private constant NEUMARKS_AT_LINEAR_LIMIT_ULPS = 1499832501287264827896539871; uint256 private constant TOT_LINEAR_NEUMARKS_ULPS = NEUMARK_CAP - NEUMARKS_AT_LINEAR_LIMIT_ULPS; uint256 private constant TOT_LINEAR_EUR_ULPS = ISSUANCE_LIMIT_EUR_ULPS - LINEAR_APPROX_LIMIT_EUR_ULPS; //////////////////////// // Public functions //////////////////////// /// @notice returns additional amount of neumarks issued for euroUlps at totalEuroUlps /// @param totalEuroUlps actual curve position from which neumarks will be issued /// @param euroUlps amount against which neumarks will be issued function incremental(uint256 totalEuroUlps, uint256 euroUlps) public constant returns (uint256 neumarkUlps) { require(totalEuroUlps + euroUlps >= totalEuroUlps); uint256 from = cumulative(totalEuroUlps); uint256 to = cumulative(totalEuroUlps + euroUlps); // as expansion is not monotonic for large totalEuroUlps, assert below may fail // example: totalEuroUlps=1.999999999999999999999000000e+27 and euroUlps=50 assert(to >= from); return to - from; } /// @notice returns amount of euro corresponding to burned neumarks /// @param totalEuroUlps actual curve position from which neumarks will be burned /// @param burnNeumarkUlps amount of neumarks to burn function incrementalInverse(uint256 totalEuroUlps, uint256 burnNeumarkUlps) public constant returns (uint256 euroUlps) { uint256 totalNeumarkUlps = cumulative(totalEuroUlps); require(totalNeumarkUlps >= burnNeumarkUlps); uint256 fromNmk = totalNeumarkUlps - burnNeumarkUlps; uint newTotalEuroUlps = cumulativeInverse(fromNmk, 0, totalEuroUlps); // yes, this may overflow due to non monotonic inverse function assert(totalEuroUlps >= newTotalEuroUlps); return totalEuroUlps - newTotalEuroUlps; } /// @notice returns amount of euro corresponding to burned neumarks /// @param totalEuroUlps actual curve position from which neumarks will be burned /// @param burnNeumarkUlps amount of neumarks to burn /// @param minEurUlps euro amount to start inverse search from, inclusive /// @param maxEurUlps euro amount to end inverse search to, inclusive function incrementalInverse(uint256 totalEuroUlps, uint256 burnNeumarkUlps, uint256 minEurUlps, uint256 maxEurUlps) public constant returns (uint256 euroUlps) { uint256 totalNeumarkUlps = cumulative(totalEuroUlps); require(totalNeumarkUlps >= burnNeumarkUlps); uint256 fromNmk = totalNeumarkUlps - burnNeumarkUlps; uint newTotalEuroUlps = cumulativeInverse(fromNmk, minEurUlps, maxEurUlps); // yes, this may overflow due to non monotonic inverse function assert(totalEuroUlps >= newTotalEuroUlps); return totalEuroUlps - newTotalEuroUlps; } /// @notice finds total amount of neumarks issued for given amount of Euro /// @dev binomial expansion does not guarantee monotonicity on uint256 precision for large euroUlps /// function below is not monotonic function cumulative(uint256 euroUlps) public constant returns(uint256 neumarkUlps) { // Return the cap if euroUlps is above the limit. if (euroUlps >= ISSUANCE_LIMIT_EUR_ULPS) { return NEUMARK_CAP; } // use linear approximation above limit below // binomial expansion does not guarantee monotonicity on uint256 precision for large euroUlps if (euroUlps >= LINEAR_APPROX_LIMIT_EUR_ULPS) { // (euroUlps - LINEAR_APPROX_LIMIT_EUR_ULPS) is small so expression does not overflow return NEUMARKS_AT_LINEAR_LIMIT_ULPS + (TOT_LINEAR_NEUMARKS_ULPS * (euroUlps - LINEAR_APPROX_LIMIT_EUR_ULPS)) / TOT_LINEAR_EUR_ULPS; } // Approximate cap-cap·(1-1/D)^n using the Binomial expansion // http://galileo.phys.virginia.edu/classes/152.mf1i.spring02/Exponential_Function.htm // Function[imax, -CAP*Sum[(-IR*EUR/CAP)^i/Factorial[i], {i, imax}]] // which may be simplified to // Function[imax, -CAP*Sum[(EUR)^i/(Factorial[i]*(-d)^i), {i, 1, imax}]] // where d = cap/initial_reward uint256 d = 230769230769230769230769231; // NEUMARK_CAP / INITIAL_REWARD_FRACTION uint256 term = NEUMARK_CAP; uint256 sum = 0; uint256 denom = d; do assembly { // We use assembler primarily to avoid the expensive // divide-by-zero check solc inserts for the / operator. term := div(mul(term, euroUlps), denom) sum := add(sum, term) denom := add(denom, d) // sub next term as we have power of negative value in the binomial expansion term := div(mul(term, euroUlps), denom) sum := sub(sum, term) denom := add(denom, d) } while (term != 0); return sum; } /// @notice find issuance curve inverse by binary search /// @param neumarkUlps neumark amount to compute inverse for /// @param minEurUlps minimum search range for the inverse, inclusive /// @param maxEurUlps maxium search range for the inverse, inclusive /// @dev in case of approximate search (no exact inverse) upper element of minimal search range is returned /// @dev in case of many possible inverses, the lowest one will be used (if range permits) /// @dev corresponds to a linear search that returns first euroUlp value that has cumulative() equal or greater than neumarkUlps function cumulativeInverse(uint256 neumarkUlps, uint256 minEurUlps, uint256 maxEurUlps) public constant returns (uint256 euroUlps) { require(maxEurUlps >= minEurUlps); require(cumulative(minEurUlps) <= neumarkUlps); require(cumulative(maxEurUlps) >= neumarkUlps); uint256 min = minEurUlps; uint256 max = maxEurUlps; // Binary search while (max > min) { uint256 mid = (max + min) / 2; uint256 val = cumulative(mid); // exact solution should not be used, a late points of the curve when many euroUlps are needed to // increase by one nmkUlp this will lead to "indeterministic" inverse values that depend on the initial min and max // and further binary division -> you can land at any of the euro value that is mapped to the same nmk value // with condition below removed, binary search will point to the lowest eur value possible which is good because it cannot be exploited even with 0 gas costs /* if (val == neumarkUlps) { return mid; }*/ // NOTE: approximate search (no inverse) must return upper element of the final range // last step of approximate search is always (min, min+1) so new mid is (2*min+1)/2 => min // so new min = mid + 1 = max which was upper range. and that ends the search // NOTE: when there are multiple inverses for the same neumarkUlps, the `max` will be dragged down // by `max = mid` expression to the lowest eur value of inverse. works only for ranges that cover all points of multiple inverse if (val < neumarkUlps) { min = mid + 1; } else { max = mid; } } // NOTE: It is possible that there is no inverse // for example curve(0) = 0 and curve(1) = 6, so // there is no value y such that curve(y) = 5. // When there is no inverse, we must return upper element of last search range. // This has the effect of reversing the curve less when // burning Neumarks. This ensures that Neumarks can always // be burned. It also ensure that the total supply of Neumarks // remains below the cap. return max; } function neumarkCap() public constant returns (uint256) { return NEUMARK_CAP; } function initialRewardFraction() public constant returns (uint256) { return INITIAL_REWARD_FRACTION; } } contract IBasicToken { //////////////////////// // Events //////////////////////// event Transfer( address indexed from, address indexed to, uint256 amount); //////////////////////// // Public functions //////////////////////// /// @dev This function makes it easy to get the total number of tokens /// @return The total number of tokens function totalSupply() public constant returns (uint256); /// @param owner The address that's balance is being requested /// @return The balance of `owner` at the current block function balanceOf(address owner) public constant returns (uint256 balance); /// @notice Send `amount` tokens to `to` from `msg.sender` /// @param to The address of the recipient /// @param amount The amount of tokens to be transferred /// @return Whether the transfer was successful or not function transfer(address to, uint256 amount) public returns (bool success); } /// @title allows deriving contract to recover any token or ether that it has balance of /// @notice note that this opens your contracts to claims from various people saying they lost tokens and they want them back /// be ready to handle such claims /// @dev use with care! /// 1. ROLE_RECLAIMER is allowed to claim tokens, it's not returning tokens to original owner /// 2. in derived contract that holds any token by design you must override `reclaim` and block such possibility. /// see LockedAccount as an example contract Reclaimable is AccessControlled, AccessRoles { //////////////////////// // Constants //////////////////////// IBasicToken constant internal RECLAIM_ETHER = IBasicToken(0x0); //////////////////////// // Public functions //////////////////////// function reclaim(IBasicToken token) public only(ROLE_RECLAIMER) { address reclaimer = msg.sender; if(token == RECLAIM_ETHER) { reclaimer.transfer(this.balance); } else { uint256 balance = token.balanceOf(this); require(token.transfer(reclaimer, balance)); } } } /// @title advances snapshot id on demand /// @dev see Snapshot folder for implementation examples ie. DailyAndSnapshotable contract contract ISnapshotable { //////////////////////// // Events //////////////////////// /// @dev should log each new snapshot id created, including snapshots created automatically via MSnapshotPolicy event LogSnapshotCreated(uint256 snapshotId); //////////////////////// // Public functions //////////////////////// /// always creates new snapshot id which gets returned /// however, there is no guarantee that any snapshot will be created with this id, this depends on the implementation of MSnaphotPolicy function createSnapshot() public returns (uint256); /// upper bound of series snapshotIds for which there's a value function currentSnapshotId() public constant returns (uint256); } /// @title Abstracts snapshot id creation logics /// @dev Mixin (internal interface) of the snapshot policy which abstracts snapshot id creation logics from Snapshot contract /// @dev to be implemented and such implementation should be mixed with Snapshot-derived contract, see EveryBlock for simplest example of implementation and StandardSnapshotToken contract MSnapshotPolicy { //////////////////////// // Internal functions //////////////////////// // The snapshot Ids need to be strictly increasing. // Whenever the snaspshot id changes, a new snapshot will be created. // As long as the same snapshot id is being returned, last snapshot will be updated as this indicates that snapshot id didn't change // // Values passed to `hasValueAt` and `valuteAt` are required // to be less or equal to `mCurrentSnapshotId()`. function mCurrentSnapshotId() internal returns (uint256); } /// @title creates snapshot id on each day boundary and allows to create additional snapshots within a given day /// @dev snapshots are encoded in single uint256, where high 128 bits represents a day number (from unix epoch) and low 128 bits represents additional snapshots within given day create via ISnapshotable contract DailyAndSnapshotable is MSnapshotPolicy, ISnapshotable { //////////////////////// // Constants //////////////////////// // Floor[2**128 / 1 days] uint256 private MAX_TIMESTAMP = 3938453320844195178974243141571391; //////////////////////// // Mutable state //////////////////////// uint256 private _currentSnapshotId; //////////////////////// // Constructor //////////////////////// /// @param start snapshotId from which to start generating values /// @dev start must be for the same day or 0, required for token cloning function DailyAndSnapshotable(uint256 start) internal { // 0 is invalid value as we are past unix epoch if (start > 0) { uint256 dayBase = snapshotAt(block.timestamp); require(start >= dayBase); // dayBase + 2**128 will not overflow as it is based on block.timestamp require(start < dayBase + 2**128); _currentSnapshotId = start; } } //////////////////////// // Public functions //////////////////////// function snapshotAt(uint256 timestamp) public constant returns (uint256) { require(timestamp < MAX_TIMESTAMP); uint256 dayBase = 2**128 * (timestamp / 1 days); return dayBase; } // // Implements ISnapshotable // function createSnapshot() public returns (uint256) { uint256 dayBase = 2**128 * (block.timestamp / 1 days); if (dayBase > _currentSnapshotId) { // New day has started, create snapshot for midnight _currentSnapshotId = dayBase; } else { // within single day, increase counter (assume 2**128 will not be crossed) _currentSnapshotId += 1; } // Log and return LogSnapshotCreated(_currentSnapshotId); return _currentSnapshotId; } function currentSnapshotId() public constant returns (uint256) { return mCurrentSnapshotId(); } //////////////////////// // Internal functions //////////////////////// // // Implements MSnapshotPolicy // function mCurrentSnapshotId() internal returns (uint256) { uint256 dayBase = 2**128 * (block.timestamp / 1 days); // New day has started if (dayBase > _currentSnapshotId) { _currentSnapshotId = dayBase; LogSnapshotCreated(dayBase); } return _currentSnapshotId; } } contract ITokenMetadata { //////////////////////// // Public functions //////////////////////// function symbol() public constant returns (string); function name() public constant returns (string); function decimals() public constant returns (uint8); } /// @title adds token metadata to token contract /// @dev see Neumark for example implementation contract TokenMetadata is ITokenMetadata { //////////////////////// // Immutable state //////////////////////// // The Token's name: e.g. DigixDAO Tokens string private NAME; // An identifier: e.g. REP string private SYMBOL; // Number of decimals of the smallest unit uint8 private DECIMALS; // An arbitrary versioning scheme string private VERSION; //////////////////////// // Constructor //////////////////////// /// @notice Constructor to set metadata /// @param tokenName Name of the new token /// @param decimalUnits Number of decimals of the new token /// @param tokenSymbol Token Symbol for the new token /// @param version Token version ie. when cloning is used function TokenMetadata( string tokenName, uint8 decimalUnits, string tokenSymbol, string version ) public { NAME = tokenName; // Set the name SYMBOL = tokenSymbol; // Set the symbol DECIMALS = decimalUnits; // Set the decimals VERSION = version; } //////////////////////// // Public functions //////////////////////// function name() public constant returns (string) { return NAME; } function symbol() public constant returns (string) { return SYMBOL; } function decimals() public constant returns (uint8) { return DECIMALS; } function version() public constant returns (string) { return VERSION; } } contract IsContract { //////////////////////// // Internal functions //////////////////////// function isContract(address addr) internal constant returns (bool) { uint256 size; // takes 700 gas assembly { size := extcodesize(addr) } return size > 0; } } contract IERC20Allowance { //////////////////////// // Events //////////////////////// event Approval( address indexed owner, address indexed spender, uint256 amount); //////////////////////// // Public functions //////////////////////// /// @dev This function makes it easy to read the `allowed[]` map /// @param owner The address of the account that owns the token /// @param spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens of owner that spender is allowed /// to spend function allowance(address owner, address spender) public constant returns (uint256 remaining); /// @notice `msg.sender` approves `spender` to spend `amount` tokens on /// its behalf. This is a modified version of the ERC20 approve function /// to be a little bit safer /// @param spender The address of the account able to transfer the tokens /// @param amount The amount of tokens to be approved for transfer /// @return True if the approval was successful function approve(address spender, uint256 amount) public returns (bool success); /// @notice Send `amount` tokens to `to` from `from` on the condition it /// is approved by `from` /// @param from The address holding the tokens being transferred /// @param to The address of the recipient /// @param amount The amount of tokens to be transferred /// @return True if the transfer was successful function transferFrom(address from, address to, uint256 amount) public returns (bool success); } contract IERC20Token is IBasicToken, IERC20Allowance { } contract IERC223Callback { //////////////////////// // Public functions //////////////////////// function onTokenTransfer( address from, uint256 amount, bytes data ) public; } contract IERC223Token is IBasicToken { /// @dev Departure: We do not log data, it has no advantage over a standard /// log event. By sticking to the standard log event we /// stay compatible with constracts that expect and ERC20 token. // event Transfer( // address indexed from, // address indexed to, // uint256 amount, // bytes data); /// @dev Departure: We do not use the callback on regular transfer calls to /// stay compatible with constracts that expect and ERC20 token. // function transfer(address to, uint256 amount) // public // returns (bool); //////////////////////// // Public functions //////////////////////// function transfer(address to, uint256 amount, bytes data) public returns (bool); } /// @title controls spending approvals /// @dev TokenAllowance observes this interface, Neumark contract implements it contract MTokenAllowanceController { //////////////////////// // Internal functions //////////////////////// /// @notice Notifies the controller about an approval allowing the /// controller to react if desired /// @param owner The address that calls `approve()` /// @param spender The spender in the `approve()` call /// @param amount The amount in the `approve()` call /// @return False if the controller does not authorize the approval function mOnApprove( address owner, address spender, uint256 amount ) internal returns (bool allow); } /// @title controls token transfers /// @dev BasicSnapshotToken observes this interface, Neumark contract implements it contract MTokenTransferController { //////////////////////// // Internal functions //////////////////////// /// @notice Notifies the controller about a token transfer allowing the /// controller to react if desired /// @param from The origin of the transfer /// @param to The destination of the transfer /// @param amount The amount of the transfer /// @return False if the controller does not authorize the transfer function mOnTransfer( address from, address to, uint256 amount ) internal returns (bool allow); } /// @title controls approvals and transfers /// @dev The token controller contract must implement these functions, see Neumark as example /// @dev please note that controller may be a separate contract that is called from mOnTransfer and mOnApprove functions contract MTokenController is MTokenTransferController, MTokenAllowanceController { } /// @title internal token transfer function /// @dev see BasicSnapshotToken for implementation contract MTokenTransfer { //////////////////////// // Internal functions //////////////////////// /// @dev This is the actual transfer function in the token contract, it can /// only be called by other functions in this contract. /// @param from The address holding the tokens being transferred /// @param to The address of the recipient /// @param amount The amount of tokens to be transferred /// @dev reverts if transfer was not successful function mTransfer( address from, address to, uint256 amount ) internal; } contract IERC677Callback { //////////////////////// // Public functions //////////////////////// // NOTE: This call can be initiated by anyone. You need to make sure that // it is send by the token (`require(msg.sender == token)`) or make sure // amount is valid (`require(token.allowance(this) >= amount)`). function receiveApproval( address from, uint256 amount, address token, // IERC667Token bytes data ) public returns (bool success); } contract IERC677Allowance is IERC20Allowance { //////////////////////// // Public functions //////////////////////// /// @notice `msg.sender` approves `spender` to send `amount` tokens on /// its behalf, and then a function is triggered in the contract that is /// being approved, `spender`. This allows users to use their tokens to /// interact with contracts in one function call instead of two /// @param spender The address of the contract able to transfer the tokens /// @param amount The amount of tokens to be approved for transfer /// @return True if the function call was successful function approveAndCall(address spender, uint256 amount, bytes extraData) public returns (bool success); } contract IERC677Token is IERC20Token, IERC677Allowance { } /// @title token spending approval and transfer /// @dev implements token approval and transfers and exposes relevant part of ERC20 and ERC677 approveAndCall /// may be mixed in with any basic token (implementing mTransfer) like BasicSnapshotToken or MintableSnapshotToken to add approval mechanism /// observes MTokenAllowanceController interface /// observes MTokenTransfer contract TokenAllowance is MTokenTransfer, MTokenAllowanceController, IERC20Allowance, IERC677Token { //////////////////////// // Mutable state //////////////////////// // `allowed` tracks rights to spends others tokens as per ERC20 mapping (address => mapping (address => uint256)) private _allowed; //////////////////////// // Constructor //////////////////////// function TokenAllowance() internal { } //////////////////////// // Public functions //////////////////////// // // Implements IERC20Token // /// @dev This function makes it easy to read the `allowed[]` map /// @param owner The address of the account that owns the token /// @param spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens of _owner that _spender is allowed /// to spend function allowance(address owner, address spender) public constant returns (uint256 remaining) { return _allowed[owner][spender]; } /// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on /// its behalf. This is a modified version of the ERC20 approve function /// where allowance per spender must be 0 to allow change of such allowance /// @param spender The address of the account able to transfer the tokens /// @param amount The amount of tokens to be approved for transfer /// @return True or reverts, False is never returned function approve(address spender, uint256 amount) public returns (bool success) { // Alerts the token controller of the approve function call require(mOnApprove(msg.sender, spender, amount)); // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender,0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require((amount == 0) || (_allowed[msg.sender][spender] == 0)); _allowed[msg.sender][spender] = amount; Approval(msg.sender, spender, amount); return true; } /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it /// is approved by `_from` /// @param from The address holding the tokens being transferred /// @param to The address of the recipient /// @param amount The amount of tokens to be transferred /// @return True if the transfer was successful, reverts in any other case function transferFrom(address from, address to, uint256 amount) public returns (bool success) { // The standard ERC 20 transferFrom functionality bool amountApproved = _allowed[from][msg.sender] >= amount; require(amountApproved); _allowed[from][msg.sender] -= amount; mTransfer(from, to, amount); return true; } // // Implements IERC677Token // /// @notice `msg.sender` approves `_spender` to send `_amount` tokens on /// its behalf, and then a function is triggered in the contract that is /// being approved, `_spender`. This allows users to use their tokens to /// interact with contracts in one function call instead of two /// @param spender The address of the contract able to transfer the tokens /// @param amount The amount of tokens to be approved for transfer /// @return True or reverts, False is never returned function approveAndCall( address spender, uint256 amount, bytes extraData ) public returns (bool success) { require(approve(spender, amount)); success = IERC677Callback(spender).receiveApproval( msg.sender, amount, this, extraData ); require(success); return true; } } /// @title Reads and writes snapshots /// @dev Manages reading and writing a series of values, where each value has assigned a snapshot id for access to historical data /// @dev may be added to any contract to provide snapshotting mechanism. should be mixed in with any of MSnapshotPolicy implementations to customize snapshot creation mechanics /// observes MSnapshotPolicy /// based on MiniMe token contract Snapshot is MSnapshotPolicy { //////////////////////// // Types //////////////////////// /// @dev `Values` is the structure that attaches a snapshot id to a /// given value, the snapshot id attached is the one that last changed the /// value struct Values { // `snapshotId` is the snapshot id that the value was generated at uint256 snapshotId; // `value` at a specific snapshot id uint256 value; } //////////////////////// // Internal functions //////////////////////// function hasValue( Values[] storage values ) internal constant returns (bool) { return values.length > 0; } /// @dev makes sure that 'snapshotId' between current snapshot id (mCurrentSnapshotId) and first snapshot id. this guarantees that getValueAt returns value from one of the snapshots. function hasValueAt( Values[] storage values, uint256 snapshotId ) internal constant returns (bool) { require(snapshotId <= mCurrentSnapshotId()); return values.length > 0 && values[0].snapshotId <= snapshotId; } /// gets last value in the series function getValue( Values[] storage values, uint256 defaultValue ) internal constant returns (uint256) { if (values.length == 0) { return defaultValue; } else { uint256 last = values.length - 1; return values[last].value; } } /// @dev `getValueAt` retrieves value at a given snapshot id /// @param values The series of values being queried /// @param snapshotId Snapshot id to retrieve the value at /// @return Value in series being queried function getValueAt( Values[] storage values, uint256 snapshotId, uint256 defaultValue ) internal constant returns (uint256) { require(snapshotId <= mCurrentSnapshotId()); // Empty value if (values.length == 0) { return defaultValue; } // Shortcut for the out of bounds snapshots uint256 last = values.length - 1; uint256 lastSnapshot = values[last].snapshotId; if (snapshotId >= lastSnapshot) { return values[last].value; } uint256 firstSnapshot = values[0].snapshotId; if (snapshotId < firstSnapshot) { return defaultValue; } // Binary search of the value in the array uint256 min = 0; uint256 max = last; while (max > min) { uint256 mid = (max + min + 1) / 2; // must always return lower indice for approximate searches if (values[mid].snapshotId <= snapshotId) { min = mid; } else { max = mid - 1; } } return values[min].value; } /// @dev `setValue` used to update sequence at next snapshot /// @param values The sequence being updated /// @param value The new last value of sequence function setValue( Values[] storage values, uint256 value ) internal { // TODO: simplify or break into smaller functions uint256 currentSnapshotId = mCurrentSnapshotId(); // Always create a new entry if there currently is no value bool empty = values.length == 0; if (empty) { // Create a new entry values.push( Values({ snapshotId: currentSnapshotId, value: value }) ); return; } uint256 last = values.length - 1; bool hasNewSnapshot = values[last].snapshotId < currentSnapshotId; if (hasNewSnapshot) { // Do nothing if the value was not modified bool unmodified = values[last].value == value; if (unmodified) { return; } // Create new entry values.push( Values({ snapshotId: currentSnapshotId, value: value }) ); } else { // We are updating the currentSnapshotId bool previousUnmodified = last > 0 && values[last - 1].value == value; if (previousUnmodified) { // Remove current snapshot if current value was set to previous value delete values[last]; values.length--; return; } // Overwrite next snapshot entry values[last].value = value; } } } /// @title access to snapshots of a token /// @notice allows to implement complex token holder rights like revenue disbursal or voting /// @notice snapshots are series of values with assigned ids. ids increase strictly. particular id mechanism is not assumed contract ITokenSnapshots { //////////////////////// // Public functions //////////////////////// /// @notice Total amount of tokens at a specific `snapshotId`. /// @param snapshotId of snapshot at which totalSupply is queried /// @return The total amount of tokens at `snapshotId` /// @dev reverts on snapshotIds greater than currentSnapshotId() /// @dev returns 0 for snapshotIds less than snapshotId of first value function totalSupplyAt(uint256 snapshotId) public constant returns(uint256); /// @dev Queries the balance of `owner` at a specific `snapshotId` /// @param owner The address from which the balance will be retrieved /// @param snapshotId of snapshot at which the balance is queried /// @return The balance at `snapshotId` function balanceOfAt(address owner, uint256 snapshotId) public constant returns (uint256); /// @notice upper bound of series of snapshotIds for which there's a value in series /// @return snapshotId function currentSnapshotId() public constant returns (uint256); } /// @title represents link between cloned and parent token /// @dev when token is clone from other token, initial balances of the cloned token /// correspond to balances of parent token at the moment of parent snapshot id specified /// @notice please note that other tokens beside snapshot token may be cloned contract IClonedTokenParent is ITokenSnapshots { //////////////////////// // Public functions //////////////////////// /// @return address of parent token, address(0) if root /// @dev parent token does not need to clonable, nor snapshottable, just a normal token function parentToken() public constant returns(IClonedTokenParent parent); /// @return snapshot at wchich initial token distribution was taken function parentSnapshotId() public constant returns(uint256 snapshotId); } /// @title token with snapshots and transfer functionality /// @dev observes MTokenTransferController interface /// observes ISnapshotToken interface /// implementes MTokenTransfer interface contract BasicSnapshotToken is MTokenTransfer, MTokenTransferController, IBasicToken, IClonedTokenParent, Snapshot { //////////////////////// // Immutable state //////////////////////// // `PARENT_TOKEN` is the Token address that was cloned to produce this token; // it will be 0x0 for a token that was not cloned IClonedTokenParent private PARENT_TOKEN; // `PARENT_SNAPSHOT_ID` is the snapshot id from the Parent Token that was // used to determine the initial distribution of the cloned token uint256 private PARENT_SNAPSHOT_ID; //////////////////////// // Mutable state //////////////////////// // `balances` is the map that tracks the balance of each address, in this // contract when the balance changes the snapshot id that the change // occurred is also included in the map mapping (address => Values[]) internal _balances; // Tracks the history of the `totalSupply` of the token Values[] internal _totalSupplyValues; //////////////////////// // Constructor //////////////////////// /// @notice Constructor to create snapshot token /// @param parentToken Address of the parent token, set to 0x0 if it is a /// new token /// @param parentSnapshotId at which snapshot id clone was created, set to 0 to clone at upper bound /// @dev please not that as long as cloned token does not overwrite value at current snapshot id, it will refer /// to parent token at which this snapshot still may change until snapshot id increases. for that time tokens are coupled /// this is prevented by parentSnapshotId value of parentToken.currentSnapshotId() - 1 being the maxiumum /// see SnapshotToken.js test to learn consequences coupling has. function BasicSnapshotToken( IClonedTokenParent parentToken, uint256 parentSnapshotId ) Snapshot() internal { PARENT_TOKEN = parentToken; if (parentToken == address(0)) { require(parentSnapshotId == 0); } else { if (parentSnapshotId == 0) { require(parentToken.currentSnapshotId() > 0); PARENT_SNAPSHOT_ID = parentToken.currentSnapshotId() - 1; } else { PARENT_SNAPSHOT_ID = parentSnapshotId; } } } //////////////////////// // Public functions //////////////////////// // // Implements IBasicToken // /// @dev This function makes it easy to get the total number of tokens /// @return The total number of tokens function totalSupply() public constant returns (uint256) { return totalSupplyAtInternal(mCurrentSnapshotId()); } /// @param owner The address that's balance is being requested /// @return The balance of `owner` at the current block function balanceOf(address owner) public constant returns (uint256 balance) { return balanceOfAtInternal(owner, mCurrentSnapshotId()); } /// @notice Send `amount` tokens to `to` from `msg.sender` /// @param to The address of the recipient /// @param amount The amount of tokens to be transferred /// @return True if the transfer was successful, reverts in any other case function transfer(address to, uint256 amount) public returns (bool success) { mTransfer(msg.sender, to, amount); return true; } // // Implements ITokenSnapshots // function totalSupplyAt(uint256 snapshotId) public constant returns(uint256) { return totalSupplyAtInternal(snapshotId); } function balanceOfAt(address owner, uint256 snapshotId) public constant returns (uint256) { return balanceOfAtInternal(owner, snapshotId); } function currentSnapshotId() public constant returns (uint256) { return mCurrentSnapshotId(); } // // Implements IClonedTokenParent // function parentToken() public constant returns(IClonedTokenParent parent) { return PARENT_TOKEN; } /// @return snapshot at wchich initial token distribution was taken function parentSnapshotId() public constant returns(uint256 snapshotId) { return PARENT_SNAPSHOT_ID; } // // Other public functions // /// @notice gets all token balances of 'owner' /// @dev intended to be called via eth_call where gas limit is not an issue function allBalancesOf(address owner) external constant returns (uint256[2][]) { /* very nice and working implementation below, // copy to memory Values[] memory values = _balances[owner]; do assembly { // in memory structs have simple layout where every item occupies uint256 balances := values } while (false);*/ Values[] storage values = _balances[owner]; uint256[2][] memory balances = new uint256[2][](values.length); for(uint256 ii = 0; ii < values.length; ++ii) { balances[ii] = [values[ii].snapshotId, values[ii].value]; } return balances; } //////////////////////// // Internal functions //////////////////////// function totalSupplyAtInternal(uint256 snapshotId) public constant returns(uint256) { Values[] storage values = _totalSupplyValues; // If there is a value, return it, reverts if value is in the future if (hasValueAt(values, snapshotId)) { return getValueAt(values, snapshotId, 0); } // Try parent contract at or before the fork if (address(PARENT_TOKEN) != 0) { uint256 earlierSnapshotId = PARENT_SNAPSHOT_ID > snapshotId ? snapshotId : PARENT_SNAPSHOT_ID; return PARENT_TOKEN.totalSupplyAt(earlierSnapshotId); } // Default to an empty balance return 0; } // get balance at snapshot if with continuation in parent token function balanceOfAtInternal(address owner, uint256 snapshotId) internal constant returns (uint256) { Values[] storage values = _balances[owner]; // If there is a value, return it, reverts if value is in the future if (hasValueAt(values, snapshotId)) { return getValueAt(values, snapshotId, 0); } // Try parent contract at or before the fork if (PARENT_TOKEN != address(0)) { uint256 earlierSnapshotId = PARENT_SNAPSHOT_ID > snapshotId ? snapshotId : PARENT_SNAPSHOT_ID; return PARENT_TOKEN.balanceOfAt(owner, earlierSnapshotId); } // Default to an empty balance return 0; } // // Implements MTokenTransfer // /// @dev This is the actual transfer function in the token contract, it can /// only be called by other functions in this contract. /// @param from The address holding the tokens being transferred /// @param to The address of the recipient /// @param amount The amount of tokens to be transferred /// @return True if the transfer was successful, reverts in any other case function mTransfer( address from, address to, uint256 amount ) internal { // never send to address 0 require(to != address(0)); // block transfers in clone that points to future/current snapshots of patent token require(parentToken() == address(0) || parentSnapshotId() < parentToken().currentSnapshotId()); // Alerts the token controller of the transfer require(mOnTransfer(from, to, amount)); // If the amount being transfered is more than the balance of the // account the transfer reverts var previousBalanceFrom = balanceOf(from); require(previousBalanceFrom >= amount); // First update the balance array with the new value for the address // sending the tokens uint256 newBalanceFrom = previousBalanceFrom - amount; setValue(_balances[from], newBalanceFrom); // Then update the balance array with the new value for the address // receiving the tokens uint256 previousBalanceTo = balanceOf(to); uint256 newBalanceTo = previousBalanceTo + amount; assert(newBalanceTo >= previousBalanceTo); // Check for overflow setValue(_balances[to], newBalanceTo); // An event to make the transfer easy to find on the blockchain Transfer(from, to, amount); } } /// @title token generation and destruction /// @dev internal interface providing token generation and destruction, see MintableSnapshotToken for implementation contract MTokenMint { //////////////////////// // Internal functions //////////////////////// /// @notice Generates `amount` tokens that are assigned to `owner` /// @param owner The address that will be assigned the new tokens /// @param amount The quantity of tokens generated /// @dev reverts if tokens could not be generated function mGenerateTokens(address owner, uint256 amount) internal; /// @notice Burns `amount` tokens from `owner` /// @param owner The address that will lose the tokens /// @param amount The quantity of tokens to burn /// @dev reverts if tokens could not be destroyed function mDestroyTokens(address owner, uint256 amount) internal; } /// @title basic snapshot token with facitilites to generate and destroy tokens /// @dev implementes MTokenMint, does not expose any public functions that create/destroy tokens contract MintableSnapshotToken is BasicSnapshotToken, MTokenMint { //////////////////////// // Constructor //////////////////////// /// @notice Constructor to create a MintableSnapshotToken /// @param parentToken Address of the parent token, set to 0x0 if it is a /// new token function MintableSnapshotToken( IClonedTokenParent parentToken, uint256 parentSnapshotId ) BasicSnapshotToken(parentToken, parentSnapshotId) internal {} /// @notice Generates `amount` tokens that are assigned to `owner` /// @param owner The address that will be assigned the new tokens /// @param amount The quantity of tokens generated function mGenerateTokens(address owner, uint256 amount) internal { // never create for address 0 require(owner != address(0)); // block changes in clone that points to future/current snapshots of patent token require(parentToken() == address(0) || parentSnapshotId() < parentToken().currentSnapshotId()); uint256 curTotalSupply = totalSupply(); uint256 newTotalSupply = curTotalSupply + amount; require(newTotalSupply >= curTotalSupply); // Check for overflow uint256 previousBalanceTo = balanceOf(owner); uint256 newBalanceTo = previousBalanceTo + amount; assert(newBalanceTo >= previousBalanceTo); // Check for overflow setValue(_totalSupplyValues, newTotalSupply); setValue(_balances[owner], newBalanceTo); Transfer(0, owner, amount); } /// @notice Burns `amount` tokens from `owner` /// @param owner The address that will lose the tokens /// @param amount The quantity of tokens to burn function mDestroyTokens(address owner, uint256 amount) internal { // block changes in clone that points to future/current snapshots of patent token require(parentToken() == address(0) || parentSnapshotId() < parentToken().currentSnapshotId()); uint256 curTotalSupply = totalSupply(); require(curTotalSupply >= amount); uint256 previousBalanceFrom = balanceOf(owner); require(previousBalanceFrom >= amount); uint256 newTotalSupply = curTotalSupply - amount; uint256 newBalanceFrom = previousBalanceFrom - amount; setValue(_totalSupplyValues, newTotalSupply); setValue(_balances[owner], newBalanceFrom); Transfer(owner, 0, amount); } } /* Copyright 2016, Jordi Baylina Copyright 2017, Remco Bloemen, Marcin Rudolf This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /// @title StandardSnapshotToken Contract /// @author Jordi Baylina, Remco Bloemen, Marcin Rudolf /// @dev This token contract's goal is to make it easy for anyone to clone this /// token using the token distribution at a given block, this will allow DAO's /// and DApps to upgrade their features in a decentralized manner without /// affecting the original token /// @dev It is ERC20 compliant, but still needs to under go further testing. /// @dev Various contracts are composed to provide required functionality of this token, different compositions are possible /// MintableSnapshotToken provides transfer, miniting and snapshotting functions /// TokenAllowance provides approve/transferFrom functions /// TokenMetadata adds name, symbol and other token metadata /// @dev This token is still abstract, Snapshot, BasicSnapshotToken and TokenAllowance observe interfaces that must be implemented /// MSnapshotPolicy - particular snapshot id creation mechanism /// MTokenController - controlls approvals and transfers /// see Neumark as an example /// @dev implements ERC223 token transfer contract StandardSnapshotToken is IERC20Token, MintableSnapshotToken, TokenAllowance, IERC223Token, IsContract { //////////////////////// // Constructor //////////////////////// /// @notice Constructor to create a MiniMeToken /// is a new token /// param tokenName Name of the new token /// param decimalUnits Number of decimals of the new token /// param tokenSymbol Token Symbol for the new token function StandardSnapshotToken( IClonedTokenParent parentToken, uint256 parentSnapshotId ) MintableSnapshotToken(parentToken, parentSnapshotId) TokenAllowance() internal {} //////////////////////// // Public functions //////////////////////// // // Implements IERC223Token // function transfer(address to, uint256 amount, bytes data) public returns (bool) { // it is necessary to point out implementation to be called BasicSnapshotToken.mTransfer(msg.sender, to, amount); // Notify the receiving contract. if (isContract(to)) { IERC223Callback(to).onTokenTransfer(msg.sender, amount, data); } return true; } } contract Neumark is AccessControlled, AccessRoles, Agreement, DailyAndSnapshotable, StandardSnapshotToken, TokenMetadata, NeumarkIssuanceCurve, Reclaimable { //////////////////////// // Constants //////////////////////// string private constant TOKEN_NAME = "Neumark"; uint8 private constant TOKEN_DECIMALS = 18; string private constant TOKEN_SYMBOL = "NEU"; string private constant VERSION = "NMK_1.0"; //////////////////////// // Mutable state //////////////////////// // disable transfers when Neumark is created bool private _transferEnabled = false; // at which point on curve new Neumarks will be created, see NeumarkIssuanceCurve contract // do not use to get total invested funds. see burn(). this is just a cache for expensive inverse function uint256 private _totalEurUlps; //////////////////////// // Events //////////////////////// event LogNeumarksIssued( address indexed owner, uint256 euroUlps, uint256 neumarkUlps ); event LogNeumarksBurned( address indexed owner, uint256 euroUlps, uint256 neumarkUlps ); //////////////////////// // Constructor //////////////////////// function Neumark( IAccessPolicy accessPolicy, IEthereumForkArbiter forkArbiter ) AccessControlled(accessPolicy) AccessRoles() Agreement(accessPolicy, forkArbiter) StandardSnapshotToken( IClonedTokenParent(0x0), 0 ) TokenMetadata( TOKEN_NAME, TOKEN_DECIMALS, TOKEN_SYMBOL, VERSION ) DailyAndSnapshotable(0) NeumarkIssuanceCurve() Reclaimable() public {} //////////////////////// // Public functions //////////////////////// /// @notice issues new Neumarks to msg.sender with reward at current curve position /// moves curve position by euroUlps /// callable only by ROLE_NEUMARK_ISSUER function issueForEuro(uint256 euroUlps) public only(ROLE_NEUMARK_ISSUER) acceptAgreement(msg.sender) returns (uint256) { require(_totalEurUlps + euroUlps >= _totalEurUlps); uint256 neumarkUlps = incremental(_totalEurUlps, euroUlps); _totalEurUlps += euroUlps; mGenerateTokens(msg.sender, neumarkUlps); LogNeumarksIssued(msg.sender, euroUlps, neumarkUlps); return neumarkUlps; } /// @notice used by ROLE_NEUMARK_ISSUER to transer newly issued neumarks /// typically to the investor and platform operator function distribute(address to, uint256 neumarkUlps) public only(ROLE_NEUMARK_ISSUER) acceptAgreement(to) { mTransfer(msg.sender, to, neumarkUlps); } /// @notice msg.sender can burn their Neumarks, curve is rolled back using inverse /// curve. as a result cost of Neumark gets lower (reward is higher) function burn(uint256 neumarkUlps) public only(ROLE_NEUMARK_BURNER) { burnPrivate(neumarkUlps, 0, _totalEurUlps); } /// @notice executes as function above but allows to provide search range for low gas burning function burn(uint256 neumarkUlps, uint256 minEurUlps, uint256 maxEurUlps) public only(ROLE_NEUMARK_BURNER) { burnPrivate(neumarkUlps, minEurUlps, maxEurUlps); } function enableTransfer(bool enabled) public only(ROLE_TRANSFER_ADMIN) { _transferEnabled = enabled; } function createSnapshot() public only(ROLE_SNAPSHOT_CREATOR) returns (uint256) { return DailyAndSnapshotable.createSnapshot(); } function transferEnabled() public constant returns (bool) { return _transferEnabled; } function totalEuroUlps() public constant returns (uint256) { return _totalEurUlps; } function incremental(uint256 euroUlps) public constant returns (uint256 neumarkUlps) { return incremental(_totalEurUlps, euroUlps); } //////////////////////// // Internal functions //////////////////////// // // Implements MTokenController // function mOnTransfer( address from, address, // to uint256 // amount ) internal acceptAgreement(from) returns (bool allow) { // must have transfer enabled or msg.sender is Neumark issuer return _transferEnabled || accessPolicy().allowed(msg.sender, ROLE_NEUMARK_ISSUER, this, msg.sig); } function mOnApprove( address owner, address, // spender, uint256 // amount ) internal acceptAgreement(owner) returns (bool allow) { return true; } //////////////////////// // Private functions //////////////////////// function burnPrivate(uint256 burnNeumarkUlps, uint256 minEurUlps, uint256 maxEurUlps) private { uint256 prevEuroUlps = _totalEurUlps; // burn first in the token to make sure balance/totalSupply is not crossed mDestroyTokens(msg.sender, burnNeumarkUlps); _totalEurUlps = cumulativeInverse(totalSupply(), minEurUlps, maxEurUlps); // actually may overflow on non-monotonic inverse assert(prevEuroUlps >= _totalEurUlps); uint256 euroUlps = prevEuroUlps - _totalEurUlps; LogNeumarksBurned(msg.sender, euroUlps, burnNeumarkUlps); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"neumarkUlps","type":"uint256"},{"name":"minEurUlps","type":"uint256"},{"name":"maxEurUlps","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"snapshotAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"totalEuroUlps","type":"uint256"},{"name":"burnNeumarkUlps","type":"uint256"},{"name":"minEurUlps","type":"uint256"},{"name":"maxEurUlps","type":"uint256"}],"name":"incrementalInverse","outputs":[{"name":"euroUlps","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"createSnapshot","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalEuroUlps","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"neumarkUlps","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"transferEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"snapshotId","type":"uint256"}],"name":"balanceOfAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newPolicy","type":"address"},{"name":"newAccessController","type":"address"}],"name":"setAccessPolicy","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"totalEuroUlps","type":"uint256"},{"name":"burnNeumarkUlps","type":"uint256"}],"name":"incrementalInverse","outputs":[{"name":"euroUlps","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"neumarkUlps","type":"uint256"},{"name":"minEurUlps","type":"uint256"},{"name":"maxEurUlps","type":"uint256"}],"name":"cumulativeInverse","outputs":[{"name":"euroUlps","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"signatory","type":"address"}],"name":"agreementSignedAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"parentToken","outputs":[{"name":"parent","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"allBalancesOf","outputs":[{"name":"","type":"uint256[2][]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"neumarkCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"euroUlps","type":"uint256"}],"name":"cumulative","outputs":[{"name":"neumarkUlps","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"snapshotId","type":"uint256"}],"name":"totalSupplyAtInternal","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"amendmentIndex","type":"uint256"}],"name":"pastAgreement","outputs":[{"name":"platformOperatorRepresentative","type":"address"},{"name":"signedBlockTimestamp","type":"uint256"},{"name":"agreementUri","type":"string"},{"name":"index","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"euroUlps","type":"uint256"}],"name":"issueForEuro","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"currentSnapshotId","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"snapshotId","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"parentSnapshotId","outputs":[{"name":"snapshotId","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"euroUlps","type":"uint256"}],"name":"incremental","outputs":[{"name":"neumarkUlps","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"amount","type":"uint256"},{"name":"data","type":"bytes"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"currentAgreement","outputs":[{"name":"platformOperatorRepresentative","type":"address"},{"name":"signedBlockTimestamp","type":"uint256"},{"name":"agreementUri","type":"string"},{"name":"index","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"},{"name":"extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"initialRewardFraction","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ethereumForkArbiter","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"agreementUri","type":"string"}],"name":"amendAgreement","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"enabled","type":"bool"}],"name":"enableTransfer","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"accessPolicy","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"totalEuroUlps","type":"uint256"},{"name":"euroUlps","type":"uint256"}],"name":"incremental","outputs":[{"name":"neumarkUlps","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"neumarkUlps","type":"uint256"}],"name":"distribute","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"reclaim","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"accessPolicy","type":"address"},{"name":"forkArbiter","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"euroUlps","type":"uint256"},{"indexed":false,"name":"neumarkUlps","type":"uint256"}],"name":"LogNeumarksIssued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"euroUlps","type":"uint256"},{"indexed":false,"name":"neumarkUlps","type":"uint256"}],"name":"LogNeumarksBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"snapshotId","type":"uint256"}],"name":"LogSnapshotCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"accepter","type":"address"}],"name":"LogAgreementAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"platformOperatorRepresentative","type":"address"},{"indexed":false,"name":"agreementUri","type":"string"}],"name":"LogAgreementAmended","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"controller","type":"address"},{"indexed":false,"name":"oldPolicy","type":"address"},{"indexed":false,"name":"newPolicy","type":"address"}],"name":"LogAccessPolicyChanged","type":"event"}]
Contract Creation Code
60606040526dc22e450672894ab6cd8efb11d33f600455600f805460ff1916905534156200002c57600080fd5b604051604080620039b083398101604052808051919060200180519150505b6040805190810160405280600781526020017f4e65756d61726b000000000000000000000000000000000000000000000000008152506012604080519081016040908152600382527f4e4555000000000000000000000000000000000000000000000000000000000060208301528051908101604052600781527f4e4d4b5f312e300000000000000000000000000000000000000000000000000060208201525b6000805b5b81815b81815b60005b60008d8d5b8f5b600160a060020a03811615156200011757600080fd5b60008054600160a060020a031916600160a060020a0383161790555b50600160a060020a03811615156200014a57600080fd5b60018054600160a060020a031916600160a060020a0383161790555b50506000821115620001c1576200018b4264010000000062000d716200038982021704565b9050808210156200019b57600080fd5b70010000000000000000000000000000000081018210620001bb57600080fd5b60058290555b5b505060068054600160a060020a031916600160a060020a0384169081179091551515620001fb578015620001f557600080fd5b6200031e565b8015156200031857600082600160a060020a031663970875ce6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156200026557600080fd5b6102c65a03f115156200027757600080fd5b505050604051805190501115156200028e57600080fd5b600182600160a060020a031663970875ce6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515620002f057600080fd5b6102c65a03f115156200030257600080fd5b505050604051805191909103600755506200031e565b60078190555b5b5b50505b50505b5b505083600b9080516200033f929160200190620003c3565b50600c82805162000355929160200190620003c3565b50600d805460ff191660ff8516179055600e8180516200037a929160200190620003c3565b505b505050505b50506200046d565b600080600454831015156200039d57600080fd5b62015180835b047001000000000000000000000000000000000290508091505b50919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200040657805160ff191683800117855562000436565b8280016001018555821562000436579182015b828111156200043657825182559160200191906001019062000419565b5b506200044592915062000449565b5090565b6200046a91905b8082111562000445576000815560010162000450565b5090565b90565b613533806200047d6000396000f300606060405236156101fe5763ffffffff60e060020a60003504166305a10028811461020357806305ecc0851461022157806306fdde031461024957806308f7d570146102d4578063095ea7b3146103055780631504d8f01461033b57806318160ddd146103605780631a3d069b1461038557806323b872dd146103aa578063313ce567146103e657806342966c681461040f5780634cd412d5146104275780634ee2cd7e1461044e57806354fd4d5014610482578063578756311461050d5780635f3cebcd14610534578063684641b41461055f5780636fa00f071461058d57806370a08231146105be57806380a54001146105ef5780638273a4111461061e5780638648c0ce146106ae5780638e53d5e4146106d35780638f828c9e146106fb5780638fb29d6c146107235780639260faf8146107d157806395d89b41146107f9578063970875ce14610884578063981b24d0146108a9578063a899ef57146108d1578063a8c17ec2146108f6578063a9059cbb1461091e578063be45fd6214610954578063c90f793e146109cd578063cae9ca5114610a78578063dd62ed3e14610af1578063e787887b14610b28578063ea490b8414610b4d578063eb4e64d614610b7c578063ef7ac0e514610bcf578063f5d60a5114610be9578063fa9fd8b214610c18578063fb93210814610c43578063fc772c8b14610c67575b600080fd5b341561020e57600080fd5b61021f600435602435604435610c88565b005b341561022c57600080fd5b610237600435610d71565b60405190815260200160405180910390f35b341561025457600080fd5b61025c610daa565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102995780820151818401525b602001610280565b50505050905090810190601f1680156102c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102df57600080fd5b610237600435602435604435606435610e53565b60405190815260200160405180910390f35b341561031057600080fd5b610327600160a060020a0360043516602435610e9e565b604051901515815260200160405180910390f35b341561034657600080fd5b610237610f5b565b60405190815260200160405180910390f35b341561036b57600080fd5b61023761103a565b60405190815260200160405180910390f35b341561039057600080fd5b610237611052565b60405190815260200160405180910390f35b34156103b557600080fd5b610327600160a060020a0360043581169060243516604435611059565b604051901515815260200160405180910390f35b34156103f157600080fd5b6103f96110d5565b60405160ff909116815260200160405180910390f35b341561041a57600080fd5b61021f6004356110df565b005b341561043257600080fd5b6103276111c9565b604051901515815260200160405180910390f35b341561045957600080fd5b610237600160a060020a03600435166024356111d3565b60405190815260200160405180910390f35b341561048d57600080fd5b61025c6111e8565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102995780820151818401525b602001610280565b50505050905090810190601f1680156102c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561051857600080fd5b61021f600160a060020a0360043581169060243516611291565b005b341561053f57600080fd5b6102376004356024356114b9565b60405190815260200160405180910390f35b341561056a57600080fd5b610237600435602435604435611503565b60405190815260200160405180910390f35b341561059857600080fd5b610237600160a060020a036004351661158e565b60405190815260200160405180910390f35b34156105c957600080fd5b610237600160a060020a03600435166115ad565b60405190815260200160405180910390f35b34156105fa57600080fd5b6106026115c8565b604051600160a060020a03909116815260200160405180910390f35b341561062957600080fd5b61063d600160a060020a03600435166115d8565b604051602080825281908101838181518152602001915080516000925b8184101561069d57602080850284010151604080838360005b8381101561068c5780820151818401525b602001610673565b50505050905001926001019261065a565b925050509250505060405180910390f35b34156106b957600080fd5b6102376116e0565b60405190815260200160405180910390f35b34156106de57600080fd5b6102376004356116f1565b60405190815260200160405180910390f35b341561070657600080fd5b6102376004356117c3565b60405190815260200160405180910390f35b341561072e57600080fd5b610739600435611890565b604051600160a060020a0385168152602081018490526060810182905260806040820181815290820184818151815260200191508051906020019080838360005b838110156107935780820151818401525b60200161077a565b50505050905090810190601f1680156107c05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34156107dc57600080fd5b610237600435611990565b60405190815260200160405180910390f35b341561080457600080fd5b61025c611b4b565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102995780820151818401525b602001610280565b50505050905090810190601f1680156102c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561088f57600080fd5b610237611bf4565b60405190815260200160405180910390f35b34156108b457600080fd5b610237600435611c04565b60405190815260200160405180910390f35b34156108dc57600080fd5b610237611c17565b60405190815260200160405180910390f35b341561090157600080fd5b610237600435611c1e565b60405190815260200160405180910390f35b341561092957600080fd5b610327600160a060020a0360043516602435611c34565b604051901515815260200160405180910390f35b341561095f57600080fd5b61032760048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611c4b95505050505050565b604051901515815260200160405180910390f35b34156109d857600080fd5b610739611d53565b604051600160a060020a0385168152602081018490526060810182905260806040820181815290820184818151815260200191508051906020019080838360005b838110156107935780820151818401525b60200161077a565b50505050905090810190601f1680156107c05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b3415610a8357600080fd5b61032760048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611e6c95505050505050565b604051901515815260200160405180910390f35b3415610afc57600080fd5b610237600160a060020a0360043581169060243516611fa6565b60405190815260200160405180910390f35b3415610b3357600080fd5b610237611fd3565b60405190815260200160405180910390f35b3415610b5857600080fd5b610602611fe0565b604051600160a060020a03909116815260200160405180910390f35b3415610b8757600080fd5b61021f60046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611ff095505050505050565b005b3415610bda57600080fd5b61021f6004351515612220565b005b3415610bf457600080fd5b61060261230a565b604051600160a060020a03909116815260200160405180910390f35b3415610c2357600080fd5b61023760043560243561231a565b60405190815260200160405180910390f35b3415610c4e57600080fd5b61021f600160a060020a036004351660243561235e565b005b3415610c7257600080fd5b61021f600160a060020a03600435166124b0565b005b600080547f19ce331285f41739cd3362a3ec176edffe014311c0f8075834fdd19d6718e69f91600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b1515610d3857600080fd5b6102c65a03f11515610d4957600080fd5b505050604051805190501515610d5e57600080fd5b610d698484846126d5565b5b5b50505050565b60008060045483101515610d8457600080fd5b62015180835b047001000000000000000000000000000000000290508091505b50919050565b610db26132a3565b600b8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b505050505090505b90565b600080600080610e62886116f1565b925086831015610e7157600080fd5b8683039150610e81828787611503565b905080881015610e8d57fe5b80880393505b505050949350505050565b6000610eab338484612756565b1515610eb657600080fd5b811580610ee65750600160a060020a033381166000908152600a6020908152604080832093871683529290522054155b1515610ef157600080fd5b600160a060020a033381166000818152600a6020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b600080547f08c1785afc57f933523bc52583a72ce9e19b2241354e04dd86f41f887e3d817490600160a060020a0316639085b77f338330600160e060020a0319873516876040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561100457600080fd5b6102c65a03f1151561101557600080fd5b50505060405180519050151561102a57600080fd5b6110326127cc565b91505b5b5090565b600061104c611047612848565b6117c3565b90505b90565b6010545b90565b600160a060020a038084166000908152600a6020908152604080832033909416835292905290812054829010158061109057600080fd5b600160a060020a038086166000908152600a6020908152604080832033909416835292905220805484900390556110c88585856128b4565b600191505b509392505050565b600d5460ff165b90565b600080547f19ce331285f41739cd3362a3ec176edffe014311c0f8075834fdd19d6718e69f91600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561118f57600080fd5b6102c65a03f115156111a057600080fd5b5050506040518051905015156111b557600080fd5b6111c38260006010546126d5565b5b5b5050565b600f5460ff165b90565b60006111df8383612a46565b90505b92915050565b6111f06132a3565b600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b505050505090505b90565b600080547fac42f8beb17975ed062dcb80c63e6d203ef1c2c335ced149dc5664cc671cb7da90600160a060020a0316639085b77f338330600160e060020a0319873516876040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561133a57600080fd5b6102c65a03f1151561134b57600080fd5b50505060405180519050151561136057600080fd5b83600160a060020a0316639085b77f847fac42f8beb17975ed062dcb80c63e6d203ef1c2c335ced149dc5664cc671cb7da60010230600035600160e060020a03191660006040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561140957600080fd5b6102c65a03f1151561141a57600080fd5b50505060405180519050151561142f57600080fd5b60008054600160a060020a0386811673ffffffffffffffffffffffffffffffffffffffff198316179092551691507f7d475c32583df95fccc34a6e12df24c1fc9943092cc129b6512013aecba0f136338386604051600160a060020a03938416815291831660208301529091166040808301919091526060909101905180910390a15b5b50505050565b6000806000806114c8866116f1565b9250848310156114d757600080fd5b84830391506114e882600088611503565b9050808610156114f457fe5b80860393505b50505092915050565b6000808080808686101561151657600080fd5b87611520886116f1565b111561152b57600080fd5b87611535876116f1565b101561154057600080fd5b8693508592505b8383111561157f5760028385015b049150611561826116f1565b9050878110156115765781600101935061157a565b8192505b611547565b8294505b505050509392505050565b600160a060020a0381166000908152600360205260409020545b919050565b60006115c0826115bb612848565b612a46565b90505b919050565b600654600160a060020a03165b90565b6115e06132a3565b60006115ea6132a3565b600160a060020a038416600090815260086020526040808220805490945090518059106116145750595b90808252806020026020018201604052801561164a57816020015b6116376132c7565b81526020019060019003908161162f5790505b509150600090505b82548110156116d4576040805190810160405280848381548110151561167457fe5b906000526020600020906002020160005b50600001548152602001848381548110151561169d57fe5b906000526020600020906002020160005b506001015490528282815181106116c157fe5b602090810290910101525b600101611652565b8193505b505050919050565b6b04d8c55aefb8c05b5c0000005b90565b6000808080806b1ad1995d94dc285fec000000861061171e576b04d8c55aefb8c05b5c00000094506117ba565b6b06c9144c1c690d4cb40000008610611771576b1408851178731b13380000006923781f97ea6cbb0f55216b06c9144c1c690d4cb3ffffff198801025b046b04d8a1e2d020d5eea0f0aadf0194506117ba565b506abee34911301d97e6c4ec4f92506b04d8c55aefb8c05b5c000000915060009050825b8381019286020480860283900492910182900390830182156117b657611795565b8194505b50505050919050565b60006009816117d28285612b36565b156117ea576117e382856000612b88565b9250611889565b600654600160a060020a03161561188457836007541161180c5760075461180e565b835b600654909150600160a060020a031663981b24d08260006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561186257600080fd5b6102c65a03f1151561187357600080fd5b505050604051805190509250611889565b600092505b5050919050565b60008061189b6132a3565b6000806002868154811015156118ad57fe5b906000526020600020906003020160005b5090508060000160009054906101000a9004600160a060020a031681600101548260020188818054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156119785780601f1061194d57610100808354040283529160200191611978565b820191906000526020600020905b81548152906001019060200180831161195b57829003601f168201915b5050505050915094509450945094505b509193509193565b6000805481907f921c3afa1f1fff707a785f953a1e197bd28c9c50e300424e015953cbf120c06c90600160a060020a0316639085b77f338330600160e060020a0319873516876040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b1515611a3b57600080fd5b6102c65a03f11515611a4c57600080fd5b505050604051805190501515611a6157600080fd5b33600160a060020a0381166000908152600360205260409020541515611ac85760025460009011611a9157600080fd5b600160a060020a038116600081815260036020526040908190204390556000805160206134e8833981519152905160405180910390a25b6010548581011015611ad957600080fd5b611ae56010548661231a565b60108054870190559250611af93384612cd2565b33600160a060020a03167fc692d9de9c1139b24231001c9b58c13d754c6fb33a10aac08eca93b9dc65ff99868560405191825260208201526040908101905180910390a28293505b5b505b5050919050565b611b536132a3565b600c8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b505050505090505b90565b600061104c612848565b90505b90565b60006115c0826117c3565b90505b919050565b6007545b90565b60006115c06010548361231a565b90505b919050565b6000611c413384846128b4565b5060015b92915050565b6000611c583385856128b4565b611c6184612e2d565b15611d485783600160a060020a031663a4c0ed363385856040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611ce65780820151818401525b602001611ccd565b50505050905090810190601f168015611d135780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1515611d3357600080fd5b6102c65a03f11515611d4457600080fd5b5050505b5060015b9392505050565b600080611d5e6132a3565b60025460009081908190819011611d7457600080fd5b600280546000198101935083908110611d8957fe5b906000526020600020906003020160005b5090508060000160009054906101000a9004600160a060020a031681600101548260020184818054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e545780601f10611e2957610100808354040283529160200191611e54565b820191906000526020600020905b815481529060010190602001808311611e3757829003601f168201915b5050505050915095509550955095505b505090919293565b6000611e788484610e9e565b1515611e8357600080fd5b83600160a060020a0316638f4ffcb1338530866000604051602001526040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f255780820151818401525b602001611f0c565b50505050905090810190601f168015611f525780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1515611f7357600080fd5b6102c65a03f11515611f8457600080fd5b5050506040518051915050801515611d4857600080fd5b5060015b9392505050565b600160a060020a038083166000908152600a60209081526040808320938516835292905220545b92915050565b675a34a38fc00a00005b90565b600154600160a060020a03165b90565b611ff86132ed565b600080547fb2b321377653f655206f71514ff9f150d0822d062a5abcf220d549e1da7999f091600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b15156120a857600080fd5b6102c65a03f115156120b957600080fd5b5050506040518051905015156120ce57600080fd5b60606040519081016040528033600160a060020a03168152602001428152602001848152509150600280548060010182816121099190613313565b916000526020600020906003020160005b5083908151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151816001015560408201518160020190805161216b929160200190613345565b505050507fe9835ee18f0f0b190604da3474d67a8f29aba2c92e90eee2bdaeca67d40d5a6b3384604051600160a060020a038316815260406020820181815290820183818151815260200191508051906020019080838360005b838110156121de5780820151818401525b6020016121c5565b50505050905090810190601f16801561220b5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15b5b505050565b600080547fb6527e944caca3d151b1f94e49ac5e223142694860743e66164720e034ec9b1991600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b15156122d057600080fd5b6102c65a03f115156122e157600080fd5b5050506040518051905015156122f657600080fd5b600f805460ff19168315151790555b5b5050565b600054600160a060020a03165b90565b600080808385018590101561232e57600080fd5b612337856116f1565b91506123448486016116f1565b90508181101561235057fe5b81810392505b505092915050565b600080547f921c3afa1f1fff707a785f953a1e197bd28c9c50e300424e015953cbf120c06c91600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561240e57600080fd5b6102c65a03f1151561241f57600080fd5b50505060405180519050151561243457600080fd5b600160a060020a0383166000908152600360205260409020548390151561249c576002546000901161246557600080fd5b600160a060020a038116600081815260036020526040908190204390556000805160206134e8833981519152905160405180910390a25b610d693385856128b4565b5b5b505b505050565b6000805481907f0542bbd0c672578966dcc525b30aa16723bb042675554ac5b0362f86b6e97dc590600160a060020a0316639085b77f338330600160e060020a0319873516876040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561255b57600080fd5b6102c65a03f1151561256c57600080fd5b50505060405180519050151561258157600080fd5b339250600160a060020a03841615156125d65782600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f1935050505015156125d157600080fd5b610d69565b83600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561262d57600080fd5b6102c65a03f1151561263e57600080fd5b5050506040518051925050600160a060020a03841663a9059cbb848460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156126a657600080fd5b6102c65a03f115156126b757600080fd5b505050604051805190501515610d6957600080fd5b5b5b5b50505050565b60105460006126e43386612e3c565b6126f66126ef61103a565b8585611503565b601081905582101561270457fe5b506010548103600160a060020a0333167ffc5b652a2cf7ce8582fe8446f9d9de7b035dfbcc1038be0e35069464fc38c657828760405191825260208201526040908101905180910390a25b5050505050565b600160a060020a038316600090815260036020526040812054849015156110c8576002546000901161278757600080fd5b600160a060020a038116600081815260036020526040908190204390556000805160206134e8833981519152905160405180910390a25b600191505b5b509392505050565b60008062015180425b047001000000000000000000000000000000000290506005548111156127ff576005819055612809565b6005805460010190555b7ff19e3c9fa6e3bfc9a2da875337498223d77ff6dae1855dc2fcf73553fade910560055460405190815260200160405180910390a160055491505b5090565b60008062015180425b047001000000000000000000000000000000000290506005548111156128aa5760058190557ff19e3c9fa6e3bfc9a2da875337498223d77ff6dae1855dc2fcf73553fade91058160405190815260200160405180910390a15b60055491505b5090565b6000808080600160a060020a03861615156128ce57600080fd5b60006128d86115c8565b600160a060020a0316148061295a57506128f06115c8565b600160a060020a031663970875ce6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561293557600080fd5b6102c65a03f1151561294657600080fd5b50505060405180519050612958611c17565b105b151561296557600080fd5b612970878787612f83565b151561297b57600080fd5b612984876115ad565b93508484101561299357600080fd5b600160a060020a038716600090815260086020526040902085850393506129ba90846130cf565b6129c3866115ad565b915050838101818110156129d357fe5b600160a060020a03861660009081526008602052604090206129f590826130cf565b85600160a060020a031687600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405190815260200160405180910390a35b50505050505050565b600160a060020a038216600090815260086020526040812081612a698285612b36565b15612a8157612a7a82856000612b88565b9250612356565b600654600160a060020a031615612b29578360075411612aa357600754612aa5565b835b600654909150600160a060020a0316634ee2cd7e868360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515612b0757600080fd5b6102c65a03f11515612b1857600080fd5b505050604051805190509250612356565b600092505b505092915050565b6000612b40612848565b821115612b4c57600080fd5b82546000901180156111df575081836000815481101515612b6957fe5b906000526020600020906002020160005b505411155b90505b92915050565b6000806000806000806000612b9b612848565b891115612ba757600080fd5b89541515612bb757879650612cc5565b8954600019810196508a9087908110612bcc57fe5b906000526020600020906002020160005b50549450848910612c13578986815481101515612bf657fe5b906000526020600020906002020160005b50600101549650612cc5565b896000815481101515612c2257fe5b906000526020600020906002020160005b5054935083891015612c4757879650612cc5565b600092508591505b82821115612c9e5760026001838501015b049050888a82815481101515612c7257fe5b906000526020600020906002020160005b505411612c9257809250612c99565b6001810391505b612c4f565b8983815481101515612cac57fe5b906000526020600020906002020160005b506001015496505b5050505050509392505050565b6000808080600160a060020a0386161515612cec57600080fd5b6000612cf66115c8565b600160a060020a03161480612d785750612d0e6115c8565b600160a060020a031663970875ce6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515612d5357600080fd5b6102c65a03f11515612d6457600080fd5b50505060405180519050612d76611c17565b105b1515612d8357600080fd5b612d8b61103a565b9350848401925083831015612d9f57600080fd5b612da8866115ad565b91505083810181811015612db857fe5b612dc36009846130cf565b600160a060020a0386166000908152600860205260409020612de590826130cf565b85600160a060020a031660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405190815260200160405180910390a35b505050505050565b6000813b908111905b50919050565b600080808080612e4a6115c8565b600160a060020a03161480612ecc5750612e626115c8565b600160a060020a031663970875ce6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515612ea757600080fd5b6102c65a03f11515612eb857600080fd5b50505060405180519050612eca611c17565b105b1515612ed757600080fd5b612edf61103a565b935084841015612eee57600080fd5b612ef7866115ad565b925084831015612f0657600080fd5b5050828203838203612f196009836130cf565b600160a060020a0386166000908152600860205260409020612f3b90826130cf565b600086600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405190815260200160405180910390a35b505050505050565b600160a060020a03831660009081526003602052604081205484901515612feb5760025460009011612fb457600080fd5b600160a060020a038116600081815260036020526040908190204390556000805160206134e8833981519152905160405180910390a25b600f5460ff16806130c35750612fff61230a565b600160a060020a0316639085b77f337f921c3afa1f1fff707a785f953a1e197bd28c9c50e300424e015953cbf120c06c60010230600035600160e060020a03191660006040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b15156130a757600080fd5b6102c65a03f115156130b857600080fd5b505050604051805190505b91505b5b509392505050565b6000806000806000806130e0612848565b8854909650159450841561313e57875488906001810161310083826133c4565b916000526020600020906002020160005b60408051908101604052898152602081018b90529190508151815560208201518160010155505050613298565b875460001981019450869089908690811061315557fe5b906000526020600020906002020160005b505410925082156131f45786888581548110151561318057fe5b906000526020600020906002020160005b506001015414915081156131a457613298565b875488906001810161310083826133c4565b916000526020600020906002020160005b60408051908101604052898152602081018b90529190508151815560208201518160010155505050613298565b600084118015613229575086886001860381548110151561321157fe5b906000526020600020906002020160005b5060010154145b9050801561327257878481548110151561323f57fe5b906000526020600020906002020160005b506000808255600190910155875461326c8960001983016133c4565b50613298565b86888581548110151561328157fe5b906000526020600020906002020160005b50600101555b5b5050505050505050565b60206040519081016040526000815290565b60206040519081016040526000815290565b604080519081016040526002815b60008152602001906001900390816132d55790505090565b6060604051908101604090815260008083526020830152810161330e6132a3565b905290565b81548183558181151161221a5760030281600302836000526020600020918201910161221a9190613408565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061338657805160ff19168380011785556133b3565b828001600101855582156133b3579182015b828111156133b3578251825591602001919060010190613398565b5b50611035929150613457565b5090565b81548183558181151161221a5760020281600202836000526020600020918201910161221a9190613478565b5b505050565b60206040519081016040526000815290565b610e5091905b8082111561103557805473ffffffffffffffffffffffffffffffffffffffff19168155600060018201819055613447600283018261349f565b5060030161340e565b5090565b90565b610e5091905b80821115611035576000815560010161345d565b5090565b90565b610e5091905b80821115611035576000808255600182015560020161347e565b5090565b90565b50805460018160011615610100020316600290046000825580601f106134c557506134e3565b601f0160209004906000526020600020908101906134e39190613457565b5b5056008c41d101e4d957423a65fda82dcc88bc6b3e756166d2331f663c10166658ebb8a165627a7a72305820179c3a812ab28f2cb7938d3ae7348d45de0ddcf9f195ea9cbe966fbdf1b8158b0029000000000000000000000000ae38c27e646959735ec70d77ed4ecc03a3eff4900000000000000000000000004c688949578b4fd0cb8f8993a0ec608659e05cf1
Deployed Bytecode
0x606060405236156101fe5763ffffffff60e060020a60003504166305a10028811461020357806305ecc0851461022157806306fdde031461024957806308f7d570146102d4578063095ea7b3146103055780631504d8f01461033b57806318160ddd146103605780631a3d069b1461038557806323b872dd146103aa578063313ce567146103e657806342966c681461040f5780634cd412d5146104275780634ee2cd7e1461044e57806354fd4d5014610482578063578756311461050d5780635f3cebcd14610534578063684641b41461055f5780636fa00f071461058d57806370a08231146105be57806380a54001146105ef5780638273a4111461061e5780638648c0ce146106ae5780638e53d5e4146106d35780638f828c9e146106fb5780638fb29d6c146107235780639260faf8146107d157806395d89b41146107f9578063970875ce14610884578063981b24d0146108a9578063a899ef57146108d1578063a8c17ec2146108f6578063a9059cbb1461091e578063be45fd6214610954578063c90f793e146109cd578063cae9ca5114610a78578063dd62ed3e14610af1578063e787887b14610b28578063ea490b8414610b4d578063eb4e64d614610b7c578063ef7ac0e514610bcf578063f5d60a5114610be9578063fa9fd8b214610c18578063fb93210814610c43578063fc772c8b14610c67575b600080fd5b341561020e57600080fd5b61021f600435602435604435610c88565b005b341561022c57600080fd5b610237600435610d71565b60405190815260200160405180910390f35b341561025457600080fd5b61025c610daa565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102995780820151818401525b602001610280565b50505050905090810190601f1680156102c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102df57600080fd5b610237600435602435604435606435610e53565b60405190815260200160405180910390f35b341561031057600080fd5b610327600160a060020a0360043516602435610e9e565b604051901515815260200160405180910390f35b341561034657600080fd5b610237610f5b565b60405190815260200160405180910390f35b341561036b57600080fd5b61023761103a565b60405190815260200160405180910390f35b341561039057600080fd5b610237611052565b60405190815260200160405180910390f35b34156103b557600080fd5b610327600160a060020a0360043581169060243516604435611059565b604051901515815260200160405180910390f35b34156103f157600080fd5b6103f96110d5565b60405160ff909116815260200160405180910390f35b341561041a57600080fd5b61021f6004356110df565b005b341561043257600080fd5b6103276111c9565b604051901515815260200160405180910390f35b341561045957600080fd5b610237600160a060020a03600435166024356111d3565b60405190815260200160405180910390f35b341561048d57600080fd5b61025c6111e8565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102995780820151818401525b602001610280565b50505050905090810190601f1680156102c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561051857600080fd5b61021f600160a060020a0360043581169060243516611291565b005b341561053f57600080fd5b6102376004356024356114b9565b60405190815260200160405180910390f35b341561056a57600080fd5b610237600435602435604435611503565b60405190815260200160405180910390f35b341561059857600080fd5b610237600160a060020a036004351661158e565b60405190815260200160405180910390f35b34156105c957600080fd5b610237600160a060020a03600435166115ad565b60405190815260200160405180910390f35b34156105fa57600080fd5b6106026115c8565b604051600160a060020a03909116815260200160405180910390f35b341561062957600080fd5b61063d600160a060020a03600435166115d8565b604051602080825281908101838181518152602001915080516000925b8184101561069d57602080850284010151604080838360005b8381101561068c5780820151818401525b602001610673565b50505050905001926001019261065a565b925050509250505060405180910390f35b34156106b957600080fd5b6102376116e0565b60405190815260200160405180910390f35b34156106de57600080fd5b6102376004356116f1565b60405190815260200160405180910390f35b341561070657600080fd5b6102376004356117c3565b60405190815260200160405180910390f35b341561072e57600080fd5b610739600435611890565b604051600160a060020a0385168152602081018490526060810182905260806040820181815290820184818151815260200191508051906020019080838360005b838110156107935780820151818401525b60200161077a565b50505050905090810190601f1680156107c05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34156107dc57600080fd5b610237600435611990565b60405190815260200160405180910390f35b341561080457600080fd5b61025c611b4b565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102995780820151818401525b602001610280565b50505050905090810190601f1680156102c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561088f57600080fd5b610237611bf4565b60405190815260200160405180910390f35b34156108b457600080fd5b610237600435611c04565b60405190815260200160405180910390f35b34156108dc57600080fd5b610237611c17565b60405190815260200160405180910390f35b341561090157600080fd5b610237600435611c1e565b60405190815260200160405180910390f35b341561092957600080fd5b610327600160a060020a0360043516602435611c34565b604051901515815260200160405180910390f35b341561095f57600080fd5b61032760048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611c4b95505050505050565b604051901515815260200160405180910390f35b34156109d857600080fd5b610739611d53565b604051600160a060020a0385168152602081018490526060810182905260806040820181815290820184818151815260200191508051906020019080838360005b838110156107935780820151818401525b60200161077a565b50505050905090810190601f1680156107c05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b3415610a8357600080fd5b61032760048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611e6c95505050505050565b604051901515815260200160405180910390f35b3415610afc57600080fd5b610237600160a060020a0360043581169060243516611fa6565b60405190815260200160405180910390f35b3415610b3357600080fd5b610237611fd3565b60405190815260200160405180910390f35b3415610b5857600080fd5b610602611fe0565b604051600160a060020a03909116815260200160405180910390f35b3415610b8757600080fd5b61021f60046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611ff095505050505050565b005b3415610bda57600080fd5b61021f6004351515612220565b005b3415610bf457600080fd5b61060261230a565b604051600160a060020a03909116815260200160405180910390f35b3415610c2357600080fd5b61023760043560243561231a565b60405190815260200160405180910390f35b3415610c4e57600080fd5b61021f600160a060020a036004351660243561235e565b005b3415610c7257600080fd5b61021f600160a060020a03600435166124b0565b005b600080547f19ce331285f41739cd3362a3ec176edffe014311c0f8075834fdd19d6718e69f91600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b1515610d3857600080fd5b6102c65a03f11515610d4957600080fd5b505050604051805190501515610d5e57600080fd5b610d698484846126d5565b5b5b50505050565b60008060045483101515610d8457600080fd5b62015180835b047001000000000000000000000000000000000290508091505b50919050565b610db26132a3565b600b8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b505050505090505b90565b600080600080610e62886116f1565b925086831015610e7157600080fd5b8683039150610e81828787611503565b905080881015610e8d57fe5b80880393505b505050949350505050565b6000610eab338484612756565b1515610eb657600080fd5b811580610ee65750600160a060020a033381166000908152600a6020908152604080832093871683529290522054155b1515610ef157600080fd5b600160a060020a033381166000818152600a6020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b600080547f08c1785afc57f933523bc52583a72ce9e19b2241354e04dd86f41f887e3d817490600160a060020a0316639085b77f338330600160e060020a0319873516876040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561100457600080fd5b6102c65a03f1151561101557600080fd5b50505060405180519050151561102a57600080fd5b6110326127cc565b91505b5b5090565b600061104c611047612848565b6117c3565b90505b90565b6010545b90565b600160a060020a038084166000908152600a6020908152604080832033909416835292905290812054829010158061109057600080fd5b600160a060020a038086166000908152600a6020908152604080832033909416835292905220805484900390556110c88585856128b4565b600191505b509392505050565b600d5460ff165b90565b600080547f19ce331285f41739cd3362a3ec176edffe014311c0f8075834fdd19d6718e69f91600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561118f57600080fd5b6102c65a03f115156111a057600080fd5b5050506040518051905015156111b557600080fd5b6111c38260006010546126d5565b5b5b5050565b600f5460ff165b90565b60006111df8383612a46565b90505b92915050565b6111f06132a3565b600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b505050505090505b90565b600080547fac42f8beb17975ed062dcb80c63e6d203ef1c2c335ced149dc5664cc671cb7da90600160a060020a0316639085b77f338330600160e060020a0319873516876040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561133a57600080fd5b6102c65a03f1151561134b57600080fd5b50505060405180519050151561136057600080fd5b83600160a060020a0316639085b77f847fac42f8beb17975ed062dcb80c63e6d203ef1c2c335ced149dc5664cc671cb7da60010230600035600160e060020a03191660006040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561140957600080fd5b6102c65a03f1151561141a57600080fd5b50505060405180519050151561142f57600080fd5b60008054600160a060020a0386811673ffffffffffffffffffffffffffffffffffffffff198316179092551691507f7d475c32583df95fccc34a6e12df24c1fc9943092cc129b6512013aecba0f136338386604051600160a060020a03938416815291831660208301529091166040808301919091526060909101905180910390a15b5b50505050565b6000806000806114c8866116f1565b9250848310156114d757600080fd5b84830391506114e882600088611503565b9050808610156114f457fe5b80860393505b50505092915050565b6000808080808686101561151657600080fd5b87611520886116f1565b111561152b57600080fd5b87611535876116f1565b101561154057600080fd5b8693508592505b8383111561157f5760028385015b049150611561826116f1565b9050878110156115765781600101935061157a565b8192505b611547565b8294505b505050509392505050565b600160a060020a0381166000908152600360205260409020545b919050565b60006115c0826115bb612848565b612a46565b90505b919050565b600654600160a060020a03165b90565b6115e06132a3565b60006115ea6132a3565b600160a060020a038416600090815260086020526040808220805490945090518059106116145750595b90808252806020026020018201604052801561164a57816020015b6116376132c7565b81526020019060019003908161162f5790505b509150600090505b82548110156116d4576040805190810160405280848381548110151561167457fe5b906000526020600020906002020160005b50600001548152602001848381548110151561169d57fe5b906000526020600020906002020160005b506001015490528282815181106116c157fe5b602090810290910101525b600101611652565b8193505b505050919050565b6b04d8c55aefb8c05b5c0000005b90565b6000808080806b1ad1995d94dc285fec000000861061171e576b04d8c55aefb8c05b5c00000094506117ba565b6b06c9144c1c690d4cb40000008610611771576b1408851178731b13380000006923781f97ea6cbb0f55216b06c9144c1c690d4cb3ffffff198801025b046b04d8a1e2d020d5eea0f0aadf0194506117ba565b506abee34911301d97e6c4ec4f92506b04d8c55aefb8c05b5c000000915060009050825b8381019286020480860283900492910182900390830182156117b657611795565b8194505b50505050919050565b60006009816117d28285612b36565b156117ea576117e382856000612b88565b9250611889565b600654600160a060020a03161561188457836007541161180c5760075461180e565b835b600654909150600160a060020a031663981b24d08260006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561186257600080fd5b6102c65a03f1151561187357600080fd5b505050604051805190509250611889565b600092505b5050919050565b60008061189b6132a3565b6000806002868154811015156118ad57fe5b906000526020600020906003020160005b5090508060000160009054906101000a9004600160a060020a031681600101548260020188818054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156119785780601f1061194d57610100808354040283529160200191611978565b820191906000526020600020905b81548152906001019060200180831161195b57829003601f168201915b5050505050915094509450945094505b509193509193565b6000805481907f921c3afa1f1fff707a785f953a1e197bd28c9c50e300424e015953cbf120c06c90600160a060020a0316639085b77f338330600160e060020a0319873516876040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b1515611a3b57600080fd5b6102c65a03f11515611a4c57600080fd5b505050604051805190501515611a6157600080fd5b33600160a060020a0381166000908152600360205260409020541515611ac85760025460009011611a9157600080fd5b600160a060020a038116600081815260036020526040908190204390556000805160206134e8833981519152905160405180910390a25b6010548581011015611ad957600080fd5b611ae56010548661231a565b60108054870190559250611af93384612cd2565b33600160a060020a03167fc692d9de9c1139b24231001c9b58c13d754c6fb33a10aac08eca93b9dc65ff99868560405191825260208201526040908101905180910390a28293505b5b505b5050919050565b611b536132a3565b600c8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b505050505090505b90565b600061104c612848565b90505b90565b60006115c0826117c3565b90505b919050565b6007545b90565b60006115c06010548361231a565b90505b919050565b6000611c413384846128b4565b5060015b92915050565b6000611c583385856128b4565b611c6184612e2d565b15611d485783600160a060020a031663a4c0ed363385856040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611ce65780820151818401525b602001611ccd565b50505050905090810190601f168015611d135780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1515611d3357600080fd5b6102c65a03f11515611d4457600080fd5b5050505b5060015b9392505050565b600080611d5e6132a3565b60025460009081908190819011611d7457600080fd5b600280546000198101935083908110611d8957fe5b906000526020600020906003020160005b5090508060000160009054906101000a9004600160a060020a031681600101548260020184818054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e545780601f10611e2957610100808354040283529160200191611e54565b820191906000526020600020905b815481529060010190602001808311611e3757829003601f168201915b5050505050915095509550955095505b505090919293565b6000611e788484610e9e565b1515611e8357600080fd5b83600160a060020a0316638f4ffcb1338530866000604051602001526040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f255780820151818401525b602001611f0c565b50505050905090810190601f168015611f525780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1515611f7357600080fd5b6102c65a03f11515611f8457600080fd5b5050506040518051915050801515611d4857600080fd5b5060015b9392505050565b600160a060020a038083166000908152600a60209081526040808320938516835292905220545b92915050565b675a34a38fc00a00005b90565b600154600160a060020a03165b90565b611ff86132ed565b600080547fb2b321377653f655206f71514ff9f150d0822d062a5abcf220d549e1da7999f091600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b15156120a857600080fd5b6102c65a03f115156120b957600080fd5b5050506040518051905015156120ce57600080fd5b60606040519081016040528033600160a060020a03168152602001428152602001848152509150600280548060010182816121099190613313565b916000526020600020906003020160005b5083908151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151816001015560408201518160020190805161216b929160200190613345565b505050507fe9835ee18f0f0b190604da3474d67a8f29aba2c92e90eee2bdaeca67d40d5a6b3384604051600160a060020a038316815260406020820181815290820183818151815260200191508051906020019080838360005b838110156121de5780820151818401525b6020016121c5565b50505050905090810190601f16801561220b5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15b5b505050565b600080547fb6527e944caca3d151b1f94e49ac5e223142694860743e66164720e034ec9b1991600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b15156122d057600080fd5b6102c65a03f115156122e157600080fd5b5050506040518051905015156122f657600080fd5b600f805460ff19168315151790555b5b5050565b600054600160a060020a03165b90565b600080808385018590101561232e57600080fd5b612337856116f1565b91506123448486016116f1565b90508181101561235057fe5b81810392505b505092915050565b600080547f921c3afa1f1fff707a785f953a1e197bd28c9c50e300424e015953cbf120c06c91600160a060020a0390911690639085b77f90339084903090600160e060020a0319813516906040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561240e57600080fd5b6102c65a03f1151561241f57600080fd5b50505060405180519050151561243457600080fd5b600160a060020a0383166000908152600360205260409020548390151561249c576002546000901161246557600080fd5b600160a060020a038116600081815260036020526040908190204390556000805160206134e8833981519152905160405180910390a25b610d693385856128b4565b5b5b505b505050565b6000805481907f0542bbd0c672578966dcc525b30aa16723bb042675554ac5b0362f86b6e97dc590600160a060020a0316639085b77f338330600160e060020a0319873516876040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b151561255b57600080fd5b6102c65a03f1151561256c57600080fd5b50505060405180519050151561258157600080fd5b339250600160a060020a03841615156125d65782600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f1935050505015156125d157600080fd5b610d69565b83600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561262d57600080fd5b6102c65a03f1151561263e57600080fd5b5050506040518051925050600160a060020a03841663a9059cbb848460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156126a657600080fd5b6102c65a03f115156126b757600080fd5b505050604051805190501515610d6957600080fd5b5b5b5b50505050565b60105460006126e43386612e3c565b6126f66126ef61103a565b8585611503565b601081905582101561270457fe5b506010548103600160a060020a0333167ffc5b652a2cf7ce8582fe8446f9d9de7b035dfbcc1038be0e35069464fc38c657828760405191825260208201526040908101905180910390a25b5050505050565b600160a060020a038316600090815260036020526040812054849015156110c8576002546000901161278757600080fd5b600160a060020a038116600081815260036020526040908190204390556000805160206134e8833981519152905160405180910390a25b600191505b5b509392505050565b60008062015180425b047001000000000000000000000000000000000290506005548111156127ff576005819055612809565b6005805460010190555b7ff19e3c9fa6e3bfc9a2da875337498223d77ff6dae1855dc2fcf73553fade910560055460405190815260200160405180910390a160055491505b5090565b60008062015180425b047001000000000000000000000000000000000290506005548111156128aa5760058190557ff19e3c9fa6e3bfc9a2da875337498223d77ff6dae1855dc2fcf73553fade91058160405190815260200160405180910390a15b60055491505b5090565b6000808080600160a060020a03861615156128ce57600080fd5b60006128d86115c8565b600160a060020a0316148061295a57506128f06115c8565b600160a060020a031663970875ce6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561293557600080fd5b6102c65a03f1151561294657600080fd5b50505060405180519050612958611c17565b105b151561296557600080fd5b612970878787612f83565b151561297b57600080fd5b612984876115ad565b93508484101561299357600080fd5b600160a060020a038716600090815260086020526040902085850393506129ba90846130cf565b6129c3866115ad565b915050838101818110156129d357fe5b600160a060020a03861660009081526008602052604090206129f590826130cf565b85600160a060020a031687600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405190815260200160405180910390a35b50505050505050565b600160a060020a038216600090815260086020526040812081612a698285612b36565b15612a8157612a7a82856000612b88565b9250612356565b600654600160a060020a031615612b29578360075411612aa357600754612aa5565b835b600654909150600160a060020a0316634ee2cd7e868360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515612b0757600080fd5b6102c65a03f11515612b1857600080fd5b505050604051805190509250612356565b600092505b505092915050565b6000612b40612848565b821115612b4c57600080fd5b82546000901180156111df575081836000815481101515612b6957fe5b906000526020600020906002020160005b505411155b90505b92915050565b6000806000806000806000612b9b612848565b891115612ba757600080fd5b89541515612bb757879650612cc5565b8954600019810196508a9087908110612bcc57fe5b906000526020600020906002020160005b50549450848910612c13578986815481101515612bf657fe5b906000526020600020906002020160005b50600101549650612cc5565b896000815481101515612c2257fe5b906000526020600020906002020160005b5054935083891015612c4757879650612cc5565b600092508591505b82821115612c9e5760026001838501015b049050888a82815481101515612c7257fe5b906000526020600020906002020160005b505411612c9257809250612c99565b6001810391505b612c4f565b8983815481101515612cac57fe5b906000526020600020906002020160005b506001015496505b5050505050509392505050565b6000808080600160a060020a0386161515612cec57600080fd5b6000612cf66115c8565b600160a060020a03161480612d785750612d0e6115c8565b600160a060020a031663970875ce6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515612d5357600080fd5b6102c65a03f11515612d6457600080fd5b50505060405180519050612d76611c17565b105b1515612d8357600080fd5b612d8b61103a565b9350848401925083831015612d9f57600080fd5b612da8866115ad565b91505083810181811015612db857fe5b612dc36009846130cf565b600160a060020a0386166000908152600860205260409020612de590826130cf565b85600160a060020a031660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405190815260200160405180910390a35b505050505050565b6000813b908111905b50919050565b600080808080612e4a6115c8565b600160a060020a03161480612ecc5750612e626115c8565b600160a060020a031663970875ce6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515612ea757600080fd5b6102c65a03f11515612eb857600080fd5b50505060405180519050612eca611c17565b105b1515612ed757600080fd5b612edf61103a565b935084841015612eee57600080fd5b612ef7866115ad565b925084831015612f0657600080fd5b5050828203838203612f196009836130cf565b600160a060020a0386166000908152600860205260409020612f3b90826130cf565b600086600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405190815260200160405180910390a35b505050505050565b600160a060020a03831660009081526003602052604081205484901515612feb5760025460009011612fb457600080fd5b600160a060020a038116600081815260036020526040908190204390556000805160206134e8833981519152905160405180910390a25b600f5460ff16806130c35750612fff61230a565b600160a060020a0316639085b77f337f921c3afa1f1fff707a785f953a1e197bd28c9c50e300424e015953cbf120c06c60010230600035600160e060020a03191660006040516020015260405160e060020a63ffffffff8716028152600160a060020a039485166004820152602481019390935292166044820152600160e060020a03199091166064820152608401602060405180830381600087803b15156130a757600080fd5b6102c65a03f115156130b857600080fd5b505050604051805190505b91505b5b509392505050565b6000806000806000806130e0612848565b8854909650159450841561313e57875488906001810161310083826133c4565b916000526020600020906002020160005b60408051908101604052898152602081018b90529190508151815560208201518160010155505050613298565b875460001981019450869089908690811061315557fe5b906000526020600020906002020160005b505410925082156131f45786888581548110151561318057fe5b906000526020600020906002020160005b506001015414915081156131a457613298565b875488906001810161310083826133c4565b916000526020600020906002020160005b60408051908101604052898152602081018b90529190508151815560208201518160010155505050613298565b600084118015613229575086886001860381548110151561321157fe5b906000526020600020906002020160005b5060010154145b9050801561327257878481548110151561323f57fe5b906000526020600020906002020160005b506000808255600190910155875461326c8960001983016133c4565b50613298565b86888581548110151561328157fe5b906000526020600020906002020160005b50600101555b5b5050505050505050565b60206040519081016040526000815290565b60206040519081016040526000815290565b604080519081016040526002815b60008152602001906001900390816132d55790505090565b6060604051908101604090815260008083526020830152810161330e6132a3565b905290565b81548183558181151161221a5760030281600302836000526020600020918201910161221a9190613408565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061338657805160ff19168380011785556133b3565b828001600101855582156133b3579182015b828111156133b3578251825591602001919060010190613398565b5b50611035929150613457565b5090565b81548183558181151161221a5760020281600202836000526020600020918201910161221a9190613478565b5b505050565b60206040519081016040526000815290565b610e5091905b8082111561103557805473ffffffffffffffffffffffffffffffffffffffff19168155600060018201819055613447600283018261349f565b5060030161340e565b5090565b90565b610e5091905b80821115611035576000815560010161345d565b5090565b90565b610e5091905b80821115611035576000808255600182015560020161347e565b5090565b90565b50805460018160011615610100020316600290046000825580601f106134c557506134e3565b601f0160209004906000526020600020908101906134e39190613457565b5b5056008c41d101e4d957423a65fda82dcc88bc6b3e756166d2331f663c10166658ebb8a165627a7a72305820179c3a812ab28f2cb7938d3ae7348d45de0ddcf9f195ea9cbe966fbdf1b8158b0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ae38c27e646959735ec70d77ed4ecc03a3eff4900000000000000000000000004c688949578b4fd0cb8f8993a0ec608659e05cf1
-----Decoded View---------------
Arg [0] : accessPolicy (address): 0xaE38c27E646959735ec70d77ED4eCc03A3EFf490
Arg [1] : forkArbiter (address): 0x4C688949578B4fD0CB8F8993a0Ec608659e05cf1
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ae38c27e646959735ec70d77ed4ecc03a3eff490
Arg [1] : 0000000000000000000000004c688949578b4fd0cb8f8993a0ec608659e05cf1
Swarm Source
bzzr://179c3a812ab28f2cb7938d3ae7348d45de0ddcf9f195ea9cbe966fbdf1b8158b
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.