ERC-20
DeFi
Overview
Max Total Supply
475,950.968041367278356937 BRC
Holders
228,213 ( 0.000%)
Market
Price
$0.0104 @ 0.000003 ETH
Onchain Market Cap
$4,950.13
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 18 Decimals)
Balance
10 BRCValue
$0.10 ( ~3.03024273083202E-05 ETH) [0.0021%]Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
BrincToken
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Snapshot.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Pausable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./Curve/interfaces/ICurve.sol"; contract BrincToken is ERC20, ERC20Burnable, ERC20Snapshot, ERC20Pausable, Ownable { using SafeMath for uint256; mapping (address => mapping (address => uint256)) private _allowances; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event BuyTaxRateChanged(uint256 oldRate, uint256 newRate); event SellTaxRateChanged(uint256 oldRate, uint256 newRate); event BuyTaxScaleChanged(uint256 oldScale, uint256 newScale); event SellTaxScaleChanged(uint256 oldScale, uint256 newScale); IERC20 private _reserveAsset; uint32 private _fixedReserveRatio; uint256 private _buyTaxRate; uint256 private _buyTaxScale; uint256 private _sellTaxRate; uint256 private _sellTaxScale; ICurve private _curveAddress; /** * @dev given a token supply, reserve balance, weight and a deposit amount (in the reserve token), * calculates the target amount for a given conversion (in the main token) * * Formula: * return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1) * * @param name curve token name * @param symbol curve token symbol * @param reserveAsset reserve asset address * @param buyTaxRate value between 1 & 100 for owner revenue on mint/buy * @param sellTaxRate value between 1 & 100 for owner revenue on burn/sell * @param reserveRatio reserve ratio, represented in ppm (2-2000000) * @param curveAddress address of the curve formula instance */ constructor ( string memory name, string memory symbol, address reserveAsset, uint256 buyTaxRate, uint256 buyTaxScale, uint256 sellTaxRate, uint256 sellTaxScale, uint32 reserveRatio, address curveAddress ) public ERC20(name, symbol) { require(reserveAsset != address(0), "BrincToken:constructor:Reserve asset invalid"); require(buyTaxRate > 0, "BrincToken:constructor:Buy tax rate cant be 0%"); require(buyTaxRate <= 100, "BrincToken:constructor:Buy tax rate cant be more than 100%"); require(sellTaxRate > 0, "BrincToken:constructor:Sell tax rate cant be 0%"); require(sellTaxRate <= 100, "BrincToken:constructor:Sell tax rate cant be more than 100%"); require(buyTaxScale >= 100, "Buy tax scale can't be < 100"); require(buyTaxScale <= 100000, "Buy tax scale can't be > 100 000"); require(sellTaxScale >= 100, "Sell tax scale can't be < 100"); require(sellTaxScale <= 100000, "Buy tax scale can't be > 100 000"); _fixedReserveRatio = reserveRatio; _buyTaxRate = buyTaxRate; _buyTaxScale = buyTaxScale; _sellTaxRate = sellTaxRate; _sellTaxScale = sellTaxScale; _reserveAsset = IERC20(reserveAsset); _curveAddress = ICurve(curveAddress); } /** * @dev address of the underlining reserve asset * * @return reserveAssetAddress */ /// #if_succeeds {:msg "Returns reserveAssetAddress"} /// $result == address(_reserveAsset); function reserveAsset() public view returns (address) { return address(_reserveAsset); } /** * @dev curve forumla instance address * * @return curveAddress */ /// #if_succeeds {:msg "Returns curveAddress"} /// $result == address(_curveAddress); function curveAddress() public view returns (address) { return address(_curveAddress); } /** * @dev reserve ratio set for the curve formula * * @return reserveRatio */ /// #if_succeeds {:msg "Returns reserveRatio"} /// $result == _fixedReserveRatio; function reserveRatio() public view returns (uint32) { return _fixedReserveRatio; } // Tax /** * @dev tax rate specified to direct reserve assets to owner on mint/buy * * @return buyTaxRate */ /// #if_succeeds {:msg "Returns taxRate"} /// $result == _buyTaxRate; function buyTaxRate() public view returns (uint256) { return _buyTaxRate; } /** * @dev Buy Tax Scale. * If buyTaxScale = 100 and buyTaxRate = 1, buyTax will effectively be 1% * If buyTaxScale = 1000 and buyTaxRate = 1, buyTax will effectively be 0.1% * * @return buyTaxScale */ /// #if_succeeds {:msg "Returns buyTaxScale"} /// $result == _buyTaxScale; function buyTaxScale() public view returns (uint256) { return _buyTaxScale; } /** * @dev tax rate specified to direct reserve assets to owner on burn/sell * * @return sellTaxRate */ /// #if_succeeds {:msg "Returns sellTaxRate"} /// $result == _sellTaxRate; function sellTaxRate() public view returns (uint256) { return _sellTaxRate; } /** * @dev Sell Tax Scale. * If sellTaxScale = 100 and sellTaxRate = 1, sellTax will effectively be 1% * If sellTaxScale = 1000 and sellTaxRate = 1, sellTax will effectively be 0.1% * * @return sellTaxScale */ /// #if_succeeds {:msg "Returns sellTaxScale"} /// $result == _sellTaxScale; function sellTaxScale() public view returns (uint256) { return _sellTaxScale; } // Curve /** * @dev calculates the cost to mint a specified amount of collateral tokens * * @param amount tokens to mint * * @return cost */ /// #if_succeeds {:msg "Returns correct mintCost"} /// $result == fundCost(totalSupply(), _reserveAsset.balanceOf(address(this)), _fixedReserveRatio, amount); function mintCost(uint256 amount) public view returns(uint256) { uint256 reserveBalance = _reserveAsset.balanceOf(address(this)); return fundCost(totalSupply(), reserveBalance, _fixedReserveRatio, amount); } /** * @dev calculates the reward for burning specified amount of curve tokens * * @param amount tokens to burn * * @return reward */ /// #if_succeeds {:msg "Returns burnReward"} /// $result == liquidateReserveAmount(totalSupply(), _reserveAsset.balanceOf(address(this)), _fixedReserveRatio, amount); function burnReward(uint256 amount) public view returns(uint256) { uint256 reserveBalance = _reserveAsset.balanceOf(address(this)); return liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount); } /** * @dev initialises the curve, the total supply needs to be more than zero for * the curve to be calculated * * @param _firstReserve initial reserve token * @param _firstSupply initial supply of curve tokens */ /// #if_succeeds {:msg "The sender must be Owner"} /// old(msg.sender == this.owner()); /// #if_succeeds {:msg "The owner to hold initial minted token"} /// this.balanceOf(msg.sender) == _firstSupply; /// #if_succeeds {:msg "The contract should have the correct intial reserve amount"} /// _reserveAsset.balanceOf(address(this)) == _firstReserve; function init(uint256 _firstReserve, uint256 _firstSupply) external onlyOwner { require(totalSupply() == 0, "BrincToken:init:already minted"); require(_reserveAsset.balanceOf(address(this)) == 0, "BrincToken:init:non-zero reserve asset balance"); require(_reserveAsset.transferFrom(_msgSender(), address(this), _firstReserve), "BrincToken:init:Reserve asset transfer failed"); _mint(_msgSender(), _firstSupply); } /** * @dev sets the tax rate stored in the buyTaxRate variable * * @param _rate new tax rate in percentage (integer between 1 and 100) */ /// #if_succeeds {:msg "The sender must be Owner"} /// old(msg.sender == this.owner()); /// #if_succeeds {:msg "The buyTaxRate was set properly"} /// _buyTaxRate == _rate; function setBuyTaxRate(uint256 _rate) external onlyOwner { require(_rate <= 100 && _rate > 0, "BrincToken:setTax:invalid tax rate (1:100)"); uint256 oldRate = _buyTaxRate; _buyTaxRate = _rate; emit BuyTaxRateChanged(oldRate, _buyTaxRate); } /** * @dev sets the buy tax scale stored in the buyTaxScale variable * * @param _scale new tax scale (integer between 100 and 100000) */ /// #if_succeeds {:msg "The sender must be Owner"} /// old(msg.sender == this.owner()); /// #if_succeeds {:msg "The buyTaxScale was set properly"} /// _buyTaxScale == _scale; function setBuyTaxScale(uint256 _scale) external onlyOwner { require(_scale <= 100000 && _scale >= 100, "invalid buy tax scale (100:100000)"); uint256 oldScale = _buyTaxScale; _buyTaxScale = _scale; emit BuyTaxScaleChanged(oldScale, _buyTaxScale); } /** * @dev sets the tax rate stored in the sellTaxRate variable * * @param _rate new tax rate in percentage (integer between 1 and 100) */ /// #if_succeeds {:msg "The sender must be Owner"} /// old(msg.sender == this.owner()); /// #if_succeeds {:msg "The correct _sellTaxRate has been set"} /// _sellTaxRate == _rate; function setSellTaxRate(uint256 _rate) external onlyOwner { require(_rate <= 100 && _rate > 0, "BrincToken:setTax:invalid tax rate (1:100)"); uint256 oldRate = _sellTaxRate; _sellTaxRate = _rate; emit SellTaxRateChanged(oldRate, _sellTaxRate); } /** * @dev sets the sell tax scale stored in the sellTaxScale variable * * @param _scale new sell tax scale (integer between 100 and 100000) */ /// #if_succeeds {:msg "The sender must be Owner"} /// old(msg.sender == this.owner()); /// #if_succeeds {:msg "The sellTaxScale was set properly"} /// _sellTaxScale == _scale; function setSellTaxScale(uint256 _scale) external onlyOwner { require(_scale <= 100000 && _scale >= 100, "invalid sell tax scale (100:100000)"); uint256 oldScale = _sellTaxScale; _sellTaxScale = _scale; emit SellTaxScaleChanged(oldScale, _sellTaxScale); } // CURVE /** * @dev given a token supply, reserve balance, weight and a deposit amount (in the reserve token), * calculates the target amount for a given conversion (in the main token) * * Formula: * return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1) * * @param _supply liquid token supply * @param _reserveBalance reserve balance * @param _reserveWeight reserve weight, represented in ppm (1-1000000) * @param _amount amount of reserve tokens to get the target amount for * * @return target */ /// #if_succeeds {:msg "The purchase amount should be correct - case _amount = 0"} /// _amount == 0 ==> $result == 0; /// #if_succeeds {:msg "The purchase amount should be correct - case _reserveWeight = MAX_WEIGHT"} /// let postTax := _removeBuyTaxFromSpecificAmount(_amount) in /// _reserveWeight == 1000000 ==> $result == _supply.mul(postTax) / _reserveBalance; function purchaseTargetAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveWeight, uint256 _amount ) public view returns (uint256) { uint256 postTax = _removeBuyTaxFromSpecificAmount(_amount); return _curveAddress.purchaseTargetAmount( _supply, _reserveBalance, _reserveWeight, postTax ); } /** * @dev given a token supply, reserve balance, weight and a sell amount (in the main token), * calculates the target amount for a given conversion (in the reserve token) * * Formula: * return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight)) * * @param _supply liquid token supply * @param _reserveBalance reserve balance * @param _reserveWeight reserve weight, represented in ppm (1-1000000) * @param _amount amount of liquid tokens to get the target amount for * * @return reserve token amount */ /// #if_succeeds {:msg "The sell amount should be correct - case _amount = 0"} /// _amount == 0 ==> $result == 0; /// #if_succeeds {:msg "The sell amount should be correct - case _reserveWeight = MAX_WEIGHT"} /// _reserveWeight == 1000000 ==> $result == _removeSellTax(_reserveBalance.mul(_amount) / _supply); function saleTargetAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveWeight, uint256 _amount ) public view returns (uint256) { uint256 reserveValue = _curveAddress.saleTargetAmount( _supply, _reserveBalance, _reserveWeight, _amount ); uint256 gross = _removeSellTax(reserveValue); return gross; } /** * @dev given a pool token supply, reserve balance, reserve ratio and an amount of requested pool tokens, * calculates the amount of reserve tokens required for purchasing the given amount of pool tokens * * Formula: * return = _reserveBalance * (((_supply + _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio) - 1) * * @param _supply pool token supply * @param _reserveBalance reserve balance * @param _reserveRatio reserve ratio, represented in ppm (2-2000000) * @param _amount requested amount of pool tokens * * @return reserve token amount */ /// #if_succeeds {:msg "The fundCost amount should be correct - case _amount = 0"} /// _amount == 0 ==> $result == 0; /// #if_succeeds {:msg "The fundCost amount should be correct - case _reserveRatio = MAX_WEIGHT"} /// _reserveRatio == 1000000 ==> $result == _addBuyTax(_curveAddress.fundCost(_supply, _reserveBalance, _reserveRatio, _amount)); function fundCost( uint256 _supply, uint256 _reserveBalance, uint32 _reserveRatio, uint256 _amount ) public view returns (uint256) { uint256 reserveTokenCost = _curveAddress.fundCost( _supply, _reserveBalance, _reserveRatio, _amount ); uint256 net = _addBuyTax(reserveTokenCost); return net; } /** * @dev given a pool token supply, reserve balance, reserve ratio and an amount of pool tokens to liquidate, * calculates the amount of reserve tokens received for selling the given amount of pool tokens * * Formula: * return = _reserveBalance * (1 - ((_supply - _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio)) * * @param _supply pool token supply * @param _reserveBalance reserve balance * @param _reserveRatio reserve ratio, represented in ppm (2-2000000) * @param _amount amount of pool tokens to liquidate * * @return reserve token amount */ /// #if_succeeds {:msg "The liquidateReserveAmount should be correct - case _amount = 0"} /// _amount == 0 ==> $result == 0; /// #if_succeeds {:msg "The liquidateReserveAmount should be correct - case _amount = _supply"} /// _amount == _supply ==> $result == _removeSellTax(_reserveBalance); /// #if_succeeds {:msg "The liquidateReserveAmount should be correct - case _reserveRatio = MAX_WEIGHT"} /// _reserveRatio == 1000000 ==> $result == _removeSellTax(_amount.mul(_reserveBalance) / _supply); function liquidateReserveAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveRatio, uint256 _amount ) public view returns (uint256) { uint256 liquidateValue = _curveAddress.liquidateReserveAmount( _supply, _reserveBalance, _reserveRatio, _amount ); uint256 gross = _removeSellTax(liquidateValue); return gross; } /** * @dev allows for the minting of tokens * @param account the account to mint the tokens to * @param amount the uint256 amount of tokens to mint * * @notice see note on mintForSpecificReserveAmount - this function should be used when there is * a target amount of main tokens (the tokens native to this contract) to be minted */ /// #if_succeeds {:msg "The caller's BrincToken balance should be increase correct"} /// this.balanceOf(account) == old(this.balanceOf(account) + amount); /// #if_succeeds {:msg "The reserve balance should increase correct"} /// _reserveAsset.balanceOf(address(this)) >= old(_reserveAsset.balanceOf(address(this))); // this will check if greater or equal to the old balance // will be equal in the case there is a 0 balance transfer /// #if_succeeds {:msg "The tax should go to the owner"} /// let reserveBalance := old(_reserveAsset.balanceOf(address(this))) in /// let reserveTokenCost := old(fundCost(totalSupply(), reserveBalance, _fixedReserveRatio, amount)) in /// let taxDeducted := old(_removeBuyTax(reserveTokenCost)) in /// (msg.sender != owner() && address(this) != owner()) ==> _reserveAsset.balanceOf(owner()) == old(_reserveAsset.balanceOf(owner()) + reserveTokenCost.sub(taxDeducted)); function mint(address account, uint256 amount) public returns (bool) { uint256 reserveBalance = _reserveAsset.balanceOf(address(this)); uint256 reserveTokenCost = fundCost(totalSupply(), reserveBalance, _fixedReserveRatio, amount); uint256 taxDeducted = _removeBuyTax(reserveTokenCost); require( _reserveAsset.transferFrom( _msgSender(), address(this), reserveTokenCost ), "BrincToken:mint:Reserve asset transfer for mint failed" ); require( _reserveAsset.transfer( owner(), reserveTokenCost.sub(taxDeducted) ), "BrincToken:mint:Tax transfer failed" ); _mint(account, amount); return true; } /** * @dev allows for the minting of tokens based on a target amount of reserve asset * @param account the account to mint the tokens to * @param amount the uint256 amount of reserve tokens to spend minting * * @notice the difference between this function and the default mint function is if the * amount of main token desired is specified (this is the case in the default mint function) * or if a specific amount of reserve token is being spent - this function would be used if the * the user has a specific amount of reserve asset (eg Dai) that they wish to spend */ /// #if_succeeds {:msg "The caller's BrincToken balance should be increase correct"} /// let reserveBalance := old(_reserveAsset.balanceOf(address(this))) in /// let tokensToMint := old(purchaseTargetAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount)) in /// msg.sender != owner() ==> this.balanceOf(account) == old(this.balanceOf(account) + tokensToMint); /// #if_succeeds {:msg "The reserve balance should increase by exact amount"} /// let taxDeducted := old(_removeBuyTaxFromSpecificAmount(amount)) in /// (msg.sender != owner() && address(this) != owner()) ==> _reserveAsset.balanceOf(address(this)) == old(_reserveAsset.balanceOf(address(this)) + amount - amount.sub(taxDeducted)); /// #if_succeeds {:msg "The tax should go to the owner"} /// let taxDeducted := old(_removeBuyTaxFromSpecificAmount(amount)) in /// (msg.sender != owner() && address(this) != owner()) ==> _reserveAsset.balanceOf(owner()) == old(_reserveAsset.balanceOf(owner())) + amount.sub(taxDeducted); /// #if_succeeds {:msg "The result should be true"} $result == true; function mintForSpecificReserveAmount(address account, uint256 amount) public returns (bool) { uint256 reserveBalance = _reserveAsset.balanceOf(address(this)); uint256 taxDeducted = _removeBuyTaxFromSpecificAmount(amount); uint256 tokensToMint = purchaseTargetAmount( totalSupply(), reserveBalance, _fixedReserveRatio, amount ); require( _reserveAsset.transferFrom( _msgSender(), address(this), amount ), "BrincToken:mint:Reserve asset transfer for mint failed" ); require( _reserveAsset.transfer( owner(), amount.sub(taxDeducted) ), "BrincToken:mint:Tax transfer failed" ); _mint(account, tokensToMint); return true; } /** * @dev Destroys `amount` tokens from the caller. * @param amount the uint256 amount of tokens to burn * * See {ERC20-_burn}. */ /// #if_succeeds {:msg "The overridden burn should decrease caller's BrincToken balance"} /// this.balanceOf(_msgSender()) == old(this.balanceOf(_msgSender()) - amount); /// #if_succeeds {:msg "burn should add burn tax to the owner's balance"} /// let reserveBalance := old(_reserveAsset.balanceOf(address(this))) in /// let reserveTokenNet := old(liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount)) in /// let taxAdded := old(_addSellTax(reserveTokenNet)) in /// (msg.sender != owner() && address(this) != owner()) ==> _reserveAsset.balanceOf(owner()) == old(_reserveAsset.balanceOf(owner()) + taxAdded.sub(reserveTokenNet)); /// #if_succeeds {:msg "burn should decrease BrincToken reserve balance by exact amount"} /// let reserveBalance := old(_reserveAsset.balanceOf(address(this))) in /// let reserveTokenNet := old(liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount)) in /// let taxAdded := old(_addSellTax(reserveTokenNet)) in /// (msg.sender != owner() && address(this) != owner()) ==> _reserveAsset.balanceOf(address(this)) == old(_reserveAsset.balanceOf(address(this)) - reserveTokenNet - taxAdded.sub(reserveTokenNet)); /// #if_succeeds {:msg "burn should increase user's reserve balance by exact amount"} /// let reserveBalance := old(_reserveAsset.balanceOf(address(this))) in /// let reserveTokenNet := old(liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount)) in /// msg.sender != owner() ==> _reserveAsset.balanceOf(_msgSender()) == old(_reserveAsset.balanceOf(_msgSender()) + reserveTokenNet); function burn(uint256 amount) public override { uint256 reserveBalance = _reserveAsset.balanceOf(address(this)); uint256 reserveTokenNet = liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount); _burn(_msgSender(), amount); uint256 taxAdded = _addSellTax(reserveTokenNet); require(_reserveAsset.transfer(owner(), taxAdded.sub(reserveTokenNet)), "BrincToken:burn:Tax transfer failed"); require(_reserveAsset.transfer(_msgSender(), reserveTokenNet), "BrincToken:burn:Reserve asset transfer failed"); } /** * @dev Allows an approved delgate to destroy tokens from another address * @param account the address to burn tokens from * @param amount the uint256 amount of tokens to approve */ /// #if_succeeds {:msg "The overridden burnFrom should decrease caller's BrincToken balance"} /// this.balanceOf(account) == old(this.balanceOf(account) - amount); /// #if_succeeds {:msg "burnFrom should add burn tax to the owner's balance"} /// let reserveBalance := old(_reserveAsset.balanceOf(address(this))) in /// let reserveTokenNet := old(liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount)) in /// let taxAdded := old(_addSellTax(reserveTokenNet)) in /// (msg.sender != owner() && address(this) != owner()) ==> _reserveAsset.balanceOf(owner()) == old(_reserveAsset.balanceOf(owner()) + taxAdded.sub(reserveTokenNet)); /// #if_succeeds {:msg "burnFrom should decrease BrincToken reserve balance by exact amount"} /// let reserveBalance := old(_reserveAsset.balanceOf(address(this))) in /// let reserveTokenNet := old(liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount)) in /// let taxAdded := old(_addSellTax(reserveTokenNet)) in /// (msg.sender != owner() && address(this) != owner()) ==> _reserveAsset.balanceOf(address(this)) == old(_reserveAsset.balanceOf(address(this)) - reserveTokenNet - taxAdded.sub(reserveTokenNet)); /// #if_succeeds {:msg "burnFrom should increase user's reserve balance by exact amount"} /// let reserveBalance := old(_reserveAsset.balanceOf(address(this))) in /// let reserveTokenNet := old(liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount)) in /// (msg.sender != owner() && address(this) != owner()) ==> _reserveAsset.balanceOf(_msgSender()) == old(_reserveAsset.balanceOf(_msgSender()) + reserveTokenNet); function burnFrom(address account, uint256 amount) public override { uint256 reserveBalance = _reserveAsset.balanceOf(address(this)); uint256 reserveTokenNet = liquidateReserveAmount(totalSupply(), reserveBalance, _fixedReserveRatio, amount); super.burnFrom(account, amount); uint256 taxAdded = _addSellTax(reserveTokenNet); require(_reserveAsset.transfer(owner(), taxAdded.sub(reserveTokenNet)), "BrincToken:burnFrom:Tax transfer failed"); require(_reserveAsset.transfer(account, reserveTokenNet), "BrincToken:burnFrom:Reserve asset transfer failed"); } // ERC20Pausable /** * @dev Pauses the contract's transfer, mint & burn functions * */ /// #if_succeeds {:msg "The caller must be Owner"} /// old(msg.sender == this.owner()); function pause() public onlyOwner() { _pause(); } /** * @dev Unpauses the contract's transfer, mint & burn functions * */ /// #if_succeeds {:msg "The caller must be Owner"} /// old(msg.sender == this.owner()); function unpause() public onlyOwner() { _unpause(); } // ERC20Snapshot /** * @dev Creates a new snapshot and returns its snapshot id. * * Emits a {Snapshot} event that contains the same id. * */ /// #if_succeeds {:msg "The caller must be Owner"} /// old(msg.sender == this.owner()); function snapshot() public onlyOwner() { _snapshot(); } // Tax /** * @dev adds the buy tax to the cost of minting/buying tokens * @notice this function should be used when the user has not speicified a specific amount of * reserve tokens they are interested in spending, but rather a specific amount of collateralized * tokens they are interested in purchasing * @param reserveTokenAmount the initial amount that needs the taxed amount applied to it * * @return the post-tax cost to the user for minting */ /// #if_succeeds {:msg "The correct tax is added to buy"} /// $result == reserveTokenAmount.mul(_buyTaxRate.add(_buyTaxScale)).div(_buyTaxScale); function _addBuyTax(uint256 reserveTokenAmount) internal view returns(uint256) { return reserveTokenAmount.mul(_buyTaxRate.add(_buyTaxScale)).div(_buyTaxScale); } /** * @dev reapplies the sell tax to the amount of reserves returned on burn/sell * @param reserveTokenAmount the initial amount that needs the taxed amount reapplied to it * * @return the pretax returns from selling */ /// #if_succeeds {:msg "The correct tax is added to sell"} /// $result == reserveTokenAmount.mul(_sellTaxRate.add(_sellTaxScale)).div(_sellTaxScale); function _addSellTax(uint256 reserveTokenAmount) internal view returns(uint256) { return reserveTokenAmount.mul(_sellTaxRate.add(_sellTaxScale)).div(_sellTaxScale); // return (reserveTokenAmount.mul(_sellTaxScale)).div(_sellTaxScale.sub(_sellTaxRate)); } /** * @dev removes the buy tax from the user-determined reserve token amount * @notice this function should be used when the user has speicified a specific amount of * reserve tokens they are interested in purchasing collateral tokens with, as opposed to * a specific amount of collateralized * @param reserveTokenAmount the initial amount that needs the taxed amount removed from it * * @return the pretax cost of the collateral tokens */ /// #if_succeeds {:msg "The correct tax removed from specific amount"} /// $result == reserveTokenAmount.mul(_buyTaxScale.sub(_buyTaxRate)).div(_buyTaxScale); function _removeBuyTaxFromSpecificAmount(uint256 reserveTokenAmount) internal view returns(uint256) { // uint256 upscaledTax = 1e18 - (_buyTaxRate.mul(1e16)); // uint256 upscaledPreTax = reserveTokenAmount.mul(upscaledTax); // return upscaledPreTax / 1e18; return reserveTokenAmount.mul(_buyTaxScale.sub(_buyTaxRate)).div(_buyTaxScale); } /** * @dev removes the buy tax from the price of minting/buying (yielding the pretax amount) * @param reserveTokenAmount the initial amount that needs the tax rate removed from * * @return the pretax cost of the collateral tokens */ /// #if_succeeds {:msg "The correct tax amount should be added"} /// $result == reserveTokenAmount.mul(_buyTaxScale).div(_buyTaxRate.add(_buyTaxScale)); function _removeBuyTax(uint256 reserveTokenAmount) internal view returns(uint256) { return reserveTokenAmount.mul(_buyTaxScale).div(_buyTaxRate.add(_buyTaxScale)); } /** * @dev removes the sell tax from the pretax returns of burning/selling * @param reserveTokenAmount the initial amount that needs the tax rate removed from * * @return the post-tax returns to the user from burning */ /// #if_succeeds {:msg "The correct tax amount should be subtracted"} /// $result == reserveTokenAmount.mul(_sellTaxScale).div(_sellTaxRate.add(_sellTaxScale)); function _removeSellTax(uint256 reserveTokenAmount) internal view returns(uint256) { return reserveTokenAmount.mul(_sellTaxScale).div(_sellTaxRate.add(_sellTaxScale)); // return reserveTokenAmount.mul(_sellTaxScale.sub(_sellTaxRate)).div(_sellTaxScale); } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20,ERC20Snapshot,ERC20Pausable) { super._beforeTokenTransfer(from, to, amount); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./ERC20.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { using SafeMath for uint256; /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance"); _approve(account, _msgSender(), decreasedAllowance); _burn(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../math/SafeMath.sol"; import "../../utils/Arrays.sol"; import "../../utils/Counters.sol"; import "./ERC20.sol"; /** * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and * total supply at the time are recorded for later access. * * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting. * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be * used to create an efficient ERC20 forking mechanism. * * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id * and the account address. * * ==== Gas Costs * * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much * smaller since identical balances in subsequent snapshots are stored as a single entry. * * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent * transfers will have normal cost until the next snapshot, and so on. */ abstract contract ERC20Snapshot is ERC20 { // Inspired by Jordi Baylina's MiniMeToken to record historical balances: // https://github.com/Giveth/minimd/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol using SafeMath for uint256; using Arrays for uint256[]; using Counters for Counters.Counter; // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a // Snapshot struct, but that would impede usage of functions that work on an array. struct Snapshots { uint256[] ids; uint256[] values; } mapping (address => Snapshots) private _accountBalanceSnapshots; Snapshots private _totalSupplySnapshots; // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. Counters.Counter private _currentSnapshotId; /** * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created. */ event Snapshot(uint256 id); /** * @dev Creates a new snapshot and returns its snapshot id. * * Emits a {Snapshot} event that contains the same id. * * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a * set of accounts, for example using {AccessControl}, or it may be open to the public. * * [WARNING] * ==== * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking, * you must consider that it can potentially be used by attackers in two ways. * * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs * section above. * * We haven't measured the actual numbers; if this is something you're interested in please reach out to us. * ==== */ function _snapshot() internal virtual returns (uint256) { _currentSnapshotId.increment(); uint256 currentId = _currentSnapshotId.current(); emit Snapshot(currentId); return currentId; } /** * @dev Retrieves the balance of `account` at the time `snapshotId` was created. */ function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) { (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]); return snapshotted ? value : balanceOf(account); } /** * @dev Retrieves the total supply at the time `snapshotId` was created. */ function totalSupplyAt(uint256 snapshotId) public view virtual returns(uint256) { (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots); return snapshotted ? value : totalSupply(); } // Update balance and/or total supply snapshots before the values are modified. This is implemented // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations. function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { super._beforeTokenTransfer(from, to, amount); if (from == address(0)) { // mint _updateAccountSnapshot(to); _updateTotalSupplySnapshot(); } else if (to == address(0)) { // burn _updateAccountSnapshot(from); _updateTotalSupplySnapshot(); } else { // transfer _updateAccountSnapshot(from); _updateAccountSnapshot(to); } } function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) { require(snapshotId > 0, "ERC20Snapshot: id is 0"); // solhint-disable-next-line max-line-length require(snapshotId <= _currentSnapshotId.current(), "ERC20Snapshot: nonexistent id"); // When a valid snapshot is queried, there are three possibilities: // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds // to this id is the current one. // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the // requested id, and its value is the one to return. // c) More snapshots were created after the requested one, and the queried value was later modified. There will be // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is // larger than the requested one. // // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does // exactly this. uint256 index = snapshots.ids.findUpperBound(snapshotId); if (index == snapshots.ids.length) { return (false, 0); } else { return (true, snapshots.values[index]); } } function _updateAccountSnapshot(address account) private { _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account)); } function _updateTotalSupplySnapshot() private { _updateSnapshot(_totalSupplySnapshots, totalSupply()); } function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { uint256 currentId = _currentSnapshotId.current(); if (_lastSnapshotId(snapshots.ids) < currentId) { snapshots.ids.push(currentId); snapshots.values.push(currentValue); } } function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) { if (ids.length == 0) { return 0; } else { return ids[ids.length - 1]; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./ERC20.sol"; import "../../utils/Pausable.sol"; /** * @dev ERC20 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC20Pausable is ERC20, Pausable { /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(!paused(), "ERC20Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /* Bonding Curve interface */ interface ICurve { function purchaseTargetAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveWeight, uint256 _amount ) external view returns (uint256); function saleTargetAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveWeight, uint256 _amount ) external view returns (uint256); function crossReserveTargetAmount( uint256 _sourceReserveBalance, uint32 _sourceReserveWeight, uint256 _targetReserveBalance, uint32 _targetReserveWeight, uint256 _amount ) external view returns (uint256); function fundCost( uint256 _supply, uint256 _reserveBalance, uint32 _reserveRatio, uint256 _amount ) external view returns (uint256); function fundSupplyAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveRatio, uint256 _amount ) external view returns (uint256); function liquidateReserveAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveRatio, uint256 _amount ) external view returns (uint256); function balancedWeights( uint256 _primaryReserveStakedBalance, uint256 _primaryReserveBalance, uint256 _secondaryReserveBalance, uint256 _reserveRateNumerator, uint256 _reserveRateDenominator ) external view returns (uint32, uint32); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { if (array.length == 0) { return 0; } uint256 low = 0; uint256 high = array.length; while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds down (it does integer division with truncation). if (array[mid] > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && array[low - 1] == element) { return low - 1; } else { return low; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../math/SafeMath.sol"; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library Counters { using SafeMath for uint256; struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { // The {SafeMath} overflow check can be skipped here, see the comment at the top counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () internal { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"reserveAsset","type":"address"},{"internalType":"uint256","name":"buyTaxRate","type":"uint256"},{"internalType":"uint256","name":"buyTaxScale","type":"uint256"},{"internalType":"uint256","name":"sellTaxRate","type":"uint256"},{"internalType":"uint256","name":"sellTaxScale","type":"uint256"},{"internalType":"uint32","name":"reserveRatio","type":"uint32"},{"internalType":"address","name":"curveAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"BuyTaxRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldScale","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newScale","type":"uint256"}],"name":"BuyTaxScaleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"SellTaxRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldScale","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newScale","type":"uint256"}],"name":"SellTaxScaleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyTaxRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyTaxScale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"uint256","name":"_reserveBalance","type":"uint256"},{"internalType":"uint32","name":"_reserveRatio","type":"uint32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"fundCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_firstReserve","type":"uint256"},{"internalType":"uint256","name":"_firstSupply","type":"uint256"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"uint256","name":"_reserveBalance","type":"uint256"},{"internalType":"uint32","name":"_reserveRatio","type":"uint32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"liquidateReserveAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintForSpecificReserveAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"uint256","name":"_reserveBalance","type":"uint256"},{"internalType":"uint32","name":"_reserveWeight","type":"uint32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"purchaseTargetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveRatio","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"uint256","name":"_reserveBalance","type":"uint256"},{"internalType":"uint32","name":"_reserveWeight","type":"uint32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"saleTargetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellTaxRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellTaxScale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setBuyTaxRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_scale","type":"uint256"}],"name":"setBuyTaxScale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setSellTaxRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_scale","type":"uint256"}],"name":"setSellTaxScale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snapshot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620057453803806200574583398181016040526101208110156200003857600080fd5b81019080805160405193929190846401000000008211156200005957600080fd5b838201915060208201858111156200007057600080fd5b82518660018202830111640100000000821117156200008e57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c4578082015181840152602081019050620000a7565b50505050905090810190601f168015620000f25780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011657600080fd5b838201915060208201858111156200012d57600080fd5b82518660018202830111640100000000821117156200014b57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018157808201518184015260208101905062000164565b50505050905090810190601f168015620001af5780820380516001836020036101000a031916815260200191505b50604052602001805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508888816003908051906020019062000219929190620007cd565b50806004908051906020019062000232929190620007cd565b506012600560006101000a81548160ff021916908360ff16021790555050506000600a60006101000a81548160ff02191690831515021790555060006200027e620007c560201b60201c565b905080600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415620003a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018062005647602c913960400191505060405180910390fd5b6000861162000400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018062005673602e913960400191505060405180910390fd5b60648611156200045c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180620056a1603a913960400191505060405180910390fd5b60008411620004b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180620056db602f913960400191505060405180910390fd5b606484111562000513576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001806200570a603b913960400191505060405180910390fd5b60648510156200058b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f42757920746178207363616c652063616e2774206265203c203130300000000081525060200191505060405180910390fd5b620186a085111562000605576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f42757920746178207363616c652063616e2774206265203e203130302030303081525060200191505060405180910390fd5b60648310156200067d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f53656c6c20746178207363616c652063616e2774206265203c2031303000000081525060200191505060405180910390fd5b620186a0831115620006f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f42757920746178207363616c652063616e2774206265203e203130302030303081525060200191505060405180910390fd5b81600c60146101000a81548163ffffffff021916908363ffffffff16021790555085600d8190555084600e8190555083600f819055508260108190555086600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050505062000873565b600033905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200081057805160ff191683800117855562000841565b8280016001018555821562000841579182015b828111156200084057825182559160200191906001019062000823565b5b50905062000850919062000854565b5090565b5b808211156200086f57600081600090555060010162000855565b5090565b614dc480620008836000396000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c806376cf0b5611610146578063a9059cbb116100c3578063dd62ed3e11610087578063dd62ed3e14610b5a578063e5dc6b2114610bd2578063ebbb215814610c00578063f2fde38b14610c66578063f3250fe214610caa578063f85cb5c814610d105761025e565b8063a9059cbb146109ee578063b3bbbb9f14610a52578063b5e8cf0214610ab6578063c15e120514610af8578063d092dca014610b2c5761025e565b806395d89b411161010a57806395d89b41146108835780639711715a14610906578063981b24d014610910578063a457c2d714610952578063a5843f08146109b65761025e565b806376cf0b561461072b57806379cc6790146107915780638074590a146107df5780638456cb59146108455780638da5cb5b1461084f5761025e565b80633f4ba83a116101df578063507e46fb116101a3578063507e46fb1461062f57806355e2e9741461065d5780635c975abb1461068b578063691f224f146106ab57806370a08231146106c9578063715018a6146107215761025e565b80633f4ba83a1461051357806340c10f191461051d57806342966c68146105815780634ec3d93d146105af5780634ee2cd7e146105cd5761025e565b806324024efd1161022657806324024efd1461041057806324c6969d1461042e57806327de8f271461044c578063313ce5671461048e57806339509351146104af5761025e565b806306fdde0314610263578063095ea7b3146102e65780630c7d5cd81461034a57806318160ddd1461036e57806323b872dd1461038c575b600080fd5b61026b610d44565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102ab578082015181840152602081019050610290565b50505050905090810190601f1680156102d85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610332600480360360408110156102fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610de6565b60405180821515815260200191505060405180910390f35b610352610e04565b604051808263ffffffff16815260200191505060405180910390f35b610376610e1e565b6040518082815260200191505060405180910390f35b6103f8600480360360608110156103a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e28565b60405180821515815260200191505060405180910390f35b610418610f01565b6040518082815260200191505060405180910390f35b610436610f0b565b6040518082815260200191505060405180910390f35b6104786004803603602081101561046257600080fd5b8101908080359060200190929190505050610f15565b6040518082815260200191505060405180910390f35b61049661100b565b604051808260ff16815260200191505060405180910390f35b6104fb600480360360408110156104c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611022565b60405180821515815260200191505060405180910390f35b61051b6110d5565b005b6105696004803603604081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061118e565b60405180821515815260200191505060405180910390f35b6105ad6004803603602081101561059757600080fd5b8101908080359060200190929190505050611528565b005b6105b76118a3565b6040518082815260200191505060405180910390f35b610619600480360360408110156105e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506118ad565b6040518082815260200191505060405180910390f35b61065b6004803603602081101561064557600080fd5b810190808035906020019092919050505061191d565b005b6106896004803603602081101561067357600080fd5b8101908080359060200190929190505050611a88565b005b610693611bf0565b60405180821515815260200191505060405180910390f35b6106b3611c07565b6040518082815260200191505060405180910390f35b61070b600480360360208110156106df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c11565b6040518082815260200191505060405180910390f35b610729611c59565b005b61077b6004803603608081101561074157600080fd5b810190808035906020019092919080359060200190929190803563ffffffff16906020019092919080359060200190929190505050611dc9565b6040518082815260200191505060405180910390f35b6107dd600480360360408110156107a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611eb4565b005b61082f600480360360808110156107f557600080fd5b810190808035906020019092919080359060200190929190803563ffffffff16906020019092919080359060200190929190505050612222565b6040518082815260200191505060405180910390f35b61084d61230d565b005b6108576123c6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61088b6123f0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108cb5780820151818401526020810190506108b0565b50505050905090810190601f1680156108f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61090e612492565b005b61093c6004803603602081101561092657600080fd5b810190808035906020019092919050505061254c565b6040518082815260200191505060405180910390f35b61099e6004803603604081101561096857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061257d565b60405180821515815260200191505060405180910390f35b6109ec600480360360408110156109cc57600080fd5b81019080803590602001909291908035906020019092919050505061264a565b005b610a3a60048036036040811015610a0457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129ef565b60405180821515815260200191505060405180910390f35b610a9e60048036036040811015610a6857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612a0d565b60405180821515815260200191505060405180910390f35b610ae260048036036020811015610acc57600080fd5b8101908080359060200190929190505050612da7565b6040518082815260200191505060405180910390f35b610b00612e9d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b5860048036036020811015610b4257600080fd5b8101908080359060200190929190505050612ec7565b005b610bbc60048036036040811015610b7057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613032565b6040518082815260200191505060405180910390f35b610bfe60048036036020811015610be857600080fd5b81019080803590602001909291905050506130b9565b005b610c5060048036036080811015610c1657600080fd5b810190808035906020019092919080359060200190929190803563ffffffff16906020019092919080359060200190929190505050613221565b6040518082815260200191505060405180910390f35b610ca860048036036020811015610c7c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061330c565b005b610cfa60048036036080811015610cc057600080fd5b810190808035906020019092919080359060200190929190803563ffffffff16906020019092919080359060200190929190505050613501565b6040518082815260200191505060405180910390f35b610d186135e6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ddc5780601f10610db157610100808354040283529160200191610ddc565b820191906000526020600020905b815481529060010190602001808311610dbf57829003601f168201915b5050505050905090565b6000610dfa610df3613610565b8484613618565b6001905092915050565b6000600c60149054906101000a900463ffffffff16905090565b6000600254905090565b6000610e3584848461380f565b610ef684610e41613610565b610ef185604051806060016040528060288152602001614c3a60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610ea7613610565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad09092919063ffffffff16565b613618565b600190509392505050565b6000600f54905090565b6000600e54905090565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610fa157600080fd5b505afa158015610fb5573d6000803e3d6000fd5b505050506040513d6020811015610fcb57600080fd5b81019080805190602001909291905050509050611003610fe9610e1e565b82600c60149054906101000a900463ffffffff1686613221565b915050919050565b6000600560009054906101000a900460ff16905090565b60006110cb61102f613610565b846110c68560016000611040613610565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613b8a90919063ffffffff16565b613618565b6001905092915050565b6110dd613610565b73ffffffffffffffffffffffffffffffffffffffff166110fb6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614611184576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61118c613c12565b565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561121a57600080fd5b505afa15801561122e573d6000803e3d6000fd5b505050506040513d602081101561124457600080fd5b81019080805190602001909291905050509050600061127e611264610e1e565b83600c60149054906101000a900463ffffffff1687613221565b9050600061128b82613cfd565b9050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd6112d3613610565b30856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561134557600080fd5b505af1158015611359573d6000803e3d6000fd5b505050506040513d602081101561136f57600080fd5b81019080805190602001909291905050506113d5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180614b8e6036913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61141b6123c6565b61142e8486613d4390919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561148157600080fd5b505af1158015611495573d6000803e3d6000fd5b505050506040513d60208110156114ab57600080fd5b8101908080519060200190929190505050611511576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614d1d6023913960400191505060405180910390fd5b61151b8686613dc6565b6001935050505092915050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156115b357600080fd5b505afa1580156115c7573d6000803e3d6000fd5b505050506040513d60208110156115dd57600080fd5b8101908080519060200190929190505050905060006116176115fd610e1e565b83600c60149054906101000a900463ffffffff1686612222565b905061162a611624613610565b84613f8d565b600061163582614151565b9050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61167d6123c6565b6116908585613d4390919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156116e357600080fd5b505af11580156116f7573d6000803e3d6000fd5b505050506040513d602081101561170d57600080fd5b8101908080519060200190929190505050611773576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614a0e6023913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6117b9613610565b846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561180d57600080fd5b505af1158015611821573d6000803e3d6000fd5b505050506040513d602081101561183757600080fd5b810190808051906020019092919050505061189d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180614ae0602d913960400191505060405180910390fd5b50505050565b6000601054905090565b60008060006118fa84600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020614197565b91509150816119115761190c85611c11565b611913565b805b9250505092915050565b611925613610565b73ffffffffffffffffffffffffffffffffffffffff166119436123c6565b73ffffffffffffffffffffffffffffffffffffffff16146119cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b620186a081111580156119e0575060648110155b611a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614abd6023913960400191505060405180910390fd5b60006010549050816010819055507f7e5dd1e2a3785a9f7260b07746bafe42a17de3b446940898235dd6beb6abfa9b81601054604051808381526020018281526020019250505060405180910390a15050565b611a90613610565b73ffffffffffffffffffffffffffffffffffffffff16611aae6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614611b37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60648111158015611b485750600081115b611b9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614b0d602a913960400191505060405180910390fd5b6000600d54905081600d819055507f522ee5b64f558270d1bdf82eb5176d992e5c0da8d8c6505c041a4039eb051f9581600d54604051808381526020018281526020019250505060405180910390a15050565b6000600a60009054906101000a900460ff16905090565b6000600d54905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611c61613610565b73ffffffffffffffffffffffffffffffffffffffff16611c7f6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614611d08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166376cf0b56878787876040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b158015611e5d57600080fd5b505afa158015611e71573d6000803e3d6000fd5b505050506040513d6020811015611e8757600080fd5b810190808051906020019092919050505090506000611ea5826142ee565b90508092505050949350505050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611f3f57600080fd5b505afa158015611f53573d6000803e3d6000fd5b505050506040513d6020811015611f6957600080fd5b810190808051906020019092919050505090506000611fa3611f89610e1e565b83600c60149054906101000a900463ffffffff1686612222565b9050611faf8484614334565b6000611fba82614151565b9050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6120026123c6565b6120158585613d4390919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561206857600080fd5b505af115801561207c573d6000803e3d6000fd5b505050506040513d602081101561209257600080fd5b81019080805190602001909291905050506120f8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180614bf26027913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561218b57600080fd5b505af115801561219f573d6000803e3d6000fd5b505050506040513d60208110156121b557600080fd5b810190808051906020019092919050505061221b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180614b5d6031913960400191505060405180910390fd5b5050505050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638074590a878787876040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b1580156122b657600080fd5b505afa1580156122ca573d6000803e3d6000fd5b505050506040513d60208110156122e057600080fd5b8101908080519060200190929190505050905060006122fe826142ee565b90508092505050949350505050565b612315613610565b73ffffffffffffffffffffffffffffffffffffffff166123336123c6565b73ffffffffffffffffffffffffffffffffffffffff16146123bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6123c4614396565b565b6000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124885780601f1061245d57610100808354040283529160200191612488565b820191906000526020600020905b81548152906001019060200180831161246b57829003601f168201915b5050505050905090565b61249a613610565b73ffffffffffffffffffffffffffffffffffffffff166124b86123c6565b73ffffffffffffffffffffffffffffffffffffffff1614612541576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b612549614482565b50565b600080600061255c846007614197565b91509150816125725761256d610e1e565b612574565b805b92505050919050565b600061264061258a613610565b8461263b85604051806060016040528060258152602001614d4060259139600160006125b4613610565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad09092919063ffffffff16565b613618565b6001905092915050565b612652613610565b73ffffffffffffffffffffffffffffffffffffffff166126706123c6565b73ffffffffffffffffffffffffffffffffffffffff16146126f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000612703610e1e565b14612776576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4272696e63546f6b656e3a696e69743a616c7265616479206d696e746564000081525060200191505060405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561280157600080fd5b505afa158015612815573d6000803e3d6000fd5b505050506040513d602081101561282b57600080fd5b810190808051906020019092919050505014612892576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614bc4602e913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd6128d8613610565b30856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561294a57600080fd5b505af115801561295e573d6000803e3d6000fd5b505050506040513d602081101561297457600080fd5b81019080805190602001909291905050506129da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180614cf0602d913960400191505060405180910390fd5b6129eb6129e5613610565b82613dc6565b5050565b6000612a036129fc613610565b848461380f565b6001905092915050565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a9957600080fd5b505afa158015612aad573d6000803e3d6000fd5b505050506040513d6020811015612ac357600080fd5b810190808051906020019092919050505090506000612ae1846144da565b90506000612b0a612af0610e1e565b84600c60149054906101000a900463ffffffff1688613501565b9050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd612b52613610565b30886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612bc457600080fd5b505af1158015612bd8573d6000803e3d6000fd5b505050506040513d6020811015612bee57600080fd5b8101908080519060200190929190505050612c54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180614b8e6036913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb612c9a6123c6565b612cad8589613d4390919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0057600080fd5b505af1158015612d14573d6000803e3d6000fd5b505050506040513d6020811015612d2a57600080fd5b8101908080519060200190929190505050612d90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614d1d6023913960400191505060405180910390fd5b612d9a8682613dc6565b6001935050505092915050565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612e3357600080fd5b505afa158015612e47573d6000803e3d6000fd5b505050506040513d6020811015612e5d57600080fd5b81019080805190602001909291905050509050612e95612e7b610e1e565b82600c60149054906101000a900463ffffffff1686612222565b915050919050565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612ecf613610565b73ffffffffffffffffffffffffffffffffffffffff16612eed6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614612f76576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b620186a08111158015612f8a575060648110155b612fdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614a316022913960400191505060405180910390fd5b6000600e54905081600e819055507f47c0abd3cbc1b969ba8e8eb901aa2624f04aed22c4f7bfd72af9f2cf43bfe90481600e54604051808381526020018281526020019250505060405180910390a15050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6130c1613610565b73ffffffffffffffffffffffffffffffffffffffff166130df6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614613168576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b606481111580156131795750600081115b6131ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614b0d602a913960400191505060405180910390fd5b6000600f54905081600f819055507fa9628aa3091e58148e3eba91f119c461b912c469a799ee54bf69fe9f478506e281600f54604051808381526020018281526020019250505060405180910390a15050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebbb2158878787876040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b1580156132b557600080fd5b505afa1580156132c9573d6000803e3d6000fd5b505050506040513d60208110156132df57600080fd5b8101908080519060200190929190505050905060006132fd82614520565b90508092505050949350505050565b613314613610565b73ffffffffffffffffffffffffffffffffffffffff166133326123c6565b73ffffffffffffffffffffffffffffffffffffffff16146133bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613441576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614a756026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061350d836144da565b9050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3250fe2878787856040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b1580156135a057600080fd5b505afa1580156135b4573d6000803e3d6000fd5b505050506040513d60208110156135ca57600080fd5b8101908080519060200190929190505050915050949350505050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561369e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180614ccc6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613724576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614a9b6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613895576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180614ca76025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561391b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806149eb6023913960400191505060405180910390fd5b613926838383614566565b61399181604051806060016040528060268152602001614b37602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad09092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613a24816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613b8a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290613b7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b42578082015181840152602081019050613b27565b50505050905090810190601f168015613b6f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080828401905083811015613c08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b613c1a611bf0565b613c8c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600a60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613cd0613610565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000613d3c613d19600e54600d54613b8a90919063ffffffff16565b613d2e600e548561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b600082821115613dbb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613e69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b613e7560008383614566565b613e8a81600254613b8a90919063ffffffff16565b600281905550613ee1816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613b8a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415614013576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614c866021913960400191505060405180910390fd5b61401f82600083614566565b61408a81604051806060016040528060228152602001614a53602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad09092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506140e181600254613d4390919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000614190601054614182614173601054600f54613b8a90919063ffffffff16565b8561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b60008060008411614210576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552433230536e617073686f743a20696420697320300000000000000000000081525060200191505060405180910390fd5b61421a6009614685565b84111561428f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000081525060200191505060405180910390fd5b60006142a7858560000161469390919063ffffffff16565b905083600001805490508114156142c55760008092509250506142e7565b60018460010182815481106142d657fe5b906000526020600020015492509250505b9250929050565b600061432d61430a601054600f54613b8a90919063ffffffff16565b61431f6010548561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b600061437382604051806060016040528060248152602001614c62602491396143648661435f613610565b613032565b613ad09092919063ffffffff16565b905061438783614381613610565b83613618565b6143918383613f8d565b505050565b61439e611bf0565b15614411576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600a60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258614455613610565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600061448e6009614744565b600061449a6009614685565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67816040518082815260200191505060405180910390a18091505090565b6000614519600e5461450b6144fc600d54600e54613d4390919063ffffffff16565b8561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b600061455f600e54614551614542600e54600d54613b8a90919063ffffffff16565b8561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b61457183838361475a565b505050565b60008083141561458957600090506145f6565b600082840290508284828161459a57fe5b04146145f1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614c196021913960400191505060405180910390fd5b809150505b92915050565b6000808211614673576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b81838161467c57fe5b04905092915050565b600081600001549050919050565b600080838054905014156146aa576000905061473e565b600080848054905090505b808210156146fe5760006146c983836147c8565b9050848682815481106146d857fe5b906000526020600020015411156146f1578091506146f8565b6001810192505b506146b5565b60008211801561472657508385600184038154811061471957fe5b9060005260206000200154145b1561473857600182039250505061473e565b81925050505b92915050565b6001816000016000828254019250508190555050565b61476583838361480a565b61476d611bf0565b156147c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614d65602a913960400191505060405180910390fd5b505050565b600060028083816147d557fe5b06600285816147e057fe5b0601816147e957fe5b04600283816147f457fe5b04600285816147ff57fe5b040101905092915050565b6148158383836148c4565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561486057614853826148c9565b61485b61491c565b6148bf565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156148ab5761489e836148c9565b6148a661491c565b6148be565b6148b4836148c9565b6148bd826148c9565b5b5b505050565b505050565b614919600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061491483611c11565b614930565b50565b61492e6007614929610e1e565b614930565b565b600061493c6009614685565b90508061494b846000016149ad565b10156149a85782600001819080600181540180825580915050600190039060005260206000200160009091909190915055826001018290806001815401808255809150506001900390600052602060002001600090919091909150555b505050565b600080828054905014156149c457600090506149e5565b816001838054905003815481106149d757fe5b906000526020600020015490505b91905056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734272696e63546f6b656e3a6275726e3a546178207472616e73666572206661696c6564696e76616c69642062757920746178207363616c6520283130303a3130303030302945524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373696e76616c69642073656c6c20746178207363616c6520283130303a313030303030294272696e63546f6b656e3a6275726e3a52657365727665206173736574207472616e73666572206661696c65644272696e63546f6b656e3a7365745461783a696e76616c69642074617820726174652028313a3130302945524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654272696e63546f6b656e3a6275726e46726f6d3a52657365727665206173736574207472616e73666572206661696c65644272696e63546f6b656e3a6d696e743a52657365727665206173736574207472616e7366657220666f72206d696e74206661696c65644272696e63546f6b656e3a696e69743a6e6f6e2d7a65726f20726573657276652061737365742062616c616e63654272696e63546f6b656e3a6275726e46726f6d3a546178207472616e73666572206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734272696e63546f6b656e3a696e69743a52657365727665206173736574207472616e73666572206661696c65644272696e63546f6b656e3a6d696e743a546178207472616e73666572206661696c656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f45524332305061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564a26469706673582212206b90d963ab154477fbcce46ed33ed3b9b19a8206e77f121b238242c1e771188964736f6c634300060c00334272696e63546f6b656e3a636f6e7374727563746f723a5265736572766520617373657420696e76616c69644272696e63546f6b656e3a636f6e7374727563746f723a4275792074617820726174652063616e742062652030254272696e63546f6b656e3a636f6e7374727563746f723a4275792074617820726174652063616e74206265206d6f7265207468616e20313030254272696e63546f6b656e3a636f6e7374727563746f723a53656c6c2074617820726174652063616e742062652030254272696e63546f6b656e3a636f6e7374727563746f723a53656c6c2074617820726174652063616e74206265206d6f7265207468616e203130302500000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000006300000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000aae6000000000000000000000000091bd43beb23eb58a5c6375059eabe9852607d1d0000000000000000000000000000000000000000000000000000000000000000a4272696e63546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034252430000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061025e5760003560e01c806376cf0b5611610146578063a9059cbb116100c3578063dd62ed3e11610087578063dd62ed3e14610b5a578063e5dc6b2114610bd2578063ebbb215814610c00578063f2fde38b14610c66578063f3250fe214610caa578063f85cb5c814610d105761025e565b8063a9059cbb146109ee578063b3bbbb9f14610a52578063b5e8cf0214610ab6578063c15e120514610af8578063d092dca014610b2c5761025e565b806395d89b411161010a57806395d89b41146108835780639711715a14610906578063981b24d014610910578063a457c2d714610952578063a5843f08146109b65761025e565b806376cf0b561461072b57806379cc6790146107915780638074590a146107df5780638456cb59146108455780638da5cb5b1461084f5761025e565b80633f4ba83a116101df578063507e46fb116101a3578063507e46fb1461062f57806355e2e9741461065d5780635c975abb1461068b578063691f224f146106ab57806370a08231146106c9578063715018a6146107215761025e565b80633f4ba83a1461051357806340c10f191461051d57806342966c68146105815780634ec3d93d146105af5780634ee2cd7e146105cd5761025e565b806324024efd1161022657806324024efd1461041057806324c6969d1461042e57806327de8f271461044c578063313ce5671461048e57806339509351146104af5761025e565b806306fdde0314610263578063095ea7b3146102e65780630c7d5cd81461034a57806318160ddd1461036e57806323b872dd1461038c575b600080fd5b61026b610d44565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102ab578082015181840152602081019050610290565b50505050905090810190601f1680156102d85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610332600480360360408110156102fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610de6565b60405180821515815260200191505060405180910390f35b610352610e04565b604051808263ffffffff16815260200191505060405180910390f35b610376610e1e565b6040518082815260200191505060405180910390f35b6103f8600480360360608110156103a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e28565b60405180821515815260200191505060405180910390f35b610418610f01565b6040518082815260200191505060405180910390f35b610436610f0b565b6040518082815260200191505060405180910390f35b6104786004803603602081101561046257600080fd5b8101908080359060200190929190505050610f15565b6040518082815260200191505060405180910390f35b61049661100b565b604051808260ff16815260200191505060405180910390f35b6104fb600480360360408110156104c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611022565b60405180821515815260200191505060405180910390f35b61051b6110d5565b005b6105696004803603604081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061118e565b60405180821515815260200191505060405180910390f35b6105ad6004803603602081101561059757600080fd5b8101908080359060200190929190505050611528565b005b6105b76118a3565b6040518082815260200191505060405180910390f35b610619600480360360408110156105e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506118ad565b6040518082815260200191505060405180910390f35b61065b6004803603602081101561064557600080fd5b810190808035906020019092919050505061191d565b005b6106896004803603602081101561067357600080fd5b8101908080359060200190929190505050611a88565b005b610693611bf0565b60405180821515815260200191505060405180910390f35b6106b3611c07565b6040518082815260200191505060405180910390f35b61070b600480360360208110156106df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c11565b6040518082815260200191505060405180910390f35b610729611c59565b005b61077b6004803603608081101561074157600080fd5b810190808035906020019092919080359060200190929190803563ffffffff16906020019092919080359060200190929190505050611dc9565b6040518082815260200191505060405180910390f35b6107dd600480360360408110156107a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611eb4565b005b61082f600480360360808110156107f557600080fd5b810190808035906020019092919080359060200190929190803563ffffffff16906020019092919080359060200190929190505050612222565b6040518082815260200191505060405180910390f35b61084d61230d565b005b6108576123c6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61088b6123f0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108cb5780820151818401526020810190506108b0565b50505050905090810190601f1680156108f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61090e612492565b005b61093c6004803603602081101561092657600080fd5b810190808035906020019092919050505061254c565b6040518082815260200191505060405180910390f35b61099e6004803603604081101561096857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061257d565b60405180821515815260200191505060405180910390f35b6109ec600480360360408110156109cc57600080fd5b81019080803590602001909291908035906020019092919050505061264a565b005b610a3a60048036036040811015610a0457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129ef565b60405180821515815260200191505060405180910390f35b610a9e60048036036040811015610a6857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612a0d565b60405180821515815260200191505060405180910390f35b610ae260048036036020811015610acc57600080fd5b8101908080359060200190929190505050612da7565b6040518082815260200191505060405180910390f35b610b00612e9d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b5860048036036020811015610b4257600080fd5b8101908080359060200190929190505050612ec7565b005b610bbc60048036036040811015610b7057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613032565b6040518082815260200191505060405180910390f35b610bfe60048036036020811015610be857600080fd5b81019080803590602001909291905050506130b9565b005b610c5060048036036080811015610c1657600080fd5b810190808035906020019092919080359060200190929190803563ffffffff16906020019092919080359060200190929190505050613221565b6040518082815260200191505060405180910390f35b610ca860048036036020811015610c7c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061330c565b005b610cfa60048036036080811015610cc057600080fd5b810190808035906020019092919080359060200190929190803563ffffffff16906020019092919080359060200190929190505050613501565b6040518082815260200191505060405180910390f35b610d186135e6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ddc5780601f10610db157610100808354040283529160200191610ddc565b820191906000526020600020905b815481529060010190602001808311610dbf57829003601f168201915b5050505050905090565b6000610dfa610df3613610565b8484613618565b6001905092915050565b6000600c60149054906101000a900463ffffffff16905090565b6000600254905090565b6000610e3584848461380f565b610ef684610e41613610565b610ef185604051806060016040528060288152602001614c3a60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610ea7613610565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad09092919063ffffffff16565b613618565b600190509392505050565b6000600f54905090565b6000600e54905090565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610fa157600080fd5b505afa158015610fb5573d6000803e3d6000fd5b505050506040513d6020811015610fcb57600080fd5b81019080805190602001909291905050509050611003610fe9610e1e565b82600c60149054906101000a900463ffffffff1686613221565b915050919050565b6000600560009054906101000a900460ff16905090565b60006110cb61102f613610565b846110c68560016000611040613610565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613b8a90919063ffffffff16565b613618565b6001905092915050565b6110dd613610565b73ffffffffffffffffffffffffffffffffffffffff166110fb6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614611184576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61118c613c12565b565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561121a57600080fd5b505afa15801561122e573d6000803e3d6000fd5b505050506040513d602081101561124457600080fd5b81019080805190602001909291905050509050600061127e611264610e1e565b83600c60149054906101000a900463ffffffff1687613221565b9050600061128b82613cfd565b9050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd6112d3613610565b30856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561134557600080fd5b505af1158015611359573d6000803e3d6000fd5b505050506040513d602081101561136f57600080fd5b81019080805190602001909291905050506113d5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180614b8e6036913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61141b6123c6565b61142e8486613d4390919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561148157600080fd5b505af1158015611495573d6000803e3d6000fd5b505050506040513d60208110156114ab57600080fd5b8101908080519060200190929190505050611511576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614d1d6023913960400191505060405180910390fd5b61151b8686613dc6565b6001935050505092915050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156115b357600080fd5b505afa1580156115c7573d6000803e3d6000fd5b505050506040513d60208110156115dd57600080fd5b8101908080519060200190929190505050905060006116176115fd610e1e565b83600c60149054906101000a900463ffffffff1686612222565b905061162a611624613610565b84613f8d565b600061163582614151565b9050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61167d6123c6565b6116908585613d4390919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156116e357600080fd5b505af11580156116f7573d6000803e3d6000fd5b505050506040513d602081101561170d57600080fd5b8101908080519060200190929190505050611773576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614a0e6023913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6117b9613610565b846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561180d57600080fd5b505af1158015611821573d6000803e3d6000fd5b505050506040513d602081101561183757600080fd5b810190808051906020019092919050505061189d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180614ae0602d913960400191505060405180910390fd5b50505050565b6000601054905090565b60008060006118fa84600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020614197565b91509150816119115761190c85611c11565b611913565b805b9250505092915050565b611925613610565b73ffffffffffffffffffffffffffffffffffffffff166119436123c6565b73ffffffffffffffffffffffffffffffffffffffff16146119cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b620186a081111580156119e0575060648110155b611a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614abd6023913960400191505060405180910390fd5b60006010549050816010819055507f7e5dd1e2a3785a9f7260b07746bafe42a17de3b446940898235dd6beb6abfa9b81601054604051808381526020018281526020019250505060405180910390a15050565b611a90613610565b73ffffffffffffffffffffffffffffffffffffffff16611aae6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614611b37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60648111158015611b485750600081115b611b9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614b0d602a913960400191505060405180910390fd5b6000600d54905081600d819055507f522ee5b64f558270d1bdf82eb5176d992e5c0da8d8c6505c041a4039eb051f9581600d54604051808381526020018281526020019250505060405180910390a15050565b6000600a60009054906101000a900460ff16905090565b6000600d54905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611c61613610565b73ffffffffffffffffffffffffffffffffffffffff16611c7f6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614611d08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166376cf0b56878787876040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b158015611e5d57600080fd5b505afa158015611e71573d6000803e3d6000fd5b505050506040513d6020811015611e8757600080fd5b810190808051906020019092919050505090506000611ea5826142ee565b90508092505050949350505050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611f3f57600080fd5b505afa158015611f53573d6000803e3d6000fd5b505050506040513d6020811015611f6957600080fd5b810190808051906020019092919050505090506000611fa3611f89610e1e565b83600c60149054906101000a900463ffffffff1686612222565b9050611faf8484614334565b6000611fba82614151565b9050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6120026123c6565b6120158585613d4390919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561206857600080fd5b505af115801561207c573d6000803e3d6000fd5b505050506040513d602081101561209257600080fd5b81019080805190602001909291905050506120f8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180614bf26027913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561218b57600080fd5b505af115801561219f573d6000803e3d6000fd5b505050506040513d60208110156121b557600080fd5b810190808051906020019092919050505061221b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180614b5d6031913960400191505060405180910390fd5b5050505050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638074590a878787876040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b1580156122b657600080fd5b505afa1580156122ca573d6000803e3d6000fd5b505050506040513d60208110156122e057600080fd5b8101908080519060200190929190505050905060006122fe826142ee565b90508092505050949350505050565b612315613610565b73ffffffffffffffffffffffffffffffffffffffff166123336123c6565b73ffffffffffffffffffffffffffffffffffffffff16146123bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6123c4614396565b565b6000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124885780601f1061245d57610100808354040283529160200191612488565b820191906000526020600020905b81548152906001019060200180831161246b57829003601f168201915b5050505050905090565b61249a613610565b73ffffffffffffffffffffffffffffffffffffffff166124b86123c6565b73ffffffffffffffffffffffffffffffffffffffff1614612541576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b612549614482565b50565b600080600061255c846007614197565b91509150816125725761256d610e1e565b612574565b805b92505050919050565b600061264061258a613610565b8461263b85604051806060016040528060258152602001614d4060259139600160006125b4613610565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad09092919063ffffffff16565b613618565b6001905092915050565b612652613610565b73ffffffffffffffffffffffffffffffffffffffff166126706123c6565b73ffffffffffffffffffffffffffffffffffffffff16146126f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000612703610e1e565b14612776576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4272696e63546f6b656e3a696e69743a616c7265616479206d696e746564000081525060200191505060405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561280157600080fd5b505afa158015612815573d6000803e3d6000fd5b505050506040513d602081101561282b57600080fd5b810190808051906020019092919050505014612892576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614bc4602e913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd6128d8613610565b30856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561294a57600080fd5b505af115801561295e573d6000803e3d6000fd5b505050506040513d602081101561297457600080fd5b81019080805190602001909291905050506129da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180614cf0602d913960400191505060405180910390fd5b6129eb6129e5613610565b82613dc6565b5050565b6000612a036129fc613610565b848461380f565b6001905092915050565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a9957600080fd5b505afa158015612aad573d6000803e3d6000fd5b505050506040513d6020811015612ac357600080fd5b810190808051906020019092919050505090506000612ae1846144da565b90506000612b0a612af0610e1e565b84600c60149054906101000a900463ffffffff1688613501565b9050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd612b52613610565b30886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612bc457600080fd5b505af1158015612bd8573d6000803e3d6000fd5b505050506040513d6020811015612bee57600080fd5b8101908080519060200190929190505050612c54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180614b8e6036913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb612c9a6123c6565b612cad8589613d4390919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0057600080fd5b505af1158015612d14573d6000803e3d6000fd5b505050506040513d6020811015612d2a57600080fd5b8101908080519060200190929190505050612d90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614d1d6023913960400191505060405180910390fd5b612d9a8682613dc6565b6001935050505092915050565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612e3357600080fd5b505afa158015612e47573d6000803e3d6000fd5b505050506040513d6020811015612e5d57600080fd5b81019080805190602001909291905050509050612e95612e7b610e1e565b82600c60149054906101000a900463ffffffff1686612222565b915050919050565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612ecf613610565b73ffffffffffffffffffffffffffffffffffffffff16612eed6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614612f76576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b620186a08111158015612f8a575060648110155b612fdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614a316022913960400191505060405180910390fd5b6000600e54905081600e819055507f47c0abd3cbc1b969ba8e8eb901aa2624f04aed22c4f7bfd72af9f2cf43bfe90481600e54604051808381526020018281526020019250505060405180910390a15050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6130c1613610565b73ffffffffffffffffffffffffffffffffffffffff166130df6123c6565b73ffffffffffffffffffffffffffffffffffffffff1614613168576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b606481111580156131795750600081115b6131ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614b0d602a913960400191505060405180910390fd5b6000600f54905081600f819055507fa9628aa3091e58148e3eba91f119c461b912c469a799ee54bf69fe9f478506e281600f54604051808381526020018281526020019250505060405180910390a15050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebbb2158878787876040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b1580156132b557600080fd5b505afa1580156132c9573d6000803e3d6000fd5b505050506040513d60208110156132df57600080fd5b8101908080519060200190929190505050905060006132fd82614520565b90508092505050949350505050565b613314613610565b73ffffffffffffffffffffffffffffffffffffffff166133326123c6565b73ffffffffffffffffffffffffffffffffffffffff16146133bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613441576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614a756026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061350d836144da565b9050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3250fe2878787856040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b1580156135a057600080fd5b505afa1580156135b4573d6000803e3d6000fd5b505050506040513d60208110156135ca57600080fd5b8101908080519060200190929190505050915050949350505050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561369e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180614ccc6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613724576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614a9b6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613895576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180614ca76025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561391b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806149eb6023913960400191505060405180910390fd5b613926838383614566565b61399181604051806060016040528060268152602001614b37602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad09092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613a24816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613b8a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290613b7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b42578082015181840152602081019050613b27565b50505050905090810190601f168015613b6f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080828401905083811015613c08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b613c1a611bf0565b613c8c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600a60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613cd0613610565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000613d3c613d19600e54600d54613b8a90919063ffffffff16565b613d2e600e548561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b600082821115613dbb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613e69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b613e7560008383614566565b613e8a81600254613b8a90919063ffffffff16565b600281905550613ee1816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613b8a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415614013576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614c866021913960400191505060405180910390fd5b61401f82600083614566565b61408a81604051806060016040528060228152602001614a53602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad09092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506140e181600254613d4390919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000614190601054614182614173601054600f54613b8a90919063ffffffff16565b8561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b60008060008411614210576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552433230536e617073686f743a20696420697320300000000000000000000081525060200191505060405180910390fd5b61421a6009614685565b84111561428f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000081525060200191505060405180910390fd5b60006142a7858560000161469390919063ffffffff16565b905083600001805490508114156142c55760008092509250506142e7565b60018460010182815481106142d657fe5b906000526020600020015492509250505b9250929050565b600061432d61430a601054600f54613b8a90919063ffffffff16565b61431f6010548561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b600061437382604051806060016040528060248152602001614c62602491396143648661435f613610565b613032565b613ad09092919063ffffffff16565b905061438783614381613610565b83613618565b6143918383613f8d565b505050565b61439e611bf0565b15614411576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600a60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258614455613610565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600061448e6009614744565b600061449a6009614685565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67816040518082815260200191505060405180910390a18091505090565b6000614519600e5461450b6144fc600d54600e54613d4390919063ffffffff16565b8561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b600061455f600e54614551614542600e54600d54613b8a90919063ffffffff16565b8561457690919063ffffffff16565b6145fc90919063ffffffff16565b9050919050565b61457183838361475a565b505050565b60008083141561458957600090506145f6565b600082840290508284828161459a57fe5b04146145f1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614c196021913960400191505060405180910390fd5b809150505b92915050565b6000808211614673576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b81838161467c57fe5b04905092915050565b600081600001549050919050565b600080838054905014156146aa576000905061473e565b600080848054905090505b808210156146fe5760006146c983836147c8565b9050848682815481106146d857fe5b906000526020600020015411156146f1578091506146f8565b6001810192505b506146b5565b60008211801561472657508385600184038154811061471957fe5b9060005260206000200154145b1561473857600182039250505061473e565b81925050505b92915050565b6001816000016000828254019250508190555050565b61476583838361480a565b61476d611bf0565b156147c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614d65602a913960400191505060405180910390fd5b505050565b600060028083816147d557fe5b06600285816147e057fe5b0601816147e957fe5b04600283816147f457fe5b04600285816147ff57fe5b040101905092915050565b6148158383836148c4565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561486057614853826148c9565b61485b61491c565b6148bf565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156148ab5761489e836148c9565b6148a661491c565b6148be565b6148b4836148c9565b6148bd826148c9565b5b5b505050565b505050565b614919600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061491483611c11565b614930565b50565b61492e6007614929610e1e565b614930565b565b600061493c6009614685565b90508061494b846000016149ad565b10156149a85782600001819080600181540180825580915050600190039060005260206000200160009091909190915055826001018290806001815401808255809150506001900390600052602060002001600090919091909150555b505050565b600080828054905014156149c457600090506149e5565b816001838054905003815481106149d757fe5b906000526020600020015490505b91905056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734272696e63546f6b656e3a6275726e3a546178207472616e73666572206661696c6564696e76616c69642062757920746178207363616c6520283130303a3130303030302945524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373696e76616c69642073656c6c20746178207363616c6520283130303a313030303030294272696e63546f6b656e3a6275726e3a52657365727665206173736574207472616e73666572206661696c65644272696e63546f6b656e3a7365745461783a696e76616c69642074617820726174652028313a3130302945524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654272696e63546f6b656e3a6275726e46726f6d3a52657365727665206173736574207472616e73666572206661696c65644272696e63546f6b656e3a6d696e743a52657365727665206173736574207472616e7366657220666f72206d696e74206661696c65644272696e63546f6b656e3a696e69743a6e6f6e2d7a65726f20726573657276652061737365742062616c616e63654272696e63546f6b656e3a6275726e46726f6d3a546178207472616e73666572206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734272696e63546f6b656e3a696e69743a52657365727665206173736574207472616e73666572206661696c65644272696e63546f6b656e3a6d696e743a546178207472616e73666572206661696c656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f45524332305061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564a26469706673582212206b90d963ab154477fbcce46ed33ed3b9b19a8206e77f121b238242c1e771188964736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000006300000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000aae6000000000000000000000000091bd43beb23eb58a5c6375059eabe9852607d1d0000000000000000000000000000000000000000000000000000000000000000a4272696e63546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034252430000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): BrincToken
Arg [1] : symbol (string): BRC
Arg [2] : reserveAsset (address): 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1
Arg [3] : buyTaxRate (uint256): 1
Arg [4] : buyTaxScale (uint256): 1000
Arg [5] : sellTaxRate (uint256): 99
Arg [6] : sellTaxScale (uint256): 1000
Arg [7] : reserveRatio (uint32): 700000
Arg [8] : curveAddress (address): 0x91Bd43beB23Eb58A5c6375059eABE9852607d1D0
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000063
Arg [6] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [7] : 00000000000000000000000000000000000000000000000000000000000aae60
Arg [8] : 00000000000000000000000091bd43beb23eb58a5c6375059eabe9852607d1d0
Arg [9] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [10] : 4272696e63546f6b656e00000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [12] : 4252430000000000000000000000000000000000000000000000000000000000
[ 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.