Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BondController
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.8.3; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@uniswap/lib/contracts/libraries/TransferHelper.sol"; import "./interfaces/IBondController.sol"; import "./interfaces/ITrancheFactory.sol"; import "./interfaces/ITranche.sol"; import "./interfaces/IRebasingERC20.sol"; /** * @dev Controller for a ButtonTranche bond * * Invariants: * - `totalDebt` should always equal the sum of all tranche tokens' `totalSupply()` */ contract BondController is IBondController, OwnableUpgradeable { uint256 private constant TRANCHE_RATIO_GRANULARITY = 1000; // One tranche for A-Z uint256 private constant MAX_TRANCHE_COUNT = 26; // Denominator for basis points. Used to calculate fees uint256 private constant BPS = 10_000; // Maximum fee in terms of basis points uint256 private constant MAX_FEE_BPS = 50; // to avoid precision loss and other weird math from a small total debt // we require the debt to be at least MINIMUM_VALID_DEBT if any uint256 private constant MINIMUM_VALID_DEBT = 10e9; address public override collateralToken; TrancheData[] public override tranches; uint256 public override trancheCount; mapping(address => bool) public trancheTokenAddresses; uint256 public override creationDate; uint256 public override maturityDate; bool public override isMature; uint256 public override totalDebt; uint256 public lastScaledCollateralBalance; // Maximum amount of collateral that can be deposited into this bond // Used as a guardrail for initial launch. // If set to 0, no deposit limit will be enforced uint256 public depositLimit; // Fee taken on deposit in basis points. Can be set by the contract owner uint256 public override feeBps; /** * @dev Constructor for Tranche ERC20 token * @param _trancheFactory The address of the tranche factory * @param _collateralToken The address of the ERC20 collateral token * @param _admin The address of the initial admin for this contract * @param trancheRatios The tranche ratios for this bond * @param _maturityDate The date timestamp in seconds at which this bond matures * @param _depositLimit The maximum amount of collateral that can be deposited. 0 if no limit */ function init( address _trancheFactory, address _collateralToken, address _admin, uint256[] memory trancheRatios, uint256 _maturityDate, uint256 _depositLimit ) external initializer { require(_trancheFactory != address(0), "BondController: invalid trancheFactory address"); require(_collateralToken != address(0), "BondController: invalid collateralToken address"); require(_admin != address(0), "BondController: invalid admin address"); require(trancheRatios.length <= MAX_TRANCHE_COUNT, "BondController: invalid tranche count"); __Ownable_init(); transferOwnership(_admin); trancheCount = trancheRatios.length; collateralToken = _collateralToken; string memory collateralSymbol = IERC20Metadata(collateralToken).symbol(); uint256 totalRatio; for (uint256 i = 0; i < trancheRatios.length; i++) { uint256 ratio = trancheRatios[i]; require(ratio <= TRANCHE_RATIO_GRANULARITY, "BondController: Invalid tranche ratio"); totalRatio += ratio; address trancheTokenAddress = ITrancheFactory(_trancheFactory).createTranche( getTrancheName(collateralSymbol, i, trancheRatios.length), getTrancheSymbol(collateralSymbol, i, trancheRatios.length), _collateralToken ); tranches.push(TrancheData(ITranche(trancheTokenAddress), ratio)); trancheTokenAddresses[trancheTokenAddress] = true; } require(totalRatio == TRANCHE_RATIO_GRANULARITY, "BondController: Invalid tranche ratios"); require(_maturityDate > block.timestamp, "BondController: Invalid maturity date"); creationDate = block.timestamp; maturityDate = _maturityDate; depositLimit = _depositLimit; } /** * @dev Skims extraneous collateral that was incorrectly sent to the contract */ modifier onSkim() { uint256 scaledCollateralBalance = IRebasingERC20(collateralToken).scaledBalanceOf(address(this)); // If there is extraneous collateral, transfer to the owner if (scaledCollateralBalance > lastScaledCollateralBalance) { uint256 _collateralBalance = IERC20(collateralToken).balanceOf(address(this)); uint256 virtualCollateralBalance = Math.mulDiv( lastScaledCollateralBalance, _collateralBalance, scaledCollateralBalance ); TransferHelper.safeTransfer(collateralToken, owner(), _collateralBalance - virtualCollateralBalance); } _; // Update the lastScaledCollateralBalance after the function call lastScaledCollateralBalance = IRebasingERC20(collateralToken).scaledBalanceOf(address(this)); } /** * @inheritdoc IBondController */ function deposit(uint256 amount) external override onSkim { require(amount > 0, "BondController: invalid amount"); require(!isMature, "BondController: Already mature"); uint256 _collateralBalance = IERC20(collateralToken).balanceOf(address(this)); require(depositLimit == 0 || _collateralBalance + amount <= depositLimit, "BondController: Deposit limit"); TrancheData[] memory _tranches = tranches; uint256 newDebt; uint256[] memory trancheValues = new uint256[](trancheCount); for (uint256 i = 0; i < _tranches.length; i++) { // NOTE: solidity 0.8 checks for over/underflow natively so no need for SafeMath uint256 trancheValue = (amount * _tranches[i].ratio) / TRANCHE_RATIO_GRANULARITY; // if there is any collateral, we should scale by the debt:collateral ratio // note: if totalDebt == 0 then we're minting for the first time // so shouldn't scale even if there is some collateral mistakenly sent in if (_collateralBalance > 0 && totalDebt > 0) { trancheValue = Math.mulDiv(trancheValue, totalDebt, _collateralBalance); } newDebt += trancheValue; trancheValues[i] = trancheValue; } totalDebt += newDebt; TransferHelper.safeTransferFrom(collateralToken, _msgSender(), address(this), amount); // saving feeBps in memory to minimize sloads uint256 _feeBps = feeBps; for (uint256 i = 0; i < trancheValues.length; i++) { uint256 trancheValue = trancheValues[i]; // fee tranche tokens are minted and held by the contract // upon maturity, they are redeemed and underlying collateral are sent to the owner uint256 fee = (trancheValue * _feeBps) / BPS; if (fee > 0) { _tranches[i].token.mint(address(this), fee); } _tranches[i].token.mint(_msgSender(), trancheValue - fee); } emit Deposit(_msgSender(), amount, _feeBps); _enforceTotalDebt(); } /** * @inheritdoc IBondController */ function mature() external override onSkim { require(!isMature, "BondController: Already mature"); require(owner() == _msgSender() || maturityDate < block.timestamp, "BondController: Invalid call to mature"); isMature = true; TrancheData[] memory _tranches = tranches; uint256 _collateralBalance = IERC20(collateralToken).balanceOf(address(this)); // Go through all tranches A-Y (not Z) delivering collateral if possible for (uint256 i = 0; i < _tranches.length - 1 && _collateralBalance > 0; i++) { ITranche _tranche = _tranches[i].token; // pay out the entire tranche token's owed collateral (equal to the supply of tranche tokens) // if there is not enough collateral to pay it out, pay as much as we have uint256 amount = Math.min(_tranche.totalSupply(), _collateralBalance); _collateralBalance -= amount; TransferHelper.safeTransfer(collateralToken, address(_tranche), amount); // redeem fees, sending output tokens to owner _tranche.redeem(address(this), owner(), IERC20(_tranche).balanceOf(address(this))); } // Transfer any remaining collaeral to the Z tranche if (_collateralBalance > 0) { ITranche _tranche = _tranches[_tranches.length - 1].token; TransferHelper.safeTransfer(collateralToken, address(_tranche), _collateralBalance); _tranche.redeem(address(this), owner(), IERC20(_tranche).balanceOf(address(this))); } emit Mature(_msgSender()); } /** * @inheritdoc IBondController */ function redeemMature(address tranche, uint256 amount) external override { require(isMature, "BondController: Bond is not mature"); require(trancheTokenAddresses[tranche], "BondController: Invalid tranche address"); ITranche(tranche).redeem(_msgSender(), _msgSender(), amount); totalDebt -= amount; emit RedeemMature(_msgSender(), tranche, amount); } /** * @inheritdoc IBondController */ function redeem(uint256[] memory amounts) external override onSkim { require(!isMature, "BondController: Bond is already mature"); TrancheData[] memory _tranches = tranches; require(amounts.length == _tranches.length, "BondController: Invalid redeem amounts"); uint256 total; for (uint256 i = 0; i < amounts.length; i++) { total += amounts[i]; } for (uint256 i = 0; i < amounts.length; i++) { require( (amounts[i] * TRANCHE_RATIO_GRANULARITY) / total == _tranches[i].ratio, "BondController: Invalid redemption ratio" ); _tranches[i].token.burn(_msgSender(), amounts[i]); } uint256 _collateralBalance = IERC20(collateralToken).balanceOf(address(this)); // return as a proportion of the total debt redeemed uint256 returnAmount = Math.mulDiv(total, _collateralBalance, totalDebt); totalDebt -= total; TransferHelper.safeTransfer(collateralToken, _msgSender(), returnAmount); emit Redeem(_msgSender(), amounts); _enforceTotalDebt(); } /** * @inheritdoc IBondController */ function setFee(uint256 newFeeBps) external override onlyOwner { require(!isMature, "BondController: Invalid call to setFee"); require(newFeeBps <= MAX_FEE_BPS, "BondController: New fee too high"); feeBps = newFeeBps; emit FeeUpdate(newFeeBps); } /** * @dev Get the string name for a tranche * @param collateralSymbol the symbol of the collateral token * @param index the tranche index * @param _trancheCount the total number of tranches * @return the string name of the tranche */ function getTrancheName( string memory collateralSymbol, uint256 index, uint256 _trancheCount ) internal pure returns (string memory) { return string(abi.encodePacked("ButtonTranche ", collateralSymbol, " ", getTrancheLetter(index, _trancheCount))); } /** * @dev Get the string symbol for a tranche * @param collateralSymbol the symbol of the collateral token * @param index the tranche index * @param _trancheCount the total number of tranches * @return the string symbol of the tranche */ function getTrancheSymbol( string memory collateralSymbol, uint256 index, uint256 _trancheCount ) internal pure returns (string memory) { return string(abi.encodePacked("TRANCHE-", collateralSymbol, "-", getTrancheLetter(index, _trancheCount))); } /** * @dev Get the string letter for a tranche index * @param index the tranche index * @param _trancheCount the total number of tranches * @return the string letter of the tranche index */ function getTrancheLetter(uint256 index, uint256 _trancheCount) internal pure returns (string memory) { bytes memory trancheLetters = bytes("ABCDEFGHIJKLMNOPQRSTUVWXY"); bytes memory target = new bytes(1); if (index == _trancheCount - 1) { target[0] = "Z"; } else { target[0] = trancheLetters[index]; } return string(target); } // @dev Ensuring total debt isn't too small function _enforceTotalDebt() internal { require(totalDebt >= MINIMUM_VALID_DEBT, "BondController: Expected minimum valid debt"); } /** * @dev Get the virtual collateral balance of the bond * @return the virtual collateral balance */ function collateralBalance() external view returns (uint256) { uint256 scaledCollateralBalance = IRebasingERC20(collateralToken).scaledBalanceOf(address(this)); uint256 _collateralBalance = IERC20(collateralToken).balanceOf(address(this)); return (scaledCollateralBalance > lastScaledCollateralBalance) ? Math.mulDiv(lastScaledCollateralBalance, _collateralBalance, scaledCollateralBalance) : _collateralBalance; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @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. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^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 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) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.0; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeApprove: approve failed' ); } function safeTransfer( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeTransfer: transfer failed' ); } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::transferFrom: transferFrom failed' ); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'TransferHelper::safeTransferETH: ETH transfer failed'); } }
pragma solidity ^0.8.3; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@uniswap/lib/contracts/libraries/TransferHelper.sol"; import "./ITranche.sol"; struct TrancheData { ITranche token; uint256 ratio; } /** * @dev Controller for a ButtonTranche bond system */ interface IBondController { event Deposit(address from, uint256 amount, uint256 feeBps); event Mature(address caller); event RedeemMature(address user, address tranche, uint256 amount); event Redeem(address user, uint256[] amounts); event FeeUpdate(uint256 newFee); function collateralToken() external view returns (address); function tranches(uint256 i) external view returns (ITranche token, uint256 ratio); function trancheCount() external view returns (uint256 count); function feeBps() external view returns (uint256 fee); function maturityDate() external view returns (uint256 maturityDate); function isMature() external view returns (bool isMature); function creationDate() external view returns (uint256 creationDate); function totalDebt() external view returns (uint256 totalDebt); /** * @dev Deposit `amount` tokens from `msg.sender`, get tranche tokens in return * Requirements: * - `msg.sender` must have `approved` `amount` collateral tokens to this contract */ function deposit(uint256 amount) external; /** * @dev Matures the bond. Disables deposits, * fixes the redemption ratio, and distributes collateral to redemption pools * Redeems any fees collected from deposits, sending redeemed funds to the contract owner * Requirements: * - The bond is not already mature * - One of: * - `msg.sender` is owner * - `maturityDate` has passed */ function mature() external; /** * @dev Redeems some tranche tokens * Requirements: * - The bond is mature * - `msg.sender` owns at least `amount` tranche tokens from address `tranche` * - `tranche` must be a valid tranche token on this bond */ function redeemMature(address tranche, uint256 amount) external; /** * @dev Redeems a slice of tranche tokens from all tranches. * Returns collateral to the user proportionally to the amount of debt they are removing * Requirements * - The bond is not mature * - The number of `amounts` is the same as the number of tranches * - The `amounts` are in equivalent ratio to the tranche order */ function redeem(uint256[] memory amounts) external; /** * @dev Updates the fee taken on deposit to the given new fee * * Requirements * - `msg.sender` has admin role * - `newFeeBps` is in range [0, 50] */ function setFee(uint256 newFeeBps) external; }
pragma solidity ^0.8.3; /** * @dev Factory for Tranche minimal proxy contracts */ interface ITrancheFactory { event TrancheCreated(address newTrancheAddress); /** * @dev Deploys a minimal proxy instance for a new tranche ERC20 token with the given parameters. */ function createTranche( string memory name, string memory symbol, address _collateralToken ) external returns (address); }
pragma solidity ^0.8.3; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@uniswap/lib/contracts/libraries/TransferHelper.sol"; /** * @dev ERC20 token to represent a single tranche for a ButtonTranche bond * */ interface ITranche is IERC20 { /** * @dev returns the BondController address which owns this Tranche contract * It should have admin permissions to call mint, burn, and redeem functions */ function bond() external view returns (address); /** * @dev Mint `amount` tokens to `to` * Only callable by the owner (bond controller). Used to * manage bonds, specifically creating tokens upon deposit * @param to the address to mint tokens to * @param amount The amount of tokens to mint */ function mint(address to, uint256 amount) external; /** * @dev Burn `amount` tokens from `from`'s balance * Only callable by the owner (bond controller). Used to * manage bonds, specifically burning tokens upon redemption * @param from The address to burn tokens from * @param amount The amount of tokens to burn */ function burn(address from, uint256 amount) external; /** * @dev Burn `amount` tokens from `from` and return the proportional * value of the collateral token to `to` * @param from The address to burn tokens from * @param to The address to send collateral back to * @param amount The amount of tokens to burn */ function redeem( address from, address to, uint256 amount ) external; }
// SPDX-License-Identifier: GPL-3.0-or-later import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; // Interface definition for Rebasing ERC20 tokens which have a "elastic" external // balance and "fixed" internal balance. Each user's external balance is // represented as a product of a "scalar" and the user's internal balance. // // From time to time the "Rebase" event updates scaler, // which increases/decreases all user balances proportionally. // // The standard ERC-20 methods are denominated in the elastic balance // interface IRebasingERC20 is IERC20, IERC20Metadata { /// @notice Returns the fixed balance of the specified address. /// @param who The address to query. function scaledBalanceOf(address who) external view returns (uint256); /// @notice Returns the total fixed supply. function scaledTotalSupply() external view returns (uint256); /// @notice Transfer all of the sender's balance to a specified address. /// @param to The address to transfer to. /// @return True on success, false otherwise. function transferAll(address to) external returns (bool); /// @notice Transfer all balance tokens from one address to another. /// @param from The address to send tokens from. /// @param to The address to transfer to. function transferAllFrom(address from, address to) external returns (bool); /// @notice Triggers the next rebase, if applicable. function rebase() external; /// @notice Event emitted when the balance scalar is updated. /// @param epoch The number of rebases since inception. /// @param newScalar The new scalar. event Rebase(uint256 indexed epoch, uint256 newScalar); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
{ "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 999999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeBps","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"Mature","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":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"tranche","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RedeemMature","type":"event"},{"inputs":[],"name":"collateralBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateralToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creationDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_trancheFactory","type":"address"},{"internalType":"address","name":"_collateralToken","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"uint256[]","name":"trancheRatios","type":"uint256[]"},{"internalType":"uint256","name":"_maturityDate","type":"uint256"},{"internalType":"uint256","name":"_depositLimit","type":"uint256"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isMature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastScaledCollateralBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maturityDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tranche","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemMature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFeeBps","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trancheCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"trancheTokenAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tranches","outputs":[{"internalType":"contract ITranche","name":"token","type":"address"},{"internalType":"uint256","name":"ratio","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50613e7e806100206000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c80638da5cb5b116100d8578063c98c05b71161008c578063f2fde38b11610066578063f2fde38b14610309578063f9afb26a1461031c578063fc7b9c181461032f57610177565b8063c98c05b7146102ef578063d59624b4146102f7578063ecf708581461030057610177565b8063ae4e7fdf116100bd578063ae4e7fdf146102af578063b2016bd4146102bc578063b6b55f25146102dc57610177565b80638da5cb5b146102675780639f0205c7146102a657610177565b806333d20e341161012f57806369fe0e2d1161011457806369fe0e2d14610244578063715018a61461025757806387b652071461025f57610177565b806333d20e341461022857806359eb82241461023b57610177565b806324a9d8531161016057806324a9d853146101cb57806326c25962146101d45780632a76ef311461021357610177565b806305b344101461017c57806320e8e89e14610198575b600080fd5b61018560695481565b6040519081526020015b60405180910390f35b6101bb6101a6366004613864565b60686020526000908152604090205460ff1681565b604051901515815260200161018f565b610185606f5481565b6101e76101e2366004613a4d565b610338565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520161018f565b61022661022136600461389c565b61037d565b005b610226610236366004613921565b610beb565b61018560675481565b610226610252366004613a4d565b610e4c565b610226611006565b610226611093565b60335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161018f565b610185606d5481565b606b546101bb9060ff1681565b6065546102819073ffffffffffffffffffffffffffffffffffffffff1681565b6102266102ea366004613a4d565b611a1d565b610185612327565b610185606a5481565b610185606e5481565b610226610317366004613864565b612499565b61022661032a36600461394c565b6125c9565b610185606c5481565b6066818154811061034857600080fd5b60009182526020909120600290910201805460019091015473ffffffffffffffffffffffffffffffffffffffff909116915082565b600054610100900460ff1680610396575060005460ff16155b610427576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600054610100900460ff1615801561046657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b73ffffffffffffffffffffffffffffffffffffffff8716610509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f426f6e64436f6e74726f6c6c65723a20696e76616c6964207472616e6368654660448201527f6163746f72792061646472657373000000000000000000000000000000000000606482015260840161041e565b73ffffffffffffffffffffffffffffffffffffffff86166105ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f426f6e64436f6e74726f6c6c65723a20696e76616c696420636f6c6c6174657260448201527f616c546f6b656e20616464726573730000000000000000000000000000000000606482015260840161041e565b73ffffffffffffffffffffffffffffffffffffffff851661064f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426f6e64436f6e74726f6c6c65723a20696e76616c69642061646d696e20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161041e565b601a845111156106e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426f6e64436f6e74726f6c6c65723a20696e76616c6964207472616e6368652060448201527f636f756e74000000000000000000000000000000000000000000000000000000606482015260840161041e565b6106e9612d6b565b6106f285612499565b8351606755606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8816908117909155604080517f95d89b410000000000000000000000000000000000000000000000000000000081529051600092916395d89b419160048083019286929190829003018186803b15801561078b57600080fd5b505afa15801561079f573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107e5919081019061399f565b90506000805b8651811015610a8257600087828151811061082f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506103e88111156108cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426f6e64436f6e74726f6c6c65723a20496e76616c6964207472616e6368652060448201527f726174696f000000000000000000000000000000000000000000000000000000606482015260840161041e565b6108d58184613ce3565b925060008b73ffffffffffffffffffffffffffffffffffffffff1663ef55207c61090187868d51612e90565b61090d88878e51612ec7565b8e6040518463ffffffff1660e01b815260040161092c93929190613c48565b602060405180830381600087803b15801561094657600080fd5b505af115801561095a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097e9190613880565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff92831680825260208083019687526066805460018082018355600092835294517f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354600290920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919098161790965596517f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94355909501949094558552606890925290922080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169092179091555080610a7a81613db8565b9150506107eb565b506103e88114610b14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20496e76616c6964207472616e6368652060448201527f726174696f730000000000000000000000000000000000000000000000000000606482015260840161041e565b428511610ba3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426f6e64436f6e74726f6c6c65723a20496e76616c6964206d6174757269747960448201527f2064617465000000000000000000000000000000000000000000000000000000606482015260840161041e565b505042606955606a839055606e8290558015610be257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50505050505050565b606b5460ff16610c7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f426f6e64436f6e74726f6c6c65723a20426f6e64206973206e6f74206d61747560448201527f7265000000000000000000000000000000000000000000000000000000000000606482015260840161041e565b73ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604090205460ff16610d32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f426f6e64436f6e74726f6c6c65723a20496e76616c6964207472616e6368652060448201527f6164647265737300000000000000000000000000000000000000000000000000606482015260840161041e565b73ffffffffffffffffffffffffffffffffffffffff8216630e6dfcd533336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260448101849052606401600060405180830381600087803b158015610dc457600080fd5b505af1158015610dd8573d6000803e3d6000fd5b5050505080606c6000828254610dee9190613d71565b90915550506040805133815273ffffffffffffffffffffffffffffffffffffffff8416602082015280820183905290517f5e9473a427344c9398fd27f132e093a6582e7177334cb912336f3c17af206edb9181900360600190a15050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610ecd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041e565b606b5460ff1615610f60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20496e76616c69642063616c6c20746f2060448201527f7365744665650000000000000000000000000000000000000000000000000000606482015260840161041e565b6032811115610fcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f426f6e64436f6e74726f6c6c65723a204e65772066656520746f6f2068696768604482015260640161041e565b606f8190556040518181527f88258d7c1f0510045362f22cdeb36a2c501ef80d7a06168881189fb8480cfe2f9060200160405180910390a150565b60335473ffffffffffffffffffffffffffffffffffffffff163314611087576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041e565b6110916000612ee5565b565b6065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff1690631da24f3e9060240160206040518083038186803b1580156110fd57600080fd5b505afa158015611111573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111359190613a65565b9050606d54811115611245576065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b1580156111ab57600080fd5b505afa1580156111bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e39190613a65565b905060006111f4606d548385612f5c565b6065549091506112429073ffffffffffffffffffffffffffffffffffffffff1661123360335473ffffffffffffffffffffffffffffffffffffffff1690565b61123d8486613d71565b613051565b50505b606b5460ff16156112b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f426f6e64436f6e74726f6c6c65723a20416c7265616479206d61747572650000604482015260640161041e565b60335473ffffffffffffffffffffffffffffffffffffffff163314806112d9575042606a54105b611365576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20496e76616c69642063616c6c20746f2060448201527f6d61747572650000000000000000000000000000000000000000000000000000606482015260840161041e565b606b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055606680546040805160208084028201810190925282815260009390929091849084015b828210156114085760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff1682526001908101548284015290835290920191016113b3565b50506065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015293945060009373ffffffffffffffffffffffffffffffffffffffff90911692506370a08231915060240160206040518083038186803b15801561147b57600080fd5b505afa15801561148f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b39190613a65565b905060005b600183516114c69190613d71565b811080156114d45750600082115b15611758576000838281518110611514577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151905060006115ab8273ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561156d57600080fd5b505afa158015611581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a59190613a65565b856131e7565b90506115b78185613d71565b6065549094506115de9073ffffffffffffffffffffffffffffffffffffffff168383613051565b8173ffffffffffffffffffffffffffffffffffffffff16630e6dfcd53061161a60335473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8716906370a082319060240160206040518083038186803b15801561167f57600080fd5b505afa158015611693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b79190613a65565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526044820152606401600060405180830381600087803b15801561172b57600080fd5b505af115801561173f573d6000803e3d6000fd5b505050505050808061175090613db8565b9150506114b8565b50801561194157600082600184516117709190613d71565b815181106117a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091010151516065549091506117da9073ffffffffffffffffffffffffffffffffffffffff168284613051565b8073ffffffffffffffffffffffffffffffffffffffff16630e6dfcd53061181660335473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8616906370a082319060240160206040518083038186803b15801561187b57600080fd5b505afa15801561188f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b39190613a65565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526044820152606401600060405180830381600087803b15801561192757600080fd5b505af115801561193b573d6000803e3d6000fd5b50505050505b6040805133815290517f2eb828fdc16ef5c267a7b18c3f8edf180aaff1a8921c4fe994fef55ddc8abe609181900360200190a150506065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff90911690631da24f3e9060240160206040518083038186803b1580156119df57600080fd5b505afa1580156119f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a179190613a65565b606d5550565b6065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff1690631da24f3e9060240160206040518083038186803b158015611a8757600080fd5b505afa158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf9190613a65565b9050606d54811115611bc0576065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015611b3557600080fd5b505afa158015611b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6d9190613a65565b90506000611b7e606d548385612f5c565b606554909150611bbd9073ffffffffffffffffffffffffffffffffffffffff1661123360335473ffffffffffffffffffffffffffffffffffffffff1690565b50505b60008211611c2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f426f6e64436f6e74726f6c6c65723a20696e76616c696420616d6f756e740000604482015260640161041e565b606b5460ff1615611c97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f426f6e64436f6e74726f6c6c65723a20416c7265616479206d61747572650000604482015260640161041e565b6065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015611d0157600080fd5b505afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190613a65565b9050606e5460001480611d575750606e54611d548483613ce3565b11155b611dbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f426f6e64436f6e74726f6c6c65723a204465706f736974206c696d6974000000604482015260640161041e565b60006066805480602002602001604051908101604052809291908181526020016000905b82821015611e365760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101611de1565b50505050905060008060675467ffffffffffffffff811115611e81577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611eaa578160200160208202803683370190505b50905060005b8351811015611fa55760006103e8858381518110611ef7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516020015189611f0e9190613d34565b611f189190613cfb565b9050600086118015611f2c57506000606c54115b15611f4157611f3e81606c5488612f5c565b90505b611f4b8185613ce3565b935080838381518110611f87577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029190910101525080611f9d81613db8565b915050611eb0565b5081606c6000828254611fb89190613ce3565b9091555050606554611fe29073ffffffffffffffffffffffffffffffffffffffff163330896131fd565b606f5460005b825181101561222f57600083828151811061202c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101519050600061271084836120479190613d34565b6120519190613cfb565b9050801561212657868381518110612092577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091010151516040517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810183905273ffffffffffffffffffffffffffffffffffffffff909116906340c10f1990604401600060405180830381600087803b15801561210d57600080fd5b505af1158015612121573d6000803e3d6000fd5b505050505b86838151811061215f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff166340c10f1961218d3390565b6121978486613d71565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b15801561220257600080fd5b505af1158015612216573d6000803e3d6000fd5b505050505050808061222790613db8565b915050611fe8565b50604080513381526020810189905280820183905290517f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360600190a161227861339c565b50506065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9091169350631da24f3e925060240190505b60206040518083038186803b1580156122e857600080fd5b505afa1580156122fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123209190613a65565b606d555050565b6065546040517f1da24f3e000000000000000000000000000000000000000000000000000000008152306004820152600091829173ffffffffffffffffffffffffffffffffffffffff90911690631da24f3e9060240160206040518083038186803b15801561239557600080fd5b505afa1580156123a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123cd9190613a65565b6065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291925060009173ffffffffffffffffffffffffffffffffffffffff909116906370a082319060240160206040518083038186803b15801561243c57600080fd5b505afa158015612450573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124749190613a65565b9050606d5482116124855780612492565b612492606d548284612f5c565b9250505090565b60335473ffffffffffffffffffffffffffffffffffffffff16331461251a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041e565b73ffffffffffffffffffffffffffffffffffffffff81166125bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161041e565b6125c681612ee5565b50565b6065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff1690631da24f3e9060240160206040518083038186803b15801561263357600080fd5b505afa158015612647573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266b9190613a65565b9050606d5481111561276c576065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b1580156126e157600080fd5b505afa1580156126f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127199190613a65565b9050600061272a606d548385612f5c565b6065549091506127699073ffffffffffffffffffffffffffffffffffffffff1661123360335473ffffffffffffffffffffffffffffffffffffffff1690565b50505b606b5460ff16156127ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20426f6e6420697320616c72656164792060448201527f6d61747572650000000000000000000000000000000000000000000000000000606482015260840161041e565b60006066805480602002602001604051908101604052809291908181526020016000905b828210156128785760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101612823565b505050509050805183511461290f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20496e76616c69642072656465656d206160448201527f6d6f756e74730000000000000000000000000000000000000000000000000000606482015260840161041e565b6000805b845181101561297c57848181518110612955577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151826129689190613ce3565b91508061297481613db8565b915050612913565b5060005b8451811015612bdf578281815181106129c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160200151826103e8878481518110612a0b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151612a1d9190613d34565b612a279190613cfb565b14612ab4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f426f6e64436f6e74726f6c6c65723a20496e76616c696420726564656d70746960448201527f6f6e20726174696f000000000000000000000000000000000000000000000000606482015260840161041e565b828181518110612aed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16639dc29fac612b1b3390565b878481518110612b54577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612b9a92919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060405180830381600087803b158015612bb457600080fd5b505af1158015612bc8573d6000803e3d6000fd5b505050508080612bd790613db8565b915050612980565b506065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015612c4a57600080fd5b505afa158015612c5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c829190613a65565b90506000612c938383606c54612f5c565b905082606c6000828254612ca79190613d71565b9091555050606554612cd09073ffffffffffffffffffffffffffffffffffffffff163383613051565b7f95a8789c26436cc55b5951f117195be05dfa3022c619a84c1449f83f9cf870683387604051612d01929190613be5565b60405180910390a1612d1161339c565b50506065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9091169250631da24f3e91506024016122d0565b600054610100900460ff1680612d84575060005460ff16155b612e10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161041e565b600054610100900460ff16158015612e4f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b612e57613433565b612e5f613547565b80156125c657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b606083612e9d8484613634565b604051602001612eae929190613ae3565b60405160208183030381529060405290505b9392505050565b606083612ed48484613634565b604051602001612eae929190613b64565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8587098587029250828110838203039150508060001415612fdc57838281612fd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b0492505050612ec0565b808411612fe857600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392908716916130e89190613ac7565b6000604051808303816000865af19150503d8060008114613125576040519150601f19603f3d011682016040523d82523d6000602084013e61312a565b606091505b5091509150818015613154575080511580613154575080806020019051810190613154919061397f565b6131e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c656400000000000000000000000000000000000000606482015260840161041e565b5050505050565b60008183106131f65781612ec0565b5090919050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052915160009283929088169161329c9190613ac7565b6000604051808303816000865af19150503d80600081146132d9576040519150601f19603f3d011682016040523d82523d6000602084013e6132de565b606091505b5091509150818015613308575080511580613308575080806020019051810190613308919061397f565b613394576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c6564000000000000000000000000000000606482015260840161041e565b505050505050565b6402540be400606c541015611091576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f426f6e64436f6e74726f6c6c65723a204578706563746564206d696e696d756d60448201527f2076616c69642064656274000000000000000000000000000000000000000000606482015260840161041e565b600054610100900460ff168061344c575060005460ff16155b6134d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161041e565b600054610100900460ff16158015612e5f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661010117905580156125c657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b600054610100900460ff1680613560575060005460ff16155b6135ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161041e565b600054610100900460ff1615801561362b57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b612e5f33612ee5565b604080518082018252601981527f4142434445464748494a4b4c4d4e4f505152535455565758590000000000000060208201528151600180825281840190935260609260009190602082018180368337019050509050613695600185613d71565b85141561372b577f5a00000000000000000000000000000000000000000000000000000000000000816000815181106136f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506137d9565b818581518110613764577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b816000815181106137a9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b949350505050565b600082601f8301126137f1578081fd5b8135602067ffffffffffffffff82111561380d5761380d613e20565b8160051b61381c828201613c94565b838152828101908684018388018501891015613836578687fd5b8693505b8584101561385857803583526001939093019291840191840161383a565b50979650505050505050565b600060208284031215613875578081fd5b8135612ec081613e4f565b600060208284031215613891578081fd5b8151612ec081613e4f565b60008060008060008060c087890312156138b4578182fd5b86356138bf81613e4f565b955060208701356138cf81613e4f565b945060408701356138df81613e4f565b9350606087013567ffffffffffffffff8111156138fa578283fd5b61390689828a016137e1565b9350506080870135915060a087013590509295509295509295565b60008060408385031215613933578182fd5b823561393e81613e4f565b946020939093013593505050565b60006020828403121561395d578081fd5b813567ffffffffffffffff811115613973578182fd5b6137d9848285016137e1565b600060208284031215613990578081fd5b81518015158114612ec0578182fd5b6000602082840312156139b0578081fd5b815167ffffffffffffffff808211156139c7578283fd5b818401915084601f8301126139da578283fd5b8151818111156139ec576139ec613e20565b613a1d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613c94565b9150808252856020828501011115613a33578384fd5b613a44816020840160208601613d88565b50949350505050565b600060208284031215613a5e578081fd5b5035919050565b600060208284031215613a76578081fd5b5051919050565b60008151808452613a95816020860160208601613d88565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251613ad9818460208701613d88565b9190910192915050565b60007f427574746f6e5472616e6368652000000000000000000000000000000000000082528351613b1b81600e850160208801613d88565b7f2000000000000000000000000000000000000000000000000000000000000000600e918401918201528351613b5881600f840160208801613d88565b01600f01949350505050565b60007f5452414e4348452d00000000000000000000000000000000000000000000000082528351613b9c816008850160208801613d88565b7f2d000000000000000000000000000000000000000000000000000000000000006008918401918201528351613bd9816009840160208801613d88565b01600901949350505050565b60006040820173ffffffffffffffffffffffffffffffffffffffff8516835260206040818501528185518084526060860191508287019350845b81811015613c3b57845183529383019391830191600101613c1f565b5090979650505050505050565b600060608252613c5b6060830186613a7d565b8281036020840152613c6d8186613a7d565b91505073ffffffffffffffffffffffffffffffffffffffff83166040830152949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613cdb57613cdb613e20565b604052919050565b60008219821115613cf657613cf6613df1565b500190565b600082613d2f577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613d6c57613d6c613df1565b500290565b600082821015613d8357613d83613df1565b500390565b60005b83811015613da3578181015183820152602001613d8b565b83811115613db2576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613dea57613dea613df1565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146125c657600080fdfea164736f6c6343000803000a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101775760003560e01c80638da5cb5b116100d8578063c98c05b71161008c578063f2fde38b11610066578063f2fde38b14610309578063f9afb26a1461031c578063fc7b9c181461032f57610177565b8063c98c05b7146102ef578063d59624b4146102f7578063ecf708581461030057610177565b8063ae4e7fdf116100bd578063ae4e7fdf146102af578063b2016bd4146102bc578063b6b55f25146102dc57610177565b80638da5cb5b146102675780639f0205c7146102a657610177565b806333d20e341161012f57806369fe0e2d1161011457806369fe0e2d14610244578063715018a61461025757806387b652071461025f57610177565b806333d20e341461022857806359eb82241461023b57610177565b806324a9d8531161016057806324a9d853146101cb57806326c25962146101d45780632a76ef311461021357610177565b806305b344101461017c57806320e8e89e14610198575b600080fd5b61018560695481565b6040519081526020015b60405180910390f35b6101bb6101a6366004613864565b60686020526000908152604090205460ff1681565b604051901515815260200161018f565b610185606f5481565b6101e76101e2366004613a4d565b610338565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520161018f565b61022661022136600461389c565b61037d565b005b610226610236366004613921565b610beb565b61018560675481565b610226610252366004613a4d565b610e4c565b610226611006565b610226611093565b60335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161018f565b610185606d5481565b606b546101bb9060ff1681565b6065546102819073ffffffffffffffffffffffffffffffffffffffff1681565b6102266102ea366004613a4d565b611a1d565b610185612327565b610185606a5481565b610185606e5481565b610226610317366004613864565b612499565b61022661032a36600461394c565b6125c9565b610185606c5481565b6066818154811061034857600080fd5b60009182526020909120600290910201805460019091015473ffffffffffffffffffffffffffffffffffffffff909116915082565b600054610100900460ff1680610396575060005460ff16155b610427576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600054610100900460ff1615801561046657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b73ffffffffffffffffffffffffffffffffffffffff8716610509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f426f6e64436f6e74726f6c6c65723a20696e76616c6964207472616e6368654660448201527f6163746f72792061646472657373000000000000000000000000000000000000606482015260840161041e565b73ffffffffffffffffffffffffffffffffffffffff86166105ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f426f6e64436f6e74726f6c6c65723a20696e76616c696420636f6c6c6174657260448201527f616c546f6b656e20616464726573730000000000000000000000000000000000606482015260840161041e565b73ffffffffffffffffffffffffffffffffffffffff851661064f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426f6e64436f6e74726f6c6c65723a20696e76616c69642061646d696e20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161041e565b601a845111156106e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426f6e64436f6e74726f6c6c65723a20696e76616c6964207472616e6368652060448201527f636f756e74000000000000000000000000000000000000000000000000000000606482015260840161041e565b6106e9612d6b565b6106f285612499565b8351606755606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8816908117909155604080517f95d89b410000000000000000000000000000000000000000000000000000000081529051600092916395d89b419160048083019286929190829003018186803b15801561078b57600080fd5b505afa15801561079f573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107e5919081019061399f565b90506000805b8651811015610a8257600087828151811061082f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506103e88111156108cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426f6e64436f6e74726f6c6c65723a20496e76616c6964207472616e6368652060448201527f726174696f000000000000000000000000000000000000000000000000000000606482015260840161041e565b6108d58184613ce3565b925060008b73ffffffffffffffffffffffffffffffffffffffff1663ef55207c61090187868d51612e90565b61090d88878e51612ec7565b8e6040518463ffffffff1660e01b815260040161092c93929190613c48565b602060405180830381600087803b15801561094657600080fd5b505af115801561095a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097e9190613880565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff92831680825260208083019687526066805460018082018355600092835294517f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354600290920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919098161790965596517f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94355909501949094558552606890925290922080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169092179091555080610a7a81613db8565b9150506107eb565b506103e88114610b14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20496e76616c6964207472616e6368652060448201527f726174696f730000000000000000000000000000000000000000000000000000606482015260840161041e565b428511610ba3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426f6e64436f6e74726f6c6c65723a20496e76616c6964206d6174757269747960448201527f2064617465000000000000000000000000000000000000000000000000000000606482015260840161041e565b505042606955606a839055606e8290558015610be257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50505050505050565b606b5460ff16610c7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f426f6e64436f6e74726f6c6c65723a20426f6e64206973206e6f74206d61747560448201527f7265000000000000000000000000000000000000000000000000000000000000606482015260840161041e565b73ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604090205460ff16610d32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f426f6e64436f6e74726f6c6c65723a20496e76616c6964207472616e6368652060448201527f6164647265737300000000000000000000000000000000000000000000000000606482015260840161041e565b73ffffffffffffffffffffffffffffffffffffffff8216630e6dfcd533336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260448101849052606401600060405180830381600087803b158015610dc457600080fd5b505af1158015610dd8573d6000803e3d6000fd5b5050505080606c6000828254610dee9190613d71565b90915550506040805133815273ffffffffffffffffffffffffffffffffffffffff8416602082015280820183905290517f5e9473a427344c9398fd27f132e093a6582e7177334cb912336f3c17af206edb9181900360600190a15050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610ecd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041e565b606b5460ff1615610f60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20496e76616c69642063616c6c20746f2060448201527f7365744665650000000000000000000000000000000000000000000000000000606482015260840161041e565b6032811115610fcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f426f6e64436f6e74726f6c6c65723a204e65772066656520746f6f2068696768604482015260640161041e565b606f8190556040518181527f88258d7c1f0510045362f22cdeb36a2c501ef80d7a06168881189fb8480cfe2f9060200160405180910390a150565b60335473ffffffffffffffffffffffffffffffffffffffff163314611087576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041e565b6110916000612ee5565b565b6065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff1690631da24f3e9060240160206040518083038186803b1580156110fd57600080fd5b505afa158015611111573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111359190613a65565b9050606d54811115611245576065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b1580156111ab57600080fd5b505afa1580156111bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e39190613a65565b905060006111f4606d548385612f5c565b6065549091506112429073ffffffffffffffffffffffffffffffffffffffff1661123360335473ffffffffffffffffffffffffffffffffffffffff1690565b61123d8486613d71565b613051565b50505b606b5460ff16156112b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f426f6e64436f6e74726f6c6c65723a20416c7265616479206d61747572650000604482015260640161041e565b60335473ffffffffffffffffffffffffffffffffffffffff163314806112d9575042606a54105b611365576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20496e76616c69642063616c6c20746f2060448201527f6d61747572650000000000000000000000000000000000000000000000000000606482015260840161041e565b606b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055606680546040805160208084028201810190925282815260009390929091849084015b828210156114085760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff1682526001908101548284015290835290920191016113b3565b50506065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015293945060009373ffffffffffffffffffffffffffffffffffffffff90911692506370a08231915060240160206040518083038186803b15801561147b57600080fd5b505afa15801561148f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b39190613a65565b905060005b600183516114c69190613d71565b811080156114d45750600082115b15611758576000838281518110611514577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151905060006115ab8273ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561156d57600080fd5b505afa158015611581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a59190613a65565b856131e7565b90506115b78185613d71565b6065549094506115de9073ffffffffffffffffffffffffffffffffffffffff168383613051565b8173ffffffffffffffffffffffffffffffffffffffff16630e6dfcd53061161a60335473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8716906370a082319060240160206040518083038186803b15801561167f57600080fd5b505afa158015611693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b79190613a65565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526044820152606401600060405180830381600087803b15801561172b57600080fd5b505af115801561173f573d6000803e3d6000fd5b505050505050808061175090613db8565b9150506114b8565b50801561194157600082600184516117709190613d71565b815181106117a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091010151516065549091506117da9073ffffffffffffffffffffffffffffffffffffffff168284613051565b8073ffffffffffffffffffffffffffffffffffffffff16630e6dfcd53061181660335473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8616906370a082319060240160206040518083038186803b15801561187b57600080fd5b505afa15801561188f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b39190613a65565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526044820152606401600060405180830381600087803b15801561192757600080fd5b505af115801561193b573d6000803e3d6000fd5b50505050505b6040805133815290517f2eb828fdc16ef5c267a7b18c3f8edf180aaff1a8921c4fe994fef55ddc8abe609181900360200190a150506065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff90911690631da24f3e9060240160206040518083038186803b1580156119df57600080fd5b505afa1580156119f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a179190613a65565b606d5550565b6065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff1690631da24f3e9060240160206040518083038186803b158015611a8757600080fd5b505afa158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf9190613a65565b9050606d54811115611bc0576065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015611b3557600080fd5b505afa158015611b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6d9190613a65565b90506000611b7e606d548385612f5c565b606554909150611bbd9073ffffffffffffffffffffffffffffffffffffffff1661123360335473ffffffffffffffffffffffffffffffffffffffff1690565b50505b60008211611c2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f426f6e64436f6e74726f6c6c65723a20696e76616c696420616d6f756e740000604482015260640161041e565b606b5460ff1615611c97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f426f6e64436f6e74726f6c6c65723a20416c7265616479206d61747572650000604482015260640161041e565b6065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015611d0157600080fd5b505afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190613a65565b9050606e5460001480611d575750606e54611d548483613ce3565b11155b611dbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f426f6e64436f6e74726f6c6c65723a204465706f736974206c696d6974000000604482015260640161041e565b60006066805480602002602001604051908101604052809291908181526020016000905b82821015611e365760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101611de1565b50505050905060008060675467ffffffffffffffff811115611e81577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611eaa578160200160208202803683370190505b50905060005b8351811015611fa55760006103e8858381518110611ef7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516020015189611f0e9190613d34565b611f189190613cfb565b9050600086118015611f2c57506000606c54115b15611f4157611f3e81606c5488612f5c565b90505b611f4b8185613ce3565b935080838381518110611f87577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029190910101525080611f9d81613db8565b915050611eb0565b5081606c6000828254611fb89190613ce3565b9091555050606554611fe29073ffffffffffffffffffffffffffffffffffffffff163330896131fd565b606f5460005b825181101561222f57600083828151811061202c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101519050600061271084836120479190613d34565b6120519190613cfb565b9050801561212657868381518110612092577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091010151516040517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810183905273ffffffffffffffffffffffffffffffffffffffff909116906340c10f1990604401600060405180830381600087803b15801561210d57600080fd5b505af1158015612121573d6000803e3d6000fd5b505050505b86838151811061215f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff166340c10f1961218d3390565b6121978486613d71565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b15801561220257600080fd5b505af1158015612216573d6000803e3d6000fd5b505050505050808061222790613db8565b915050611fe8565b50604080513381526020810189905280820183905290517f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360600190a161227861339c565b50506065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9091169350631da24f3e925060240190505b60206040518083038186803b1580156122e857600080fd5b505afa1580156122fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123209190613a65565b606d555050565b6065546040517f1da24f3e000000000000000000000000000000000000000000000000000000008152306004820152600091829173ffffffffffffffffffffffffffffffffffffffff90911690631da24f3e9060240160206040518083038186803b15801561239557600080fd5b505afa1580156123a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123cd9190613a65565b6065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291925060009173ffffffffffffffffffffffffffffffffffffffff909116906370a082319060240160206040518083038186803b15801561243c57600080fd5b505afa158015612450573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124749190613a65565b9050606d5482116124855780612492565b612492606d548284612f5c565b9250505090565b60335473ffffffffffffffffffffffffffffffffffffffff16331461251a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041e565b73ffffffffffffffffffffffffffffffffffffffff81166125bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161041e565b6125c681612ee5565b50565b6065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff1690631da24f3e9060240160206040518083038186803b15801561263357600080fd5b505afa158015612647573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266b9190613a65565b9050606d5481111561276c576065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b1580156126e157600080fd5b505afa1580156126f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127199190613a65565b9050600061272a606d548385612f5c565b6065549091506127699073ffffffffffffffffffffffffffffffffffffffff1661123360335473ffffffffffffffffffffffffffffffffffffffff1690565b50505b606b5460ff16156127ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20426f6e6420697320616c72656164792060448201527f6d61747572650000000000000000000000000000000000000000000000000000606482015260840161041e565b60006066805480602002602001604051908101604052809291908181526020016000905b828210156128785760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff168252600190810154828401529083529092019101612823565b505050509050805183511461290f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f426f6e64436f6e74726f6c6c65723a20496e76616c69642072656465656d206160448201527f6d6f756e74730000000000000000000000000000000000000000000000000000606482015260840161041e565b6000805b845181101561297c57848181518110612955577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151826129689190613ce3565b91508061297481613db8565b915050612913565b5060005b8451811015612bdf578281815181106129c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160200151826103e8878481518110612a0b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151612a1d9190613d34565b612a279190613cfb565b14612ab4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f426f6e64436f6e74726f6c6c65723a20496e76616c696420726564656d70746960448201527f6f6e20726174696f000000000000000000000000000000000000000000000000606482015260840161041e565b828181518110612aed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16639dc29fac612b1b3390565b878481518110612b54577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612b9a92919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060405180830381600087803b158015612bb457600080fd5b505af1158015612bc8573d6000803e3d6000fd5b505050508080612bd790613db8565b915050612980565b506065546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015612c4a57600080fd5b505afa158015612c5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c829190613a65565b90506000612c938383606c54612f5c565b905082606c6000828254612ca79190613d71565b9091555050606554612cd09073ffffffffffffffffffffffffffffffffffffffff163383613051565b7f95a8789c26436cc55b5951f117195be05dfa3022c619a84c1449f83f9cf870683387604051612d01929190613be5565b60405180910390a1612d1161339c565b50506065546040517f1da24f3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9091169250631da24f3e91506024016122d0565b600054610100900460ff1680612d84575060005460ff16155b612e10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161041e565b600054610100900460ff16158015612e4f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b612e57613433565b612e5f613547565b80156125c657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b606083612e9d8484613634565b604051602001612eae929190613ae3565b60405160208183030381529060405290505b9392505050565b606083612ed48484613634565b604051602001612eae929190613b64565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8587098587029250828110838203039150508060001415612fdc57838281612fd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b0492505050612ec0565b808411612fe857600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392908716916130e89190613ac7565b6000604051808303816000865af19150503d8060008114613125576040519150601f19603f3d011682016040523d82523d6000602084013e61312a565b606091505b5091509150818015613154575080511580613154575080806020019051810190613154919061397f565b6131e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c656400000000000000000000000000000000000000606482015260840161041e565b5050505050565b60008183106131f65781612ec0565b5090919050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052915160009283929088169161329c9190613ac7565b6000604051808303816000865af19150503d80600081146132d9576040519150601f19603f3d011682016040523d82523d6000602084013e6132de565b606091505b5091509150818015613308575080511580613308575080806020019051810190613308919061397f565b613394576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c6564000000000000000000000000000000606482015260840161041e565b505050505050565b6402540be400606c541015611091576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f426f6e64436f6e74726f6c6c65723a204578706563746564206d696e696d756d60448201527f2076616c69642064656274000000000000000000000000000000000000000000606482015260840161041e565b600054610100900460ff168061344c575060005460ff16155b6134d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161041e565b600054610100900460ff16158015612e5f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661010117905580156125c657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b600054610100900460ff1680613560575060005460ff16155b6135ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161041e565b600054610100900460ff1615801561362b57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b612e5f33612ee5565b604080518082018252601981527f4142434445464748494a4b4c4d4e4f505152535455565758590000000000000060208201528151600180825281840190935260609260009190602082018180368337019050509050613695600185613d71565b85141561372b577f5a00000000000000000000000000000000000000000000000000000000000000816000815181106136f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506137d9565b818581518110613764577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b816000815181106137a9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b949350505050565b600082601f8301126137f1578081fd5b8135602067ffffffffffffffff82111561380d5761380d613e20565b8160051b61381c828201613c94565b838152828101908684018388018501891015613836578687fd5b8693505b8584101561385857803583526001939093019291840191840161383a565b50979650505050505050565b600060208284031215613875578081fd5b8135612ec081613e4f565b600060208284031215613891578081fd5b8151612ec081613e4f565b60008060008060008060c087890312156138b4578182fd5b86356138bf81613e4f565b955060208701356138cf81613e4f565b945060408701356138df81613e4f565b9350606087013567ffffffffffffffff8111156138fa578283fd5b61390689828a016137e1565b9350506080870135915060a087013590509295509295509295565b60008060408385031215613933578182fd5b823561393e81613e4f565b946020939093013593505050565b60006020828403121561395d578081fd5b813567ffffffffffffffff811115613973578182fd5b6137d9848285016137e1565b600060208284031215613990578081fd5b81518015158114612ec0578182fd5b6000602082840312156139b0578081fd5b815167ffffffffffffffff808211156139c7578283fd5b818401915084601f8301126139da578283fd5b8151818111156139ec576139ec613e20565b613a1d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613c94565b9150808252856020828501011115613a33578384fd5b613a44816020840160208601613d88565b50949350505050565b600060208284031215613a5e578081fd5b5035919050565b600060208284031215613a76578081fd5b5051919050565b60008151808452613a95816020860160208601613d88565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251613ad9818460208701613d88565b9190910192915050565b60007f427574746f6e5472616e6368652000000000000000000000000000000000000082528351613b1b81600e850160208801613d88565b7f2000000000000000000000000000000000000000000000000000000000000000600e918401918201528351613b5881600f840160208801613d88565b01600f01949350505050565b60007f5452414e4348452d00000000000000000000000000000000000000000000000082528351613b9c816008850160208801613d88565b7f2d000000000000000000000000000000000000000000000000000000000000006008918401918201528351613bd9816009840160208801613d88565b01600901949350505050565b60006040820173ffffffffffffffffffffffffffffffffffffffff8516835260206040818501528185518084526060860191508287019350845b81811015613c3b57845183529383019391830191600101613c1f565b5090979650505050505050565b600060608252613c5b6060830186613a7d565b8281036020840152613c6d8186613a7d565b91505073ffffffffffffffffffffffffffffffffffffffff83166040830152949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613cdb57613cdb613e20565b604052919050565b60008219821115613cf657613cf6613df1565b500190565b600082613d2f577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613d6c57613d6c613df1565b500290565b600082821015613d8357613d83613df1565b500390565b60005b83811015613da3578181015183820152602001613d8b565b83811115613db2576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613dea57613dea613df1565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146125c657600080fdfea164736f6c6343000803000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.