Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
107506954 | 562 days ago | 0 ETH | ||||
107491891 | 563 days ago | 0 ETH | ||||
107490556 | 563 days ago | 0 ETH | ||||
107449020 | 564 days ago | 0 ETH | ||||
107436297 | 564 days ago | 0 ETH | ||||
107426184 | 564 days ago | 0 ETH | ||||
107404112 | 565 days ago | 0 ETH | ||||
107353225 | 566 days ago | 0 ETH | ||||
107352441 | 566 days ago | 0 ETH | ||||
107311686 | 567 days ago | 0 ETH | ||||
107311678 | 567 days ago | 0 ETH | ||||
107311257 | 567 days ago | 0 ETH | ||||
107311252 | 567 days ago | 0 ETH | ||||
107311244 | 567 days ago | 0 ETH | ||||
107291174 | 567 days ago | 0 ETH | ||||
107253463 | 568 days ago | 0 ETH | ||||
107166334 | 570 days ago | 0 ETH | ||||
107103543 | 572 days ago | 0 ETH | ||||
107103203 | 572 days ago | 0 ETH | ||||
107094944 | 572 days ago | 0 ETH | ||||
107059512 | 573 days ago | 0 ETH | ||||
107050370 | 573 days ago | 0 ETH | ||||
107041485 | 573 days ago | 0 ETH | ||||
107041477 | 573 days ago | 0 ETH | ||||
107041469 | 573 days ago | 0 ETH |
Loading...
Loading
Contract Name:
SportVault
Compiler Version
v0.8.4+commit.c7e474f2
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 "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "../utils/proxy/solidity-0.8.0/ProxyReentrancyGuard.sol"; import "../utils/proxy/solidity-0.8.0/ProxyOwned.sol"; import "../interfaces/ISportsAMM.sol"; import "../interfaces/ISportPositionalMarket.sol"; import "../interfaces/IStakingThales.sol"; contract SportVault is Initializable, ProxyOwned, PausableUpgradeable, ProxyReentrancyGuard { /* ========== LIBRARIES ========== */ using SafeERC20Upgradeable for IERC20Upgradeable; struct DepositReceipt { uint round; uint amount; } struct InitParams { address _owner; ISportsAMM _sportsAmm; IERC20Upgradeable _sUSD; uint _roundLength; uint _priceLowerLimit; uint _priceUpperLimit; int _skewImpactLimit; uint _allocationLimitsPerMarketPerRound; uint _maxAllowedDeposit; uint _utilizationRate; uint _minDepositAmount; uint _maxAllowedUsers; uint _minTradeAmount; } /* ========== CONSTANTS ========== */ uint private constant HUNDRED = 1e20; uint private constant ONE = 1e18; /* ========== STATE VARIABLES ========== */ ISportsAMM public sportsAMM; IERC20Upgradeable public sUSD; bool public vaultStarted; uint public round; uint public roundLength; mapping(uint => uint) public roundStartTime; mapping(uint => address[]) public usersPerRound; mapping(uint => mapping(address => bool)) public userInRound; mapping(uint => mapping(address => uint)) public balancesPerRound; mapping(address => bool) public withdrawalRequested; mapping(address => DepositReceipt) public depositReceipts; mapping(uint => uint) public allocationPerRound; mapping(uint => address[]) public tradingMarketsPerRound; mapping(uint => mapping(address => ISportsAMM.Position)) public tradingMarketPositionPerRound; mapping(uint => mapping(address => bool)) public isTradingMarketInARound; mapping(uint => uint) public profitAndLossPerRound; mapping(uint => uint) public cumulativeProfitAndLoss; uint public maxAllowedDeposit; uint public utilizationRate; mapping(uint => uint) public capPerRound; uint public minDepositAmount; uint public maxAllowedUsers; uint public usersCurrentlyInVault; uint public allocationLimitsPerMarketPerRound; mapping(uint => mapping(address => uint)) public allocationSpentPerRound; uint public priceLowerLimit; uint public priceUpperLimit; int public skewImpactLimit; uint public minTradeAmount; /// @return The address of the Staking contract IStakingThales public stakingThales; mapping(uint => uint) public allocationSpentInARound; /* ========== CONSTRUCTOR ========== */ function __BaseSportVault_init( address _owner, ISportsAMM _sportAmm, IERC20Upgradeable _sUSD, uint _roundLength, uint _maxAllowedDeposit, uint _utilizationRate, uint _minDepositAmount, uint _maxAllowedUsers ) internal onlyInitializing { setOwner(_owner); initNonReentrant(); sportsAMM = ISportsAMM(_sportAmm); sUSD = _sUSD; roundLength = _roundLength; maxAllowedDeposit = _maxAllowedDeposit; utilizationRate = _utilizationRate; minDepositAmount = _minDepositAmount; maxAllowedUsers = _maxAllowedUsers; sUSD.approve(address(sportsAMM), type(uint256).max); } function initialize(InitParams calldata params) external initializer { __BaseSportVault_init( params._owner, params._sportsAmm, params._sUSD, params._roundLength, params._maxAllowedDeposit, params._utilizationRate, params._minDepositAmount, params._maxAllowedUsers ); priceLowerLimit = params._priceLowerLimit; priceUpperLimit = params._priceUpperLimit; skewImpactLimit = params._skewImpactLimit; allocationLimitsPerMarketPerRound = params._allocationLimitsPerMarketPerRound; minTradeAmount = params._minTradeAmount; } /// @notice Start vault and begin round #1 function startVault() external onlyOwner { require(!vaultStarted, "Vault has already started"); round = 1; roundStartTime[round] = block.timestamp; vaultStarted = true; capPerRound[2] = capPerRound[1]; emit VaultStarted(); } /// @notice Close current round and begin next round, /// excercise options of trading markets and calculate profit and loss function closeRound() external nonReentrant whenNotPaused { require(canCloseCurrentRound(), "Can't close current round"); // excercise market options _exerciseMarketsReadyToExercised(); // balance in next round does not affect PnL in a current round uint currentVaultBalance = sUSD.balanceOf(address(this)) - allocationPerRound[round + 1]; // calculate PnL // if no allocation for current round if (allocationPerRound[round] == 0) { profitAndLossPerRound[round] = 1; } else { profitAndLossPerRound[round] = (currentVaultBalance * ONE) / allocationPerRound[round]; } for (uint i = 0; i < usersPerRound[round].length; i++) { address user = usersPerRound[round][i]; uint balanceAfterCurRound = (balancesPerRound[round][user] * profitAndLossPerRound[round]) / ONE; if (userInRound[round][user]) { if (!withdrawalRequested[user]) { balancesPerRound[round + 1][user] = balancesPerRound[round + 1][user] + balanceAfterCurRound; userInRound[round + 1][user] = true; usersPerRound[round + 1].push(user); if (address(stakingThales) != address(0)) { stakingThales.updateVolume(user, balanceAfterCurRound); } } else { balancesPerRound[round + 1][user] = 0; sUSD.safeTransfer(user, balanceAfterCurRound); withdrawalRequested[user] = false; userInRound[round + 1][user] = false; emit Claimed(user, balanceAfterCurRound); } } } if (round == 1) { cumulativeProfitAndLoss[round] = profitAndLossPerRound[round]; } else { cumulativeProfitAndLoss[round] = (cumulativeProfitAndLoss[round - 1] * profitAndLossPerRound[round]) / ONE; } // start next round round += 1; roundStartTime[round] = block.timestamp; // allocation for next round doesn't include withdrawal queue share from previous round allocationPerRound[round] = sUSD.balanceOf(address(this)); capPerRound[round + 1] = allocationPerRound[round]; emit RoundClosed(round - 1, profitAndLossPerRound[round - 1]); } /// @notice Deposit funds from user into vault for the next round /// @param amount Value to be deposited function deposit(uint amount) external canDeposit(amount) nonReentrant whenNotPaused { sUSD.safeTransferFrom(msg.sender, address(this), amount); uint nextRound = round + 1; // new user enters the vault if (balancesPerRound[round][msg.sender] == 0 && balancesPerRound[nextRound][msg.sender] == 0) { require(usersCurrentlyInVault < maxAllowedUsers, "Max amount of users reached"); usersPerRound[nextRound].push(msg.sender); userInRound[nextRound][msg.sender] = true; usersCurrentlyInVault = usersCurrentlyInVault + 1; } balancesPerRound[nextRound][msg.sender] += amount; // update deposit state of a user depositReceipts[msg.sender] = DepositReceipt(nextRound, balancesPerRound[nextRound][msg.sender]); allocationPerRound[nextRound] += amount; capPerRound[nextRound] += amount; if (address(stakingThales) != address(0)) { stakingThales.updateVolume(msg.sender, amount); } emit Deposited(msg.sender, amount); } function withdrawalRequest() external nonReentrant whenNotPaused { require(vaultStarted, "Vault has not started"); require(!withdrawalRequested[msg.sender], "Withdrawal already requested"); require(balancesPerRound[round][msg.sender] > 0, "Nothing to withdraw"); require(balancesPerRound[round + 1][msg.sender] == 0, "Can't withdraw as you already deposited for next round"); uint nextRound = round + 1; if (capPerRound[nextRound] > balancesPerRound[round][msg.sender]) { capPerRound[nextRound] -= balancesPerRound[round][msg.sender]; } usersCurrentlyInVault = usersCurrentlyInVault - 1; withdrawalRequested[msg.sender] = true; emit WithdrawalRequested(msg.sender); } /// @notice Buy market options from Thales AMM /// @param market address of a market /// @param amount number of options to be bought /// @param position to buy options for function trade( address market, uint amount, ISportsAMM.Position position ) external nonReentrant whenNotPaused { require(vaultStarted, "Vault has not started"); require(amount >= minTradeAmount, "Amount less than minimum"); ISportPositionalMarket marketContract = ISportPositionalMarket(market); (uint maturity, ) = marketContract.times(); require(maturity < (roundStartTime[round] + roundLength), "Market time not valid"); uint basePricePosition = sportsAMM.obtainOdds(address(market), position); require(basePricePosition > 0, "Price not more than 0"); int pricePositionImpact = sportsAMM.buyPriceImpact(address(market), position, amount); require(basePricePosition >= priceLowerLimit && basePricePosition <= priceUpperLimit, "Market price not valid"); require(pricePositionImpact < skewImpactLimit, "Skew impact too high"); _buyFromAmm(market, position, amount); if (!isTradingMarketInARound[round][market]) { tradingMarketsPerRound[round].push(market); isTradingMarketInARound[round][market] = true; } } /// @notice Set length of rounds /// @param _roundLength Length of a round in miliseconds function setRoundLength(uint _roundLength) external onlyOwner { roundLength = _roundLength; emit RoundLengthChanged(_roundLength); } /// @notice Set ThalesAMM contract /// @param _sportAMM ThalesAMM address function setSportAmm(ISportsAMM _sportAMM) external onlyOwner { sportsAMM = _sportAMM; sUSD.approve(address(sportsAMM), type(uint256).max); emit SportAMMChanged(address(_sportAMM)); } /// @notice Set IStakingThales contract /// @param _stakingThales IStakingThales address function setStakingThales(IStakingThales _stakingThales) external onlyOwner { stakingThales = _stakingThales; emit StakingThalesChanged(address(_stakingThales)); } /// @notice Set utilization rate parameter /// @param _utilizationRate Value in percents function setUtilizationRate(uint _utilizationRate) external onlyOwner { utilizationRate = _utilizationRate; emit UtilizationRateChanged(_utilizationRate); } /// @notice Set max allowed deposit /// @param _maxAllowedDeposit Deposit value function setMaxAllowedDeposit(uint _maxAllowedDeposit) external onlyOwner { maxAllowedDeposit = _maxAllowedDeposit; emit MaxAllowedDepositChanged(_maxAllowedDeposit); } /// @notice Set min allowed deposit /// @param _minDepositAmount Deposit value function setMinAllowedDeposit(uint _minDepositAmount) external onlyOwner { minDepositAmount = _minDepositAmount; emit MinAllowedDepositChanged(_minDepositAmount); } /// @notice Set _maxAllowedUsers /// @param _maxAllowedUsers Deposit value function setMaxAllowedUsers(uint _maxAllowedUsers) external onlyOwner { maxAllowedUsers = _maxAllowedUsers; emit MaxAllowedUsersChanged(_maxAllowedUsers); } /// @notice Set allocation limits for assets to be spent in one round /// @param _allocationLimitsPerMarketPerRound allocation per market in percent function setAllocationLimits(uint _allocationLimitsPerMarketPerRound) external onlyOwner { require(_allocationLimitsPerMarketPerRound < HUNDRED, "Invalid allocation limit values"); allocationLimitsPerMarketPerRound = _allocationLimitsPerMarketPerRound; emit SetAllocationLimits(allocationLimitsPerMarketPerRound); } /// @notice Set price limit for options to be bought from AMM /// @param _priceLowerLimit lower limit /// @param _priceUpperLimit upper limit function setPriceLimits(uint _priceLowerLimit, uint _priceUpperLimit) external onlyOwner { require(_priceLowerLimit < _priceUpperLimit, "Invalid price limit values"); priceLowerLimit = _priceLowerLimit; priceUpperLimit = _priceUpperLimit; emit SetPriceLimits(_priceLowerLimit, _priceUpperLimit); } /// @notice Set skew impact limit for AMM /// @param _skewImpactLimit limit in percents function setSkewImpactLimit(int _skewImpactLimit) external onlyOwner { skewImpactLimit = _skewImpactLimit; emit SetSkewImpactLimit(_skewImpactLimit); } /// @notice Set _minTradeAmount /// @param _minTradeAmount limit in percents function setMinTradeAmount(uint _minTradeAmount) external onlyOwner { minTradeAmount = _minTradeAmount; emit SetMinTradeAmount(_minTradeAmount); } /* ========== INTERNAL FUNCTIONS ========== */ function _exerciseMarketsReadyToExercised() internal { ISportPositionalMarket market; for (uint i = 0; i < tradingMarketsPerRound[round].length; i++) { market = ISportPositionalMarket(tradingMarketsPerRound[round][i]); if (!market.paused() && market.resolved()) { (uint homeBalance, uint awayBalance, uint drawBalance) = market.balancesOf(address(this)); if (homeBalance > 0 || awayBalance > 0 || drawBalance > 0) { market.exerciseOptions(); } } } } /// @notice Buy options from AMM /// @param market address of a market /// @param position position to be bought /// @param amount amount of positions to be bought function _buyFromAmm( address market, ISportsAMM.Position position, uint amount ) internal { uint quote = sportsAMM.buyFromAmmQuote(market, position, amount); require(quote < (tradingAllocation() - allocationSpentInARound[round]), "Amount exceeds available allocation"); uint allocationAsset = (tradingAllocation() * allocationLimitsPerMarketPerRound) / HUNDRED; require( (quote + allocationSpentPerRound[round][market]) < allocationAsset, "Amount exceeds available allocation for asset" ); uint balanceBeforeTrade = sUSD.balanceOf(address(this)); sportsAMM.buyFromAMM(market, position, amount, quote, 0); uint balanceAfterTrade = sUSD.balanceOf(address(this)); allocationSpentInARound[round] += quote; allocationSpentPerRound[round][market] += quote; tradingMarketPositionPerRound[round][market] = position; emit TradeExecuted(market, position, amount, quote); } /// @notice Return trading allocation in current round based on utilization rate param /// @return uint function tradingAllocation() public view returns (uint) { return (allocationPerRound[round] * utilizationRate) / ONE; } /* ========== VIEWS ========== */ /// @notice Checks if all conditions are met to close the round /// @return bool function canCloseCurrentRound() public view returns (bool) { if (!vaultStarted || block.timestamp < (roundStartTime[round] + roundLength)) { return false; } for (uint i = 0; i < tradingMarketsPerRound[round].length; i++) { ISportPositionalMarket market = ISportPositionalMarket(tradingMarketsPerRound[round][i]); if ((!market.resolved()) || market.paused()) { return false; } } return true; } /// @notice Get available amount to spend on an asset in a round /// @param market to fetch available allocation for /// @return uint function getAvailableAllocationForMarket(address market) external view returns (uint) { uint allocationMarket = (tradingAllocation() * allocationLimitsPerMarketPerRound) / HUNDRED; uint remainingAvailable = allocationMarket - allocationSpentPerRound[round][market]; return remainingAvailable < (tradingAllocation() - allocationSpentInARound[round]) ? remainingAvailable : (tradingAllocation() - allocationSpentInARound[round]); } /// @notice Return user balance in a round /// @param _round Round number /// @param user Address of the user /// @return uint function getBalancesPerRound(uint _round, address user) external view returns (uint) { return balancesPerRound[_round][user]; } /// @notice Return available to deposit /// @return returned how much more users can deposit function getAvailableToDeposit() external view returns (uint returned) { if (capPerRound[round + 1] < maxAllowedDeposit) { returned = maxAllowedDeposit - capPerRound[round + 1]; } } /// @notice end of current round /// @return uint function getCurrentRoundEnd() external view returns (uint) { return roundStartTime[round] + roundLength; } /// @notice Return multiplied PnLs between rounds /// @param roundA Round number from /// @param roundB Round number to /// @return uint function cumulativePnLBetweenRounds(uint roundA, uint roundB) public view returns (uint) { return (cumulativeProfitAndLoss[roundB] * profitAndLossPerRound[roundA]) / cumulativeProfitAndLoss[roundA]; } /* ========== MODIFIERS ========== */ modifier canDeposit(uint amount) { require(!withdrawalRequested[msg.sender], "Withdrawal is requested, cannot deposit"); require(amount >= minDepositAmount, "Invalid amount"); require(capPerRound[round + 1] + amount <= maxAllowedDeposit, "Deposit amount exceeds vault cap"); _; } /* ========== EVENTS ========== */ event VaultStarted(); event RoundClosed(uint round, uint roundPnL); event RoundLengthChanged(uint roundLength); event SportAMMChanged(address thalesAmm); event StakingThalesChanged(address stakingThales); event SetSUSD(address sUSD); event Deposited(address user, uint amount); event Claimed(address user, uint amount); event WithdrawalRequested(address user); event UtilizationRateChanged(uint utilizationRate); event MaxAllowedDepositChanged(uint maxAllowedDeposit); event MinAllowedDepositChanged(uint minAllowedDeposit); event MaxAllowedUsersChanged(uint MaxAllowedUsersChanged); event SetAllocationLimits(uint allocationLimitsPerMarketPerRound); event SetPriceLimits(uint priceLowerLimit, uint priceUpperLimit); event SetSkewImpactLimit(int skewImpact); event SetMinTradeAmount(uint SetMinTradeAmount); event TradeExecuted(address market, ISportsAMM.Position position, uint amount, uint quote); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) 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 onlyInitializing { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_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 { _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); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @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. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ 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() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the `nonReentrant` modifier * available, which can be aplied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. */ contract ProxyReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; bool private _initialized; function initNonReentrant() public { require(!_initialized, "Already initialized"); _initialized = true; _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // Clone of syntetix contract without constructor contract ProxyOwned { address public owner; address public nominatedOwner; bool private _initialized; bool private _transferredAtInit; function setOwner(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); require(!_initialized, "Already initialized, use nominateNewOwner"); _initialized = true; owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } function transferOwnershipAtInit(address proxyAddress) external onlyOwner { require(proxyAddress != address(0), "Invalid address"); require(!_transferredAtInit, "Already transferred"); owner = proxyAddress; _transferredAtInit = true; emit OwnerChanged(owner, proxyAddress); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ISportsAMM { /* ========== VIEWS / VARIABLES ========== */ enum Position { Home, Away, Draw } struct SellRequirements { address user; address market; Position position; uint amount; uint expectedPayout; uint additionalSlippage; } function theRundownConsumer() external view returns (address); function getMarketDefaultOdds(address _market, bool isSell) external view returns (uint[] memory); function isMarketInAMMTrading(address _market) external view returns (bool); function availableToBuyFromAMM(address market, Position position) external view returns (uint _available); function parlayAMM() external view returns (address); function minSupportedOdds() external view returns (uint); function maxSupportedOdds() external view returns (uint); function min_spread() external view returns (uint); function max_spread() external view returns (uint); function minimalTimeLeftToMaturity() external view returns (uint); function getSpentOnGame(address market) external view returns (uint); function safeBoxImpact() external view returns (uint); function manager() external view returns (address); function getLiquidityPool() external view returns (address); function buyFromAMM( address market, Position position, uint amount, uint expectedPayout, uint additionalSlippage ) external; function buyFromAmmQuote( address market, Position position, uint amount ) external view returns (uint); function buyFromAmmQuoteForParlayAMM( address market, Position position, uint amount ) external view returns (uint); function updateParlayVolume(address _account, uint _amount) external; function buyPriceImpact( address market, ISportsAMM.Position position, uint amount ) external view returns (int impact); function obtainOdds(address _market, ISportsAMM.Position _position) external view returns (uint oddsToReturn); function buyFromAmmQuoteWithDifferentCollateral( address market, ISportsAMM.Position position, uint amount, address collateral ) external view returns (uint collateralQuote, uint sUSDToPay); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "../interfaces/IPositionalMarketManager.sol"; import "../interfaces/IPosition.sol"; import "../interfaces/IPriceFeed.sol"; interface ISportPositionalMarket { /* ========== TYPES ========== */ enum Phase { Trading, Maturity, Expiry } enum Side { Cancelled, Home, Away, Draw } /* ========== VIEWS / VARIABLES ========== */ function getOptions() external view returns ( IPosition home, IPosition away, IPosition draw ); function times() external view returns (uint maturity, uint destruction); function initialMint() external view returns (uint); function getGameDetails() external view returns (bytes32 gameId, string memory gameLabel); function getGameId() external view returns (bytes32); function deposited() external view returns (uint); function optionsCount() external view returns (uint); function creator() external view returns (address); function resolved() external view returns (bool); function cancelled() external view returns (bool); function paused() external view returns (bool); function phase() external view returns (Phase); function canResolve() external view returns (bool); function result() external view returns (Side); function isChild() external view returns (bool); function tags(uint idx) external view returns (uint); function getParentMarketPositions() external view returns (IPosition position1, IPosition position2); function getStampedOdds() external view returns ( uint, uint, uint ); function balancesOf(address account) external view returns ( uint home, uint away, uint draw ); function totalSupplies() external view returns ( uint home, uint away, uint draw ); function isDoubleChance() external view returns (bool); function parentMarket() external view returns (ISportPositionalMarket); /* ========== MUTATIVE FUNCTIONS ========== */ function setPaused(bool _paused) external; function updateDates(uint256 _maturity, uint256 _expiry) external; function mint(uint value) external; function exerciseOptions() external; function restoreInvalidOdds( uint _homeOdds, uint _awayOdds, uint _drawOdds ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IStakingThales { function updateVolume(address account, uint amount) external; /* ========== VIEWS / VARIABLES ========== */ function totalStakedAmount() external view returns (uint); function stakedBalanceOf(address account) external view returns (uint); function currentPeriodRewards() external view returns (uint); function currentPeriodFees() external view returns (uint); function getLastPeriodOfClaimedRewards(address account) external view returns (uint); function getRewardsAvailable(address account) external view returns (uint); function getRewardFeesAvailable(address account) external view returns (uint); function getAlreadyClaimedRewards(address account) external view returns (uint); function getContractRewardFunds() external view returns (uint); function getContractFeeFunds() external view returns (uint); function getAMMVolume(address account) external view returns (uint); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 onlyInitializing { __Context_init_unchained(); } function __Context_init_unchained() internal onlyInitializing { } 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.5.16; import "../interfaces/IPositionalMarket.sol"; interface IPositionalMarketManager { /* ========== VIEWS / VARIABLES ========== */ function durations() external view returns (uint expiryDuration, uint maxTimeToMaturity); function capitalRequirement() external view returns (uint); function marketCreationEnabled() external view returns (bool); function onlyAMMMintingAndBurning() external view returns (bool); function transformCollateral(uint value) external view returns (uint); function reverseTransformCollateral(uint value) external view returns (uint); function totalDeposited() external view returns (uint); function numActiveMarkets() external view returns (uint); function activeMarkets(uint index, uint pageSize) external view returns (address[] memory); function numMaturedMarkets() external view returns (uint); function maturedMarkets(uint index, uint pageSize) external view returns (address[] memory); function isActiveMarket(address candidate) external view returns (bool); function isKnownMarket(address candidate) external view returns (bool); function getThalesAMM() external view returns (address); /* ========== MUTATIVE FUNCTIONS ========== */ function createMarket( bytes32 oracleKey, uint strikePrice, uint maturity, uint initialMint // initial sUSD to mint options for, ) external returns (IPositionalMarket); function resolveMarket(address market) external; function expireMarkets(address[] calldata market) external; function transferSusdTo( address sender, address receiver, uint amount ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "./IPositionalMarket.sol"; interface IPosition { /* ========== VIEWS / VARIABLES ========== */ function getBalanceOf(address account) external view returns (uint); function getTotalSupply() external view returns (uint); function exerciseWithAmount(address claimant, uint amount) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IPriceFeed { // Structs struct RateAndUpdatedTime { uint216 rate; uint40 time; } // Mutative functions function addAggregator(bytes32 currencyKey, address aggregatorAddress) external; function removeAggregator(bytes32 currencyKey) external; // Views function rateForCurrency(bytes32 currencyKey) external view returns (uint); function rateAndUpdatedTime(bytes32 currencyKey) external view returns (uint rate, uint time); function getRates() external view returns (uint[] memory); function getCurrencies() external view returns (bytes32[] memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "../interfaces/IPositionalMarketManager.sol"; import "../interfaces/IPosition.sol"; import "../interfaces/IPriceFeed.sol"; interface IPositionalMarket { /* ========== TYPES ========== */ enum Phase { Trading, Maturity, Expiry } enum Side { Up, Down } /* ========== VIEWS / VARIABLES ========== */ function getOptions() external view returns (IPosition up, IPosition down); function times() external view returns (uint maturity, uint destructino); function getOracleDetails() external view returns ( bytes32 key, uint strikePrice, uint finalPrice ); function fees() external view returns (uint poolFee, uint creatorFee); function deposited() external view returns (uint); function creator() external view returns (address); function resolved() external view returns (bool); function phase() external view returns (Phase); function oraclePrice() external view returns (uint); function oraclePriceAndTimestamp() external view returns (uint price, uint updatedAt); function canResolve() external view returns (bool); function result() external view returns (Side); function balancesOf(address account) external view returns (uint up, uint down); function totalSupplies() external view returns (uint up, uint down); function getMaximumBurnable(address account) external view returns (uint amount); /* ========== MUTATIVE FUNCTIONS ========== */ function mint(uint value) external; function exerciseOptions() external returns (uint); function burnOptions(uint amount) external; function burnOptionsMaximum() external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "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":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxAllowedDeposit","type":"uint256"}],"name":"MaxAllowedDepositChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"MaxAllowedUsersChanged","type":"uint256"}],"name":"MaxAllowedUsersChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minAllowedDeposit","type":"uint256"}],"name":"MinAllowedDepositChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"roundPnL","type":"uint256"}],"name":"RoundClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"roundLength","type":"uint256"}],"name":"RoundLengthChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"allocationLimitsPerMarketPerRound","type":"uint256"}],"name":"SetAllocationLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"SetMinTradeAmount","type":"uint256"}],"name":"SetMinTradeAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"priceLowerLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceUpperLimit","type":"uint256"}],"name":"SetPriceLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sUSD","type":"address"}],"name":"SetSUSD","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int256","name":"skewImpact","type":"int256"}],"name":"SetSkewImpactLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"thalesAmm","type":"address"}],"name":"SportAMMChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"stakingThales","type":"address"}],"name":"StakingThalesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"market","type":"address"},{"indexed":false,"internalType":"enum ISportsAMM.Position","name":"position","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quote","type":"uint256"}],"name":"TradeExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"utilizationRate","type":"uint256"}],"name":"UtilizationRateChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"VaultStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"WithdrawalRequested","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allocationLimitsPerMarketPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allocationPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allocationSpentInARound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"allocationSpentPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"balancesPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canCloseCurrentRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"capPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closeRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundA","type":"uint256"},{"internalType":"uint256","name":"roundB","type":"uint256"}],"name":"cumulativePnLBetweenRounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cumulativeProfitAndLoss","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":[{"internalType":"address","name":"","type":"address"}],"name":"depositReceipts","outputs":[{"internalType":"uint256","name":"round","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"market","type":"address"}],"name":"getAvailableAllocationForMarket","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableToDeposit","outputs":[{"internalType":"uint256","name":"returned","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_round","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getBalancesPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentRoundEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initNonReentrant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"contract ISportsAMM","name":"_sportsAmm","type":"address"},{"internalType":"contract IERC20Upgradeable","name":"_sUSD","type":"address"},{"internalType":"uint256","name":"_roundLength","type":"uint256"},{"internalType":"uint256","name":"_priceLowerLimit","type":"uint256"},{"internalType":"uint256","name":"_priceUpperLimit","type":"uint256"},{"internalType":"int256","name":"_skewImpactLimit","type":"int256"},{"internalType":"uint256","name":"_allocationLimitsPerMarketPerRound","type":"uint256"},{"internalType":"uint256","name":"_maxAllowedDeposit","type":"uint256"},{"internalType":"uint256","name":"_utilizationRate","type":"uint256"},{"internalType":"uint256","name":"_minDepositAmount","type":"uint256"},{"internalType":"uint256","name":"_maxAllowedUsers","type":"uint256"},{"internalType":"uint256","name":"_minTradeAmount","type":"uint256"}],"internalType":"struct SportVault.InitParams","name":"params","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"isTradingMarketInARound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAllowedDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAllowedUsers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTradeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceLowerLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceUpperLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"profitAndLossPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"round","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sUSD","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocationLimitsPerMarketPerRound","type":"uint256"}],"name":"setAllocationLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxAllowedDeposit","type":"uint256"}],"name":"setMaxAllowedDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxAllowedUsers","type":"uint256"}],"name":"setMaxAllowedUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minDepositAmount","type":"uint256"}],"name":"setMinAllowedDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minTradeAmount","type":"uint256"}],"name":"setMinTradeAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceLowerLimit","type":"uint256"},{"internalType":"uint256","name":"_priceUpperLimit","type":"uint256"}],"name":"setPriceLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundLength","type":"uint256"}],"name":"setRoundLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"_skewImpactLimit","type":"int256"}],"name":"setSkewImpactLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISportsAMM","name":"_sportAMM","type":"address"}],"name":"setSportAmm","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IStakingThales","name":"_stakingThales","type":"address"}],"name":"setStakingThales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_utilizationRate","type":"uint256"}],"name":"setUtilizationRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"skewImpactLimit","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sportsAMM","outputs":[{"internalType":"contract ISportsAMM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingThales","outputs":[{"internalType":"contract IStakingThales","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"market","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum ISportsAMM.Position","name":"position","type":"uint8"}],"name":"trade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tradingAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"tradingMarketPositionPerRound","outputs":[{"internalType":"enum ISportsAMM.Position","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tradingMarketsPerRound","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usersCurrentlyInVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"usersPerRound","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"utilizationRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawalRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawalRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50613922806100206000396000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c806371bb4b47116101ff578063c99252881161011a578063e278fe6f116100ad578063e76a02791161007c578063e76a0279146108bc578063ebc79772146108cf578063ee161cce146108d7578063fd8a8cc6146108df57600080fd5b8063e278fe6f14610878578063e45b2e8814610880578063e48a694b14610893578063e75c93d9146108b357600080fd5b8063db7f92d4116100e9578063db7f92d414610841578063dd636bc714610854578063dda9046f1461085c578063ddcc8fe91461086557600080fd5b8063c9925288146107f9578063c9f4ff4614610811578063cee73a7614610824578063d27c07971461083857600080fd5b8063942f535711610192578063b6b55f2511610161578063b6b55f25146107aa578063be805e3c146107bd578063c137a60f146107c6578063c3b83f5f146107e657600080fd5b8063942f53571461072857806395ba9a7014610763578063a250badb1461078e578063a9050d4d146107a157600080fd5b806387117630116101ce57806387117630146106e05780638b649b94146106f35780638da5cb5b146106fc5780639324cac71461071557600080fd5b806371bb4b471461069d57806374094edd146106a557806379ba5097146106c55780637f852582146106cd57600080fd5b8063384e631c116102ef5780635ddd3e83116102825780636719b2ee116102515780636719b2ee14610617578063681312f5146106535780636c321c8a1461066657806371143ab91461066f57600080fd5b80635ddd3e83146105ac578063610589e1146105d7578063634e0d97146105e0578063645006ca1461060e57600080fd5b806353a47bb7116102be57806353a47bb71461057357806356991791146105865780635c975abb146105995780635d1c236d146105a457600080fd5b8063384e631c1461052457806340774ff614610537578063456ff7881461054a5780634ae7937f1461055357600080fd5b8063202ffce811610367578063322ce77a11610336578063322ce77a146104d5578063336d30ed146104de578063343e4f9f146104fe578063370faeb01461051157600080fd5b8063202ffce81461048757806325a663951461049a5780632ef04761146104ba578063311c56df146104cd57600080fd5b8063146ca531116103a3578063146ca531146104305780631627540c146104395780631daae1731461044c5780631e9224601461047f57600080fd5b806306d1fb3c146103ca578063082f9fd4146103f057806313af40351461041b575b600080fd5b6103dd6103d83660046135dc565b6108f2565b6040519081526020015b60405180910390f35b6104036103fe36600461360b565b61091c565b6040516001600160a01b0390911681526020016103e7565b61042e610429366004613514565b610954565b005b6103dd60695481565b61042e610447366004613514565b610a94565b61046f61045a366004613514565b606f6020526000908152604090205460ff1681565b60405190151581526020016103e7565b6103dd610aea565b61042e610495366004613594565b610b24565b6103dd6104a8366004613594565b60796020526000908152604090205481565b61042e6104c8366004613594565b610b61565b61042e610b9e565b6103dd607c5481565b6103dd6104ec366004613594565b60766020526000908152604090205481565b61040361050c36600461360b565b610e90565b61042e61051f36600461360b565b610eac565b61042e6105323660046135c4565b610f4a565b61042e610545366004613594565b61107f565b6103dd60815481565b6103dd610561366004613594565b60716020526000908152604090205481565b600154610403906001600160a01b031681565b61042e610594366004613530565b6110bc565b60345460ff1661046f565b61042e61153f565b6103dd6105ba3660046135dc565b606e60209081526000928352604080842090915290825290205481565b6103dd607b5481565b61046f6105ee3660046135dc565b606d60209081526000928352604080842090915290825290205460ff1681565b6103dd607a5481565b61063e610625366004613514565b6070602052600090815260409020805460019091015482565b604080519283526020830191909152016103e7565b61042e610661366004613594565b611658565b6103dd60785481565b61046f61067d3660046135dc565b607460209081526000928352604080842090915290825290205460ff1681565b6103dd611695565b6103dd6106b3366004613594565b60756020526000908152604090205481565b61042e6116b5565b61042e6106db366004613514565b6117b2565b61042e6106ee366004613594565b611808565b6103dd606a5481565b600054610403906201000090046001600160a01b031681565b606854610403906001600160a01b031681565b6107566107363660046135dc565b607360209081526000928352604080842090915290825290205460ff1681565b6040516103e7919061376a565b6103dd6107713660046135dc565b607e60209081526000928352604080842090915290825290205481565b6103dd61079c366004613514565b61189d565b6103dd607d5481565b61042e6107b8366004613594565b61195d565b6103dd60805481565b6103dd6107d4366004613594565b606b6020526000908152604090205481565b61042e6107f4366004613514565b611d7f565b6067546104039061010090046001600160a01b031681565b6103dd61081f36600461360b565b611e98565b60685461046f90600160a01b900460ff1681565b6103dd60775481565b61042e61084f366004613594565b611ed8565b6103dd611f15565b6103dd60825481565b61042e610873366004613594565b611f74565b61042e611fb1565b61042e61088e366004613514565b6126f6565b6103dd6108a1366004613594565b60846020526000908152604090205481565b6103dd607f5481565b61042e6108ca366004613594565b6127e0565b61042e61281d565b61046f61287b565b608354610403906001600160a01b031681565b6000828152606e602090815260408083206001600160a01b03851684529091529020545b92915050565b6072602052816000526040600020818154811061093857600080fd5b6000918252602090912001546001600160a01b03169150829050565b6001600160a01b0381166109af5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff1615610a1b5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b60648201526084016109a6565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610a9c612a31565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610a89565b6078546069546000908152607160205260408120549091670de0b6b3a764000091610b159190613844565b610b1f9190613824565b905090565b610b2c612a31565b607b8190556040518181527fe7c2c09f66c8b970b4a99250f4d0844e1496b9d51d4760a17b0134ddd52023e190602001610a89565b610b69612a31565b60818190556040518181527f137f353e194da87258fd6c2b78eb1cfb9f2ce996f3466729d2464eccb7ce612990602001610a89565b600160666000828254610bb1919061380c565b909155505060665460345460ff1615610bdc5760405162461bcd60e51b81526004016109a6906137ab565b606854600160a01b900460ff16610c2d5760405162461bcd60e51b815260206004820152601560248201527415985d5b1d081a185cc81b9bdd081cdd185c9d1959605a1b60448201526064016109a6565b336000908152606f602052604090205460ff1615610c8d5760405162461bcd60e51b815260206004820152601c60248201527f5769746864726177616c20616c7265616479207265717565737465640000000060448201526064016109a6565b6069546000908152606e60209081526040808320338452909152902054610cec5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064016109a6565b606e60006069546001610cff919061380c565b81526020808201929092526040908101600090812033825290925290205415610d895760405162461bcd60e51b815260206004820152603660248201527f43616e277420776974686472617720617320796f7520616c72656164792064656044820152751c1bdcda5d195908199bdc881b995e1d081c9bdd5b9960521b60648201526084016109a6565b60006069546001610d9a919061380c565b6069546000908152606e602090815260408083203384528252808320548484526079909252909120549192501015610e0a576069546000908152606e6020908152604080832033845282528083205484845260799092528220805491929091610e04908490613863565b90915550505b6001607c54610e199190613863565b607c55336000818152606f6020908152604091829020805460ff1916600117905590519182527fe5892ff2a8b08efb903ffbba1f0514c1d3e22eea34dd5b89cf30aabce03dde5a91015b60405180910390a1506066548114610e8d5760405162461bcd60e51b81526004016109a6906137d5565b50565b606c602052816000526040600020818154811061093857600080fd5b610eb4612a31565b808210610f035760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964207072696365206c696d69742076616c75657300000000000060448201526064016109a6565b607f829055608081905560408051838152602081018390527f34b23d671026520e294c1060acc36120677e8c9bd073a8f6577a6f241785b1a6910160405180910390a15050565b600054610100900460ff16610f655760005460ff1615610f69565b303b155b610fcc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109a6565b600054610100900460ff16158015610fee576000805461ffff19166101011790555b611040610ffe6020840184613514565b61100e6040850160208601613514565b61101e6060860160408701613514565b8560600135866101000135876101200135886101400135896101600135612aab565b608080830135607f5560a0830135905560c082013560815560e0820135607d55610180820135608255801561107b576000805461ff00191690555b5050565b611087612a31565b60788190556040518181527fc117ccf765672707ebe3c1606037488c1e27dc1f42b5266e3d6b496db7d4209e90602001610a89565b6001606660008282546110cf919061380c565b909155505060665460345460ff16156110fa5760405162461bcd60e51b81526004016109a6906137ab565b606854600160a01b900460ff1661114b5760405162461bcd60e51b815260206004820152601560248201527415985d5b1d081a185cc81b9bdd081cdd185c9d1959605a1b60448201526064016109a6565b60825483101561119d5760405162461bcd60e51b815260206004820152601860248201527f416d6f756e74206c657373207468616e206d696e696d756d000000000000000060448201526064016109a6565b60008490506000816001600160a01b0316639e3b34bf6040518163ffffffff1660e01b8152600401604080518083038186803b1580156111dc57600080fd5b505afa1580156111f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611214919061362c565b50606a546069546000908152606b60205260409020549192506112369161380c565b811061127c5760405162461bcd60e51b815260206004820152601560248201527413585c9ad95d081d1a5b59481b9bdd081d985b1a59605a1b60448201526064016109a6565b6067546040516350d851a160e01b815260009161010090046001600160a01b0316906350d851a1906112b4908a9089906004016136ba565b60206040518083038186803b1580156112cc57600080fd5b505afa1580156112e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130491906135ac565b90506000811161134e5760405162461bcd60e51b815260206004820152601560248201527405072696365206e6f74206d6f7265207468616e203605c1b60448201526064016109a6565b606754604051632fd1b02d60e21b815260009161010090046001600160a01b03169063bf46c0b490611388908b908a908c906004016136d7565b60206040518083038186803b1580156113a057600080fd5b505afa1580156113b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d891906135ac565b9050607f5482101580156113ee57506080548211155b6114335760405162461bcd60e51b815260206004820152601660248201527513585c9ad95d081c1c9a58d9481b9bdd081d985b1a5960521b60448201526064016109a6565b608154811261147b5760405162461bcd60e51b81526020600482015260146024820152730a6d6caee40d2dae0c2c6e840e8dede40d0d2ced60631b60448201526064016109a6565b611486888789612c05565b60695460009081526074602090815260408083206001600160a01b038c16845290915290205460ff16611514576069805460009081526072602090815260408083208054600180820183559185528385200180546001600160a01b0319166001600160a01b038f169081179091559454845260748352818420948452939091529020805460ff191690911790555b5050505060665481146115395760405162461bcd60e51b81526004016109a6906137d5565b50505050565b611547612a31565b606854600160a01b900460ff16156115a15760405162461bcd60e51b815260206004820152601960248201527f5661756c742068617320616c726561647920737461727465640000000000000060448201526064016109a6565b6001606955427fa775687211c2b3346a0f5a2a0e7590e6c1838453e3785e6dd2a8efd6265ddf15556068805460ff60a01b1916600160a01b17905560796020527fdf6d6ad01a16c6118cfd605fcb55ad218b43517981ef4cc6d63a492cf34990d954600260009081527f7d4d2b02426547888e9185e69135196c4ed1edbc114060100a6ef94f8b5f60df919091556040517f59760ad83ef06d1a0bc439d8b39a42a870493f0cd3bc3d53bbd3e7c6991f494f9190a1565b611660612a31565b606a8190556040518181527f1d1fb7111c3779798bd4aefb2daea07ee8257a13c7eaceba89b4b1ccd405050d90602001610a89565b606a546069546000908152606b60205260408120549091610b1f9161380c565b6001546001600160a01b0316331461172d5760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b60648201526084016109a6565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6117ba612a31565b608380546001600160a01b0319166001600160a01b0383169081179091556040519081527f3c7faa500efbd341aedbf1ee7ebd52ea36d226dda76bc01dd39b43d46f55b8d390602001610a89565b611810612a31565b68056bc75e2d6310000081106118685760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420616c6c6f636174696f6e206c696d69742076616c7565730060448201526064016109a6565b607d8190556040518181527f9fb019ef2cdd86e0c7772694b935b2fd45131410802474ef0a8bf0afff94a40390602001610a89565b60008068056bc75e2d63100000607d546118b5610aea565b6118bf9190613844565b6118c99190613824565b6069546000908152607e602090815260408083206001600160a01b0388168452909152812054919250906118fd9083613863565b60695460009081526084602052604090205490915061191a610aea565b6119249190613863565b811061195357606954600090815260846020526040902054611944610aea565b61194e9190613863565b611955565b805b949350505050565b336000908152606f6020526040902054819060ff16156119cf5760405162461bcd60e51b815260206004820152602760248201527f5769746864726177616c206973207265717565737465642c2063616e6e6f742060448201526619195c1bdcda5d60ca1b60648201526084016109a6565b607a54811015611a125760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016109a6565b60775481607960006069546001611a29919061380c565b815260200190815260200160002054611a42919061380c565b1115611a905760405162461bcd60e51b815260206004820181905260248201527f4465706f73697420616d6f756e742065786365656473207661756c742063617060448201526064016109a6565b600160666000828254611aa3919061380c565b909155505060665460345460ff1615611ace5760405162461bcd60e51b81526004016109a6906137ab565b606854611ae6906001600160a01b031633308661303f565b60006069546001611af7919061380c565b6069546000908152606e60209081526040808320338452909152902054909150158015611b3b57506000818152606e60209081526040808320338452909152902054155b15611bf457607b54607c5410611b935760405162461bcd60e51b815260206004820152601b60248201527f4d617820616d6f756e74206f662075736572732072656163686564000000000060448201526064016109a6565b6000818152606c602090815260408083208054600181810183559185528385200180546001600160a01b03191633908117909155858552606d8452828520908552909252909120805460ff191682179055607c54611bf09161380c565b607c555b6000818152606e6020908152604080832033845290915281208054869290611c1d90849061380c565b90915550506040805180820182528281526000838152606e6020908152838220338084529082528483205482850190815290835260708252848320935184555160019093019290925583815260719091529081208054869290611c8190849061380c565b909155505060008181526079602052604081208054869290611ca490849061380c565b90915550506083546001600160a01b031615611d1f576083546040516302c7739b60e01b8152336004820152602481018690526001600160a01b03909116906302c7739b90604401600060405180830381600087803b158015611d0657600080fd5b505af1158015611d1a573d6000803e3d6000fd5b505050505b60408051338152602081018690527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4910160405180910390a1506066548114611d7a5760405162461bcd60e51b81526004016109a6906137d5565b505050565b611d87612a31565b6001600160a01b038116611dcf5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016109a6565b600154600160a81b900460ff1615611e1f5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b60448201526064016109a6565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610a89565b6000828152607660208181526040808420546075835281852054868652939092528320549091611ec791613844565b611ed19190613824565b9392505050565b611ee0612a31565b607a8190556040518181527f990717cc219e5348c1b88bb0ff530d804f0b6f54f3b03844a2bfbe4eb1e9c5d690602001610a89565b6000607754607960006069546001611f2d919061380c565b8152602001908152602001600020541015611f7157607960006069546001611f55919061380c565b815260200190815260200160002054607754610b1f9190613863565b90565b611f7c612a31565b60778190556040518181527f8c43aa02599ac8f8bab4724621ceea5e7a06b07bbbfaf3b7bd0386cbe481ea3c90602001610a89565b600160666000828254611fc4919061380c565b909155505060665460345460ff1615611fef5760405162461bcd60e51b81526004016109a6906137ab565b611ff761287b565b6120435760405162461bcd60e51b815260206004820152601960248201527f43616e277420636c6f73652063757272656e7420726f756e640000000000000060448201526064016109a6565b61204b6130aa565b6000607160006069546001612060919061380c565b8152602081019190915260409081016000205460685491516370a0823160e01b815230600482015290916001600160a01b0316906370a082319060240160206040518083038186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ed91906135ac565b6120f79190613863565b60695460009081526071602052604090205490915061212a5760695460009081526075602052604090206001905561216b565b60695460009081526071602052604090205461214e670de0b6b3a764000083613844565b6121589190613824565b6069546000908152607560205260409020555b60005b6069546000908152606c6020526040902054811015612511576069546000908152606c602052604081208054839081106121b857634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154606954835260758252604080842054606e84528185206001600160a01b0390931680865292909352832054909350670de0b6b3a76400009161220791613844565b6122119190613824565b6069546000908152606d602090815260408083206001600160a01b038716845290915290205490915060ff16156124fc576001600160a01b0382166000908152606f602052604090205460ff1661240c5780606e60006069546001612276919061380c565b81526020019081526020016000206000846001600160a01b03166001600160a01b03168152602001908152602001600020546122b2919061380c565b606e600060695460016122c5919061380c565b81526020019081526020016000206000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506001606d6000606954600161230f919061380c565b8152602080820192909252604090810160009081206001600160a01b03871682529092528120805460ff191692151592909217909155606954606c919061235790600161380c565b8152602080820192909252604001600090812080546001810182559082529190200180546001600160a01b0319166001600160a01b03848116919091179091556083541615612407576083546040516302c7739b60e01b81526001600160a01b03848116600483015260248201849052909116906302c7739b90604401600060405180830381600087803b1580156123ee57600080fd5b505af1158015612402573d6000803e3d6000fd5b505050505b6124fc565b6000606e60006069546001612421919061380c565b8152602080820192909252604090810160009081206001600160a01b0380881683529352209190915560685461245991168383613307565b6001600160a01b0382166000908152606f60205260408120805460ff19169055606954606d90829061248c90600161380c565b8152602080820192909252604090810160009081206001600160a01b03871680835290845290829020805460ff19169415159490941790935580519283529082018390527fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a910160405180910390a15b50508080612509906138a6565b91505061216e565b5060695460011415612540576069546000908152607560209081526040808320546076909252909120556125a3565b606954600081815260756020526040812054670de0b6b3a764000092909160769161256d90600190613863565b8152602001908152602001600020546125869190613844565b6125909190613824565b6069546000908152607660205260409020555b6001606960008282546125b6919061380c565b90915550506069546000908152606b60205260409081902042905560685490516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561261357600080fd5b505afa158015612627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264b91906135ac565b6069805460009081526071602052604080822093909355905480825291812054916079919061267b90600161380c565b8152602001908152602001600020819055507fc67dda8e11f1aa941c7e74466b1859a07a32f46aaf641d29b83be348424d93cd60016069546126bd9190613863565b6075600060016069546126d09190613863565b815260200190815260200160002054604051610e63929190918252602082015260400190565b6126fe612a31565b60678054610100600160a81b0319166101006001600160a01b038481168202929092179283905560685460405163095ea7b360e01b81529190930482166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b15801561276e57600080fd5b505af1158015612782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a69190613574565b506040516001600160a01b03821681527f576297e5fcc8cd907ee80b240284865eb3d821bdc5232e6ee9e4d78a12531c0990602001610a89565b6127e8612a31565b60828190556040518181527f26ea09cdab135064e784e44516fc5b3d619360d241ae64bff47153b2e5ee610e90602001610a89565b60675460ff16156128665760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016109a6565b6067805460ff19166001908117909155606655565b606854600090600160a01b900460ff1615806128b45750606a546069546000908152606b60205260409020546128b1919061380c565b42105b156128bf5750600090565b60005b606954600090815260726020526040902054811015612a2957606954600090815260726020526040812080548390811061290c57634e487b7160e01b600052603260045260246000fd5b6000918252602091829020015460408051633f6fa65560e01b815290516001600160a01b0390921693508392633f6fa65592600480840193829003018186803b15801561295857600080fd5b505afa15801561296c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129909190613574565b1580612a085750806001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156129d057600080fd5b505afa1580156129e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a089190613574565b15612a165760009250505090565b5080612a21816138a6565b9150506128c2565b506001905090565b6000546201000090046001600160a01b03163314612aa95760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b60648201526084016109a6565b565b600054610100900460ff16612b165760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a6565b612b1f88610954565b612b2761281d565b60678054610100600160a81b0319166101006001600160a01b038a811682029290921792839055606880546001600160a01b0319168a8416908117909155606a89905560778890556078879055607a869055607b85905560405163095ea7b360e01b8152919093049091166004820152600019602482015263095ea7b390604401602060405180830381600087803b158015612bc257600080fd5b505af1158015612bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bfa9190613574565b505050505050505050565b60675460405163270e13ef60e01b815260009161010090046001600160a01b03169063270e13ef90612c3f908790879087906004016136d7565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f91906135ac565b606954600090815260846020526040902054909150612cac610aea565b612cb69190613863565b8110612d105760405162461bcd60e51b815260206004820152602360248201527f416d6f756e74206578636565647320617661696c61626c6520616c6c6f63617460448201526234b7b760e91b60648201526084016109a6565b600068056bc75e2d63100000607d54612d27610aea565b612d319190613844565b612d3b9190613824565b6069546000908152607e602090815260408083206001600160a01b038a1684529091529020549091508190612d70908461380c565b10612dd35760405162461bcd60e51b815260206004820152602d60248201527f416d6f756e74206578636565647320617661696c61626c6520616c6c6f63617460448201526c1a5bdb88199bdc88185cdcd95d609a1b60648201526084016109a6565b6068546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612e1757600080fd5b505afa158015612e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e4f91906135ac565b60675460405163221d7ae160e21b815291925061010090046001600160a01b031690638875eb8490612e8e908990899089908990600090600401613731565b600060405180830381600087803b158015612ea857600080fd5b505af1158015612ebc573d6000803e3d6000fd5b50506068546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a082319060240160206040518083038186803b158015612f0657600080fd5b505afa158015612f1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3e91906135ac565b9050836084600060695481526020019081526020016000206000828254612f65919061380c565b90915550506069546000908152607e602090815260408083206001600160a01b038b16845290915281208054869290612f9f90849061380c565b909155505060695460009081526073602090815260408083206001600160a01b038b1684529091529020805487919060ff19166001836002811115612ff457634e487b7160e01b600052602160045260246000fd5b02179055507fd1fc86fd7e2808fb6a4d745c0f26983bd36784721df1e29a27a28ce3fcdc74168787878760405161302e9493929190613702565b60405180910390a150505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115399085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613337565b6000805b60695460009081526072602052604090205481101561107b5760695460009081526072602052604090208054829081106130f857634e487b7160e01b600052603260045260246000fd5b6000918252602091829020015460408051635c975abb60e01b815290516001600160a01b0390921694508492635c975abb92600480840193829003018186803b15801561314457600080fd5b505afa158015613158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061317c9190613574565b1580156131f55750816001600160a01b0316633f6fa6556040518163ffffffff1660e01b815260040160206040518083038186803b1580156131bd57600080fd5b505afa1580156131d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131f59190613574565b156132f557604051636392a51f60e01b8152306004820152600090819081906001600160a01b03861690636392a51f9060240160606040518083038186803b15801561324057600080fd5b505afa158015613254573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613278919061364f565b925092509250600083118061328d5750600082115b806132985750600081115b156132f157846001600160a01b031663851492586040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156132d857600080fd5b505af11580156132ec573d6000803e3d6000fd5b505050505b5050505b806132ff816138a6565b9150506130ae565b6040516001600160a01b038316602482015260448101829052611d7a90849063a9059cbb60e01b90606401613073565b600061338c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134099092919063ffffffff16565b805190915015611d7a57808060200190518101906133aa9190613574565b611d7a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109a6565b6060611955848460008585843b6134625760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a6565b600080866001600160a01b0316858760405161347e919061369e565b60006040518083038185875af1925050503d80600081146134bb576040519150601f19603f3d011682016040523d82523d6000602084013e6134c0565b606091505b50915091506134d08282866134db565b979650505050505050565b606083156134ea575081611ed1565b8251156134fa5782518084602001fd5b8160405162461bcd60e51b81526004016109a69190613778565b600060208284031215613525578081fd5b8135611ed1816138d7565b600080600060608486031215613544578182fd5b833561354f816138d7565b925060208401359150604084013560038110613569578182fd5b809150509250925092565b600060208284031215613585578081fd5b81518015158114611ed1578182fd5b6000602082840312156135a5578081fd5b5035919050565b6000602082840312156135bd578081fd5b5051919050565b60006101a082840312156135d6578081fd5b50919050565b600080604083850312156135ee578182fd5b823591506020830135613600816138d7565b809150509250929050565b6000806040838503121561361d578182fd5b50508035926020909101359150565b6000806040838503121561363e578182fd5b505080516020909101519092909150565b600080600060608486031215613663578283fd5b8351925060208401519150604084015190509250925092565b6003811061369a57634e487b7160e01b600052602160045260246000fd5b9052565b600082516136b081846020870161387a565b9190910192915050565b6001600160a01b038316815260408101611ed1602083018461367c565b6001600160a01b0384168152606081016136f4602083018561367c565b826040830152949350505050565b6001600160a01b03851681526080810161371f602083018661367c565b60408201939093526060015292915050565b6001600160a01b038616815260a0810161374e602083018761367c565b8460408301528360608301528260808301529695505050505050565b60208101610916828461367c565b602081526000825180602084015261379781604085016020870161387a565b601f01601f19169190910160400192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561381f5761381f6138c1565b500190565b60008261383f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561385e5761385e6138c1565b500290565b600082821015613875576138756138c1565b500390565b60005b8381101561389557818101518382015260200161387d565b838111156115395750506000910152565b60006000198214156138ba576138ba6138c1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610e8d57600080fdfea264697066735822122051548f5aa5157bf20022006b0c4235ea8b0e8cae79502a058267d823daae356b64736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103c55760003560e01c806371bb4b47116101ff578063c99252881161011a578063e278fe6f116100ad578063e76a02791161007c578063e76a0279146108bc578063ebc79772146108cf578063ee161cce146108d7578063fd8a8cc6146108df57600080fd5b8063e278fe6f14610878578063e45b2e8814610880578063e48a694b14610893578063e75c93d9146108b357600080fd5b8063db7f92d4116100e9578063db7f92d414610841578063dd636bc714610854578063dda9046f1461085c578063ddcc8fe91461086557600080fd5b8063c9925288146107f9578063c9f4ff4614610811578063cee73a7614610824578063d27c07971461083857600080fd5b8063942f535711610192578063b6b55f2511610161578063b6b55f25146107aa578063be805e3c146107bd578063c137a60f146107c6578063c3b83f5f146107e657600080fd5b8063942f53571461072857806395ba9a7014610763578063a250badb1461078e578063a9050d4d146107a157600080fd5b806387117630116101ce57806387117630146106e05780638b649b94146106f35780638da5cb5b146106fc5780639324cac71461071557600080fd5b806371bb4b471461069d57806374094edd146106a557806379ba5097146106c55780637f852582146106cd57600080fd5b8063384e631c116102ef5780635ddd3e83116102825780636719b2ee116102515780636719b2ee14610617578063681312f5146106535780636c321c8a1461066657806371143ab91461066f57600080fd5b80635ddd3e83146105ac578063610589e1146105d7578063634e0d97146105e0578063645006ca1461060e57600080fd5b806353a47bb7116102be57806353a47bb71461057357806356991791146105865780635c975abb146105995780635d1c236d146105a457600080fd5b8063384e631c1461052457806340774ff614610537578063456ff7881461054a5780634ae7937f1461055357600080fd5b8063202ffce811610367578063322ce77a11610336578063322ce77a146104d5578063336d30ed146104de578063343e4f9f146104fe578063370faeb01461051157600080fd5b8063202ffce81461048757806325a663951461049a5780632ef04761146104ba578063311c56df146104cd57600080fd5b8063146ca531116103a3578063146ca531146104305780631627540c146104395780631daae1731461044c5780631e9224601461047f57600080fd5b806306d1fb3c146103ca578063082f9fd4146103f057806313af40351461041b575b600080fd5b6103dd6103d83660046135dc565b6108f2565b6040519081526020015b60405180910390f35b6104036103fe36600461360b565b61091c565b6040516001600160a01b0390911681526020016103e7565b61042e610429366004613514565b610954565b005b6103dd60695481565b61042e610447366004613514565b610a94565b61046f61045a366004613514565b606f6020526000908152604090205460ff1681565b60405190151581526020016103e7565b6103dd610aea565b61042e610495366004613594565b610b24565b6103dd6104a8366004613594565b60796020526000908152604090205481565b61042e6104c8366004613594565b610b61565b61042e610b9e565b6103dd607c5481565b6103dd6104ec366004613594565b60766020526000908152604090205481565b61040361050c36600461360b565b610e90565b61042e61051f36600461360b565b610eac565b61042e6105323660046135c4565b610f4a565b61042e610545366004613594565b61107f565b6103dd60815481565b6103dd610561366004613594565b60716020526000908152604090205481565b600154610403906001600160a01b031681565b61042e610594366004613530565b6110bc565b60345460ff1661046f565b61042e61153f565b6103dd6105ba3660046135dc565b606e60209081526000928352604080842090915290825290205481565b6103dd607b5481565b61046f6105ee3660046135dc565b606d60209081526000928352604080842090915290825290205460ff1681565b6103dd607a5481565b61063e610625366004613514565b6070602052600090815260409020805460019091015482565b604080519283526020830191909152016103e7565b61042e610661366004613594565b611658565b6103dd60785481565b61046f61067d3660046135dc565b607460209081526000928352604080842090915290825290205460ff1681565b6103dd611695565b6103dd6106b3366004613594565b60756020526000908152604090205481565b61042e6116b5565b61042e6106db366004613514565b6117b2565b61042e6106ee366004613594565b611808565b6103dd606a5481565b600054610403906201000090046001600160a01b031681565b606854610403906001600160a01b031681565b6107566107363660046135dc565b607360209081526000928352604080842090915290825290205460ff1681565b6040516103e7919061376a565b6103dd6107713660046135dc565b607e60209081526000928352604080842090915290825290205481565b6103dd61079c366004613514565b61189d565b6103dd607d5481565b61042e6107b8366004613594565b61195d565b6103dd60805481565b6103dd6107d4366004613594565b606b6020526000908152604090205481565b61042e6107f4366004613514565b611d7f565b6067546104039061010090046001600160a01b031681565b6103dd61081f36600461360b565b611e98565b60685461046f90600160a01b900460ff1681565b6103dd60775481565b61042e61084f366004613594565b611ed8565b6103dd611f15565b6103dd60825481565b61042e610873366004613594565b611f74565b61042e611fb1565b61042e61088e366004613514565b6126f6565b6103dd6108a1366004613594565b60846020526000908152604090205481565b6103dd607f5481565b61042e6108ca366004613594565b6127e0565b61042e61281d565b61046f61287b565b608354610403906001600160a01b031681565b6000828152606e602090815260408083206001600160a01b03851684529091529020545b92915050565b6072602052816000526040600020818154811061093857600080fd5b6000918252602090912001546001600160a01b03169150829050565b6001600160a01b0381166109af5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff1615610a1b5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b60648201526084016109a6565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610a9c612a31565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610a89565b6078546069546000908152607160205260408120549091670de0b6b3a764000091610b159190613844565b610b1f9190613824565b905090565b610b2c612a31565b607b8190556040518181527fe7c2c09f66c8b970b4a99250f4d0844e1496b9d51d4760a17b0134ddd52023e190602001610a89565b610b69612a31565b60818190556040518181527f137f353e194da87258fd6c2b78eb1cfb9f2ce996f3466729d2464eccb7ce612990602001610a89565b600160666000828254610bb1919061380c565b909155505060665460345460ff1615610bdc5760405162461bcd60e51b81526004016109a6906137ab565b606854600160a01b900460ff16610c2d5760405162461bcd60e51b815260206004820152601560248201527415985d5b1d081a185cc81b9bdd081cdd185c9d1959605a1b60448201526064016109a6565b336000908152606f602052604090205460ff1615610c8d5760405162461bcd60e51b815260206004820152601c60248201527f5769746864726177616c20616c7265616479207265717565737465640000000060448201526064016109a6565b6069546000908152606e60209081526040808320338452909152902054610cec5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064016109a6565b606e60006069546001610cff919061380c565b81526020808201929092526040908101600090812033825290925290205415610d895760405162461bcd60e51b815260206004820152603660248201527f43616e277420776974686472617720617320796f7520616c72656164792064656044820152751c1bdcda5d195908199bdc881b995e1d081c9bdd5b9960521b60648201526084016109a6565b60006069546001610d9a919061380c565b6069546000908152606e602090815260408083203384528252808320548484526079909252909120549192501015610e0a576069546000908152606e6020908152604080832033845282528083205484845260799092528220805491929091610e04908490613863565b90915550505b6001607c54610e199190613863565b607c55336000818152606f6020908152604091829020805460ff1916600117905590519182527fe5892ff2a8b08efb903ffbba1f0514c1d3e22eea34dd5b89cf30aabce03dde5a91015b60405180910390a1506066548114610e8d5760405162461bcd60e51b81526004016109a6906137d5565b50565b606c602052816000526040600020818154811061093857600080fd5b610eb4612a31565b808210610f035760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964207072696365206c696d69742076616c75657300000000000060448201526064016109a6565b607f829055608081905560408051838152602081018390527f34b23d671026520e294c1060acc36120677e8c9bd073a8f6577a6f241785b1a6910160405180910390a15050565b600054610100900460ff16610f655760005460ff1615610f69565b303b155b610fcc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109a6565b600054610100900460ff16158015610fee576000805461ffff19166101011790555b611040610ffe6020840184613514565b61100e6040850160208601613514565b61101e6060860160408701613514565b8560600135866101000135876101200135886101400135896101600135612aab565b608080830135607f5560a0830135905560c082013560815560e0820135607d55610180820135608255801561107b576000805461ff00191690555b5050565b611087612a31565b60788190556040518181527fc117ccf765672707ebe3c1606037488c1e27dc1f42b5266e3d6b496db7d4209e90602001610a89565b6001606660008282546110cf919061380c565b909155505060665460345460ff16156110fa5760405162461bcd60e51b81526004016109a6906137ab565b606854600160a01b900460ff1661114b5760405162461bcd60e51b815260206004820152601560248201527415985d5b1d081a185cc81b9bdd081cdd185c9d1959605a1b60448201526064016109a6565b60825483101561119d5760405162461bcd60e51b815260206004820152601860248201527f416d6f756e74206c657373207468616e206d696e696d756d000000000000000060448201526064016109a6565b60008490506000816001600160a01b0316639e3b34bf6040518163ffffffff1660e01b8152600401604080518083038186803b1580156111dc57600080fd5b505afa1580156111f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611214919061362c565b50606a546069546000908152606b60205260409020549192506112369161380c565b811061127c5760405162461bcd60e51b815260206004820152601560248201527413585c9ad95d081d1a5b59481b9bdd081d985b1a59605a1b60448201526064016109a6565b6067546040516350d851a160e01b815260009161010090046001600160a01b0316906350d851a1906112b4908a9089906004016136ba565b60206040518083038186803b1580156112cc57600080fd5b505afa1580156112e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130491906135ac565b90506000811161134e5760405162461bcd60e51b815260206004820152601560248201527405072696365206e6f74206d6f7265207468616e203605c1b60448201526064016109a6565b606754604051632fd1b02d60e21b815260009161010090046001600160a01b03169063bf46c0b490611388908b908a908c906004016136d7565b60206040518083038186803b1580156113a057600080fd5b505afa1580156113b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d891906135ac565b9050607f5482101580156113ee57506080548211155b6114335760405162461bcd60e51b815260206004820152601660248201527513585c9ad95d081c1c9a58d9481b9bdd081d985b1a5960521b60448201526064016109a6565b608154811261147b5760405162461bcd60e51b81526020600482015260146024820152730a6d6caee40d2dae0c2c6e840e8dede40d0d2ced60631b60448201526064016109a6565b611486888789612c05565b60695460009081526074602090815260408083206001600160a01b038c16845290915290205460ff16611514576069805460009081526072602090815260408083208054600180820183559185528385200180546001600160a01b0319166001600160a01b038f169081179091559454845260748352818420948452939091529020805460ff191690911790555b5050505060665481146115395760405162461bcd60e51b81526004016109a6906137d5565b50505050565b611547612a31565b606854600160a01b900460ff16156115a15760405162461bcd60e51b815260206004820152601960248201527f5661756c742068617320616c726561647920737461727465640000000000000060448201526064016109a6565b6001606955427fa775687211c2b3346a0f5a2a0e7590e6c1838453e3785e6dd2a8efd6265ddf15556068805460ff60a01b1916600160a01b17905560796020527fdf6d6ad01a16c6118cfd605fcb55ad218b43517981ef4cc6d63a492cf34990d954600260009081527f7d4d2b02426547888e9185e69135196c4ed1edbc114060100a6ef94f8b5f60df919091556040517f59760ad83ef06d1a0bc439d8b39a42a870493f0cd3bc3d53bbd3e7c6991f494f9190a1565b611660612a31565b606a8190556040518181527f1d1fb7111c3779798bd4aefb2daea07ee8257a13c7eaceba89b4b1ccd405050d90602001610a89565b606a546069546000908152606b60205260408120549091610b1f9161380c565b6001546001600160a01b0316331461172d5760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b60648201526084016109a6565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6117ba612a31565b608380546001600160a01b0319166001600160a01b0383169081179091556040519081527f3c7faa500efbd341aedbf1ee7ebd52ea36d226dda76bc01dd39b43d46f55b8d390602001610a89565b611810612a31565b68056bc75e2d6310000081106118685760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420616c6c6f636174696f6e206c696d69742076616c7565730060448201526064016109a6565b607d8190556040518181527f9fb019ef2cdd86e0c7772694b935b2fd45131410802474ef0a8bf0afff94a40390602001610a89565b60008068056bc75e2d63100000607d546118b5610aea565b6118bf9190613844565b6118c99190613824565b6069546000908152607e602090815260408083206001600160a01b0388168452909152812054919250906118fd9083613863565b60695460009081526084602052604090205490915061191a610aea565b6119249190613863565b811061195357606954600090815260846020526040902054611944610aea565b61194e9190613863565b611955565b805b949350505050565b336000908152606f6020526040902054819060ff16156119cf5760405162461bcd60e51b815260206004820152602760248201527f5769746864726177616c206973207265717565737465642c2063616e6e6f742060448201526619195c1bdcda5d60ca1b60648201526084016109a6565b607a54811015611a125760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016109a6565b60775481607960006069546001611a29919061380c565b815260200190815260200160002054611a42919061380c565b1115611a905760405162461bcd60e51b815260206004820181905260248201527f4465706f73697420616d6f756e742065786365656473207661756c742063617060448201526064016109a6565b600160666000828254611aa3919061380c565b909155505060665460345460ff1615611ace5760405162461bcd60e51b81526004016109a6906137ab565b606854611ae6906001600160a01b031633308661303f565b60006069546001611af7919061380c565b6069546000908152606e60209081526040808320338452909152902054909150158015611b3b57506000818152606e60209081526040808320338452909152902054155b15611bf457607b54607c5410611b935760405162461bcd60e51b815260206004820152601b60248201527f4d617820616d6f756e74206f662075736572732072656163686564000000000060448201526064016109a6565b6000818152606c602090815260408083208054600181810183559185528385200180546001600160a01b03191633908117909155858552606d8452828520908552909252909120805460ff191682179055607c54611bf09161380c565b607c555b6000818152606e6020908152604080832033845290915281208054869290611c1d90849061380c565b90915550506040805180820182528281526000838152606e6020908152838220338084529082528483205482850190815290835260708252848320935184555160019093019290925583815260719091529081208054869290611c8190849061380c565b909155505060008181526079602052604081208054869290611ca490849061380c565b90915550506083546001600160a01b031615611d1f576083546040516302c7739b60e01b8152336004820152602481018690526001600160a01b03909116906302c7739b90604401600060405180830381600087803b158015611d0657600080fd5b505af1158015611d1a573d6000803e3d6000fd5b505050505b60408051338152602081018690527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4910160405180910390a1506066548114611d7a5760405162461bcd60e51b81526004016109a6906137d5565b505050565b611d87612a31565b6001600160a01b038116611dcf5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016109a6565b600154600160a81b900460ff1615611e1f5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b60448201526064016109a6565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610a89565b6000828152607660208181526040808420546075835281852054868652939092528320549091611ec791613844565b611ed19190613824565b9392505050565b611ee0612a31565b607a8190556040518181527f990717cc219e5348c1b88bb0ff530d804f0b6f54f3b03844a2bfbe4eb1e9c5d690602001610a89565b6000607754607960006069546001611f2d919061380c565b8152602001908152602001600020541015611f7157607960006069546001611f55919061380c565b815260200190815260200160002054607754610b1f9190613863565b90565b611f7c612a31565b60778190556040518181527f8c43aa02599ac8f8bab4724621ceea5e7a06b07bbbfaf3b7bd0386cbe481ea3c90602001610a89565b600160666000828254611fc4919061380c565b909155505060665460345460ff1615611fef5760405162461bcd60e51b81526004016109a6906137ab565b611ff761287b565b6120435760405162461bcd60e51b815260206004820152601960248201527f43616e277420636c6f73652063757272656e7420726f756e640000000000000060448201526064016109a6565b61204b6130aa565b6000607160006069546001612060919061380c565b8152602081019190915260409081016000205460685491516370a0823160e01b815230600482015290916001600160a01b0316906370a082319060240160206040518083038186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ed91906135ac565b6120f79190613863565b60695460009081526071602052604090205490915061212a5760695460009081526075602052604090206001905561216b565b60695460009081526071602052604090205461214e670de0b6b3a764000083613844565b6121589190613824565b6069546000908152607560205260409020555b60005b6069546000908152606c6020526040902054811015612511576069546000908152606c602052604081208054839081106121b857634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154606954835260758252604080842054606e84528185206001600160a01b0390931680865292909352832054909350670de0b6b3a76400009161220791613844565b6122119190613824565b6069546000908152606d602090815260408083206001600160a01b038716845290915290205490915060ff16156124fc576001600160a01b0382166000908152606f602052604090205460ff1661240c5780606e60006069546001612276919061380c565b81526020019081526020016000206000846001600160a01b03166001600160a01b03168152602001908152602001600020546122b2919061380c565b606e600060695460016122c5919061380c565b81526020019081526020016000206000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506001606d6000606954600161230f919061380c565b8152602080820192909252604090810160009081206001600160a01b03871682529092528120805460ff191692151592909217909155606954606c919061235790600161380c565b8152602080820192909252604001600090812080546001810182559082529190200180546001600160a01b0319166001600160a01b03848116919091179091556083541615612407576083546040516302c7739b60e01b81526001600160a01b03848116600483015260248201849052909116906302c7739b90604401600060405180830381600087803b1580156123ee57600080fd5b505af1158015612402573d6000803e3d6000fd5b505050505b6124fc565b6000606e60006069546001612421919061380c565b8152602080820192909252604090810160009081206001600160a01b0380881683529352209190915560685461245991168383613307565b6001600160a01b0382166000908152606f60205260408120805460ff19169055606954606d90829061248c90600161380c565b8152602080820192909252604090810160009081206001600160a01b03871680835290845290829020805460ff19169415159490941790935580519283529082018390527fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a910160405180910390a15b50508080612509906138a6565b91505061216e565b5060695460011415612540576069546000908152607560209081526040808320546076909252909120556125a3565b606954600081815260756020526040812054670de0b6b3a764000092909160769161256d90600190613863565b8152602001908152602001600020546125869190613844565b6125909190613824565b6069546000908152607660205260409020555b6001606960008282546125b6919061380c565b90915550506069546000908152606b60205260409081902042905560685490516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561261357600080fd5b505afa158015612627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264b91906135ac565b6069805460009081526071602052604080822093909355905480825291812054916079919061267b90600161380c565b8152602001908152602001600020819055507fc67dda8e11f1aa941c7e74466b1859a07a32f46aaf641d29b83be348424d93cd60016069546126bd9190613863565b6075600060016069546126d09190613863565b815260200190815260200160002054604051610e63929190918252602082015260400190565b6126fe612a31565b60678054610100600160a81b0319166101006001600160a01b038481168202929092179283905560685460405163095ea7b360e01b81529190930482166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b15801561276e57600080fd5b505af1158015612782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a69190613574565b506040516001600160a01b03821681527f576297e5fcc8cd907ee80b240284865eb3d821bdc5232e6ee9e4d78a12531c0990602001610a89565b6127e8612a31565b60828190556040518181527f26ea09cdab135064e784e44516fc5b3d619360d241ae64bff47153b2e5ee610e90602001610a89565b60675460ff16156128665760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016109a6565b6067805460ff19166001908117909155606655565b606854600090600160a01b900460ff1615806128b45750606a546069546000908152606b60205260409020546128b1919061380c565b42105b156128bf5750600090565b60005b606954600090815260726020526040902054811015612a2957606954600090815260726020526040812080548390811061290c57634e487b7160e01b600052603260045260246000fd5b6000918252602091829020015460408051633f6fa65560e01b815290516001600160a01b0390921693508392633f6fa65592600480840193829003018186803b15801561295857600080fd5b505afa15801561296c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129909190613574565b1580612a085750806001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156129d057600080fd5b505afa1580156129e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a089190613574565b15612a165760009250505090565b5080612a21816138a6565b9150506128c2565b506001905090565b6000546201000090046001600160a01b03163314612aa95760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b60648201526084016109a6565b565b600054610100900460ff16612b165760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a6565b612b1f88610954565b612b2761281d565b60678054610100600160a81b0319166101006001600160a01b038a811682029290921792839055606880546001600160a01b0319168a8416908117909155606a89905560778890556078879055607a869055607b85905560405163095ea7b360e01b8152919093049091166004820152600019602482015263095ea7b390604401602060405180830381600087803b158015612bc257600080fd5b505af1158015612bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bfa9190613574565b505050505050505050565b60675460405163270e13ef60e01b815260009161010090046001600160a01b03169063270e13ef90612c3f908790879087906004016136d7565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f91906135ac565b606954600090815260846020526040902054909150612cac610aea565b612cb69190613863565b8110612d105760405162461bcd60e51b815260206004820152602360248201527f416d6f756e74206578636565647320617661696c61626c6520616c6c6f63617460448201526234b7b760e91b60648201526084016109a6565b600068056bc75e2d63100000607d54612d27610aea565b612d319190613844565b612d3b9190613824565b6069546000908152607e602090815260408083206001600160a01b038a1684529091529020549091508190612d70908461380c565b10612dd35760405162461bcd60e51b815260206004820152602d60248201527f416d6f756e74206578636565647320617661696c61626c6520616c6c6f63617460448201526c1a5bdb88199bdc88185cdcd95d609a1b60648201526084016109a6565b6068546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612e1757600080fd5b505afa158015612e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e4f91906135ac565b60675460405163221d7ae160e21b815291925061010090046001600160a01b031690638875eb8490612e8e908990899089908990600090600401613731565b600060405180830381600087803b158015612ea857600080fd5b505af1158015612ebc573d6000803e3d6000fd5b50506068546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a082319060240160206040518083038186803b158015612f0657600080fd5b505afa158015612f1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3e91906135ac565b9050836084600060695481526020019081526020016000206000828254612f65919061380c565b90915550506069546000908152607e602090815260408083206001600160a01b038b16845290915281208054869290612f9f90849061380c565b909155505060695460009081526073602090815260408083206001600160a01b038b1684529091529020805487919060ff19166001836002811115612ff457634e487b7160e01b600052602160045260246000fd5b02179055507fd1fc86fd7e2808fb6a4d745c0f26983bd36784721df1e29a27a28ce3fcdc74168787878760405161302e9493929190613702565b60405180910390a150505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115399085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613337565b6000805b60695460009081526072602052604090205481101561107b5760695460009081526072602052604090208054829081106130f857634e487b7160e01b600052603260045260246000fd5b6000918252602091829020015460408051635c975abb60e01b815290516001600160a01b0390921694508492635c975abb92600480840193829003018186803b15801561314457600080fd5b505afa158015613158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061317c9190613574565b1580156131f55750816001600160a01b0316633f6fa6556040518163ffffffff1660e01b815260040160206040518083038186803b1580156131bd57600080fd5b505afa1580156131d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131f59190613574565b156132f557604051636392a51f60e01b8152306004820152600090819081906001600160a01b03861690636392a51f9060240160606040518083038186803b15801561324057600080fd5b505afa158015613254573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613278919061364f565b925092509250600083118061328d5750600082115b806132985750600081115b156132f157846001600160a01b031663851492586040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156132d857600080fd5b505af11580156132ec573d6000803e3d6000fd5b505050505b5050505b806132ff816138a6565b9150506130ae565b6040516001600160a01b038316602482015260448101829052611d7a90849063a9059cbb60e01b90606401613073565b600061338c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134099092919063ffffffff16565b805190915015611d7a57808060200190518101906133aa9190613574565b611d7a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109a6565b6060611955848460008585843b6134625760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a6565b600080866001600160a01b0316858760405161347e919061369e565b60006040518083038185875af1925050503d80600081146134bb576040519150601f19603f3d011682016040523d82523d6000602084013e6134c0565b606091505b50915091506134d08282866134db565b979650505050505050565b606083156134ea575081611ed1565b8251156134fa5782518084602001fd5b8160405162461bcd60e51b81526004016109a69190613778565b600060208284031215613525578081fd5b8135611ed1816138d7565b600080600060608486031215613544578182fd5b833561354f816138d7565b925060208401359150604084013560038110613569578182fd5b809150509250925092565b600060208284031215613585578081fd5b81518015158114611ed1578182fd5b6000602082840312156135a5578081fd5b5035919050565b6000602082840312156135bd578081fd5b5051919050565b60006101a082840312156135d6578081fd5b50919050565b600080604083850312156135ee578182fd5b823591506020830135613600816138d7565b809150509250929050565b6000806040838503121561361d578182fd5b50508035926020909101359150565b6000806040838503121561363e578182fd5b505080516020909101519092909150565b600080600060608486031215613663578283fd5b8351925060208401519150604084015190509250925092565b6003811061369a57634e487b7160e01b600052602160045260246000fd5b9052565b600082516136b081846020870161387a565b9190910192915050565b6001600160a01b038316815260408101611ed1602083018461367c565b6001600160a01b0384168152606081016136f4602083018561367c565b826040830152949350505050565b6001600160a01b03851681526080810161371f602083018661367c565b60408201939093526060015292915050565b6001600160a01b038616815260a0810161374e602083018761367c565b8460408301528360608301528260808301529695505050505050565b60208101610916828461367c565b602081526000825180602084015261379781604085016020870161387a565b601f01601f19169190910160400192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561381f5761381f6138c1565b500190565b60008261383f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561385e5761385e6138c1565b500290565b600082821015613875576138756138c1565b500390565b60005b8381101561389557818101518382015260200161387d565b838111156115395750506000910152565b60006000198214156138ba576138ba6138c1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610e8d57600080fdfea264697066735822122051548f5aa5157bf20022006b0c4235ea8b0e8cae79502a058267d823daae356b64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
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.