Contract Overview
Balance:
0 MATIC
My Name Tag:
Not Available
Txn Hash |
Method
|
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x552e1b3c4806108348dfa9da46f582d9af870a0e30d3fe2e3840c2f2e40a37aa | 0x600360e0 | 33639070 | 63 days 14 hrs ago | 0xb78565a3ded20c1f338234355b208dc14a5d4685 | IN | Create: SaleExchangeRate | 0 MATIC | 0.00406619104 |
[ Download CSV Export ]
Contract Source Code Verified (Exact Match)
Contract Name:
SaleExchangeRate
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./InitialStableCoinDeclaration.sol"; import "./Roles.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; contract SaleExchangeRate is Roles, InitialStableCoinDeclaration { address public SECURITIES; //address of the security token uint8 public priceDecimals; //decimals of the price uint256 public baseSecurityToFiatPrice; // price of the secutity token in fiat => fiat*(10**priceDecimals) bool public status; // isActive event BuyTokensEvent( address buyer, address securities, uint256 amountSecurities, address swapToken, uint256 securityPrice, string fiatUsed ); modifier onlyActive() { require(status == true, "SaleExchangeRate: not active"); _; } modifier onlyAllowedTokens(address _token) { require( !exTokenData[_token].blocked, "SaleExchangeRate: this token is blocked to swap" ); _; } modifier ownerOrSuperAdmin() { require( owner() == _msgSender() || hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "SaleExchangeRate: caller has to be the owner or SuperAdmin" ); _; } constructor( address _securities, uint256 _baseSecurityToFiatPrice, uint8 _priceDecimals, //array of pairs: //[0]:address of stableCoin, //[1]:address of the price-contract stableCoin/USD address[2][] memory stableCoinsInfo ) InitialStableCoinDeclaration(stableCoinsInfo) { SECURITIES = _securities; baseSecurityToFiatPrice = _baseSecurityToFiatPrice; priceDecimals = _priceDecimals; status = true; } function changeStatus() external onlyRole(TECHNICAL_ROLE) { status = !status; } /// @notice Owner of the contract has an opportunity to send any tokens from the contract to his/her wallet /// @param _amount amount of the tokens to send (* decimals of token) /// @param _token address of the tokens to send /// @return true if the operation done successfully function sendBack( uint256 _amount, address _token ) external ownerOrSuperAdmin returns (bool) { IERC20(_token).transfer(_msgSender(), _amount); return true; } /// @notice price and its decimals of the secutity token in FIAT /// @param _priceInFIAT price of Security in FIAT (price multiplied by 10**_priceDecimals) /// @param _priceDecimals decimals for price in FIAT function setPrice( uint256 _priceInFIAT, uint8 _priceDecimals ) external ownerOrSuperAdmin { baseSecurityToFiatPrice = _priceInFIAT; priceDecimals = _priceDecimals; } function setStableCoinBlockStatus( address _exToken, bool _isBlocked ) external ownerOrSuperAdmin { _updateExchangeToken(_exToken, _isBlocked); } function setPriceFeedForToken( address _exToken, address _priceContract ) external onlyRole(TECHNICAL_ROLE) { _updateExchangeToken(_exToken, _priceContract); priceFeed[_exToken] = AggregatorV3Interface(_priceContract); } function addAllowedToken( address _token, address _priceContract ) external onlyRole(TECHNICAL_ROLE) returns (bool) { require( _token != address(0), "SaleExchangeRate: You try to add zero-address" ); for (uint256 i = 0; i < allowedStableCoins.length; i++) { require( allowedStableCoins[i].stableCoinAddress != _token, "SaleExchangeRate: this token is already available" ); } _addAllowedToken(_token, _priceContract); return true; } function removeTokenFromAllowed( address _token ) external onlyRole(TECHNICAL_ROLE) returns (bool) { for (uint256 i = 0; i < allowedStableCoins.length; i++) { if (allowedStableCoins[i].stableCoinAddress == _token) { if (i != allowedStableCoins.length - 1) { allowedStableCoins[i] = allowedStableCoins[ allowedStableCoins.length - 1 ]; } allowedStableCoins.pop(); } } delete exTokenData[_token]; return true; } /// @notice swap of the token to security. /// @dev make swap, create and write the order of the operation, emit BuyTokensEvent /// @param _amountOfStableCoin amount of token to buy securities /// @param _stableCoinAddress address of the token to buy security. /// Token has to be Allowed. /// Token has to be equal to the USDT in price, in other way formula doesn't work /// @return true if the operation done successfully function buyToken( uint256 _amountOfStableCoin, address _stableCoinAddress ) public virtual onlyActive onlyAllowedTokens(_stableCoinAddress) returns (bool) { (, uint256 amountSecurities) = buyTokenView( _amountOfStableCoin, _stableCoinAddress ); uint256 balanceBefore = IERC20(_stableCoinAddress).balanceOf( address(this) ); IERC20(_stableCoinAddress).transferFrom( _msgSender(), address(this), _amountOfStableCoin ); require( IERC20(_stableCoinAddress).balanceOf(address(this)) == (balanceBefore + _amountOfStableCoin), "SaleExchangeRate: token transfer for buying failed" ); IERC20(SECURITIES).transfer(_msgSender(), amountSecurities); emit BuyTokensEvent( _msgSender(), SECURITIES, amountSecurities, _stableCoinAddress, baseSecurityToFiatPrice, getCurrentFiat() ); return true; } /// @notice function count and return the amount of security to be gotten for the proper amount of tokens /// @param _amountOfStableCoin amount of token you want to spend /// @param _stableCoinAddress address of token you want to use for buying security /// Token has to be Allowed /// @return token , securities - tuple of uintegers - (amount of token to spend, amount of securities to get) function buyTokenView( uint256 _amountOfStableCoin, address _stableCoinAddress ) public view onlyAllowedTokens(_stableCoinAddress) returns (uint256, uint256) { //scale decimals of stableCoin to uint256 scaledAmountOfStableCoins = _scaleAmount( _amountOfStableCoin, IERC20Metadata(_stableCoinAddress).decimals(), priceDecimals ); //calculate amount of security Tokens to buy uint256 amountOfSecurities = ((scaledAmountOfStableCoins * getStableCoinPriceInFiat(_stableCoinAddress)) / baseSecurityToFiatPrice); return (_amountOfStableCoin, amountOfSecurities); } function getStableCoinPriceInFiat( address _token ) public view returns (uint256) { return _getStableCoinPriceInFiat(_token, priceDecimals); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; contract Roles is Ownable, AccessControl { bytes32 public constant TECHNICAL_ROLE = keccak256("TECHNICAL_ROLE"); constructor() { _setRoleAdmin(TECHNICAL_ROLE, TECHNICAL_ROLE); _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); _grantRole(TECHNICAL_ROLE, _msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./FiatDeclaration.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; contract InitialStableCoinDeclaration is FiatDeclaration { struct ExchangeToken { address stableCoinAddress; //address of the priceFeed smart contract StableCoin/USD address priceFeedAddress; bool blocked; } ExchangeToken[] public allowedStableCoins; mapping(address => ExchangeToken) exTokenData; mapping(address => AggregatorV3Interface) priceFeed; constructor( //array of pairs: //[0]:address of stableCoin, //[1]:address of the price-contract stableCoin/USD address[2][] memory stableCoinsInfo ) { for (uint256 i = 0; i < stableCoinsInfo.length; i++) { _addAllowedToken(stableCoinsInfo[i][0], stableCoinsInfo[i][1]); } } /// @notice returns array of all possible stableCoins with their full data function getAllStableCoinsInfo() external view returns (ExchangeToken[] memory) { return allowedStableCoins; } function _getStableCoinPriceInFiat( address _token, uint8 _priceDecimals ) internal view returns (uint256) { return _getLatestPrice(_token, _priceDecimals) / _getFiatToUSDrate(currentFiat, _priceDecimals); } function _getFiatToUSDrate( FiatCurrency _fiat, uint8 _priceDecimals ) internal view returns (uint256) { if (fiatData[_fiat].fiatRouter == address(0)) { return 1; } else { AggregatorV3Interface fR = AggregatorV3Interface( fiatData[_fiat].fiatRouter ); (, int price, , , ) = fR.latestRoundData(); return _scaleAmount(uint256(price), fR.decimals(), _priceDecimals); } } /// @notice the function reduces the amount to the required decimals /// @param _amount amount of token you want to reduce /// @param _amountDecimals decimals which amount has now /// @param _decimalsToUse decimals you want to get after scaling /// @return uint256 the scaled amount with proper decimals function _scaleAmount( uint256 _amount, uint8 _amountDecimals, uint8 _decimalsToUse ) internal pure returns (uint256) { if (_amountDecimals < _decimalsToUse) { return _amount * (10 ** uint256(_decimalsToUse - _amountDecimals)); } else if (_amountDecimals > _decimalsToUse) { return _amount / (10 ** uint256(_amountDecimals - _decimalsToUse)); } return _amount; } function _getLatestPrice( address _token, uint8 _priceDecimals ) internal view returns (uint256) { AggregatorV3Interface pF = priceFeed[_token]; (, int price, , , ) = pF.latestRoundData(); return _scaleAmount(uint256(price), pF.decimals(), _priceDecimals); } function _addAllowedToken(address _token, address _priceContract) internal { ExchangeToken storage et = exTokenData[_token]; et.stableCoinAddress = _token; et.priceFeedAddress = _priceContract; priceFeed[_token] = AggregatorV3Interface(_priceContract); allowedStableCoins.push(exTokenData[_token]); } function _updateExchangeToken(address _token, address _priceFeed) internal { ExchangeToken storage et = exTokenData[_token]; et.priceFeedAddress = _priceFeed; _updateAllowedStableCoinsList(_token); } function _updateExchangeToken(address _token, bool _isBlocked) internal { ExchangeToken storage et = exTokenData[_token]; et.blocked = _isBlocked; _updateAllowedStableCoinsList(_token); } function _updateAllowedStableCoinsList(address _token) internal { for (uint256 i = 0; i < allowedStableCoins.length; i++) { ExchangeToken memory et = exTokenData[_token]; if (allowedStableCoins[i].stableCoinAddress == _token) { allowedStableCoins[i] = et; } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract FiatDeclaration { enum FiatCurrency { USD, // 0 EUR, // 1 GBP // 2 } // The currentFiat has a default value of the first member: `USD` FiatCurrency currentFiat; // the order of names has to be equal to order of FiatCurrency string[3] fiatNameList = ["USD", "EUR", "GBP"]; // Array of addresses of price-feed contracts for fiat/fiat pairs: // [0] - USD / USD priceFeed = '0x0000000000000000000000000000000000000000' !!! // [1] - EUR / USD // [2] - GBP / USD address[3] fiatPriceFeedList = [ 0x0000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000 ]; struct Fiat { uint256 enumNumber; string literalName; address fiatRouter; } Fiat[] public possibleFiat; mapping(FiatCurrency => Fiat) fiatData; constructor() { require( fiatPriceFeedList.length == fiatNameList.length, "SaleExchangeRate: check number of priceFeeds for fiat" ); for (uint256 i = 0; i < fiatPriceFeedList.length; i++) { _addFiat(i); } } function getCurrentFiat() public view returns (string memory) { return fiatNameList[uint256(currentFiat)]; } function getAllPossibleFiat() public view returns (Fiat[] memory) { return possibleFiat; } function _addFiat(uint256 _index) internal { Fiat storage f = fiatData[FiatCurrency(_index)]; f.enumNumber = _index; f.literalName = fiatNameList[_index]; f.fiatRouter = fiatPriceFeedList[_index]; possibleFiat.push(fiatData[FiatCurrency(_index)]); } }
// 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/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// 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 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 // 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 (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[{"internalType":"address","name":"_securities","type":"address"},{"internalType":"uint256","name":"_baseSecurityToFiatPrice","type":"uint256"},{"internalType":"uint8","name":"_priceDecimals","type":"uint8"},{"internalType":"address[2][]","name":"stableCoinsInfo","type":"address[2][]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"securities","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountSecurities","type":"uint256"},{"indexed":false,"internalType":"address","name":"swapToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"securityPrice","type":"uint256"},{"indexed":false,"internalType":"string","name":"fiatUsed","type":"string"}],"name":"BuyTokensEvent","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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECURITIES","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TECHNICAL_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_priceContract","type":"address"}],"name":"addAllowedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedStableCoins","outputs":[{"internalType":"address","name":"stableCoinAddress","type":"address"},{"internalType":"address","name":"priceFeedAddress","type":"address"},{"internalType":"bool","name":"blocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseSecurityToFiatPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountOfStableCoin","type":"uint256"},{"internalType":"address","name":"_stableCoinAddress","type":"address"}],"name":"buyToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountOfStableCoin","type":"uint256"},{"internalType":"address","name":"_stableCoinAddress","type":"address"}],"name":"buyTokenView","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changeStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPossibleFiat","outputs":[{"components":[{"internalType":"uint256","name":"enumNumber","type":"uint256"},{"internalType":"string","name":"literalName","type":"string"},{"internalType":"address","name":"fiatRouter","type":"address"}],"internalType":"struct FiatDeclaration.Fiat[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllStableCoinsInfo","outputs":[{"components":[{"internalType":"address","name":"stableCoinAddress","type":"address"},{"internalType":"address","name":"priceFeedAddress","type":"address"},{"internalType":"bool","name":"blocked","type":"bool"}],"internalType":"struct InitialStableCoinDeclaration.ExchangeToken[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentFiat","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getStableCoinPriceInFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"possibleFiat","outputs":[{"internalType":"uint256","name":"enumNumber","type":"uint256"},{"internalType":"string","name":"literalName","type":"string"},{"internalType":"address","name":"fiatRouter","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removeTokenFromAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"sendBack","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceInFIAT","type":"uint256"},{"internalType":"uint8","name":"_priceDecimals","type":"uint8"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_exToken","type":"address"},{"internalType":"address","name":"_priceContract","type":"address"}],"name":"setPriceFeedForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_exToken","type":"address"},{"internalType":"bool","name":"_isBlocked","type":"bool"}],"name":"setStableCoinBlockStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
600360e0818152621554d160ea1b6101005260809081526101208281526222aaa960e91b6101405260a0526101a06040526101608281526204742560ec1b6101805260c05262000051919081620005b0565b5060408051606081018252600080825260208201819052918101919091526200007f90600690600362000600565b503480156200008d57600080fd5b5060405162002eee38038062002eee833981016040819052620000b09162000764565b80620000bc336200031f565b620000e87ff1003c818ac400b04d0532342ab6840e13256c3eda7edcf0182834ef0bf030ea806200036f565b620000f5600033620003bc565b620001217ff1003c818ac400b04d0532342ab6840e13256c3eda7edcf0182834ef0bf030ea33620003bc565b60005b60038110156200014e57620001398162000445565b806200014581620008a3565b91505062000124565b5060005b8151811015620002d357620002be828281518110620001755762000175620008cb565b6020026020010151600060028110620001925762000192620008cb565b6020020151838381518110620001ac57620001ac620008cb565b6020026020010151600160028110620001c957620001c9620008cb565b60200201516001600160a01b039182166000818152600c6020818152604080842080546001600160a01b0319908116909617815560018082018054988a1698881689178155600d85529286208054881690981790975592909152600b805495860181559092525460029093027f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db98101805484169486169490941790935580547f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba90930180549283169390941692831784555460ff600160a01b91829004161515026001600160a81b0319909116909117179055565b80620002ca81620008a3565b91505062000152565b5050600e8054600f9490945560ff909216600160a01b026001600160a81b03199093166001600160a01b0390941693909317919091179055506010805460ff1916600117905562000b3b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000828152600160208190526040808320909101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620004415760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b6000600a6000836002811115620004605762000460620008e1565b6002811115620004745762000474620008e1565b6002811115620004885762000488620008e1565b815260208101919091526040016000208281559050600382818110620004b257620004b2620008cb565b6001830191620004c491018262000986565b5060068260038110620004db57620004db620008cb565b0154600280830180546001600160a01b0319166001600160a01b0390931692909217909155600990600a9060009085908111156200051d576200051d620008e1565b6002811115620005315762000531620008e1565b6002811115620005455762000545620008e1565b815260208082019290925260400160009081208354600181810186559483529290912081546003909302019182559181810190620005869084018262000986565b50600291820154910180546001600160a01b0319166001600160a01b039092169190911790555050565b8260038101928215620005ee579160200282015b82811115620005ee5782518290620005dd908262000a76565b5091602001919060010190620005c4565b50620005fc92915062000659565b5090565b82600381019282156200064b579160200282015b828111156200064b57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000614565b50620005fc9291506200067a565b80821115620005fc57600062000670828262000691565b5060010162000659565b5b80821115620005fc57600081556001016200067b565b5080546200069f90620008f7565b6000825580601f10620006b0575050565b601f016020900490600052602060002090810190620006d091906200067a565b50565b80516001600160a01b0381168114620006eb57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156200072b576200072b620006f0565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200075c576200075c620006f0565b604052919050565b600080600080608085870312156200077b57600080fd5b6200078685620006d3565b9350602080860151935060408087015160ff81168114620007a657600080fd5b60608801519094506001600160401b0380821115620007c457600080fd5b8189019150601f8a81840112620007da57600080fd5b825182811115620007ef57620007ef620006f0565b620007ff868260051b0162000731565b818152868101935060069190911b84018601908c8211156200082057600080fd5b938601935b8185101562000892578c838601126200083e5760008081fd5b6200084862000706565b808787018f8111156200085b5760008081fd5b875b818110156200087f576200087181620006d3565b8452928a01928a016200085d565b5050855250938501939286019262000825565b999c989b5096995050505050505050565b600060018201620008c457634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b600181811c908216806200090c57607f821691505b6020821081036200092d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200098157600081815260208120601f850160051c810160208610156200095c5750805b601f850160051c820191505b818110156200097d5782815560010162000968565b5050505b505050565b81810362000992575050565b6200099e8254620008f7565b6001600160401b03811115620009b857620009b8620006f0565b620009d081620009c98454620008f7565b8462000933565b6000601f82116001811462000a075760008315620009ee5750848201545b600019600385901b1c1916600184901b17845562000a6f565b600085815260209020601f19841690600086815260209020845b8381101562000a43578286015482556001958601959091019060200162000a21565b508583101562000a625781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b81516001600160401b0381111562000a925762000a92620006f0565b62000aa381620009c98454620008f7565b602080601f83116001811462000adb576000841562000ac25750858301515b600019600386901b1c1916600185901b1785556200097d565b600085815260208120601f198616915b8281101562000b0c5788860151825594840194600190910190840162000aeb565b508582101562000b2b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6123a38062000b4b6000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80635d206bfe1161010457806391e89fda116100a2578063ab37474111610071578063ab37474114610447578063be5499d21461045c578063d547741f14610471578063f2fde38b1461048457600080fd5b806391e89fda146103de57806396383c04146103f1578063a217fddf14610404578063a29c08161461040c57600080fd5b80638da5cb5b116100de5780638da5cb5b146103805780638df53e5a146103a55780639134709e146103b857806391d14854146103cb57600080fd5b80635d206bfe14610352578063715018a6146103655780637f42af3f1461036d57600080fd5b8063248a9ca31161017c578063305e94cd1161014b578063305e94cd1461030457806336568abe14610317578063442629251461032a5780634b7c3b301461033f57600080fd5b8063248a9ca3146102a157806328712991146102d35780632e4c0e40146102dc5780632f2ff15d146102f157600080fd5b8063085634ec116101b8578063085634ec146102405780631d3794091461024a5780631d5c105114610272578063200d2ed21461029457600080fd5b806301ffc9a7146101df578063038aabcf1461020757806305300b281461021a575b600080fd5b6101f26101ed366004611c21565b610497565b60405190151581526020015b60405180910390f35b6101f2610215366004611c67565b6104ce565b600e5461022e90600160a01b900460ff1681565b60405160ff90911681526020016101fe565b61024861059e565b005b61025d610258366004611c67565b6105cb565b604080519283526020830191909152016101fe565b610285610280366004611c93565b6106c0565b6040516101fe93929190611cfc565b6010546101f29060ff1681565b6102c56102af366004611c93565b6000908152600160208190526040909120015490565b6040519081526020016101fe565b6102c5600f5481565b6102e4610787565b6040516101fe9190611d2d565b6102486102ff366004611c67565b610843565b6101f2610312366004611d40565b61086e565b610248610325366004611c67565b610aa7565b610332610b25565b6040516101fe9190611d6a565b61024861034d366004611e02565b610c36565b6102c5610360366004611e39565b610c7b565b610248610c96565b61024861037b366004611d40565b610caa565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101fe565b600e5461038d906001600160a01b031681565b6101f26103c6366004611c67565b610cfb565b6101f26103d9366004611c67565b611063565b6101f26103ec366004611e39565b61108e565b6102486103ff366004611e63565b611251565b6102c5600081565b61041f61041a366004611c93565b6112b2565b604080516001600160a01b0394851681529390921660208401521515908201526060016101fe565b6102c560008051602061234e83398151915281565b6104646112f8565b6040516101fe9190611e88565b61024861047f366004611c67565b61137c565b610248610492366004611e39565b6113a2565b60006001600160e01b03198216637965db0b60e01b14806104c857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080546001600160a01b03163314806104ee57506104ee600033611063565b6105135760405162461bcd60e51b815260040161050a90611eef565b60405180910390fd5b6001600160a01b03821663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018690526044016020604051808303816000875af1158015610570573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105949190611f4c565b5060019392505050565b60008051602061234e8339815191526105b68161141b565b506010805460ff19811660ff90911615179055565b6001600160a01b0381166000908152600c602052604081206001015481908390600160a01b900460ff16156106125760405162461bcd60e51b815260040161050a90611f69565b600061068c86866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610656573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067a9190611fb8565b600e54600160a01b900460ff16611425565b90506000600f5461069c87610c7b565b6106a69084611feb565b6106b09190612002565b879550935050505b509250929050565b600981815481106106d057600080fd5b600091825260209091206003909102018054600182018054919350906106f590612024565b80601f016020809104026020016040519081016040528092919081815260200182805461072190612024565b801561076e5780601f106107435761010080835404028352916020019161076e565b820191906000526020600020905b81548152906001019060200180831161075157829003601f168201915b505050600290930154919250506001600160a01b031683565b6002805460609160039160ff16908111156107a4576107a4612058565b600381106107b4576107b461206e565b0180546107c090612024565b80601f01602080910402602001604051908101604052809291908181526020018280546107ec90612024565b80156108395780601f1061080e57610100808354040283529160200191610839565b820191906000526020600020905b81548152906001019060200180831161081c57829003601f168201915b5050505050905090565b6000828152600160208190526040909120015461085f8161141b565b6108698383611498565b505050565b600060008051602061234e8339815191526108888161141b565b6001600160a01b0384166108f45760405162461bcd60e51b815260206004820152602d60248201527f53616c6545786368616e6765526174653a20596f752074727920746f2061646460448201526c207a65726f2d6164647265737360981b606482015260840161050a565b60005b600b548110156109b157846001600160a01b0316600b828154811061091e5761091e61206e565b60009182526020909120600290910201546001600160a01b03160361099f5760405162461bcd60e51b815260206004820152603160248201527f53616c6545786368616e6765526174653a207468697320746f6b656e20697320604482015270616c726561647920617661696c61626c6560781b606482015260840161050a565b806109a981612084565b9150506108f7565b5061059484846001600160a01b039182166000818152600c6020818152604080842080546001600160a01b0319908116909617815560018082018054988a1698881689178155600d85529286208054881690981790975592909152600b805495860181559092525460029093027f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db98101805484169486169490941790935580547f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba90930180549283169390941692831784555460ff600160a01b91829004161515026001600160a81b0319909116909117179055565b6001600160a01b0381163314610b175760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161050a565b610b218282611503565b5050565b60606009805480602002602001604051908101604052809291908181526020016000905b82821015610c2d578382906000526020600020906003020160405180606001604052908160008201548152602001600182018054610b8690612024565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb290612024565b8015610bff5780601f10610bd457610100808354040283529160200191610bff565b820191906000526020600020905b815481529060010190602001808311610be257829003601f168201915b5050509183525050600291909101546001600160a01b03166020918201529082526001929092019101610b49565b50505050905090565b6000546001600160a01b0316331480610c555750610c55600033611063565b610c715760405162461bcd60e51b815260040161050a90611eef565b610b21828261156a565b60006104c882600e60149054906101000a900460ff166115a4565b610c9e6115cb565b610ca86000611625565b565b60008051602061234e833981519152610cc28161141b565b610ccc8383611675565b506001600160a01b039182166000908152600d6020526040902080546001600160a01b03191691909216179055565b60105460009060ff161515600114610d555760405162461bcd60e51b815260206004820152601c60248201527f53616c6545786368616e6765526174653a206e6f742061637469766500000000604482015260640161050a565b6001600160a01b0382166000908152600c60205260409020600101548290600160a01b900460ff1615610d9a5760405162461bcd60e51b815260040161050a90611f69565b6000610da685856105cb565b6040516370a0823160e01b8152306004820152909250600091506001600160a01b038616906370a0823190602401602060405180830381865afa158015610df1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e15919061209d565b90506001600160a01b0385166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018990526064016020604051808303816000875af1158015610e7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9e9190611f4c565b50610ea986826120b6565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f11919061209d565b14610f795760405162461bcd60e51b815260206004820152603260248201527f53616c6545786368616e6765526174653a20746f6b656e207472616e7366657260448201527108199bdc88189d5e5a5b99c819985a5b195960721b606482015260840161050a565b600e546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af1158015610fd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffc9190611f4c565b507f4c6881f0e54dcdbfeb87fc4e7d927b681ccc11d8f917c242e4d7d83ca6cb09ce33600e54600f546001600160a01b03909116908590899061103d610787565b60405161104f969594939291906120c9565b60405180910390a150600195945050505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600060008051602061234e8339815191526110a88161141b565b60005b600b5481101561120e57836001600160a01b0316600b82815481106110d2576110d261206e565b60009182526020909120600290910201546001600160a01b0316036111fc57600b5461110090600190612117565b81146111b457600b805461111690600190612117565b815481106111265761112661206e565b9060005260206000209060020201600b82815481106111475761114761206e565b60009182526020909120825460029092020180546001600160a01b039283166001600160a01b031991821617825560019384018054949092018054949093169084168117835590546001600160a81b031990931617600160a01b9283900460ff1615159092029190911790555b600b8054806111c5576111c561212a565b60008281526020902060026000199092019182020180546001600160a01b031916815560010180546001600160a81b031916905590555b8061120681612084565b9150506110ab565b506001600160a01b0383166000908152600c6020526040902080546001600160a01b0319168155600190810180546001600160a81b031916905591505b50919050565b6000546001600160a01b03163314806112705750611270600033611063565b61128c5760405162461bcd60e51b815260040161050a90611eef565b600f91909155600e805460ff909216600160a01b0260ff60a01b19909216919091179055565b600b81815481106112c257600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b6060600b805480602002602001604051908101604052809291908181526020016000905b82821015610c2d576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161131c565b600082815260016020819052604090912001546113988161141b565b6108698383611503565b6113aa6115cb565b6001600160a01b03811661140f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161050a565b61141881611625565b50565b61141881336116b1565b60008160ff168360ff16101561145e5761143f8383612140565b61144d9060ff16600a612235565b6114579085611feb565b9050611491565b8160ff168360ff16111561148e576114768284612140565b6114849060ff16600a612235565b6114579085612002565b50825b9392505050565b6114a28282611063565b610b215760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b61150d8282611063565b15610b215760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166000908152600c6020526040902060018101805460ff60a01b1916600160a01b841515021790556108698361170a565b6002546000906115b79060ff1683611820565b6115c184846119a2565b6114919190612002565b6000546001600160a01b03163314610ca85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161050a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038281166000908152600c602052604090206001810180546001600160a01b031916928416929092179091556108698361170a565b6116bb8282611063565b610b21576116c881611a73565b6116d3836020611a85565b6040516020016116e4929190612241565b60408051601f198184030181529082905262461bcd60e51b825261050a91600401611d2d565b60005b600b54811015610b21576001600160a01b038281166000818152600c6020908152604091829020825160608101845281548616815260019091015494851691810191909152600160a01b90930460ff16151590830152600b8054849081106117775761177761206e565b60009182526020909120600290910201546001600160a01b03160361180d5780600b83815481106117aa576117aa61206e565b6000918252602091829020835160029092020180546001600160a01b039283166001600160a01b031990911617815591830151600190920180546040909401511515600160a01b026001600160a81b031990941692909116919091179190911790555b508061181881612084565b91505061170d565b600080600a8185600281111561183857611838612058565b600281111561184957611849612058565b81526020810191909152604001600020600201546001600160a01b031603611873575060016104c8565b6000600a600085600281111561188b5761188b612058565b600281111561189c5761189c612058565b815260200190815260200160002060020160009054906101000a90046001600160a01b031690506000816001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192791906122d0565b50505091505061199981836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561196f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119939190611fb8565b86611425565b925050506104c8565b6001600160a01b038083166000908152600d6020526040808220548151633fabe5a360e21b81529151929316918391839163feaf968c9160048082019260a0929091908290030181865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2291906122d0565b505050915050611a6a81836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561196f573d6000803e3d6000fd5b95945050505050565b60606104c86001600160a01b03831660145b60606000611a94836002611feb565b611a9f9060026120b6565b67ffffffffffffffff811115611ab757611ab7612320565b6040519080825280601f01601f191660200182016040528015611ae1576020820181803683370190505b509050600360fc1b81600081518110611afc57611afc61206e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611b2b57611b2b61206e565b60200101906001600160f81b031916908160001a9053506000611b4f846002611feb565b611b5a9060016120b6565b90505b6001811115611bd2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b8e57611b8e61206e565b1a60f81b828281518110611ba457611ba461206e565b60200101906001600160f81b031916908160001a90535060049490941c93611bcb81612336565b9050611b5d565b5083156114915760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161050a565b600060208284031215611c3357600080fd5b81356001600160e01b03198116811461149157600080fd5b80356001600160a01b0381168114611c6257600080fd5b919050565b60008060408385031215611c7a57600080fd5b82359150611c8a60208401611c4b565b90509250929050565b600060208284031215611ca557600080fd5b5035919050565b60005b83811015611cc7578181015183820152602001611caf565b50506000910152565b60008151808452611ce8816020860160208601611cac565b601f01601f19169290920160200192915050565b838152606060208201526000611d156060830185611cd0565b905060018060a01b0383166040830152949350505050565b6020815260006114916020830184611cd0565b60008060408385031215611d5357600080fd5b611d5c83611c4b565b9150611c8a60208401611c4b565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611de657603f19898403018552815160608151855288820151818a870152611dbf82870182611cd0565b928901516001600160a01b0316958901959095525094870194925090860190600101611d91565b509098975050505050505050565b801515811461141857600080fd5b60008060408385031215611e1557600080fd5b611e1e83611c4b565b91506020830135611e2e81611df4565b809150509250929050565b600060208284031215611e4b57600080fd5b61149182611c4b565b60ff8116811461141857600080fd5b60008060408385031215611e7657600080fd5b823591506020830135611e2e81611e54565b602080825282518282018190526000919060409081850190868401855b82811015611ee257815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101611ea5565b5091979650505050505050565b6020808252603a908201527f53616c6545786368616e6765526174653a2063616c6c65722068617320746f2060408201527f626520746865206f776e6572206f7220537570657241646d696e000000000000606082015260800190565b600060208284031215611f5e57600080fd5b815161149181611df4565b6020808252602f908201527f53616c6545786368616e6765526174653a207468697320746f6b656e2069732060408201526e0626c6f636b656420746f207377617608c1b606082015260800190565b600060208284031215611fca57600080fd5b815161149181611e54565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176104c8576104c8611fd5565b60008261201f57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c9082168061203857607f821691505b60208210810361124b57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006001820161209657612096611fd5565b5060010190565b6000602082840312156120af57600080fd5b5051919050565b808201808211156104c8576104c8611fd5565b6001600160a01b038781168252868116602083015260408201869052841660608201526080810183905260c060a0820181905260009061210b90830184611cd0565b98975050505050505050565b818103818111156104c8576104c8611fd5565b634e487b7160e01b600052603160045260246000fd5b60ff82811682821603908111156104c8576104c8611fd5565b600181815b808511156106b857816000190482111561217a5761217a611fd5565b8085161561218757918102915b93841c939080029061215e565b6000826121a3575060016104c8565b816121b0575060006104c8565b81600181146121c657600281146121d0576121ec565b60019150506104c8565b60ff8411156121e1576121e1611fd5565b50506001821b6104c8565b5060208310610133831016604e8410600b841016171561220f575081810a6104c8565b6122198383612159565b806000190482111561222d5761222d611fd5565b029392505050565b60006114918383612194565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612279816017850160208801611cac565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516122aa816028840160208801611cac565b01602801949350505050565b805169ffffffffffffffffffff81168114611c6257600080fd5b600080600080600060a086880312156122e857600080fd5b6122f1866122b6565b9450602086015193506040860151925060608601519150612314608087016122b6565b90509295509295909350565b634e487b7160e01b600052604160045260246000fd5b60008161234557612345611fd5565b50600019019056fef1003c818ac400b04d0532342ab6840e13256c3eda7edcf0182834ef0bf030eaa26469706673582212203a888a10d6e614d902c2eab5eebdd98c516fc33eb8525508b1c6d6b60ea3554164736f6c634300081300330000000000000000000000008e82483b435d4f8731b9f9fb3960c053d62a056c0000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb0000000000000000000000001c2252aeed50e0c9b64bdff2735ee3c932f5c408
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008e82483b435d4f8731b9f9fb3960c053d62a056c0000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb0000000000000000000000001c2252aeed50e0c9b64bdff2735ee3c932f5c408
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000008e82483b435d4f8731b9f9fb3960c053d62a056c
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000320
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb
Arg [6] : 0000000000000000000000001c2252aeed50e0c9b64bdff2735ee3c932f5c408
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|