ERC-20
Overview
Max Total Supply
2,998,038.043317596014693879 0xBCC
Holders
11
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.0000001 0xBCCValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
_0xBitconnect
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-03-21 */ pragma solidity 0.4.25; contract ERC20Interface { function totalSupply() public constant returns(uint); function balanceOf(address tokenOwner) public constant returns(uint balance); function allowance(address tokenOwner, address spender) public constant returns(uint remaining); function transfer(address to, uint tokens) public returns(bool success); function approve(address spender, uint tokens) public returns(bool success); function transferFrom(address from, address to, uint tokens) public returns(bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract _0xBitconnect { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); _; } modifier onlyAdministrator() { address _customerAddress = msg.sender; require(administrators[_customerAddress]); _; } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint incoming, uint8 dividendRate, uint tokensMinted, address indexed referredBy ); event UserDividendRate( address user, uint divRate ); event onTokenSell( address indexed customerAddress, uint tokensBurned, uint earned ); event onReinvestment( address indexed customerAddress, uint reinvested, uint tokensMinted ); event onWithdraw( address indexed customerAddress, uint withdrawn ); event Transfer( address indexed from, address indexed to, uint tokens ); event Approval( address indexed tokenOwner, address indexed spender, uint tokens ); event Allocation( uint toBankRoll, uint toReferrer, uint toTokenHolders, uint toDivCardHolders, uint forTokens ); event Referral( address referrer, uint amountReceived ); /*===================================== = CONSTANTS = =====================================*/ uint8 constant public decimals = 18; uint constant internal magnitude = 2 ** 64; uint constant internal MULTIPLIER = 1140; uint constant internal MIN_TOK_BUYIN = 0.0001 ether; uint constant internal MIN_TOKEN_SELL_AMOUNT = 0.0001 ether; uint constant internal MIN_TOKEN_TRANSFER = 1e10; uint constant internal referrer_percentage = 25; uint constant internal MAX_SUPPLY = 1e25; ERC20Interface internal _0xBTC; uint public stakingRequirement = 100e18; /*================================ = CONFIGURABLES = ================================*/ string public name = "0xBitconnect"; string public symbol = "0xBCC"; address internal bankrollAddress; _0xBitconnectDividendCards divCardContract; /*================================ = DATASETS = ================================*/ // Tracks front & backend tokens mapping(address => uint) internal frontTokenBalanceLedger_; mapping(address => uint) internal dividendTokenBalanceLedger_; mapping(address => mapping(address => uint)) public allowed; // Tracks dividend rates for users mapping(uint8 => bool) internal validDividendRates_; mapping(address => bool) internal userSelectedRate; mapping(address => uint8) internal userDividendRate; // Payout tracking mapping(address => uint) internal referralBalance_; mapping(address => int256) internal payoutsTo_; uint public current0xbtcInvested; uint internal tokenSupply = 0; uint internal divTokenSupply = 0; uint internal profitPerDivToken; mapping(address => bool) public administrators; bool public regularPhase = false; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ constructor(address _bankrollAddress, address _divCardAddress, address _btcAddress) public { bankrollAddress = _bankrollAddress; divCardContract = _0xBitconnectDividendCards(_divCardAddress); _0xBTC = ERC20Interface(_btcAddress); administrators[msg.sender] = true; // Helps with debugging! validDividendRates_[10] = true; validDividendRates_[20] = true; validDividendRates_[30] = true; userSelectedRate[bankrollAddress] = true; userDividendRate[bankrollAddress] = 30; /*======================================= = INITIAL HEAVEN = =======================================*/ uint initiallyAssigned = 3*10**24; address heavenA = 0xA7cDc6cF8E8a4db39bc03ac675662D6E2F8F84f3; address heavenB = 0xbC539A28e85c587987297da7039949eA23b51723; userSelectedRate[heavenA] = true; userDividendRate[heavenA] = 30; userSelectedRate[heavenB] = true; userDividendRate[heavenB] = 30; tokenSupply = tokenSupply.add(initiallyAssigned); divTokenSupply = divTokenSupply.add(initiallyAssigned.mul(30)); profitPerDivToken = profitPerDivToken.add((initiallyAssigned.mul(magnitude)).div(divTokenSupply)); payoutsTo_[heavenA] += (int256)((profitPerDivToken * (initiallyAssigned.div(3)).mul(userDividendRate[heavenA]))); payoutsTo_[heavenB] += (int256)((profitPerDivToken * (initiallyAssigned.div(3)).mul(userDividendRate[heavenB]))); payoutsTo_[bankrollAddress] += (int256)((profitPerDivToken * (initiallyAssigned.div(3)).mul(userDividendRate[bankrollAddress]))); frontTokenBalanceLedger_[heavenA] = frontTokenBalanceLedger_[heavenA].add(initiallyAssigned.div(3)); dividendTokenBalanceLedger_[heavenA] = dividendTokenBalanceLedger_[heavenA].add((initiallyAssigned.div(3)).mul(userDividendRate[heavenA])); frontTokenBalanceLedger_[heavenB] = frontTokenBalanceLedger_[heavenB].add(initiallyAssigned.div(3)); dividendTokenBalanceLedger_[heavenB] = dividendTokenBalanceLedger_[heavenB].add((initiallyAssigned.div(3)).mul(userDividendRate[heavenB])); frontTokenBalanceLedger_[bankrollAddress] = frontTokenBalanceLedger_[bankrollAddress].add(initiallyAssigned.div(3)); dividendTokenBalanceLedger_[bankrollAddress] = dividendTokenBalanceLedger_[bankrollAddress].add((initiallyAssigned.div(3)).mul(userDividendRate[bankrollAddress])); } /** * Same as buy, but explicitly sets your dividend percentage. * If this has been called before, it will update your `default' dividend * percentage for regular buy transactions going forward. */ function buyAndSetDivPercentage(uint _0xbtcAmount, address _referredBy, uint8 _divChoice, string providedUnhashedPass) public returns(uint) { require(regularPhase); // Dividend percentage should be a currently accepted value. require(validDividendRates_[_divChoice]); // Set the dividend fee percentage denominator. userSelectedRate[msg.sender] = true; userDividendRate[msg.sender] = _divChoice; emit UserDividendRate(msg.sender, _divChoice); // Finally, purchase tokens. purchaseTokens(_0xbtcAmount, _referredBy, false); } // All buys except for the above one require regular phase. function buy(uint _0xbtcAmount, address _referredBy) public returns(uint) { require(regularPhase); address _customerAddress = msg.sender; require(userSelectedRate[_customerAddress]); purchaseTokens(_0xbtcAmount, _referredBy, false); } function buyAndTransfer(uint _0xbtcAmount, address _referredBy, address target) public { bytes memory empty; buyAndTransfer(_0xbtcAmount, _referredBy, target, empty, 20); } function buyAndTransfer(uint _0xbtcAmount, address _referredBy, address target, bytes _data) public { buyAndTransfer(_0xbtcAmount, _referredBy, target, _data, 20); } // Overload function buyAndTransfer(uint _0xbtcAmount, address _referredBy, address target, bytes _data, uint8 divChoice) public { require(regularPhase); address _customerAddress = msg.sender; uint256 frontendBalance = frontTokenBalanceLedger_[msg.sender]; if (userSelectedRate[_customerAddress] && divChoice == 0) { purchaseTokens(_0xbtcAmount, _referredBy, false); } else { buyAndSetDivPercentage(_0xbtcAmount, _referredBy, divChoice, "0x0"); } uint256 difference = SafeMath.sub(frontTokenBalanceLedger_[msg.sender], frontendBalance); transferTo(msg.sender, target, difference, _data); } // No Fallback functionality function () public { revert(); } function reinvest() dividendHolder() public { require(regularPhase); uint _dividends = myDividends(false); // Pay out requisite `virtual' dividends. address _customerAddress = msg.sender; payoutsTo_[_customerAddress] += (int256)(_dividends * magnitude); _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; uint _tokens = purchaseTokens(_dividends.div(1e10), address(0), true); //to 8 Decimals // Fire logging event. emit onReinvestment(_customerAddress, _dividends, _tokens); } function exit() public { require(regularPhase); // Retrieve token balance for caller, then sell them all. address _customerAddress = msg.sender; uint _tokens = frontTokenBalanceLedger_[_customerAddress]; if (_tokens > 0) sell(_tokens); withdraw(_customerAddress); } function withdraw(address _recipient) dividendHolder() public { require(regularPhase); // Setup data address _customerAddress = msg.sender; uint _dividends = myDividends(false); // update dividend tracker payoutsTo_[_customerAddress] += (int256)(_dividends * magnitude); // add ref. bonus _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; if (_recipient == address(0x0)) { _recipient = msg.sender; } _dividends = _dividends.div(1e10); //to 8 decimals _0xBTC.transfer(_recipient, _dividends); // Fire logging event. emit onWithdraw(_recipient, _dividends); } // Sells front-end tokens. function sell(uint _amountOfTokens) onlyHolders() public { require(regularPhase); require(_amountOfTokens <= frontTokenBalanceLedger_[msg.sender]); uint _frontEndTokensToBurn = _amountOfTokens; // Calculate how many dividend tokens this action burns. // Computed as the caller's average dividend rate multiplied by the number of front-end tokens held. // As an additional guard, we ensure that the dividend rate is between 2 and 50 inclusive. uint userDivRate = getUserAverageDividendRate(msg.sender); require((2 * magnitude) <= userDivRate && (50 * magnitude) >= userDivRate); uint _divTokensToBurn = (_frontEndTokensToBurn.mul(userDivRate)).div(magnitude); // Calculate 0xbtc received before dividends uint _0xbtc = tokensTo0xbtc_(_frontEndTokensToBurn); if (_0xbtc > current0xbtcInvested) { // Well, congratulations, you've emptied the coffers. current0xbtcInvested = 0; } else { current0xbtcInvested = current0xbtcInvested - _0xbtc; } // Calculate dividends generated from the sale. uint _dividends = (_0xbtc.mul(getUserAverageDividendRate(msg.sender)).div(100)).div(magnitude); // Calculate 0xbtc receivable net of dividends. uint _taxed0xbtc = _0xbtc.sub(_dividends); // Burn the sold tokens (both front-end and back-end variants). tokenSupply = tokenSupply.sub(_frontEndTokensToBurn); divTokenSupply = divTokenSupply.sub(_divTokensToBurn); // Subtract the token balances for the seller frontTokenBalanceLedger_[msg.sender] = frontTokenBalanceLedger_[msg.sender].sub(_frontEndTokensToBurn); dividendTokenBalanceLedger_[msg.sender] = dividendTokenBalanceLedger_[msg.sender].sub(_divTokensToBurn); // Update dividends tracker int256 _updatedPayouts = (int256)(profitPerDivToken * _divTokensToBurn + (_taxed0xbtc * magnitude)); payoutsTo_[msg.sender] -= _updatedPayouts; // Let's avoid breaking arithmetic where we can, eh? if (divTokenSupply > 0) { // Update the value of each remaining back-end dividend token. profitPerDivToken = profitPerDivToken.add((_dividends * magnitude) / divTokenSupply); } // Fire logging event. emit onTokenSell(msg.sender, _frontEndTokensToBurn, _taxed0xbtc); } /** * Transfer tokens from the caller to a new holder. * No charge incurred for the transfer. We'd make a terrible bank. */ function transfer(address _toAddress, uint _amountOfTokens) onlyHolders() public returns(bool) { require(_amountOfTokens >= MIN_TOKEN_TRANSFER && _amountOfTokens <= frontTokenBalanceLedger_[msg.sender]); bytes memory empty; transferFromInternal(msg.sender, _toAddress, _amountOfTokens, empty); return true; } function approve(address spender, uint tokens) public returns(bool) { address _customerAddress = msg.sender; allowed[_customerAddress][spender] = tokens; // Fire logging event. emit Approval(_customerAddress, spender, tokens); // Good old ERC20. return true; } /** * Transfer tokens from the caller to a new holder: the Used By Smart Contracts edition. * No charge incurred for the transfer. No seriously, we'd make a terrible bank. */ function transferFrom(address _from, address _toAddress, uint _amountOfTokens) public returns(bool) { // Setup variables address _customerAddress = _from; bytes memory empty; // Make sure we own the tokens we're transferring, are ALLOWED to transfer that many tokens, // and are transferring at least one full token. require(_amountOfTokens >= MIN_TOKEN_TRANSFER && _amountOfTokens <= frontTokenBalanceLedger_[_customerAddress] && _amountOfTokens <= allowed[_customerAddress][msg.sender]); transferFromInternal(_from, _toAddress, _amountOfTokens, empty); // Good old ERC20. return true; } function transferTo(address _from, address _to, uint _amountOfTokens, bytes _data) public { if (_from != msg.sender) { require(_amountOfTokens >= MIN_TOKEN_TRANSFER && _amountOfTokens <= frontTokenBalanceLedger_[_from] && _amountOfTokens <= allowed[_from][msg.sender]); } else { require(_amountOfTokens >= MIN_TOKEN_TRANSFER && _amountOfTokens <= frontTokenBalanceLedger_[_from]); } transferFromInternal(_from, _to, _amountOfTokens, _data); } // Who'd have thought we'd need this thing floating around? function totalSupply() public view returns(uint256) { return tokenSupply; } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ function startRegularPhase() onlyAdministrator public { regularPhase = true; } // The death of a great man demands the birth of a great son. function setAdministrator(address _newAdmin, bool _status) onlyAdministrator() public { administrators[_newAdmin] = _status; } function setStakingRequirement(uint _amountOfTokens) onlyAdministrator() public { // This plane only goes one way, lads. Never below the initial. require(_amountOfTokens >= 100e18); stakingRequirement = _amountOfTokens; } function setName(string _name) onlyAdministrator() public { name = _name; } function setSymbol(string _symbol) onlyAdministrator() public { symbol = _symbol; } function changeBankroll(address _newBankrollAddress) onlyAdministrator public { bankrollAddress = _newBankrollAddress; } /*---------- HELPERS AND CALCULATORS ----------*/ function total0xbtcBalance() public view returns(uint) { return _0xBTC.balanceOf(address(this)); } function total0xbtcReceived() public view returns(uint) { return current0xbtcInvested; } /** * Retrieves your currently selected dividend rate. */ function getMyDividendRate() public view returns(uint8) { address _customerAddress = msg.sender; require(userSelectedRate[_customerAddress]); return userDividendRate[_customerAddress]; } /** * Retrieve the total frontend token supply */ function getFrontEndTokenSupply() public view returns(uint) { return tokenSupply; } /** * Retreive the total dividend token supply */ function getDividendTokenSupply() public view returns(uint) { return divTokenSupply; } /** * Retrieve the frontend tokens owned by the caller */ function myFrontEndTokens() public view returns(uint) { address _customerAddress = msg.sender; return getFrontEndTokenBalanceOf(_customerAddress); } /** * Retrieve the dividend tokens owned by the caller */ function myDividendTokens() public view returns(uint) { address _customerAddress = msg.sender; return getDividendTokenBalanceOf(_customerAddress); } function myReferralDividends() public view returns(uint) { return myDividends(true) - myDividends(false); } function myDividends(bool _includeReferralBonus) public view returns(uint) { address _customerAddress = msg.sender; return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress); } function theDividendsOf(bool _includeReferralBonus, address _customerAddress) public view returns(uint) { return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress); } function getFrontEndTokenBalanceOf(address _customerAddress) view public returns(uint) { return frontTokenBalanceLedger_[_customerAddress]; } function balanceOf(address _owner) view public returns(uint) { return getFrontEndTokenBalanceOf(_owner); } function getDividendTokenBalanceOf(address _customerAddress) view public returns(uint) { return dividendTokenBalanceLedger_[_customerAddress]; } function dividendsOf(address _customerAddress) view public returns(uint) { return (uint)((int256)(profitPerDivToken * dividendTokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude; } // Get the sell price at the user's average dividend rate function sellPrice() public view returns(uint) { uint price; // Calculate the tokens received for 0.001 0xbtc. // Divide to find the average, to calculate the price. uint tokensReceivedFor0xbtc = btcToTokens_(0.001 ether); price = (1e18 * 0.001 ether) / tokensReceivedFor0xbtc; // Factor in the user's average dividend rate uint theSellPrice = price.sub((price.mul(getUserAverageDividendRate(msg.sender)).div(100)).div(magnitude)); return theSellPrice; } // Get the buy price at a particular dividend rate function buyPrice(uint dividendRate) public view returns(uint) { uint price; // Calculate the tokens received for 100 finney. // Divide to find the average, to calculate the price. uint tokensReceivedFor0xbtc = btcToTokens_(0.001 ether); price = (1e18 * 0.001 ether) / tokensReceivedFor0xbtc; // Factor in the user's selected dividend rate uint theBuyPrice = (price.mul(dividendRate).div(100)).add(price); return theBuyPrice; } function calculateTokensReceived(uint _0xbtcToSpend) public view returns(uint) { uint fixedAmount = _0xbtcToSpend.mul(1e10); uint _dividends = (fixedAmount.mul(userDividendRate[msg.sender])).div(100); uint _taxed0xbtc = fixedAmount.sub(_dividends); uint _amountOfTokens = btcToTokens_(_taxed0xbtc); return _amountOfTokens; } // When selling tokens, we need to calculate the user's current dividend rate. // This is different from their selected dividend rate. function calculate0xbtcReceived(uint _tokensToSell) public view returns(uint) { require(_tokensToSell <= tokenSupply); uint _0xbtc = tokensTo0xbtc_(_tokensToSell); uint userAverageDividendRate = getUserAverageDividendRate(msg.sender); uint _dividends = (_0xbtc.mul(userAverageDividendRate).div(100)).div(magnitude); uint _taxed0xbtc = _0xbtc.sub(_dividends); return _taxed0xbtc.div(1e10); } /* * Get's a user's average dividend rate - which is just their divTokenBalance / tokenBalance * We multiply by magnitude to avoid precision errors. */ function getUserAverageDividendRate(address user) public view returns(uint) { return (magnitude * dividendTokenBalanceLedger_[user]).div(frontTokenBalanceLedger_[user]); } function getMyAverageDividendRate() public view returns(uint) { return getUserAverageDividendRate(msg.sender); } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ /* Purchase tokens with 0xbtc. During normal operation: 0.5% should go to the master dividend card 0.5% should go to the matching dividend card 25% of dividends should go to the referrer, if any is provided. */ function purchaseTokens(uint _incoming, address _referredBy, bool _reinvest) internal returns(uint) { require(_incoming.mul(1e10) >= MIN_TOK_BUYIN || msg.sender == bankrollAddress, "Tried to buy below the min 0xbtc buyin threshold."); uint toReferrer; uint toTokenHolders; uint toDivCardHolders; uint dividendAmount; uint tokensBought; uint remaining0xbtc = _incoming.mul(1e10); uint fee; // 1% for dividend card holders is taken off before anything else if (regularPhase) { toDivCardHolders = _incoming.mul(1e8); remaining0xbtc = remaining0xbtc.sub(toDivCardHolders); } /* Next, we tax for dividends: Dividends = (0xbtc * div%) / 100 Important note: the 1% sent to div-card holders is handled prior to any dividend taxes are considered. */ // Calculate the total dividends on this buy dividendAmount = (remaining0xbtc.mul(userDividendRate[msg.sender])).div(100); remaining0xbtc = remaining0xbtc.sub(dividendAmount); // Calculate how many tokens to buy: tokensBought = btcToTokens_(remaining0xbtc); // This is where we actually mint tokens: require(tokenSupply.add(tokensBought) <= MAX_SUPPLY); tokenSupply = tokenSupply.add(tokensBought); divTokenSupply = divTokenSupply.add(tokensBought.mul(userDividendRate[msg.sender])); /* Update the total investment tracker Note that this must be done AFTER we calculate how many tokens are bought - because btcToTokens needs to know the amount *before* investment, not *after* investment. */ current0xbtcInvested = current0xbtcInvested + remaining0xbtc; // Ccheck for referrals // 25% goes to referrers, if set // toReferrer = (dividends * 25)/100 if (_referredBy != 0x0000000000000000000000000000000000000000 && _referredBy != msg.sender && frontTokenBalanceLedger_[_referredBy] >= stakingRequirement) { toReferrer = (dividendAmount.mul(referrer_percentage)).div(100); referralBalance_[_referredBy] += toReferrer; emit Referral(_referredBy, toReferrer); } // The rest of the dividends go to token holders toTokenHolders = dividendAmount.sub(toReferrer); fee = toTokenHolders * magnitude; fee = fee - (fee - (tokensBought.mul(userDividendRate[msg.sender]) * (toTokenHolders * magnitude / (divTokenSupply)))); // Finally, increase the divToken value profitPerDivToken = profitPerDivToken.add((toTokenHolders.mul(magnitude)).div(divTokenSupply)); payoutsTo_[msg.sender] += (int256)((profitPerDivToken * tokensBought.mul(userDividendRate[msg.sender])) - fee); // Update the buyer's token amounts frontTokenBalanceLedger_[msg.sender] = frontTokenBalanceLedger_[msg.sender].add(tokensBought); dividendTokenBalanceLedger_[msg.sender] = dividendTokenBalanceLedger_[msg.sender].add(tokensBought.mul(userDividendRate[msg.sender])); if (_reinvest == false) { //Lets receive the 0xbtc _0xBTC.transferFrom(msg.sender, address(this), _incoming); } // Transfer to div cards if (regularPhase) { _0xBTC.approve(address(divCardContract), toDivCardHolders.div(1e10)); divCardContract.receiveDividends(toDivCardHolders.div(1e10), userDividendRate[msg.sender]); } // This event should help us track where all the 0xbtc is going emit Allocation(0, toReferrer, toTokenHolders, toDivCardHolders, remaining0xbtc); emit onTokenPurchase(msg.sender, _incoming, userDividendRate[msg.sender], tokensBought, _referredBy); // Sanity checking uint sum = toReferrer + toTokenHolders + toDivCardHolders + remaining0xbtc - _incoming.mul(1e10); assert(sum == 0); } // How many tokens one gets from a certain amount of 0xbtc. function btcToTokens_(uint _0xbtcAmount) public view returns(uint) { //0xbtcAmount expected as 18 decimals instead of 8 require(_0xbtcAmount > MIN_TOK_BUYIN, "Tried to buy tokens with too little 0xbtc."); uint _0xbtcTowardsVariablePriceTokens = _0xbtcAmount; uint varPriceTokens = 0; if (_0xbtcTowardsVariablePriceTokens != 0) { uint simulated0xbtcBeforeInvested = toPowerOfThreeHalves(tokenSupply.div(MULTIPLIER * 1e6)).mul(2).div(3); uint simulated0xbtcAfterInvested = simulated0xbtcBeforeInvested + _0xbtcTowardsVariablePriceTokens; uint tokensBefore = toPowerOfTwoThirds(simulated0xbtcBeforeInvested.mul(3).div(2)).mul(MULTIPLIER); uint tokensAfter = toPowerOfTwoThirds(simulated0xbtcAfterInvested.mul(3).div(2)).mul(MULTIPLIER); /* Investment IS already multiplied by 1e18; however, because this is taken to a power of (2/3), we need to multiply the result by 1e6 to get back to the correct number of decimals. */ varPriceTokens = (1e6) * tokensAfter.sub(tokensBefore); } uint totalTokensReceived = varPriceTokens; assert(totalTokensReceived > 0); return totalTokensReceived; } // How much 0xBTC we get from selling N tokens function tokensTo0xbtc_(uint _tokens) public view returns(uint) { require(_tokens >= MIN_TOKEN_SELL_AMOUNT, "Tried to sell too few tokens."); /* * i = investment, p = price, t = number of tokens * * i_current = p_initial * t_current (for t_current <= t_initial) * i_current = i_initial + (2/3)(t_current)^(3/2) (for t_current > t_initial) * * t_current = i_current / p_initial (for i_current <= i_initial) * t_current = t_initial + ((3/2)(i_current))^(2/3) (for i_current > i_initial) */ uint tokensToSellAtVariablePrice = _tokens; uint _0xbtcFromVarPriceTokens; // Now, actually calculate: if (tokensToSellAtVariablePrice != 0) { /* Note: Unlike the sister function in btcToTokens, we don't have to calculate any "virtual" token count. We have the equations for total investment above; note that this is for TOTAL. To get the 0xbtc received from this sell, we calculate the new total investment after this sell. Note that we divide by 1e6 here as the inverse of multiplying by 1e6 in btcToTokens. */ uint investmentBefore = toPowerOfThreeHalves(tokenSupply.div(MULTIPLIER * 1e6)).mul(2).div(3); uint investmentAfter = toPowerOfThreeHalves((tokenSupply - tokensToSellAtVariablePrice).div(MULTIPLIER * 1e6)).mul(2).div(3); _0xbtcFromVarPriceTokens = investmentBefore.sub(investmentAfter); } uint _0xbtcReceived = _0xbtcFromVarPriceTokens; assert(_0xbtcReceived > 0); return _0xbtcReceived; } function transferFromInternal(address _from, address _toAddress, uint _amountOfTokens, bytes _data) internal { require(regularPhase); require(_toAddress != address(0x0)); address _customerAddress = _from; uint _amountOfFrontEndTokens = _amountOfTokens; // Withdraw all outstanding dividends first (including those generated from referrals). if (theDividendsOf(true, _customerAddress) > 0) withdrawFrom(_customerAddress); // Calculate how many back-end dividend tokens to transfer. // This amount is proportional to the caller's average dividend rate multiplied by the proportion of tokens being transferred. uint _amountOfDivTokens = _amountOfFrontEndTokens.mul(getUserAverageDividendRate(_customerAddress)).div(magnitude); if (_customerAddress != msg.sender) { // Update the allowed balance. // Don't update this if we are transferring our own tokens (via transfer or buyAndTransfer) allowed[_customerAddress][msg.sender] -= _amountOfTokens; } // Exchange tokens frontTokenBalanceLedger_[_customerAddress] = frontTokenBalanceLedger_[_customerAddress].sub(_amountOfFrontEndTokens); frontTokenBalanceLedger_[_toAddress] = frontTokenBalanceLedger_[_toAddress].add(_amountOfFrontEndTokens); dividendTokenBalanceLedger_[_customerAddress] = dividendTokenBalanceLedger_[_customerAddress].sub(_amountOfDivTokens); dividendTokenBalanceLedger_[_toAddress] = dividendTokenBalanceLedger_[_toAddress].add(_amountOfDivTokens); // Recipient inherits dividend percentage if they have not already selected one. if (!userSelectedRate[_toAddress]) { userSelectedRate[_toAddress] = true; userDividendRate[_toAddress] = userDividendRate[_customerAddress]; } // Update dividend trackers payoutsTo_[_customerAddress] -= (int256)(profitPerDivToken * _amountOfDivTokens); payoutsTo_[_toAddress] += (int256)(profitPerDivToken * _amountOfDivTokens); uint length; assembly { length: = extcodesize(_toAddress) } if (length > 0) { // its a contract // note: at ethereum update ALL addresses are contracts ERC223Receiving receiver = ERC223Receiving(_toAddress); receiver.tokenFallback(_from, _amountOfTokens, _data); } // Fire logging event. emit Transfer(_customerAddress, _toAddress, _amountOfFrontEndTokens); } // Called from transferFrom. Always checks if _customerAddress has dividends. function withdrawFrom(address _customerAddress) internal { // Setup data uint _dividends = theDividendsOf(false, _customerAddress); // update dividend tracker payoutsTo_[_customerAddress] += (int256)(_dividends * magnitude); // add ref. bonus _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; _dividends = _dividends.div(1e10); //to 8 decimals _0xBTC.transfer(_customerAddress, _dividends); //8 decimals correction // Fire logging event. emit onWithdraw(_customerAddress, _dividends); } /*======================= = MATHS FUNCTIONS = ======================*/ function toPowerOfThreeHalves(uint x) public pure returns(uint) { // m = 3, n = 2 // sqrt(x^3) return sqrt(x ** 3); } function toPowerOfTwoThirds(uint x) public pure returns(uint) { // m = 2, n = 3 // cbrt(x^2) return cbrt(x ** 2); } function sqrt(uint x) public pure returns(uint y) { uint z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } function cbrt(uint x) public pure returns(uint y) { uint z = (x + 1) / 3; y = x; while (z < y) { y = z; z = (x / (z * z) + 2 * z) / 3; } } } /*======================= = INTERFACES = ======================*/ interface _0xBitconnectDividendCards { function ownerOf(uint /*_divCardId*/ ) external pure returns(address); function receiveDividends(uint amount, uint divCardRate) external; } interface _0xBitconnectBankroll { function receiveDividends(uint amount) external; } interface ERC223Receiving { function tokenFallback(address _from, uint _amountOfTokens, bytes _data) external returns(bool); } // Think it's safe to say y'all know what this is. library SafeMath { function mul(uint a, uint b) internal pure returns(uint) { if (a == 0) { return 0; } uint c = a * b; assert(c / a == b); return c; } function div(uint a, uint b) internal pure returns(uint) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint a, uint b) internal pure returns(uint) { assert(b <= a); return a - b; } function add(uint a, uint b) internal pure returns(uint) { uint c = a + b; assert(c >= a); return c; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"dividendsOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_0xbtcAmount","type":"uint256"},{"name":"_referredBy","type":"address"},{"name":"target","type":"address"},{"name":"_data","type":"bytes"},{"name":"divChoice","type":"uint8"}],"name":"buyAndTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"tokens","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokens","type":"uint256"}],"name":"tokensTo0xbtc_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_0xbtcToSpend","type":"uint256"}],"name":"calculateTokensReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amountOfTokens","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"transferTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"regularPhase","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_toAddress","type":"address"},{"name":"_amountOfTokens","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"startRegularPhase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"total0xbtcReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"total0xbtcBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sellPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"getFrontEndTokenBalanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"getDividendTokenBalanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"stakingRequirement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_0xbtcAmount","type":"uint256"},{"name":"_referredBy","type":"address"},{"name":"target","type":"address"}],"name":"buyAndTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"myDividendTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"sqrt","outputs":[{"name":"y","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_includeReferralBonus","type":"bool"}],"name":"myDividends","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"administrators","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMyAverageDividendRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_0xbtcAmount","type":"uint256"},{"name":"_referredBy","type":"address"}],"name":"buy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfTokens","type":"uint256"}],"name":"setStakingRequirement","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"current0xbtcInvested","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newAdmin","type":"address"},{"name":"_status","type":"bool"}],"name":"setAdministrator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getFrontEndTokenSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"toPowerOfTwoThirds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"myReferralDividends","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newBankrollAddress","type":"address"}],"name":"changeBankroll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_toAddress","type":"address"},{"name":"_amountOfTokens","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_includeReferralBonus","type":"bool"},{"name":"_customerAddress","type":"address"}],"name":"theDividendsOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMyDividendRate","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_symbol","type":"string"}],"name":"setSymbol","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_0xbtcAmount","type":"uint256"},{"name":"_referredBy","type":"address"},{"name":"target","type":"address"},{"name":"_data","type":"bytes"}],"name":"buyAndTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"myFrontEndTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokensToSell","type":"uint256"}],"name":"calculate0xbtcReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"dividendRate","type":"uint256"}],"name":"buyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_0xbtcAmount","type":"uint256"},{"name":"_referredBy","type":"address"},{"name":"_divChoice","type":"uint8"},{"name":"providedUnhashedPass","type":"string"}],"name":"buyAndSetDivPercentage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfTokens","type":"uint256"}],"name":"sell","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_0xbtcAmount","type":"uint256"}],"name":"btcToTokens_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"cbrt","outputs":[{"name":"y","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"user","type":"address"}],"name":"getUserAverageDividendRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"reinvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"toPowerOfThreeHalves","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"getDividendTokenSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_bankrollAddress","type":"address"},{"name":"_divCardAddress","type":"address"},{"name":"_btcAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"incoming","type":"uint256"},{"indexed":false,"name":"dividendRate","type":"uint8"},{"indexed":false,"name":"tokensMinted","type":"uint256"},{"indexed":true,"name":"referredBy","type":"address"}],"name":"onTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"user","type":"address"},{"indexed":false,"name":"divRate","type":"uint256"}],"name":"UserDividendRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"tokensBurned","type":"uint256"},{"indexed":false,"name":"earned","type":"uint256"}],"name":"onTokenSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"reinvested","type":"uint256"},{"indexed":false,"name":"tokensMinted","type":"uint256"}],"name":"onReinvestment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"withdrawn","type":"uint256"}],"name":"onWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenOwner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"toBankRoll","type":"uint256"},{"indexed":false,"name":"toReferrer","type":"uint256"},{"indexed":false,"name":"toTokenHolders","type":"uint256"},{"indexed":false,"name":"toDivCardHolders","type":"uint256"},{"indexed":false,"name":"forTokens","type":"uint256"}],"name":"Allocation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"referrer","type":"address"},{"indexed":false,"name":"amountReceived","type":"uint256"}],"name":"Referral","type":"event"}]
Contract Creation Code
68056bc75e2d6310000060015560c0604052600c60808190527f3078426974636f6e6e656374000000000000000000000000000000000000000060a09081526200004d9160029190620007cd565b506040805180820190915260058082527f307842434300000000000000000000000000000000000000000000000000000060209092019182526200009491600391620007cd565b506000600f8190556010556013805460ff19169055348015620000b657600080fd5b50604051606080620032ca83398101604090815281516020808401519383015160048054600160a060020a0319908116600160a060020a03808716919091178355600580548316828a161790556000805490921681851617825533825260128552868220805460ff1990811660019081179092557f502e20e4e219e0c509d693958f17384c185f07a810a5d31c46c2be981e979c2580548216831790557f60a5a5a37b4d1dd7d7b24e4897f9467e8debaad1cd5a21b57a3edb667b34643f80548216831790557fba813966250df53e8742361bee196aca3139d68609981c9283b9bd74a15a86e88054821683179055845483168452600a8752888420805482168317905593549091168252600b9094529485208054601e90831681179091557f9a539d163a8fb5e1e2cd827f35b49a1f426058aebd42e3903f2720028916a23380548316851790557f47c94f19239f3b0ff7946d4d565b040fba8368f050ba589eaf5ba24c3af6a465805483168217905573bc539a28e85c587987297da7039949ea23b51723958690527f47c2c686d1bc67d69d0ebd046ef1073b593909ccb0a33b32e88df8ef584ccc71805483169094179093557f6d59e11e4e0c1531c7ecd3f7a9bcd51039c87c339c5806b5266db8bdc1e4dcec8054909116909217909155600f5491939290916a027b46536c66c8e30000009173a7cdc6cf8e8a4db39bc03ac675662d6e2f8f84f391620002dc90846401000000006200076b8102620028401704565b600f5562000316620002fe84601e640100000000620024726200078682021704565b60105490640100000000620028406200076b82021704565b601081905562000375906200035d90620003488668010000000000000000640100000000620024726200078682021704565b906401000000006200245b620007b582021704565b60115490640100000000620028406200076b82021704565b601155600160a060020a0382166000908152600b6020526040902054620003c99060ff16620003b48560036401000000006200245b620007b582021704565b90640100000000620024726200078682021704565b601154600160a060020a038481166000908152600d602090815260408083208054969095029095019093559084168152600b9091522054620004239060ff16620003b4856003640100000000620007b581026200245b1704565b601154600160a060020a038381166000908152600d602090815260408083208054969095029095019093556004549091168152600b9091522054620004809060ff16620003b4856003640100000000620007b581026200245b1704565b601154600454600160a060020a03166000908152600d602052604090208054929091029091019055620004f5620004c7846003640100000000620007b581026200245b1704565b600160a060020a03841660009081526006602052604090205490640100000000620028406200076b82021704565b600160a060020a038316600090815260066020908152604080832093909355600b905220546200057090620005429060ff16620003b48660036401000000006200245b620007b582021704565b600160a060020a03841660009081526007602052604090205490640100000000620028406200076b82021704565b600160a060020a038316600090815260076020526040902055620005d6620005a88460036401000000006200245b620007b582021704565b600160a060020a03831660009081526006602052604090205490640100000000620028406200076b82021704565b600160a060020a038216600090815260066020908152604080832093909355600b905220546200065190620006239060ff16620003b48660036401000000006200245b620007b582021704565b600160a060020a03831660009081526007602052604090205490640100000000620028406200076b82021704565b600160a060020a038216600090815260076020526040902055620006b9620006898460036401000000006200245b620007b582021704565b600454600160a060020a031660009081526006602052604090205490640100000000620028406200076b82021704565b60048054600160a060020a0390811660009081526006602090815260408083209590955592549091168152600b90915220546200074390620007139060ff16620003b48660036401000000006200245b620007b582021704565b600454600160a060020a031660009081526007602052604090205490640100000000620028406200076b82021704565b600454600160a060020a03166000908152600760205260409020555062000872945050505050565b6000828201838110156200077b57fe5b8091505b5092915050565b6000808315156200079b57600091506200077f565b50828202828482811515620007ac57fe5b04146200077b57fe5b6000808284811515620007c457fe5b04949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200081057805160ff191683800117855562000840565b8280016001018555821562000840579182015b828111156200084057825182559160200191906001019062000823565b506200084e92915062000852565b5090565b6200086f91905b808211156200084e576000815560010162000859565b90565b612a4880620008826000396000f30060806040526004361061026d5763ffffffff60e060020a60003504166265318b811461027f57806304339582146102b257806306fdde031461032a578063095ea7b3146103b45780630b605fcd146103ec57806310d0ffdd1461040457806318160ddd1461041c57806319fb361f14610431578063214dda84146104a057806323b872dd146104b557806327dffba6146104df578063313ce567146104f4578063375023f21461051f57806341a51d00146105345780634b750334146105495780634c146f381461055e578063513920411461057f57806351cff8d9146105a057806356d399e8146105c15780635c658165146105d65780635cd8d2ad146105fd5780636135e08414610627578063677342ce1461063c578063688abbf71461065457806370a082311461066e57806376be15851461068f5780637b89eef2146106b05780637deb6025146106c55780638328b610146106e95780638787c7101461070157806387c950581461071657806395d89b411461073c57806396242f411461041c578063965447d914610751578063a6d87f7d14610769578063a78bcf6e1461077e578063a9059cbb1461079f578063b1f253f6146107c3578063b607068c146107e9578063b84c8246146107fe578063ba033fe114610857578063bcaa218e146108c8578063c1b466d6146108dd578063c47f0027146108f5578063c4dbf6221461094e578063dc154a1914610966578063e4849b32146109d8578063e7c17972146109f0578063e9fad8ee14610a08578063f42c56c214610a1d578063f8ead7cf14610a35578063fdb5a03e14610a56578063fdc89f7314610a6b578063ffcb1edb14610a83575b34801561027957600080fd5b50600080fd5b34801561028b57600080fd5b506102a0600160a060020a0360043516610a98565b60408051918252519081900360200190f35b3480156102be57600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261032894803594600160a060020a03602480358216966044359092169536956084949392019181908401838280828437509497505050923560ff169350610ad392505050565b005b34801561033657600080fd5b5061033f610ba8565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610379578181015183820152602001610361565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103c057600080fd5b506103d8600160a060020a0360043516602435610c33565b604080519115158252519081900360200190f35b3480156103f857600080fd5b506102a0600435610ca0565b34801561041057600080fd5b506102a0600435610dc3565b34801561042857600080fd5b506102a0610e29565b34801561043d57600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261032894600160a060020a038135811695602480359092169560443595369560849401918190840183828082843750949750610e309650505050505050565b3480156104ac57600080fd5b506103d8610ef6565b3480156104c157600080fd5b506103d8600160a060020a0360043581169060243516604435610eff565b3480156104eb57600080fd5b50610328610f83565b34801561050057600080fd5b50610509610fb1565b6040805160ff9092168252519081900360200190f35b34801561052b57600080fd5b506102a0610fb6565b34801561054057600080fd5b506102a0610fbc565b34801561055557600080fd5b506102a0611053565b34801561056a57600080fd5b506102a0600160a060020a03600435166110ca565b34801561058b57600080fd5b506102a0600160a060020a03600435166110e5565b3480156105ac57600080fd5b50610328600160a060020a0360043516611100565b3480156105cd57600080fd5b506102a0611279565b3480156105e257600080fd5b506102a0600160a060020a036004358116906024351661127f565b34801561060957600080fd5b50610328600435600160a060020a036024358116906044351661129c565b34801561063357600080fd5b506102a06112ac565b34801561064857600080fd5b506102a06004356112bf565b34801561066057600080fd5b506102a060043515156112fa565b34801561067a57600080fd5b506102a0600160a060020a036004351661133b565b34801561069b57600080fd5b506103d8600160a060020a036004351661134c565b3480156106bc57600080fd5b506102a0611361565b3480156106d157600080fd5b506102a0600435600160a060020a0360243516611371565b3480156106f557600080fd5b506103286004356113ba565b34801561070d57600080fd5b506102a06113f4565b34801561072257600080fd5b50610328600160a060020a036004351660243515156113fa565b34801561074857600080fd5b5061033f611444565b34801561075d57600080fd5b506102a060043561149f565b34801561077557600080fd5b506102a06114ad565b34801561078a57600080fd5b50610328600160a060020a03600435166114c9565b3480156107ab57600080fd5b506103d8600160a060020a0360043516602435611517565b3480156107cf57600080fd5b506102a06004351515600160a060020a0360243516611574565b3480156107f557600080fd5b506105096115a6565b34801561080a57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526103289436949293602493928401919081908401838280828437509497506115e79650505050505050565b34801561086357600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261032894803594600160a060020a036024803582169660443590921695369560849493920191819084018382808284375094975061161d9650505050505050565b3480156108d457600080fd5b506102a061162b565b3480156108e957600080fd5b506102a0600435611637565b34801561090157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526103289436949293602493928401919081908401838280828437509497506116af9650505050505050565b34801561095a57600080fd5b506102a06004356116e0565b34801561097257600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526102a094803594600160a060020a0360248035919091169560ff6044351695369560849493019181908401838280828437509497506117429650505050505050565b3480156109e457600080fd5b506103286004356117f7565b3480156109fc57600080fd5b506102a0600435611a29565b348015610a1457600080fd5b50610328611b80565b348015610a2957600080fd5b506102a0600435611bc6565b348015610a4157600080fd5b506102a0600160a060020a0360043516611c00565b348015610a6257600080fd5b50610328611c41565b348015610a7757600080fd5b506102a0600435611d1d565b348015610a8f57600080fd5b506102a0611d2b565b600160a060020a03166000908152600d6020908152604080832054600790925290912054601154680100000000000000009102919091030490565b6013546000908190819060ff161515610aeb57600080fd5b33600081815260066020908152604080832054600a90925290912054919450925060ff168015610b1c575060ff8416155b15610b3357610b2d88886000611d31565b50610b76565b610b748888866040805190810160405280600381526020017f3078300000000000000000000000000000000000000000000000000000000000815250611742565b505b33600090815260066020526040902054610b909083612449565b9050610b9e33878388610e30565b5050505050505050565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610c2b5780601f10610c0057610100808354040283529160200191610c2b565b820191906000526020600020905b815481529060010190602001808311610c0e57829003601f168201915b505050505081565b336000818152600860209081526040808320600160a060020a03871680855290835281842086905581518681529151939493909284927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a3600191505b5092915050565b60008080808080655af3107a4000871015610d1c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f547269656420746f2073656c6c20746f6f2066657720746f6b656e732e000000604482015290519081900360640190fd5b8694508415610dad57610d6b6003610d5f6002610d53610d4e610474620f424002600f5461245b90919063ffffffff16565b611d1d565b9063ffffffff61247216565b9063ffffffff61245b16565b9250610d986003610d5f6002610d53610d4e610474620f4240028b600f540361245b90919063ffffffff16565b9150610daa838363ffffffff61244916565b93505b508260008111610db957fe5b9695505050505050565b600080808080610dde866402540be40063ffffffff61247216565b336000908152600b6020526040902054909450610e0c90606490610d5f90879060ff1663ffffffff61247216565b9250610e1e848463ffffffff61244916565b9150610db982611a29565b600f545b90565b600160a060020a0384163314610eac576402540be4008210158015610e6d5750600160a060020a0384166000908152600660205260409020548211155b8015610e9c5750600160a060020a03841660009081526008602090815260408083203384529091529020548211155b1515610ea757600080fd5b610ee4565b6402540be4008210158015610ed95750600160a060020a0384166000908152600660205260409020548211155b1515610ee457600080fd5b610ef08484848461249d565b50505050565b60135460ff1681565b60008360606402540be4008410801590610f315750600160a060020a0382166000908152600660205260409020548411155b8015610f605750600160a060020a03821660009081526008602090815260408083203384529091529020548411155b1515610f6b57600080fd5b610f778686868461249d565b50600195945050505050565b3360008181526012602052604090205460ff161515610fa157600080fd5b506013805460ff19166001179055565b601281565b600e5490565b60008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a082319160248082019260209290919082900301818787803b15801561102257600080fd5b505af1158015611036573d6000803e3d6000fd5b505050506040513d602081101561104c57600080fd5b5051905090565b60008060008061106966038d7ea4c68000611a29565b9150816d314dc6448d9338c15b0a0000000081151561108457fe5b0492506110c26110b568010000000000000000610d5f6064610d5f6110a833611c00565b899063ffffffff61247216565b849063ffffffff61244916565b949350505050565b600160a060020a031660009081526006602052604090205490565b600160a060020a031660009081526007602052604090205490565b600080600061110f60016112fa565b1161111957600080fd5b60135460ff16151561112a57600080fd5b33915061113760006112fa565b600160a060020a038084166000908152600d602090815260408083208054680100000000000000008702019055600c90915281208054919055909101915083161515611181573392505b611196816402540be40063ffffffff61245b16565b60008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03888116600483015260248201869052915194955091169263a9059cbb92604480840193602093929083900390910190829087803b15801561120957600080fd5b505af115801561121d573d6000803e3d6000fd5b505050506040513d602081101561123357600080fd5b5050604080518281529051600160a060020a038516917fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc919081900360200190a2505050565b60015481565b600860209081526000928352604080842090915290825290205481565b6060610ef0848484846014610ad3565b6000336112b8816110e5565b91505b5090565b80600260018201045b818110156112f45780915060028182858115156112e157fe5b04018115156112ec57fe5b0490506112c8565b50919050565b600033826113105761130b81610a98565b611334565b600160a060020a0381166000908152600c602052604090205461133282610a98565b015b9392505050565b6000611346826110ca565b92915050565b60126020526000908152604090205460ff1681565b600061136c33611c00565b905090565b601354600090819060ff16151561138757600080fd5b50336000818152600a602052604090205460ff1615156113a657600080fd5b6113b284846000611d31565b505092915050565b3360008181526012602052604090205460ff1615156113d857600080fd5b68056bc75e2d631000008210156113ee57600080fd5b50600155565b600e5481565b3360008181526012602052604090205460ff16151561141857600080fd5b50600160a060020a03919091166000908152601260205260409020805460ff1916911515919091179055565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610c2b5780601f10610c0057610100808354040283529160200191610c2b565b60006113466002830a611bc6565b60006114b960006112fa565b6114c360016112fa565b03905090565b3360008181526012602052604090205460ff1615156114e757600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60006060600061152561162b565b1161152f57600080fd5b6402540be40083101580156115535750336000908152600660205260409020548311155b151561155e57600080fd5b61156a3385858461249d565b5060019392505050565b6000826115845761130b82610a98565b600160a060020a0382166000908152600c602052604090205461133283610a98565b336000818152600a602052604081205490919060ff1615156115c757600080fd5b600160a060020a03166000908152600b602052604090205460ff16919050565b3360008181526012602052604090205460ff16151561160557600080fd5b815161161890600390602085019061298e565b505050565b610ef0848484846014610ad3565b6000336112b8816110ca565b6000806000806000600f54861115151561165057600080fd5b61165986610ca0565b935061166433611c00565b925061168668010000000000000000610d5f606481888863ffffffff61247216565b9150611698848363ffffffff61244916565b9050610db9816402540be40063ffffffff61245b16565b3360008181526012602052604090205460ff1615156116cd57600080fd5b815161161890600290602085019061298e565b6000806000806116f666038d7ea4c68000611a29565b9150816d314dc6448d9338c15b0a0000000081151561171157fe5b0492506117398361172d6064610d5f838a63ffffffff61247216565b9063ffffffff61284016565b95945050505050565b60135460009060ff16151561175657600080fd5b60ff80841660009081526009602052604090205416151561177657600080fd5b336000818152600a60209081526040808320805460ff19908116600117909155600b835292819020805460ff891694168417905580519384529083019190915280517fc95fc9f67beb97905ada724494d1acfcaa30a3c96b432a0eac1824899f9f97c29281900390910190a16117ee85856000611d31565b50949350505050565b60008060008060008060008061180b61162b565b1161181557600080fd5b60135460ff16151561182657600080fd5b3360009081526006602052604090205488111561184257600080fd5b87965061184e33611c00565b95506802000000000000000086108015906118725750683200000000000000008611155b151561187d57600080fd5b61189a68010000000000000000610d5f898963ffffffff61247216565b94506118a587610ca0565b9350600e548411156118bb576000600e556118c5565b600e805485900390555b6118e368010000000000000000610d5f6064610d5f6110a833611c00565b92506118f5848463ffffffff61244916565b600f5490925061190b908863ffffffff61244916565b600f55601054611921908663ffffffff61244916565b60105533600090815260066020526040902054611944908863ffffffff61244916565b33600090815260066020908152604080832093909355600790522054611970908663ffffffff61244916565b33600090815260076020908152604080832093909355601154600d90915291812080549288026801000000000000000086020192839003905560105491925010156119e5576119e16010546801000000000000000085028115156119d057fe5b60115491900463ffffffff61284016565b6011555b6040805188815260208101849052815133927fc4823739c5787d2ca17e404aa47d5569ae71dfb49cbf21b3f6152ed238a31139928290030190a25050505050505050565b600080808080808080655af3107a40008911611acc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f547269656420746f2062757920746f6b656e73207769746820746f6f206c697460448201527f746c652030786274632e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b889650600095508615611b6857611b026003610d5f6002610d53610d4e610474620f424002600f5461245b90919063ffffffff16565b94508685019350611b2d610474610d53611b286002610d5f8a600363ffffffff61247216565b61149f565b9250611b4e610474610d53611b286002610d5f89600363ffffffff61247216565b9150611b60828463ffffffff61244916565b620f42400295505b508460008111611b7457fe5b98975050505050505050565b601354600090819060ff161515611b9657600080fd5b50503360008181526006602052604081205490811115611bb957611bb9816117f7565b611bc282611100565b5050565b80600360018201045b818110156112f45780915060038160020282830285811515611bed57fe5b0401811515611bf857fe5b049050611bcf565b600160a060020a038116600090815260066020908152604080832054600790925282205461134691680100000000000000009091029063ffffffff61245b16565b600080600080611c5160016112fa565b11611c5b57600080fd5b60135460ff161515611c6c57600080fd5b611c7660006112fa565b336000818152600d602090815260408083208054680100000000000000008702019055600c9091528120805491905590910193509150611ccd611cc4846402540be40063ffffffff61245b16565b60006001611d31565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab36153264588483604051808381526020018281526020019250505060405180910390a2505050565b60006113466003830a6112bf565b60105490565b60008080808080808080655af3107a4000611d578d6402540be40063ffffffff61247216565b101580611d6e5750600454600160a060020a031633145b1515611e0157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f547269656420746f206275792062656c6f7720746865206d696e20307862746360448201527f20627579696e207468726573686f6c642e000000000000000000000000000000606482015290519081900360840190fd5b611e168c6402540be40063ffffffff61247216565b60135490935060ff1615611e4d57611e388c6305f5e10063ffffffff61247216565b9550611e4a838763ffffffff61244916565b92505b336000908152600b6020526040902054611e7890606490610d5f90869060ff1663ffffffff61247216565b9450611e8a838663ffffffff61244916565b9250611e9583611a29565b93506a084595161401484a000000611eb885600f5461284090919063ffffffff16565b1115611ec357600080fd5b600f54611ed6908563ffffffff61284016565b600f55336000908152600b6020526040902054611f1090611f0190869060ff1663ffffffff61247216565b6010549063ffffffff61284016565b601055600e805484019055600160a060020a038b1615801590611f3c5750600160a060020a038b163314155b8015611f625750600154600160a060020a038c1660009081526006602052604090205410155b15611fd857611f7d6064610d5f87601963ffffffff61247216565b600160a060020a038c166000818152600c6020908152604091829020805485019055815192835282018390528051929a507f5db31c63b6c985d138b0b2896458c45ecf94b259da29b7623bdef92b5853d0cd92918290030190a15b611fe8858963ffffffff61244916565b60105490975068010000000000000000880292508281151561200657fe5b336000908152600b60205260409020549190049061202e90869060ff1663ffffffff61247216565b0282038203915061206961205a601054610d5f680100000000000000008b61247290919063ffffffff16565b6011549063ffffffff61284016565b601155336000908152600b6020526040902054829061209290869060ff1663ffffffff61247216565b601154336000908152600d6020908152604080832080549590940295909503909301909155600690915220546120c89085612840565b33600090815260066020908152604080832093909355600b90522054612118906120fc90869060ff1663ffffffff61247216565b336000908152600760205260409020549063ffffffff61284016565b336000908152600760205260409020558915156121ed576000809054906101000a9004600160a060020a0316600160a060020a03166323b872dd33308f6040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183600160a060020a0316600160a060020a031681526020018281526020019350505050602060405180830381600087803b1580156121c057600080fd5b505af11580156121d4573d6000803e3d6000fd5b505050506040513d60208110156121ea57600080fd5b50505b60135460ff161561233157600054600554600160a060020a039182169163095ea7b39116612226896402540be40063ffffffff61245b16565b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561227857600080fd5b505af115801561228c573d6000803e3d6000fd5b505050506040513d60208110156122a257600080fd5b5050600554600160a060020a031663f1dbd6476122ca886402540be40063ffffffff61245b16565b336000908152600b602052604080822054815160e060020a63ffffffff8716028152600481019490945260ff1660248401525160448084019382900301818387803b15801561231857600080fd5b505af115801561232c573d6000803e3d6000fd5b505050505b6040805160008152602081018a9052808201899052606081018890526080810185905290517f7dcbb47dfce2f719d7e1984fd3345bbf7923b236005b64931d95b9205100de829181900360a00190a18a600160a060020a031633600160a060020a03167f3c060c0bb859887701f835b738d115b4730aa95086b1acd507ea54bdf269efa88e600b600033600160a060020a0316600160a060020a0316815260200190815260200160002060009054906101000a900460ff1688604051808481526020018360ff1660ff168152602001828152602001935050505060405180910390a36124288c6402540be40063ffffffff61247216565b88880187018401039050801561243a57fe5b50505050505050509392505050565b60008282111561245557fe5b50900390565b600080828481151561246957fe5b04949350505050565b6000808315156124855760009150610c99565b5082820282848281151561249557fe5b041461133457fe5b601354600090819081908190819060ff1615156124b957600080fd5b600160a060020a03881615156124ce57600080fd5b88945086935060006124e1600187611574565b11156124f0576124f08561284f565b61251668010000000000000000610d5f61250988611c00565b879063ffffffff61247216565b9250600160a060020a038516331461255357600160a060020a03851660009081526008602090815260408083203384529091529020805488900390555b600160a060020a03851660009081526006602052604090205461257c908563ffffffff61244916565b600160a060020a0380871660009081526006602052604080822093909355908a16815220546125b1908563ffffffff61284016565b600160a060020a03808a166000908152600660209081526040808320949094559188168152600790915220546125ed908463ffffffff61244916565b600160a060020a0380871660009081526007602052604080822093909355908a1681522054612622908463ffffffff61284016565b600160a060020a038916600090815260076020908152604080832093909355600a9052205460ff16151561269c57600160a060020a038089166000818152600a60209081526040808320805460ff19908116600117909155948a168352600b909152808220549282529020805490921660ff919091161790555b60118054600160a060020a038781166000908152600d602052604080822080549489029094039093559254908b16835290822080549186029091019055883b92508211156127ea57506040517fc0ee0b8a000000000000000000000000000000000000000000000000000000008152600160a060020a0389811660048301908152602483018990526060604484019081528851606485015288518b949385169363c0ee0b8a938e938d938d9360840190602085019080838360005b8381101561276f578181015183820152602001612757565b50505050905090810190601f16801561279c5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156127bd57600080fd5b505af11580156127d1573d6000803e3d6000fd5b505050506040513d60208110156127e757600080fd5b50505b87600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050505050565b60008282018381101561133457fe5b600061285c600083611574565b600160a060020a0383166000908152600d602090815260408083208054680100000000000000008602019055600c909152812080549190550190506128ac816402540be40063ffffffff61245b16565b60008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015260248201869052915194955091169263a9059cbb92604480840193602093929083900390910190829087803b15801561291f57600080fd5b505af1158015612933573d6000803e3d6000fd5b505050506040513d602081101561294957600080fd5b5050604080518281529051600160a060020a038416917fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc919081900360200190a25050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106129cf57805160ff19168380011785556129fc565b828001600101855582156129fc579182015b828111156129fc5782518255916020019190600101906129e1565b506112bb92610e2d9250905b808211156112bb5760008155600101612a085600a165627a7a7230582028c85fa5fbc508d7345e00286568a476f8d9800eedd7a38f8f0c0e6fea23e9510029000000000000000000000000a4fcf82feb35b1c011634457ef58c110e6274bac00000000000000000000000031e0c89030f0f0e594f007947bb744d75884731d000000000000000000000000b6ed7644c69416d67b522e20bc294a9a9b405b31
Deployed Bytecode
0x60806040526004361061026d5763ffffffff60e060020a60003504166265318b811461027f57806304339582146102b257806306fdde031461032a578063095ea7b3146103b45780630b605fcd146103ec57806310d0ffdd1461040457806318160ddd1461041c57806319fb361f14610431578063214dda84146104a057806323b872dd146104b557806327dffba6146104df578063313ce567146104f4578063375023f21461051f57806341a51d00146105345780634b750334146105495780634c146f381461055e578063513920411461057f57806351cff8d9146105a057806356d399e8146105c15780635c658165146105d65780635cd8d2ad146105fd5780636135e08414610627578063677342ce1461063c578063688abbf71461065457806370a082311461066e57806376be15851461068f5780637b89eef2146106b05780637deb6025146106c55780638328b610146106e95780638787c7101461070157806387c950581461071657806395d89b411461073c57806396242f411461041c578063965447d914610751578063a6d87f7d14610769578063a78bcf6e1461077e578063a9059cbb1461079f578063b1f253f6146107c3578063b607068c146107e9578063b84c8246146107fe578063ba033fe114610857578063bcaa218e146108c8578063c1b466d6146108dd578063c47f0027146108f5578063c4dbf6221461094e578063dc154a1914610966578063e4849b32146109d8578063e7c17972146109f0578063e9fad8ee14610a08578063f42c56c214610a1d578063f8ead7cf14610a35578063fdb5a03e14610a56578063fdc89f7314610a6b578063ffcb1edb14610a83575b34801561027957600080fd5b50600080fd5b34801561028b57600080fd5b506102a0600160a060020a0360043516610a98565b60408051918252519081900360200190f35b3480156102be57600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261032894803594600160a060020a03602480358216966044359092169536956084949392019181908401838280828437509497505050923560ff169350610ad392505050565b005b34801561033657600080fd5b5061033f610ba8565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610379578181015183820152602001610361565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103c057600080fd5b506103d8600160a060020a0360043516602435610c33565b604080519115158252519081900360200190f35b3480156103f857600080fd5b506102a0600435610ca0565b34801561041057600080fd5b506102a0600435610dc3565b34801561042857600080fd5b506102a0610e29565b34801561043d57600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261032894600160a060020a038135811695602480359092169560443595369560849401918190840183828082843750949750610e309650505050505050565b3480156104ac57600080fd5b506103d8610ef6565b3480156104c157600080fd5b506103d8600160a060020a0360043581169060243516604435610eff565b3480156104eb57600080fd5b50610328610f83565b34801561050057600080fd5b50610509610fb1565b6040805160ff9092168252519081900360200190f35b34801561052b57600080fd5b506102a0610fb6565b34801561054057600080fd5b506102a0610fbc565b34801561055557600080fd5b506102a0611053565b34801561056a57600080fd5b506102a0600160a060020a03600435166110ca565b34801561058b57600080fd5b506102a0600160a060020a03600435166110e5565b3480156105ac57600080fd5b50610328600160a060020a0360043516611100565b3480156105cd57600080fd5b506102a0611279565b3480156105e257600080fd5b506102a0600160a060020a036004358116906024351661127f565b34801561060957600080fd5b50610328600435600160a060020a036024358116906044351661129c565b34801561063357600080fd5b506102a06112ac565b34801561064857600080fd5b506102a06004356112bf565b34801561066057600080fd5b506102a060043515156112fa565b34801561067a57600080fd5b506102a0600160a060020a036004351661133b565b34801561069b57600080fd5b506103d8600160a060020a036004351661134c565b3480156106bc57600080fd5b506102a0611361565b3480156106d157600080fd5b506102a0600435600160a060020a0360243516611371565b3480156106f557600080fd5b506103286004356113ba565b34801561070d57600080fd5b506102a06113f4565b34801561072257600080fd5b50610328600160a060020a036004351660243515156113fa565b34801561074857600080fd5b5061033f611444565b34801561075d57600080fd5b506102a060043561149f565b34801561077557600080fd5b506102a06114ad565b34801561078a57600080fd5b50610328600160a060020a03600435166114c9565b3480156107ab57600080fd5b506103d8600160a060020a0360043516602435611517565b3480156107cf57600080fd5b506102a06004351515600160a060020a0360243516611574565b3480156107f557600080fd5b506105096115a6565b34801561080a57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526103289436949293602493928401919081908401838280828437509497506115e79650505050505050565b34801561086357600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261032894803594600160a060020a036024803582169660443590921695369560849493920191819084018382808284375094975061161d9650505050505050565b3480156108d457600080fd5b506102a061162b565b3480156108e957600080fd5b506102a0600435611637565b34801561090157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526103289436949293602493928401919081908401838280828437509497506116af9650505050505050565b34801561095a57600080fd5b506102a06004356116e0565b34801561097257600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526102a094803594600160a060020a0360248035919091169560ff6044351695369560849493019181908401838280828437509497506117429650505050505050565b3480156109e457600080fd5b506103286004356117f7565b3480156109fc57600080fd5b506102a0600435611a29565b348015610a1457600080fd5b50610328611b80565b348015610a2957600080fd5b506102a0600435611bc6565b348015610a4157600080fd5b506102a0600160a060020a0360043516611c00565b348015610a6257600080fd5b50610328611c41565b348015610a7757600080fd5b506102a0600435611d1d565b348015610a8f57600080fd5b506102a0611d2b565b600160a060020a03166000908152600d6020908152604080832054600790925290912054601154680100000000000000009102919091030490565b6013546000908190819060ff161515610aeb57600080fd5b33600081815260066020908152604080832054600a90925290912054919450925060ff168015610b1c575060ff8416155b15610b3357610b2d88886000611d31565b50610b76565b610b748888866040805190810160405280600381526020017f3078300000000000000000000000000000000000000000000000000000000000815250611742565b505b33600090815260066020526040902054610b909083612449565b9050610b9e33878388610e30565b5050505050505050565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610c2b5780601f10610c0057610100808354040283529160200191610c2b565b820191906000526020600020905b815481529060010190602001808311610c0e57829003601f168201915b505050505081565b336000818152600860209081526040808320600160a060020a03871680855290835281842086905581518681529151939493909284927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a3600191505b5092915050565b60008080808080655af3107a4000871015610d1c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f547269656420746f2073656c6c20746f6f2066657720746f6b656e732e000000604482015290519081900360640190fd5b8694508415610dad57610d6b6003610d5f6002610d53610d4e610474620f424002600f5461245b90919063ffffffff16565b611d1d565b9063ffffffff61247216565b9063ffffffff61245b16565b9250610d986003610d5f6002610d53610d4e610474620f4240028b600f540361245b90919063ffffffff16565b9150610daa838363ffffffff61244916565b93505b508260008111610db957fe5b9695505050505050565b600080808080610dde866402540be40063ffffffff61247216565b336000908152600b6020526040902054909450610e0c90606490610d5f90879060ff1663ffffffff61247216565b9250610e1e848463ffffffff61244916565b9150610db982611a29565b600f545b90565b600160a060020a0384163314610eac576402540be4008210158015610e6d5750600160a060020a0384166000908152600660205260409020548211155b8015610e9c5750600160a060020a03841660009081526008602090815260408083203384529091529020548211155b1515610ea757600080fd5b610ee4565b6402540be4008210158015610ed95750600160a060020a0384166000908152600660205260409020548211155b1515610ee457600080fd5b610ef08484848461249d565b50505050565b60135460ff1681565b60008360606402540be4008410801590610f315750600160a060020a0382166000908152600660205260409020548411155b8015610f605750600160a060020a03821660009081526008602090815260408083203384529091529020548411155b1515610f6b57600080fd5b610f778686868461249d565b50600195945050505050565b3360008181526012602052604090205460ff161515610fa157600080fd5b506013805460ff19166001179055565b601281565b600e5490565b60008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a082319160248082019260209290919082900301818787803b15801561102257600080fd5b505af1158015611036573d6000803e3d6000fd5b505050506040513d602081101561104c57600080fd5b5051905090565b60008060008061106966038d7ea4c68000611a29565b9150816d314dc6448d9338c15b0a0000000081151561108457fe5b0492506110c26110b568010000000000000000610d5f6064610d5f6110a833611c00565b899063ffffffff61247216565b849063ffffffff61244916565b949350505050565b600160a060020a031660009081526006602052604090205490565b600160a060020a031660009081526007602052604090205490565b600080600061110f60016112fa565b1161111957600080fd5b60135460ff16151561112a57600080fd5b33915061113760006112fa565b600160a060020a038084166000908152600d602090815260408083208054680100000000000000008702019055600c90915281208054919055909101915083161515611181573392505b611196816402540be40063ffffffff61245b16565b60008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03888116600483015260248201869052915194955091169263a9059cbb92604480840193602093929083900390910190829087803b15801561120957600080fd5b505af115801561121d573d6000803e3d6000fd5b505050506040513d602081101561123357600080fd5b5050604080518281529051600160a060020a038516917fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc919081900360200190a2505050565b60015481565b600860209081526000928352604080842090915290825290205481565b6060610ef0848484846014610ad3565b6000336112b8816110e5565b91505b5090565b80600260018201045b818110156112f45780915060028182858115156112e157fe5b04018115156112ec57fe5b0490506112c8565b50919050565b600033826113105761130b81610a98565b611334565b600160a060020a0381166000908152600c602052604090205461133282610a98565b015b9392505050565b6000611346826110ca565b92915050565b60126020526000908152604090205460ff1681565b600061136c33611c00565b905090565b601354600090819060ff16151561138757600080fd5b50336000818152600a602052604090205460ff1615156113a657600080fd5b6113b284846000611d31565b505092915050565b3360008181526012602052604090205460ff1615156113d857600080fd5b68056bc75e2d631000008210156113ee57600080fd5b50600155565b600e5481565b3360008181526012602052604090205460ff16151561141857600080fd5b50600160a060020a03919091166000908152601260205260409020805460ff1916911515919091179055565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610c2b5780601f10610c0057610100808354040283529160200191610c2b565b60006113466002830a611bc6565b60006114b960006112fa565b6114c360016112fa565b03905090565b3360008181526012602052604090205460ff1615156114e757600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60006060600061152561162b565b1161152f57600080fd5b6402540be40083101580156115535750336000908152600660205260409020548311155b151561155e57600080fd5b61156a3385858461249d565b5060019392505050565b6000826115845761130b82610a98565b600160a060020a0382166000908152600c602052604090205461133283610a98565b336000818152600a602052604081205490919060ff1615156115c757600080fd5b600160a060020a03166000908152600b602052604090205460ff16919050565b3360008181526012602052604090205460ff16151561160557600080fd5b815161161890600390602085019061298e565b505050565b610ef0848484846014610ad3565b6000336112b8816110ca565b6000806000806000600f54861115151561165057600080fd5b61165986610ca0565b935061166433611c00565b925061168668010000000000000000610d5f606481888863ffffffff61247216565b9150611698848363ffffffff61244916565b9050610db9816402540be40063ffffffff61245b16565b3360008181526012602052604090205460ff1615156116cd57600080fd5b815161161890600290602085019061298e565b6000806000806116f666038d7ea4c68000611a29565b9150816d314dc6448d9338c15b0a0000000081151561171157fe5b0492506117398361172d6064610d5f838a63ffffffff61247216565b9063ffffffff61284016565b95945050505050565b60135460009060ff16151561175657600080fd5b60ff80841660009081526009602052604090205416151561177657600080fd5b336000818152600a60209081526040808320805460ff19908116600117909155600b835292819020805460ff891694168417905580519384529083019190915280517fc95fc9f67beb97905ada724494d1acfcaa30a3c96b432a0eac1824899f9f97c29281900390910190a16117ee85856000611d31565b50949350505050565b60008060008060008060008061180b61162b565b1161181557600080fd5b60135460ff16151561182657600080fd5b3360009081526006602052604090205488111561184257600080fd5b87965061184e33611c00565b95506802000000000000000086108015906118725750683200000000000000008611155b151561187d57600080fd5b61189a68010000000000000000610d5f898963ffffffff61247216565b94506118a587610ca0565b9350600e548411156118bb576000600e556118c5565b600e805485900390555b6118e368010000000000000000610d5f6064610d5f6110a833611c00565b92506118f5848463ffffffff61244916565b600f5490925061190b908863ffffffff61244916565b600f55601054611921908663ffffffff61244916565b60105533600090815260066020526040902054611944908863ffffffff61244916565b33600090815260066020908152604080832093909355600790522054611970908663ffffffff61244916565b33600090815260076020908152604080832093909355601154600d90915291812080549288026801000000000000000086020192839003905560105491925010156119e5576119e16010546801000000000000000085028115156119d057fe5b60115491900463ffffffff61284016565b6011555b6040805188815260208101849052815133927fc4823739c5787d2ca17e404aa47d5569ae71dfb49cbf21b3f6152ed238a31139928290030190a25050505050505050565b600080808080808080655af3107a40008911611acc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f547269656420746f2062757920746f6b656e73207769746820746f6f206c697460448201527f746c652030786274632e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b889650600095508615611b6857611b026003610d5f6002610d53610d4e610474620f424002600f5461245b90919063ffffffff16565b94508685019350611b2d610474610d53611b286002610d5f8a600363ffffffff61247216565b61149f565b9250611b4e610474610d53611b286002610d5f89600363ffffffff61247216565b9150611b60828463ffffffff61244916565b620f42400295505b508460008111611b7457fe5b98975050505050505050565b601354600090819060ff161515611b9657600080fd5b50503360008181526006602052604081205490811115611bb957611bb9816117f7565b611bc282611100565b5050565b80600360018201045b818110156112f45780915060038160020282830285811515611bed57fe5b0401811515611bf857fe5b049050611bcf565b600160a060020a038116600090815260066020908152604080832054600790925282205461134691680100000000000000009091029063ffffffff61245b16565b600080600080611c5160016112fa565b11611c5b57600080fd5b60135460ff161515611c6c57600080fd5b611c7660006112fa565b336000818152600d602090815260408083208054680100000000000000008702019055600c9091528120805491905590910193509150611ccd611cc4846402540be40063ffffffff61245b16565b60006001611d31565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab36153264588483604051808381526020018281526020019250505060405180910390a2505050565b60006113466003830a6112bf565b60105490565b60008080808080808080655af3107a4000611d578d6402540be40063ffffffff61247216565b101580611d6e5750600454600160a060020a031633145b1515611e0157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f547269656420746f206275792062656c6f7720746865206d696e20307862746360448201527f20627579696e207468726573686f6c642e000000000000000000000000000000606482015290519081900360840190fd5b611e168c6402540be40063ffffffff61247216565b60135490935060ff1615611e4d57611e388c6305f5e10063ffffffff61247216565b9550611e4a838763ffffffff61244916565b92505b336000908152600b6020526040902054611e7890606490610d5f90869060ff1663ffffffff61247216565b9450611e8a838663ffffffff61244916565b9250611e9583611a29565b93506a084595161401484a000000611eb885600f5461284090919063ffffffff16565b1115611ec357600080fd5b600f54611ed6908563ffffffff61284016565b600f55336000908152600b6020526040902054611f1090611f0190869060ff1663ffffffff61247216565b6010549063ffffffff61284016565b601055600e805484019055600160a060020a038b1615801590611f3c5750600160a060020a038b163314155b8015611f625750600154600160a060020a038c1660009081526006602052604090205410155b15611fd857611f7d6064610d5f87601963ffffffff61247216565b600160a060020a038c166000818152600c6020908152604091829020805485019055815192835282018390528051929a507f5db31c63b6c985d138b0b2896458c45ecf94b259da29b7623bdef92b5853d0cd92918290030190a15b611fe8858963ffffffff61244916565b60105490975068010000000000000000880292508281151561200657fe5b336000908152600b60205260409020549190049061202e90869060ff1663ffffffff61247216565b0282038203915061206961205a601054610d5f680100000000000000008b61247290919063ffffffff16565b6011549063ffffffff61284016565b601155336000908152600b6020526040902054829061209290869060ff1663ffffffff61247216565b601154336000908152600d6020908152604080832080549590940295909503909301909155600690915220546120c89085612840565b33600090815260066020908152604080832093909355600b90522054612118906120fc90869060ff1663ffffffff61247216565b336000908152600760205260409020549063ffffffff61284016565b336000908152600760205260409020558915156121ed576000809054906101000a9004600160a060020a0316600160a060020a03166323b872dd33308f6040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183600160a060020a0316600160a060020a031681526020018281526020019350505050602060405180830381600087803b1580156121c057600080fd5b505af11580156121d4573d6000803e3d6000fd5b505050506040513d60208110156121ea57600080fd5b50505b60135460ff161561233157600054600554600160a060020a039182169163095ea7b39116612226896402540be40063ffffffff61245b16565b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561227857600080fd5b505af115801561228c573d6000803e3d6000fd5b505050506040513d60208110156122a257600080fd5b5050600554600160a060020a031663f1dbd6476122ca886402540be40063ffffffff61245b16565b336000908152600b602052604080822054815160e060020a63ffffffff8716028152600481019490945260ff1660248401525160448084019382900301818387803b15801561231857600080fd5b505af115801561232c573d6000803e3d6000fd5b505050505b6040805160008152602081018a9052808201899052606081018890526080810185905290517f7dcbb47dfce2f719d7e1984fd3345bbf7923b236005b64931d95b9205100de829181900360a00190a18a600160a060020a031633600160a060020a03167f3c060c0bb859887701f835b738d115b4730aa95086b1acd507ea54bdf269efa88e600b600033600160a060020a0316600160a060020a0316815260200190815260200160002060009054906101000a900460ff1688604051808481526020018360ff1660ff168152602001828152602001935050505060405180910390a36124288c6402540be40063ffffffff61247216565b88880187018401039050801561243a57fe5b50505050505050509392505050565b60008282111561245557fe5b50900390565b600080828481151561246957fe5b04949350505050565b6000808315156124855760009150610c99565b5082820282848281151561249557fe5b041461133457fe5b601354600090819081908190819060ff1615156124b957600080fd5b600160a060020a03881615156124ce57600080fd5b88945086935060006124e1600187611574565b11156124f0576124f08561284f565b61251668010000000000000000610d5f61250988611c00565b879063ffffffff61247216565b9250600160a060020a038516331461255357600160a060020a03851660009081526008602090815260408083203384529091529020805488900390555b600160a060020a03851660009081526006602052604090205461257c908563ffffffff61244916565b600160a060020a0380871660009081526006602052604080822093909355908a16815220546125b1908563ffffffff61284016565b600160a060020a03808a166000908152600660209081526040808320949094559188168152600790915220546125ed908463ffffffff61244916565b600160a060020a0380871660009081526007602052604080822093909355908a1681522054612622908463ffffffff61284016565b600160a060020a038916600090815260076020908152604080832093909355600a9052205460ff16151561269c57600160a060020a038089166000818152600a60209081526040808320805460ff19908116600117909155948a168352600b909152808220549282529020805490921660ff919091161790555b60118054600160a060020a038781166000908152600d602052604080822080549489029094039093559254908b16835290822080549186029091019055883b92508211156127ea57506040517fc0ee0b8a000000000000000000000000000000000000000000000000000000008152600160a060020a0389811660048301908152602483018990526060604484019081528851606485015288518b949385169363c0ee0b8a938e938d938d9360840190602085019080838360005b8381101561276f578181015183820152602001612757565b50505050905090810190601f16801561279c5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156127bd57600080fd5b505af11580156127d1573d6000803e3d6000fd5b505050506040513d60208110156127e757600080fd5b50505b87600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050505050565b60008282018381101561133457fe5b600061285c600083611574565b600160a060020a0383166000908152600d602090815260408083208054680100000000000000008602019055600c909152812080549190550190506128ac816402540be40063ffffffff61245b16565b60008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015260248201869052915194955091169263a9059cbb92604480840193602093929083900390910190829087803b15801561291f57600080fd5b505af1158015612933573d6000803e3d6000fd5b505050506040513d602081101561294957600080fd5b5050604080518281529051600160a060020a038416917fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc919081900360200190a25050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106129cf57805160ff19168380011785556129fc565b828001600101855582156129fc579182015b828111156129fc5782518255916020019190600101906129e1565b506112bb92610e2d9250905b808211156112bb5760008155600101612a085600a165627a7a7230582028c85fa5fbc508d7345e00286568a476f8d9800eedd7a38f8f0c0e6fea23e9510029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a4fcf82feb35b1c011634457ef58c110e6274bac00000000000000000000000031e0c89030f0f0e594f007947bb744d75884731d000000000000000000000000b6ed7644c69416d67b522e20bc294a9a9b405b31
-----Decoded View---------------
Arg [0] : _bankrollAddress (address): 0xa4fcF82feB35b1C011634457Ef58c110E6274bAC
Arg [1] : _divCardAddress (address): 0x31e0C89030f0F0e594f007947bB744d75884731D
Arg [2] : _btcAddress (address): 0xB6eD7644C69416d67B522e20bC294A9a9B405B31
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a4fcf82feb35b1c011634457ef58c110e6274bac
Arg [1] : 00000000000000000000000031e0c89030f0f0e594f007947bb744d75884731d
Arg [2] : 000000000000000000000000b6ed7644c69416d67b522e20bc294a9a9b405b31
Swarm Source
bzzr://28c85fa5fbc508d7345e00286568a476f8d9800eedd7a38f8f0c0e6fea23e951
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.