Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
EscrowThales
Compiler Version
v0.5.16+commit.9c3226ce
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.5.16; import "openzeppelin-solidity-2.3.0/contracts/math/SafeMath.sol"; import "openzeppelin-solidity-2.3.0/contracts/token/ERC20/SafeERC20.sol"; import "../utils/proxy/ProxyReentrancyGuard.sol"; import "../utils/proxy/ProxyOwned.sol"; import "../utils/proxy/ProxyPausable.sol"; import "@openzeppelin/upgrades-core/contracts/Initializable.sol"; import "../interfaces/IEscrowThales.sol"; import "../interfaces/IStakingThales.sol"; import "../interfaces/IThalesStakingRewardsPool.sol"; contract EscrowThales is IEscrowThales, Initializable, ProxyOwned, ProxyReentrancyGuard, ProxyPausable { using SafeMath for uint; using SafeERC20 for IERC20; IERC20 public vestingToken; IStakingThales public iStakingThales; address public airdropContract; uint public constant NUM_PERIODS = 10; uint public totalEscrowedRewards; uint public totalEscrowBalanceNotIncludedInStaking; uint public currentVestingPeriod; uint private _totalVested; struct VestingEntry { uint amount; uint vesting_period; } mapping(address => VestingEntry[NUM_PERIODS]) public vestingEntries; mapping(address => uint) public totalAccountEscrowedAmount; mapping(address => uint) public lastPeriodAddedReward; bool private testMode; IThalesStakingRewardsPool public ThalesStakingRewardsPool; /* ========== CONSTRUCTOR ========== */ function initialize( address _owner, address _vestingToken //THALES ) public initializer { setOwner(_owner); initNonReentrant(); vestingToken = IERC20(_vestingToken); } /* ========== VIEWS ========== */ function getStakerPeriod(address account, uint index) external view returns (uint) { require(account != address(0), "Invalid account address"); return vestingEntries[account][index].vesting_period; } function getStakerAmounts(address account, uint index) external view returns (uint) { require(account != address(0), "Invalid account address"); return vestingEntries[account][index].amount; } function getStakedEscrowedBalanceForRewards(address account) external view returns (uint) { if (lastPeriodAddedReward[account] == currentVestingPeriod) { return totalAccountEscrowedAmount[account].sub( vestingEntries[account][currentVestingPeriod.mod(NUM_PERIODS)].amount ); } else { return totalAccountEscrowedAmount[account]; } } function claimable(address account) external view returns (uint) { require(account != address(0), "Invalid address"); return totalAccountEscrowedAmount[account].sub(_getVestingNotAvailable(account)); } /* ========== PUBLIC ========== */ function addToEscrow(address account, uint amount) external notPaused { require(account != address(0), "Invalid address"); require(amount > 0, "Amount is 0"); require( msg.sender == address(ThalesStakingRewardsPool) || msg.sender == airdropContract, "Add to escrow can only be called from staking or ongoing airdrop contracts" ); totalAccountEscrowedAmount[account] = totalAccountEscrowedAmount[account].add(amount); if (lastPeriodAddedReward[account] == currentVestingPeriod) { vestingEntries[account][currentVestingPeriod.mod(NUM_PERIODS)].amount = vestingEntries[account][ currentVestingPeriod.mod(NUM_PERIODS) ] .amount .add(amount); } else { vestingEntries[account][currentVestingPeriod.mod(NUM_PERIODS)].amount = amount; } vestingEntries[account][currentVestingPeriod.mod(NUM_PERIODS)].vesting_period = currentVestingPeriod.add( NUM_PERIODS ); lastPeriodAddedReward[account] = currentVestingPeriod; totalEscrowedRewards = totalEscrowedRewards.add(amount); //Transfering THALES from StakingThales to EscrowThales vestingToken.safeTransferFrom(msg.sender, address(this), amount); // add to totalEscrowBalanceNotIncludedInStaking if user is not staking if (iStakingThales.stakedBalanceOf(account) == 0) { totalEscrowBalanceNotIncludedInStaking = totalEscrowBalanceNotIncludedInStaking.add(amount); } emit AddedToEscrow(account, amount); } function vest(uint amount) external nonReentrant notPaused returns (bool) { require(amount > 0, "Claimed amount is 0"); require(currentVestingPeriod >= NUM_PERIODS, "Vesting rewards still not available"); uint vestingAmount = 0; vestingAmount = totalAccountEscrowedAmount[msg.sender].sub(_getVestingNotAvailable(msg.sender)); // Amount must be lower than the reward require(amount <= vestingAmount, "Amount exceeds the claimable rewards"); totalAccountEscrowedAmount[msg.sender] = totalAccountEscrowedAmount[msg.sender].sub(amount); totalEscrowedRewards = totalEscrowedRewards.sub(amount); _totalVested = _totalVested.add(amount); vestingToken.safeTransfer(msg.sender, amount); // subtract from totalEscrowBalanceNotIncludedInStaking if user is not staking if (iStakingThales.stakedBalanceOf(msg.sender) == 0) { totalEscrowBalanceNotIncludedInStaking = totalEscrowBalanceNotIncludedInStaking.sub(amount); } emit Vested(msg.sender, amount); return true; } function addTotalEscrowBalanceNotIncludedInStaking(uint amount) external { require(msg.sender == address(iStakingThales), "Can only be called from staking contract"); totalEscrowBalanceNotIncludedInStaking = totalEscrowBalanceNotIncludedInStaking.add(amount); } function subtractTotalEscrowBalanceNotIncludedInStaking(uint amount) external { require(msg.sender == address(iStakingThales), "Can only be called from staking contract"); totalEscrowBalanceNotIncludedInStaking = totalEscrowBalanceNotIncludedInStaking.sub(amount); } function updateCurrentPeriod() external returns (bool) { if (!testMode) { require(msg.sender == address(iStakingThales), "Can only be called from staking contract"); } currentVestingPeriod = currentVestingPeriod.add(1); return true; } function setStakingThalesContract(address StakingThalesContract) external onlyOwner { require(StakingThalesContract != address(0), "Invalid address set"); iStakingThales = IStakingThales(StakingThalesContract); emit StakingThalesContractChanged(StakingThalesContract); } function enableTestMode() external onlyOwner { testMode = true; } function setAirdropContract(address AirdropContract) external onlyOwner { require(AirdropContract != address(0), "Invalid address set"); airdropContract = AirdropContract; emit AirdropContractChanged(AirdropContract); } function setThalesStakingRewardsPool(address _thalesStakingRewardsPool) public onlyOwner { require(_thalesStakingRewardsPool != address(0), "Invalid address"); ThalesStakingRewardsPool = IThalesStakingRewardsPool(_thalesStakingRewardsPool); emit ThalesStakingRewardsPoolChanged(_thalesStakingRewardsPool); } function fixEscrowEntry(address account) external onlyOwner { vestingEntries[account][currentVestingPeriod.mod(NUM_PERIODS)].vesting_period = currentVestingPeriod.add( NUM_PERIODS ); } /* ========== INTERNAL FUNCTIONS ========== */ function _getVestingNotAvailable(address account) internal view returns (uint) { uint vesting_not_available = 0; for (uint i = 0; i < NUM_PERIODS; i++) { if (vestingEntries[account][i].vesting_period > currentVestingPeriod) { vesting_not_available = vesting_not_available.add(vestingEntries[account][i].amount); } } return vesting_not_available; } /* ========== EVENTS ========== */ event AddedToEscrow(address acount, uint amount); event Vested(address account, uint amount); event StakingThalesContractChanged(address newAddress); event AirdropContractChanged(address newAddress); event ThalesStakingRewardsPoolChanged(address thalesStakingRewardsPool); }
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } }
pragma solidity ^0.5.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.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 ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 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' // solhint-disable-next-line max-line-length 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(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(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(IERC20 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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity ^0.5.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.5.16; // 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.5.16; // Inheritance import "./ProxyOwned.sol"; // Clone of syntetix contract without constructor contract ProxyPausable is ProxyOwned { uint public lastPauseTime; bool public paused; /** * @notice Change the paused state of the contract * @dev Only the contract owner may call this. */ function setPaused(bool _paused) external onlyOwner { // Ensure we're actually changing the state before we do anything if (_paused == paused) { return; } // Set our paused state. paused = _paused; // If applicable, set the last pause time. if (paused) { lastPauseTime = block.timestamp; } // Let everyone know that our pause state has changed. emit PauseChanged(paused); } event PauseChanged(bool isPaused); modifier notPaused { require(!paused, "This action cannot be performed while the contract is paused"); _; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.24 <0.7.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ 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 use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IEscrowThales { /* ========== VIEWS / VARIABLES ========== */ function getStakerPeriod(address account, uint index) external view returns (uint); function getStakerAmounts(address account, uint index) external view returns (uint); function totalAccountEscrowedAmount(address account) external view returns (uint); function getStakedEscrowedBalanceForRewards(address account) external view returns (uint); function totalEscrowedRewards() external view returns (uint); function totalEscrowBalanceNotIncludedInStaking() external view returns (uint); function currentVestingPeriod() external view returns (uint); function updateCurrentPeriod() external returns (bool); function claimable(address account) external view returns (uint); function addToEscrow(address account, uint amount) external; function vest(uint amount) external returns (bool); function addTotalEscrowBalanceNotIncludedInStaking(uint amount) external; function subtractTotalEscrowBalanceNotIncludedInStaking(uint amount) 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 getAlreadyClaimedFees(address account) external view returns (uint); function getContractRewardFunds() external view returns (uint); function getContractFeeFunds() external view returns (uint); }
// SPDX-License-Identifier: MIT pragma solidity ^0.5.16; interface IThalesStakingRewardsPool { function addToEscrow(address account, uint amount) external; }
pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through `transferFrom`. This is * zero by default. * * This value changes when `approve` or `transferFrom` are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * > 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); }
pragma solidity ^0.5.0; /** * @dev Collection of functions related to the address type, */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } }
{ "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":"acount","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AddedToEscrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"AirdropContractChanged","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":"bool","name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"StakingThalesContractChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"thalesStakingRewardsPool","type":"address"}],"name":"ThalesStakingRewardsPoolChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Vested","type":"event"},{"constant":true,"inputs":[],"name":"NUM_PERIODS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ThalesStakingRewardsPool","outputs":[{"internalType":"contract IThalesStakingRewardsPool","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addToEscrow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addTotalEscrowBalanceNotIncludedInStaking","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"airdropContract","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentVestingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"enableTestMode","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"fixEscrowEntry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getStakedEscrowedBalanceForRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getStakerAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getStakerPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"iStakingThales","outputs":[{"internalType":"contract IStakingThales","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initNonReentrant","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_vestingToken","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lastPauseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastPeriodAddedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"AirdropContract","type":"address"}],"name":"setAirdropContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"StakingThalesContract","type":"address"}],"name":"setStakingThalesContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_thalesStakingRewardsPool","type":"address"}],"name":"setThalesStakingRewardsPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"subtractTotalEscrowBalanceNotIncludedInStaking","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalAccountEscrowedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEscrowBalanceNotIncludedInStaking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEscrowedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"updateCurrentPeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"vest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"vestingEntries","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"vesting_period","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vestingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50611f03806100206000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80637ef7b42711610125578063ad4fe40b116100ad578063c3b83f5f1161007c578063c3b83f5f1461056c578063c6b763f914610592578063cf09ce2b146105b8578063ebc79772146105c0578063f388466f146105c85761021c565b8063ad4fe40b146104f5578063ad6d15de1461051b578063b01ca88f14610538578063b9d1c70b146105645761021c565b806391b4ded9116100f457806391b4ded914610490578063a5d7cb6c14610498578063ab2be726146104a0578063ab610850146104a8578063acfabbe4146104ed5761021c565b80637ef7b4271461042e578063857afabd1461045a5780638da5cb5b146104805780638fa6d02e146104885761021c565b8063485cc955116101a85780635d138505116101775780635d138505146103b5578063698f15ca146103bd5780636a760b80146103e35780636f0115381461040057806379ba5097146104265761021c565b8063485cc9551461034657806353a47bb7146103745780635817d0421461037c5780635c975abb146103995761021c565b806317640e07116101ef57806317640e07146102a857806319d152fa146102ce5780631cb70a95146102f25780631f532962146102fa578063402914f5146103205761021c565b80630faab8cf1461022157806313af40351461023b5780631627540c1461026357806316c38b3c14610289575b600080fd5b6102296105f4565b60408051918252519081900360200190f35b6102616004803603602081101561025157600080fd5b50356001600160a01b03166105f9565b005b6102616004803603602081101561027957600080fd5b50356001600160a01b031661070e565b6102616004803603602081101561029f57600080fd5b5035151561076a565b610229600480360360208110156102be57600080fd5b50356001600160a01b03166107e4565b6102d6610894565b604080516001600160a01b039092168252519081900360200190f35b6102d66108a8565b6102616004803603602081101561031057600080fd5b50356001600160a01b03166108bc565b6102296004803603602081101561033657600080fd5b50356001600160a01b031661096d565b6102616004803603604081101561035c57600080fd5b506001600160a01b03813581169160200135166109f3565b6102d6610ac8565b6102616004803603602081101561039257600080fd5b5035610ad7565b6103a1610b39565b604080519115158252519081900360200190f35b610229610b42565b610229600480360360208110156103d357600080fd5b50356001600160a01b0316610b48565b6103a1600480360360208110156103f957600080fd5b5035610b5a565b6102616004803603602081101561041657600080fd5b50356001600160a01b0316610e48565b610261610ef5565b6102296004803603604081101561044457600080fd5b506001600160a01b038135169060200135610fb1565b6102616004803603602081101561047057600080fd5b50356001600160a01b031661103b565b6102d66110e8565b6102296110f7565b6102296110fd565b6102d6611103565b6102d6611112565b6104d4600480360360408110156104be57600080fd5b506001600160a01b038135169060200135611121565b6040805192835260208301919091528051918290030190f35b6103a161114e565b6102616004803603602081101561050b57600080fd5b50356001600160a01b03166111c1565b6102616004803603602081101561053157600080fd5b5035611221565b6102616004803603604081101561054e57600080fd5b506001600160a01b03813516906020013561127d565b61022961164c565b6102616004803603602081101561058257600080fd5b50356001600160a01b0316611652565b610229600480360360208110156105a857600080fd5b50356001600160a01b0316611771565b610261611783565b61026161179a565b610229600480360360408110156105de57600080fd5b506001600160a01b0381351690602001356117fd565b600a81565b6001600160a01b038116610654576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b603454600160a01b900460ff161561069d5760405162461bcd60e51b8152600401808060200182810382526029815260200180611d2a6029913960400191505060405180910390fd5b6034805460ff60a01b1916600160a01b179055603380546001600160a01b0383166001600160a01b031990911681179091556040805160008152602081019290925280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150565b610716611883565b603480546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b610772611883565b60385460ff1615158115151415610788576107e1565b6038805460ff1916821515179081905560ff16156107a557426037555b6038546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b603d546001600160a01b03821660009081526041602052604081205490911415610874576001600160a01b0382166000908152603f60205260409020603d5461086d919061083990600a63ffffffff6118ce16565b600a811061084357fe5b60020201546001600160a01b0384166000908152604060208190529020549063ffffffff61193316565b905061088f565b506001600160a01b0381166000908152604060208190529020545b919050565b60385461010090046001600160a01b031681565b60425461010090046001600160a01b031681565b6108c4611883565b6001600160a01b038116610911576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b604280546001600160a01b0383166101008102610100600160a81b03199092169190911790915560408051918252517fc70f351eb054617c1a59ce7df5868ecc6f691ec895094e2185b4f4d45c987c899181900360200190a150565b60006001600160a01b0382166109bc576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b6109ed6109c883611990565b6001600160a01b0384166000908152604060208190529020549063ffffffff61193316565b92915050565b600054610100900460ff1680610a0c5750610a0c611a1d565b80610a1a575060005460ff16155b610a555760405162461bcd60e51b815260040180806020018281038252602e815260200180611d82602e913960400191505060405180910390fd5b600054610100900460ff16158015610a80576000805460ff1961ff0019909116610100171660011790555b610a89836105f9565b610a9161179a565b60388054610100600160a81b0319166101006001600160a01b038516021790558015610ac3576000805461ff00191690555b505050565b6034546001600160a01b031681565b6039546001600160a01b03163314610b205760405162461bcd60e51b8152600401808060200182810382526028815260200180611ea76028913960400191505060405180910390fd5b603c54610b33908263ffffffff611a2316565b603c5550565b60385460ff1681565b603d5481565b60406020819052600091825290205481565b60358054600101908190556038546000919060ff1615610bab5760405162461bcd60e51b815260040180806020018281038252603c815260200180611dd3603c913960400191505060405180910390fd5b60008311610bf6576040805162461bcd60e51b81526020600482015260136024820152720436c61696d656420616d6f756e74206973203606c1b604482015290519081900360640190fd5b600a603d541015610c385760405162461bcd60e51b8152600401808060200182810382526023815260200180611db06023913960400191505060405180910390fd5b6000610c62610c4633611990565b336000908152604060208190529020549063ffffffff61193316565b905080841115610ca35760405162461bcd60e51b8152600401808060200182810382526024815260200180611e0f6024913960400191505060405180910390fd5b33600090815260406020819052902054610cc3908563ffffffff61193316565b33600090815260406020819052902055603b54610ce6908563ffffffff61193316565b603b55603e54610cfc908563ffffffff611a2316565b603e55603854610d1b9061010090046001600160a01b03163386611a84565b60395460408051631676539160e01b815233600482015290516001600160a01b0390921691631676539191602480820192602092909190829003018186803b158015610d6657600080fd5b505afa158015610d7a573d6000803e3d6000fd5b505050506040513d6020811015610d9057600080fd5b5051610dad57603c54610da9908563ffffffff61193316565b603c555b604080513381526020810186905281517ed5958799b183a7b738d3ad5e711305293dd5076a37a4e3b7e6611dea6114f3929181900390910190a160019250506035548114610e42576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50919050565b610e50611883565b6001600160a01b038116610ea1576040805162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081859191c995cdcc81cd95d606a1b604482015290519081900360640190fd5b603a80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fd010a6b29232520d927f04d85597efb6fc5b0dc8f3b101b9292e8ae32f7b95719181900360200190a150565b6034546001600160a01b03163314610f3e5760405162461bcd60e51b8152600401808060200182810382526035815260200180611cf56035913960400191505060405180910390fd5b603354603454604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160348054603380546001600160a01b03199081166001600160a01b03841617909155169055565b60006001600160a01b038316611008576040805162461bcd60e51b8152602060048201526017602482015276496e76616c6964206163636f756e74206164647265737360481b604482015290519081900360640190fd5b6001600160a01b0383166000908152603f6020526040902082600a811061102b57fe5b6002020160010154905092915050565b611043611883565b6001600160a01b038116611094576040805162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081859191c995cdcc81cd95d606a1b604482015290519081900360640190fd5b603980546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f82e5240229d10cc4b4806dbb17617cfd44ab67bde505b66eec73d21395371a579181900360200190a150565b6033546001600160a01b031681565b603c5481565b60375481565b6039546001600160a01b031681565b603a546001600160a01b031681565b603f60205281600052604060002081600a811061113a57fe5b600202018054600190910154909250905082565b60425460009060ff166111a4576039546001600160a01b031633146111a45760405162461bcd60e51b8152600401808060200182810382526028815260200180611ea76028913960400191505060405180910390fd5b603d546111b890600163ffffffff611a2316565b603d5550600190565b6111c9611883565b603d546111dd90600a63ffffffff611a2316565b6001600160a01b0382166000908152603f60205260409020603d5461120990600a63ffffffff6118ce16565b600a811061121357fe5b600202016001018190555050565b6039546001600160a01b0316331461126a5760405162461bcd60e51b8152600401808060200182810382526028815260200180611ea76028913960400191505060405180910390fd5b603c54610b33908263ffffffff61193316565b60385460ff16156112bf5760405162461bcd60e51b815260040180806020018281038252603c815260200180611dd3603c913960400191505060405180910390fd5b6001600160a01b03821661130c576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b6000811161134f576040805162461bcd60e51b815260206004820152600b60248201526a0416d6f756e7420697320360ac1b604482015290519081900360640190fd5b60425461010090046001600160a01b03163314806113775750603a546001600160a01b031633145b6113b25760405162461bcd60e51b815260040180806020018281038252604a815260200180611e33604a913960600191505060405180910390fd5b6001600160a01b0382166000908152604060208190529020546113db908263ffffffff611a2316565b6001600160a01b03831660009081526040602081815281832093909355603d5460419093529020541415611496576001600160a01b0382166000908152603f60205260409020603d5461145691839161143b90600a63ffffffff6118ce16565b600a811061144557fe5b60020201549063ffffffff611a2316565b6001600160a01b0383166000908152603f60205260409020603d5461148290600a63ffffffff6118ce16565b600a811061148c57fe5b60020201556114d5565b6001600160a01b0382166000908152603f60205260409020603d548291906114c590600a63ffffffff6118ce16565b600a81106114cf57fe5b60020201555b603d546114e990600a63ffffffff611a2316565b6001600160a01b0383166000908152603f60205260409020603d5461151590600a63ffffffff6118ce16565b600a811061151f57fe5b6002020160010155603d546001600160a01b038316600090815260416020526040902055603b546115509082611a23565b603b556038546115709061010090046001600160a01b0316333084611ad6565b60395460408051631676539160e01b81526001600160a01b038581166004830152915191909216916316765391916024808301926020929190829003018186803b1580156115bd57600080fd5b505afa1580156115d1573d6000803e3d6000fd5b505050506040513d60208110156115e757600080fd5b505161160457603c54611600908263ffffffff611a2316565b603c555b604080516001600160a01b03841681526020810183905281517f690a755e9d381a220ee302f6a382749c9cdccbbc983ccdf1c18c978f9281c64d929181900390910190a15050565b603b5481565b61165a611883565b6001600160a01b0381166116a7576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b603454600160a81b900460ff16156116fc576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b604482015290519081900360640190fd5b603380546001600160a01b038084166001600160a01b03199092168217928390556034805460ff60a81b1916600160a81b17905560408051939091168352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150565b60416020526000908152604090205481565b61178b611883565b6042805460ff19166001179055565b60365460ff16156117e8576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b6036805460ff19166001908117909155603555565b60006001600160a01b038316611854576040805162461bcd60e51b8152602060048201526017602482015276496e76616c6964206163636f756e74206164647265737360481b604482015290519081900360640190fd5b6001600160a01b0383166000908152603f6020526040902082600a811061187757fe5b60020201549392505050565b6033546001600160a01b031633146118cc5760405162461bcd60e51b815260040180806020018281038252602f815260200180611d53602f913960400191505060405180910390fd5b565b600081611922576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b81838161192b57fe5b069392505050565b60008282111561198a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600080805b600a811015611a1657603d546001600160a01b0385166000908152603f6020526040902082600a81106119c457fe5b60020201600101541115611a0e576001600160a01b0384166000908152603f60205260409020611a0b9082600a81106119f957fe5b6002020154839063ffffffff611a2316565b91505b600101611995565b5092915050565b303b1590565b600082820183811015611a7d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ac3908490611b36565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611b30908590611b36565b50505050565b611b48826001600160a01b0316611cee565b611b99576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310611bd75780518252601f199092019160209182019101611bb8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c39576040519150601f19603f3d011682016040523d82523d6000602084013e611c3e565b606091505b509150915081611c95576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611b3057808060200190516020811015611cb157600080fd5b5051611b305760405162461bcd60e51b815260040180806020018281038252602a815260200180611e7d602a913960400191505060405180910390fd5b3b15159056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e657273686970416c726561647920696e697469616c697a65642c20757365206e6f6d696e6174654e65774f776e65724f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656456657374696e672072657761726473207374696c6c206e6f7420617661696c61626c655468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e747261637420697320706175736564416d6f756e7420657863656564732074686520636c61696d61626c65207265776172647341646420746f20657363726f772063616e206f6e6c792062652063616c6c65642066726f6d207374616b696e67206f72206f6e676f696e672061697264726f7020636f6e7472616374735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656443616e206f6e6c792062652063616c6c65642066726f6d207374616b696e6720636f6e7472616374a265627a7a7231582011bd6929a2f3d1f2a14f53c47596b7c15737062cf85d28e661a647006ca6c52e64736f6c63430005100032
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80637ef7b42711610125578063ad4fe40b116100ad578063c3b83f5f1161007c578063c3b83f5f1461056c578063c6b763f914610592578063cf09ce2b146105b8578063ebc79772146105c0578063f388466f146105c85761021c565b8063ad4fe40b146104f5578063ad6d15de1461051b578063b01ca88f14610538578063b9d1c70b146105645761021c565b806391b4ded9116100f457806391b4ded914610490578063a5d7cb6c14610498578063ab2be726146104a0578063ab610850146104a8578063acfabbe4146104ed5761021c565b80637ef7b4271461042e578063857afabd1461045a5780638da5cb5b146104805780638fa6d02e146104885761021c565b8063485cc955116101a85780635d138505116101775780635d138505146103b5578063698f15ca146103bd5780636a760b80146103e35780636f0115381461040057806379ba5097146104265761021c565b8063485cc9551461034657806353a47bb7146103745780635817d0421461037c5780635c975abb146103995761021c565b806317640e07116101ef57806317640e07146102a857806319d152fa146102ce5780631cb70a95146102f25780631f532962146102fa578063402914f5146103205761021c565b80630faab8cf1461022157806313af40351461023b5780631627540c1461026357806316c38b3c14610289575b600080fd5b6102296105f4565b60408051918252519081900360200190f35b6102616004803603602081101561025157600080fd5b50356001600160a01b03166105f9565b005b6102616004803603602081101561027957600080fd5b50356001600160a01b031661070e565b6102616004803603602081101561029f57600080fd5b5035151561076a565b610229600480360360208110156102be57600080fd5b50356001600160a01b03166107e4565b6102d6610894565b604080516001600160a01b039092168252519081900360200190f35b6102d66108a8565b6102616004803603602081101561031057600080fd5b50356001600160a01b03166108bc565b6102296004803603602081101561033657600080fd5b50356001600160a01b031661096d565b6102616004803603604081101561035c57600080fd5b506001600160a01b03813581169160200135166109f3565b6102d6610ac8565b6102616004803603602081101561039257600080fd5b5035610ad7565b6103a1610b39565b604080519115158252519081900360200190f35b610229610b42565b610229600480360360208110156103d357600080fd5b50356001600160a01b0316610b48565b6103a1600480360360208110156103f957600080fd5b5035610b5a565b6102616004803603602081101561041657600080fd5b50356001600160a01b0316610e48565b610261610ef5565b6102296004803603604081101561044457600080fd5b506001600160a01b038135169060200135610fb1565b6102616004803603602081101561047057600080fd5b50356001600160a01b031661103b565b6102d66110e8565b6102296110f7565b6102296110fd565b6102d6611103565b6102d6611112565b6104d4600480360360408110156104be57600080fd5b506001600160a01b038135169060200135611121565b6040805192835260208301919091528051918290030190f35b6103a161114e565b6102616004803603602081101561050b57600080fd5b50356001600160a01b03166111c1565b6102616004803603602081101561053157600080fd5b5035611221565b6102616004803603604081101561054e57600080fd5b506001600160a01b03813516906020013561127d565b61022961164c565b6102616004803603602081101561058257600080fd5b50356001600160a01b0316611652565b610229600480360360208110156105a857600080fd5b50356001600160a01b0316611771565b610261611783565b61026161179a565b610229600480360360408110156105de57600080fd5b506001600160a01b0381351690602001356117fd565b600a81565b6001600160a01b038116610654576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b603454600160a01b900460ff161561069d5760405162461bcd60e51b8152600401808060200182810382526029815260200180611d2a6029913960400191505060405180910390fd5b6034805460ff60a01b1916600160a01b179055603380546001600160a01b0383166001600160a01b031990911681179091556040805160008152602081019290925280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150565b610716611883565b603480546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b610772611883565b60385460ff1615158115151415610788576107e1565b6038805460ff1916821515179081905560ff16156107a557426037555b6038546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b603d546001600160a01b03821660009081526041602052604081205490911415610874576001600160a01b0382166000908152603f60205260409020603d5461086d919061083990600a63ffffffff6118ce16565b600a811061084357fe5b60020201546001600160a01b0384166000908152604060208190529020549063ffffffff61193316565b905061088f565b506001600160a01b0381166000908152604060208190529020545b919050565b60385461010090046001600160a01b031681565b60425461010090046001600160a01b031681565b6108c4611883565b6001600160a01b038116610911576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b604280546001600160a01b0383166101008102610100600160a81b03199092169190911790915560408051918252517fc70f351eb054617c1a59ce7df5868ecc6f691ec895094e2185b4f4d45c987c899181900360200190a150565b60006001600160a01b0382166109bc576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b6109ed6109c883611990565b6001600160a01b0384166000908152604060208190529020549063ffffffff61193316565b92915050565b600054610100900460ff1680610a0c5750610a0c611a1d565b80610a1a575060005460ff16155b610a555760405162461bcd60e51b815260040180806020018281038252602e815260200180611d82602e913960400191505060405180910390fd5b600054610100900460ff16158015610a80576000805460ff1961ff0019909116610100171660011790555b610a89836105f9565b610a9161179a565b60388054610100600160a81b0319166101006001600160a01b038516021790558015610ac3576000805461ff00191690555b505050565b6034546001600160a01b031681565b6039546001600160a01b03163314610b205760405162461bcd60e51b8152600401808060200182810382526028815260200180611ea76028913960400191505060405180910390fd5b603c54610b33908263ffffffff611a2316565b603c5550565b60385460ff1681565b603d5481565b60406020819052600091825290205481565b60358054600101908190556038546000919060ff1615610bab5760405162461bcd60e51b815260040180806020018281038252603c815260200180611dd3603c913960400191505060405180910390fd5b60008311610bf6576040805162461bcd60e51b81526020600482015260136024820152720436c61696d656420616d6f756e74206973203606c1b604482015290519081900360640190fd5b600a603d541015610c385760405162461bcd60e51b8152600401808060200182810382526023815260200180611db06023913960400191505060405180910390fd5b6000610c62610c4633611990565b336000908152604060208190529020549063ffffffff61193316565b905080841115610ca35760405162461bcd60e51b8152600401808060200182810382526024815260200180611e0f6024913960400191505060405180910390fd5b33600090815260406020819052902054610cc3908563ffffffff61193316565b33600090815260406020819052902055603b54610ce6908563ffffffff61193316565b603b55603e54610cfc908563ffffffff611a2316565b603e55603854610d1b9061010090046001600160a01b03163386611a84565b60395460408051631676539160e01b815233600482015290516001600160a01b0390921691631676539191602480820192602092909190829003018186803b158015610d6657600080fd5b505afa158015610d7a573d6000803e3d6000fd5b505050506040513d6020811015610d9057600080fd5b5051610dad57603c54610da9908563ffffffff61193316565b603c555b604080513381526020810186905281517ed5958799b183a7b738d3ad5e711305293dd5076a37a4e3b7e6611dea6114f3929181900390910190a160019250506035548114610e42576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50919050565b610e50611883565b6001600160a01b038116610ea1576040805162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081859191c995cdcc81cd95d606a1b604482015290519081900360640190fd5b603a80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fd010a6b29232520d927f04d85597efb6fc5b0dc8f3b101b9292e8ae32f7b95719181900360200190a150565b6034546001600160a01b03163314610f3e5760405162461bcd60e51b8152600401808060200182810382526035815260200180611cf56035913960400191505060405180910390fd5b603354603454604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160348054603380546001600160a01b03199081166001600160a01b03841617909155169055565b60006001600160a01b038316611008576040805162461bcd60e51b8152602060048201526017602482015276496e76616c6964206163636f756e74206164647265737360481b604482015290519081900360640190fd5b6001600160a01b0383166000908152603f6020526040902082600a811061102b57fe5b6002020160010154905092915050565b611043611883565b6001600160a01b038116611094576040805162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081859191c995cdcc81cd95d606a1b604482015290519081900360640190fd5b603980546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f82e5240229d10cc4b4806dbb17617cfd44ab67bde505b66eec73d21395371a579181900360200190a150565b6033546001600160a01b031681565b603c5481565b60375481565b6039546001600160a01b031681565b603a546001600160a01b031681565b603f60205281600052604060002081600a811061113a57fe5b600202018054600190910154909250905082565b60425460009060ff166111a4576039546001600160a01b031633146111a45760405162461bcd60e51b8152600401808060200182810382526028815260200180611ea76028913960400191505060405180910390fd5b603d546111b890600163ffffffff611a2316565b603d5550600190565b6111c9611883565b603d546111dd90600a63ffffffff611a2316565b6001600160a01b0382166000908152603f60205260409020603d5461120990600a63ffffffff6118ce16565b600a811061121357fe5b600202016001018190555050565b6039546001600160a01b0316331461126a5760405162461bcd60e51b8152600401808060200182810382526028815260200180611ea76028913960400191505060405180910390fd5b603c54610b33908263ffffffff61193316565b60385460ff16156112bf5760405162461bcd60e51b815260040180806020018281038252603c815260200180611dd3603c913960400191505060405180910390fd5b6001600160a01b03821661130c576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b6000811161134f576040805162461bcd60e51b815260206004820152600b60248201526a0416d6f756e7420697320360ac1b604482015290519081900360640190fd5b60425461010090046001600160a01b03163314806113775750603a546001600160a01b031633145b6113b25760405162461bcd60e51b815260040180806020018281038252604a815260200180611e33604a913960600191505060405180910390fd5b6001600160a01b0382166000908152604060208190529020546113db908263ffffffff611a2316565b6001600160a01b03831660009081526040602081815281832093909355603d5460419093529020541415611496576001600160a01b0382166000908152603f60205260409020603d5461145691839161143b90600a63ffffffff6118ce16565b600a811061144557fe5b60020201549063ffffffff611a2316565b6001600160a01b0383166000908152603f60205260409020603d5461148290600a63ffffffff6118ce16565b600a811061148c57fe5b60020201556114d5565b6001600160a01b0382166000908152603f60205260409020603d548291906114c590600a63ffffffff6118ce16565b600a81106114cf57fe5b60020201555b603d546114e990600a63ffffffff611a2316565b6001600160a01b0383166000908152603f60205260409020603d5461151590600a63ffffffff6118ce16565b600a811061151f57fe5b6002020160010155603d546001600160a01b038316600090815260416020526040902055603b546115509082611a23565b603b556038546115709061010090046001600160a01b0316333084611ad6565b60395460408051631676539160e01b81526001600160a01b038581166004830152915191909216916316765391916024808301926020929190829003018186803b1580156115bd57600080fd5b505afa1580156115d1573d6000803e3d6000fd5b505050506040513d60208110156115e757600080fd5b505161160457603c54611600908263ffffffff611a2316565b603c555b604080516001600160a01b03841681526020810183905281517f690a755e9d381a220ee302f6a382749c9cdccbbc983ccdf1c18c978f9281c64d929181900390910190a15050565b603b5481565b61165a611883565b6001600160a01b0381166116a7576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b603454600160a81b900460ff16156116fc576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b604482015290519081900360640190fd5b603380546001600160a01b038084166001600160a01b03199092168217928390556034805460ff60a81b1916600160a81b17905560408051939091168352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150565b60416020526000908152604090205481565b61178b611883565b6042805460ff19166001179055565b60365460ff16156117e8576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b6036805460ff19166001908117909155603555565b60006001600160a01b038316611854576040805162461bcd60e51b8152602060048201526017602482015276496e76616c6964206163636f756e74206164647265737360481b604482015290519081900360640190fd5b6001600160a01b0383166000908152603f6020526040902082600a811061187757fe5b60020201549392505050565b6033546001600160a01b031633146118cc5760405162461bcd60e51b815260040180806020018281038252602f815260200180611d53602f913960400191505060405180910390fd5b565b600081611922576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b81838161192b57fe5b069392505050565b60008282111561198a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600080805b600a811015611a1657603d546001600160a01b0385166000908152603f6020526040902082600a81106119c457fe5b60020201600101541115611a0e576001600160a01b0384166000908152603f60205260409020611a0b9082600a81106119f957fe5b6002020154839063ffffffff611a2316565b91505b600101611995565b5092915050565b303b1590565b600082820183811015611a7d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ac3908490611b36565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611b30908590611b36565b50505050565b611b48826001600160a01b0316611cee565b611b99576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310611bd75780518252601f199092019160209182019101611bb8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c39576040519150601f19603f3d011682016040523d82523d6000602084013e611c3e565b606091505b509150915081611c95576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611b3057808060200190516020811015611cb157600080fd5b5051611b305760405162461bcd60e51b815260040180806020018281038252602a815260200180611e7d602a913960400191505060405180910390fd5b3b15159056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e657273686970416c726561647920696e697469616c697a65642c20757365206e6f6d696e6174654e65774f776e65724f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656456657374696e672072657761726473207374696c6c206e6f7420617661696c61626c655468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e747261637420697320706175736564416d6f756e7420657863656564732074686520636c61696d61626c65207265776172647341646420746f20657363726f772063616e206f6e6c792062652063616c6c65642066726f6d207374616b696e67206f72206f6e676f696e672061697264726f7020636f6e7472616374735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656443616e206f6e6c792062652063616c6c65642066726f6d207374616b696e6720636f6e7472616374a265627a7a7231582011bd6929a2f3d1f2a14f53c47596b7c15737062cf85d28e661a647006ca6c52e64736f6c63430005100032
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.