Latest 25 from a total of 135 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 20312115 | 592 days ago | IN | 0 ETH | 0.00170538 | ||||
| Set Tokamak Laye... | 20312105 | 592 days ago | IN | 0 ETH | 0.00037515 | ||||
| Set Tokamak Laye... | 20311934 | 592 days ago | IN | 0 ETH | 0.00030036 | ||||
| Claim | 20309962 | 592 days ago | IN | 0 ETH | 0.00032381 | ||||
| Claim | 19397536 | 720 days ago | IN | 0 ETH | 0.00668485 | ||||
| Withdraw | 19397535 | 720 days ago | IN | 0 ETH | 0.01050414 | ||||
| Claim | 19397472 | 720 days ago | IN | 0 ETH | 0.00679487 | ||||
| Withdraw | 19397462 | 720 days ago | IN | 0 ETH | 0.01438409 | ||||
| Withdraw | 19087403 | 763 days ago | IN | 0 ETH | 0.00534466 | ||||
| Claim | 19087391 | 763 days ago | IN | 0 ETH | 0.00406178 | ||||
| Claim | 18761761 | 809 days ago | IN | 0 ETH | 0.00456385 | ||||
| Withdraw | 18761725 | 809 days ago | IN | 0 ETH | 0.00740728 | ||||
| Withdraw | 16911504 | 1069 days ago | IN | 0 ETH | 0.00429215 | ||||
| Claim | 16561866 | 1118 days ago | IN | 0 ETH | 0.00240376 | ||||
| Withdraw | 16274694 | 1158 days ago | IN | 0 ETH | 0.00326866 | ||||
| Withdraw | 15977142 | 1200 days ago | IN | 0 ETH | 0.00557999 | ||||
| Claim | 15977139 | 1200 days ago | IN | 0 ETH | 0.00358812 | ||||
| Claim | 15845341 | 1218 days ago | IN | 0 ETH | 0.00199489 | ||||
| Withdraw | 15845332 | 1218 days ago | IN | 0 ETH | 0.00268007 | ||||
| Withdraw | 15632735 | 1248 days ago | IN | 0 ETH | 0.00496436 | ||||
| Claim | 15632725 | 1248 days ago | IN | 0 ETH | 0.0146973 | ||||
| Withdraw | 15541175 | 1261 days ago | IN | 0 ETH | 0.00455368 | ||||
| Claim | 15522079 | 1264 days ago | IN | 0 ETH | 0.00123738 | ||||
| Withdraw | 15522079 | 1264 days ago | IN | 0 ETH | 0.00166832 | ||||
| Withdraw | 15522079 | 1264 days ago | IN | 0 ETH | 0.00166832 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 12880653 | 1680 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x904E4281...2ee96e185 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
StakeTONProxy
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
pragma abicoder v2;
import {IStakeVaultStorage} from "../interfaces/IStakeVaultStorage.sol";
import {IIERC20} from "../interfaces/IIERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./StakeTONStorage.sol";
import "../common/AccessibleCommon.sol";
import {OnApprove} from "../tokens/OnApprove.sol";
import "./ProxyBase.sol";
/// @title Proxy for Stake contracts in Phase 1
contract StakeTONProxy is
StakeTONStorage,
AccessibleCommon,
ProxyBase,
OnApprove
{
using SafeMath for uint256;
event Upgraded(address indexed implementation);
/// @dev event on staking TON
/// @param to the sender
/// @param amount the amount of staking
event Staked(address indexed to, uint256 amount);
/// @dev the constructor of StakeTONProxy
/// @param _logic the logic address of StakeTONProxy
constructor(address _logic) {
assert(
IMPLEMENTATION_SLOT ==
bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1)
);
require(_logic != address(0), "StakeTONProxy: logic is zero");
_setImplementation(_logic);
_setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE);
_setupRole(ADMIN_ROLE, msg.sender);
_setupRole(ADMIN_ROLE, address(this));
}
/// @notice Set pause state
/// @param _pause true:pause or false:resume
function setProxyPause(bool _pause) external onlyOwner {
pauseProxy = _pause;
}
/// @notice Set implementation contract
/// @param impl New implementation contract address
function upgradeTo(address impl) external onlyOwner {
require(impl != address(0), "StakeTONProxy: input is zero");
require(
_implementation() != impl,
"StakeTONProxy: The input address is same as the state"
);
_setImplementation(impl);
emit Upgraded(impl);
}
/// @dev returns the implementation
function implementation() public view returns (address) {
return _implementation();
}
/// @dev receive ether
receive() external payable {
_fallback();
}
/// @dev fallback function , execute on undefined function call
fallback() external payable {
_fallback();
}
/// @dev fallback function , execute on undefined function call
function _fallback() internal {
address _impl = _implementation();
require(
_impl != address(0) && !pauseProxy,
"StakeTONProxy: impl is zero OR proxy is false"
);
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), _impl, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
/// @dev Approves function
/// @dev call by WTON
/// @param owner who actually calls
/// @param spender Who gives permission to use
/// @param tonAmount how much will be available
/// @param data Amount data to use with users
function onApprove(
address owner,
address spender,
uint256 tonAmount,
bytes calldata data
) external override returns (bool) {
(address _spender, uint256 _amount) = _decodeStakeData(data);
require(
tonAmount == _amount && spender == _spender,
"StakeTONProxy: tonAmount != stakingAmount "
);
require(
stakeOnApprove(msg.sender, owner, _spender, _amount),
"StakeTONProxy: stakeOnApprove fails "
);
return true;
}
function _decodeStakeData(bytes calldata input)
internal
pure
returns (address spender, uint256 amount)
{
(spender, amount) = abi.decode(input, (address, uint256));
}
/// @dev stake with WTON
/// @param from WTON
/// @param _owner who actually calls
/// @param _spender Who gives permission to use
/// @param _amount how much will be available
function stakeOnApprove(
address from,
address _owner,
address _spender,
uint256 _amount
) public returns (bool) {
require(
(paytoken == from && _amount > 0 && _spender == address(this)),
"StakeTONProxy: stakeOnApprove init fail"
);
require(
block.number >= saleStartBlock && block.number < startBlock,
"StakeTONProxy: period not allowed"
);
require(
!IStakeVaultStorage(vault).saleClosed(),
"StakeTONProxy: end sale"
);
require(
IIERC20(paytoken).balanceOf(_owner) >= _amount,
"StakeTONProxy: insuffient"
);
LibTokenStake1.StakedAmount storage staked = userStaked[_owner];
if (staked.amount == 0) totalStakers = totalStakers.add(1);
staked.amount = staked.amount.add(_amount);
totalStakedAmount = totalStakedAmount.add(_amount);
require(
IIERC20(from).transferFrom(_owner, _spender, _amount),
"StakeTONProxy: transfer fail"
);
emit Staked(_owner, _amount);
return true;
}
/// @dev set initial storage
/// @param _addr the array addresses of token, paytoken, vault, defiAddress
/// @param _registry the registry address
/// @param _intdata the array valued of saleStartBlock, stakeStartBlock, periodBlocks
function setInit(
address[4] memory _addr,
address _registry,
uint256[3] memory _intdata
) external onlyOwner {
require(token == address(0), "StakeTONProxy: already initialized");
require(
_registry != address(0) &&
_addr[2] != address(0) &&
_intdata[0] < _intdata[1],
"StakeTONProxy: setInit fail"
);
token = _addr[0];
paytoken = _addr[1];
vault = _addr[2];
defiAddr = _addr[3];
stakeRegistry = _registry;
tokamakLayer2 = address(0);
saleStartBlock = _intdata[0];
startBlock = _intdata[1];
endBlock = startBlock.add(_intdata[2]);
}
}//SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.6;
pragma abicoder v2;
interface IStakeVaultStorage {
/// @dev reward token : TOS
function tos() external view returns (address);
/// @dev paytoken is the token that the user stakes.
function paytoken() external view returns (address);
/// @dev allocated amount of TOS
function cap() external view returns (uint256);
/// @dev Operation type of staking amount
function stakeType() external view returns (uint256);
/// @dev External contract address used when operating the staking amount
function defiAddr() external view returns (address);
/// @dev the start block for sale.
function saleStartBlock() external view returns (uint256);
/// @dev the staking start block
function stakeStartBlock() external view returns (uint256);
/// @dev the staking end block.
function stakeEndBlock() external view returns (uint256);
/// @dev the staking real end block.
function realEndBlock() external view returns (uint256);
/// @dev reward amount per block
function blockTotalReward() external view returns (uint256);
/// @dev sale closed flag
function saleClosed() external view returns (bool);
/// @dev the total staked amount stored at orderedEndBlock’s end block time
function stakeEndBlockTotal(uint256 endblock)
external
view
returns (uint256 totalStakedAmount);
}//SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.6;
interface IIERC20 {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, 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) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
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-contracts/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) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
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) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}//SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.6;
import "./Stake1Storage.sol";
/// @title the storage of StakeTONStorage
contract StakeTONStorage is Stake1Storage {
/// @dev TON address
address public ton;
/// @dev WTON address
address public wton;
/// @dev SeigManager address
address public seigManager;
/// @dev DepositManager address
address public depositManager;
/// @dev swapProxy address
address public swapProxy;
/// @dev the layer2 address in Tokamak
address public tokamakLayer2;
/// @dev the accumulated TON amount staked into tokamak , in wei unit
uint256 public toTokamak;
/// @dev the accumulated WTON amount unstaked from tokamak , in ray unit
uint256 public fromTokamak;
/// @dev the accumulated WTON amount swapped using uniswap , in ray unit
uint256 public toUniswapWTON;
/// @dev the TOS balance in this contract
uint256 public swappedAmountTOS;
/// @dev the TON balance in this contract when withdraw at first
uint256 public finalBalanceTON;
/// @dev the WTON balance in this contract when withdraw at first
uint256 public finalBalanceWTON;
/// @dev defi status
uint256 public defiStatus;
/// @dev the number of requesting unstaking to tokamak , when process unstaking, reset zero.
uint256 public requestNum;
/// @dev the withdraw flag, when withdraw at first, set true
bool public withdrawFlag;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./AccessRoleCommon.sol";
contract AccessibleCommon is AccessRoleCommon, AccessControl {
modifier onlyOwner() {
require(isAdmin(msg.sender), "Accessible: Caller is not an admin");
_;
}
/// @dev add admin
/// @param account address to add
function addAdmin(address account) public virtual onlyOwner {
grantRole(ADMIN_ROLE, account);
}
/// @dev remove admin
/// @param account address to remove
function removeAdmin(address account) public virtual onlyOwner {
renounceRole(ADMIN_ROLE, account);
}
/// @dev transfer admin
/// @param newAdmin new admin address
function transferAdmin(address newAdmin) external virtual onlyOwner {
require(newAdmin != address(0), "Accessible: zero address");
require(msg.sender != newAdmin, "Accessible: same admin");
grantRole(ADMIN_ROLE, newAdmin);
renounceRole(ADMIN_ROLE, msg.sender);
}
/// @dev whether admin
/// @param account address to check
function isAdmin(address account) public view virtual returns (bool) {
return hasRole(ADMIN_ROLE, account);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import {ERC165} from "@openzeppelin/contracts/introspection/ERC165.sol";
abstract contract OnApprove is ERC165 {
constructor() {
_registerInterface(OnApprove(this).onApprove.selector);
}
// solhint-disable-next-line max-line-length
function onApprove(
address owner,
address spender,
uint256 amount,
bytes calldata data
) external virtual returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
abstract contract ProxyBase {
// bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1))
bytes32 internal constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/// @dev Sets the implementation address of the proxy.
/// @param newImplementation Address of the new implementation.
function _setImplementation(address newImplementation) internal {
require(
Address.isContract(newImplementation),
"ProxyBase: Cannot set a proxy implementation to a non-contract address"
);
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
function _implementation() internal view returns (address impl) {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
impl := sload(slot)
}
}
}//SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.6;
import "../libraries/LibTokenStake1.sol";
/// @title The base storage of stakeContract
contract Stake1Storage {
/// @dev reward token : TOS
address public token;
/// @dev registry
address public stakeRegistry;
/// @dev paytoken is the token that the user stakes. ( if paytoken is ether, paytoken is address(0) )
address public paytoken;
/// @dev A vault that holds TOS rewards.
address public vault;
/// @dev the start block for sale.
uint256 public saleStartBlock;
/// @dev the staking start block, once staking starts, users can no longer apply for staking.
uint256 public startBlock;
/// @dev the staking end block.
uint256 public endBlock;
/// @dev the total amount claimed
uint256 public rewardClaimedTotal;
/// @dev the total staked amount
uint256 public totalStakedAmount;
/// @dev information staked by user
mapping(address => LibTokenStake1.StakedAmount) public userStaked;
/// @dev total stakers
uint256 public totalStakers;
uint256 internal _lock;
/// @dev flag for pause proxy
bool public pauseProxy;
/// @dev extra address storage
address public defiAddr;
///@dev for migrate L2
bool public migratedL2;
/// @dev user's staked information
function getUserStaked(address user)
external
view
returns (
uint256 amount,
uint256 claimedBlock,
uint256 claimedAmount,
uint256 releasedBlock,
uint256 releasedAmount,
uint256 releasedTOSAmount,
bool released
)
{
return (
userStaked[user].amount,
userStaked[user].claimedBlock,
userStaked[user].claimedAmount,
userStaked[user].releasedBlock,
userStaked[user].releasedAmount,
userStaked[user].releasedTOSAmount,
userStaked[user].released
);
}
/// @dev Give the infomation of this stakeContracts
/// @return paytoken, vault, [saleStartBlock, startBlock, endBlock], rewardClaimedTotal, totalStakedAmount, totalStakers
function infos()
external
view
returns (
address,
address,
uint256[3] memory,
uint256,
uint256,
uint256
)
{
return (
paytoken,
vault,
[saleStartBlock, startBlock, endBlock],
rewardClaimedTotal,
totalStakedAmount,
totalStakers
);
}
}//SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.6;
library LibTokenStake1 {
enum DefiStatus {
NONE,
APPROVE,
DEPOSITED,
REQUESTWITHDRAW,
REQUESTWITHDRAWALL,
WITHDRAW,
END
}
struct DefiInfo {
string name;
address router;
address ext1;
address ext2;
uint256 fee;
address routerV2;
}
struct StakeInfo {
string name;
uint256 startBlock;
uint256 endBlock;
uint256 balance;
uint256 totalRewardAmount;
uint256 claimRewardAmount;
}
struct StakedAmount {
uint256 amount;
uint256 claimedBlock;
uint256 claimedAmount;
uint256 releasedBlock;
uint256 releasedAmount;
uint256 releasedTOSAmount;
bool released;
}
struct StakedAmountForSTOS {
uint256 amount;
uint256 startBlock;
uint256 periodBlock;
uint256 rewardPerBlock;
uint256 claimedBlock;
uint256 claimedAmount;
uint256 releasedBlock;
uint256 releasedAmount;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableSet.sol";
import "../utils/Address.sol";
import "../GSN/Context.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view returns (bool) {
return _roles[role].members.contains(account);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
return _roles[role].members.length();
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
return _roles[role].members.at(index);
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
_roles[role].adminRole = adminRole;
}
function _grantRole(bytes32 role, address account) private {
if (_roles[role].members.add(account)) {
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) private {
if (_roles[role].members.remove(account)) {
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
contract AccessRoleCommon {
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN");
bytes32 public constant MINTER_ROLE = keccak256("MINTER");
bytes32 public constant BURNER_ROLE = keccak256("BURNER");
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
// When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @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;
// solhint-disable-next-line no-inline-assembly
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");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(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");
// solhint-disable-next-line avoid-low-level-calls
(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");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/
abstract contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedInterfaces;
constructor () internal {
// Derived contracts need only register support for their own interfaces,
// we register support for ERC165 itself here
_registerInterface(_INTERFACE_ID_ERC165);
}
/**
* @dev See {IERC165-supportsInterface}.
*
* Time complexity O(1), guaranteed to always use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view override returns (bool) {
return _supportedInterfaces[interfaceId];
}
/**
* @dev Registers the contract as an implementer of the interface defined by
* `interfaceId`. Support of the actual ERC165 interface is automatic and
* registering its interface id is not required.
*
* See {IERC165-supportsInterface}.
*
* Requirements:
*
* - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
*/
function _registerInterface(bytes4 interfaceId) internal virtual {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"optimizer": {
"enabled": true,
"runs": 100
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_logic","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defiAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defiStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalBalanceTON","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalBalanceWTON","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fromTokamak","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserStaked","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"claimedBlock","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"releasedBlock","type":"uint256"},{"internalType":"uint256","name":"releasedAmount","type":"uint256"},{"internalType":"uint256","name":"releasedTOSAmount","type":"uint256"},{"internalType":"bool","name":"released","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"infos","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[3]","name":"","type":"uint256[3]"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migratedL2","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tonAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onApprove","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseProxy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paytoken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardClaimedTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStartBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seigManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[4]","name":"_addr","type":"address[4]"},{"internalType":"address","name":"_registry","type":"address"},{"internalType":"uint256[3]","name":"_intdata","type":"uint256[3]"}],"name":"setInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_pause","type":"bool"}],"name":"setProxyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeOnApprove","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swappedAmountTOS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toTokamak","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toUniswapWTON","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokamakLayer2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ton","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userStaked","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"claimedBlock","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"releasedBlock","type":"uint256"},{"internalType":"uint256","name":"releasedAmount","type":"uint256"},{"internalType":"uint256","name":"releasedTOSAmount","type":"uint256"},{"internalType":"bool","name":"released","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFlag","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wton","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
0x60806040523480156200001157600080fd5b50604051620025c3380380620025c3833981016040819052620000349162000357565b620000466301ffc9a760e01b620000ed565b62000058632139e50b60e11b620000ed565b6001600160a01b0381166200008a5760405162461bcd60e51b8152600401620000819062000387565b60405180910390fd5b620000958162000172565b620000b06000805160206200255d83398151915280620001e9565b620000cb6000805160206200255d833981519152336200023b565b620000e66000805160206200255d833981519152306200023b565b50620003be565b6001600160e01b031980821614156200014d576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152601d60205260409020805460ff19166001179055565b62000188816200024b60201b620015051760201c565b620001c55760405162461bcd60e51b81526004018080602001828103825260468152602001806200257d6046913960600191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000828152601c6020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a46000918252601c602052604090912060020155565b62000247828262000251565b5050565b3b151590565b6000828152601c60209081526040909120620002789183906200150b620002cc821b17901c565b15620002475762000288620002ec565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620002e3836001600160a01b038416620002f0565b90505b92915050565b3390565b6000620002fe83836200033f565b6200033657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620002e6565b506000620002e6565b60009081526001919091016020526040902054151590565b60006020828403121562000369578081fd5b81516001600160a01b038116811462000380578182fd5b9392505050565b6020808252601c908201527f5374616b65544f4e50726f78793a206c6f676963206973207a65726f00000000604082015260600190565b61218f80620003ce6000396000f3fe6080604052600436106102ce5760003560e01c8063722853261161017b578063acc3a939116100d7578063e09974b911610085578063e09974b9146107c6578063e58e2747146107db578063e6a7bc87146107f0578063e7bf950c14610805578063fbfa77cf14610825578063fc0c546a1461083a578063fd7fa4601461084f576102dd565b8063acc3a939146106f4578063b2d4d6a314610727578063ca15c8731461073c578063cc48b9471461075c578063d539139314610771578063d547741f14610786578063dac3fc3f146107a6576102dd565b80639010d07c116101345780639010d07c1461063957806391d148541461065957806392ea3b4c146106795780639a88be2f1461068e5780639d84ca35146106b5578063a1f5f50e146106ca578063a217fddf146106df576102dd565b806372285326146105a557806375829def146105ba57806375b238fc146105da5780637cb00d25146105ef578063869890381461060f5780638d62d94914610624576102dd565b80633659cfe61161022a57806363a8fd89116101e357806363a8fd8914610507578063683048351461051c5780636c7ac9d8146105315780636e7cf534146105465780636ec4be901461055b5780636fb7f558146105705780637048027514610585576102dd565b80633659cfe6146104665780634273ca161461048657806343b0934a146104a657806348cd4cb1146104c8578063567e98f9146104dd5780635c60da1b146104f2576102dd565b80631785f53c116102875780631785f53c1461039c57806320027275146103bc578063248a9ca3146103d157806324d7806c146103f1578063282c51f3146104115780632f2ff15d1461042657806336568abe14610446576102dd565b806301ffc9a7146102e557806305871b781461031b578063083c63231461033d5780630ac8e0f3146103525780630bfb3841146103675780630ea3d9c914610387576102dd565b366102dd576102db610864565b005b6102db610864565b3480156102f157600080fd5b50610305610300366004611bd8565b6108d4565b6040516103129190611cb5565b60405180910390f35b34801561032757600080fd5b506103306108f7565b6040516103129190611cc0565b34801561034957600080fd5b506103306108fd565b34801561035e57600080fd5b50610330610903565b34801561037357600080fd5b506103056103823660046119a5565b610909565b34801561039357600080fd5b50610330610c02565b3480156103a857600080fd5b506102db6103b736600461195e565b610c08565b3480156103c857600080fd5b50610330610c67565b3480156103dd57600080fd5b506103306103ec366004611b70565b610c6d565b3480156103fd57600080fd5b5061030561040c36600461195e565b610c82565b34801561041d57600080fd5b50610330610ca2565b34801561043257600080fd5b506102db610441366004611b88565b610cc6565b34801561045257600080fd5b506102db610461366004611b88565b610d2d565b34801561047257600080fd5b506102db61048136600461195e565b610d8e565b34801561049257600080fd5b506103056104a13660046119f5565b610e71565b3480156104b257600080fd5b506104bb610ef6565b6040516103129190611c18565b3480156104d457600080fd5b50610330610f05565b3480156104e957600080fd5b50610330610f0b565b3480156104fe57600080fd5b506104bb610f11565b34801561051357600080fd5b50610305610f20565b34801561052857600080fd5b506104bb610f29565b34801561053d57600080fd5b506104bb610f38565b34801561055257600080fd5b50610305610f47565b34801561056757600080fd5b506104bb610f50565b34801561057c57600080fd5b506104bb610f5f565b34801561059157600080fd5b506102db6105a036600461195e565b610f6e565b3480156105b157600080fd5b50610330610fca565b3480156105c657600080fd5b506102db6105d536600461195e565b610fd0565b3480156105e657600080fd5b506103306110f1565b3480156105fb57600080fd5b506102db61060a366004611b38565b611103565b34801561061b57600080fd5b5061033061115a565b34801561063057600080fd5b506104bb611160565b34801561064557600080fd5b506104bb610654366004611bb7565b61116f565b34801561066557600080fd5b50610305610674366004611b88565b61118e565b34801561068557600080fd5b506104bb6111a6565b34801561069a57600080fd5b506106a36111b5565b60405161031296959493929190611c2c565b3480156106c157600080fd5b506104bb61120b565b3480156106d657600080fd5b5061030561121f565b3480156106eb57600080fd5b5061033061122f565b34801561070057600080fd5b5061071461070f36600461195e565b611234565b6040516103129796959493929190611fcc565b34801561073357600080fd5b50610330611274565b34801561074857600080fd5b50610330610757366004611b70565b61127a565b34801561076857600080fd5b506104bb611291565b34801561077d57600080fd5b506103306112a0565b34801561079257600080fd5b506102db6107a1366004611b88565b6112c4565b3480156107b257600080fd5b506107146107c136600461195e565b61131d565b3480156107d257600080fd5b50610330611366565b3480156107e757600080fd5b5061033061136c565b3480156107fc57600080fd5b50610330611372565b34801561081157600080fd5b506102db610820366004611a8f565b611378565b34801561083157600080fd5b506104bb6114e1565b34801561084657600080fd5b506104bb6114f0565b34801561085b57600080fd5b506103306114ff565b600061086e611520565b90506001600160a01b0381161580159061088b5750600c5460ff16155b6108b05760405162461bcd60e51b81526004016108a790611f7f565b60405180910390fd5b3660008037600080366000845af43d6000803e8080156108cf573d6000f35b3d6000fd5b6001600160e01b031981166000908152601d602052604090205460ff165b919050565b60155481565b60065481565b60145481565b6002546000906001600160a01b0386811691161480156109295750600082115b801561093d57506001600160a01b03831630145b6109595760405162461bcd60e51b81526004016108a790611f38565b600454431015801561096c575060055443105b6109885760405162461bcd60e51b81526004016108a790611cc9565b600360009054906101000a90046001600160a01b03166001600160a01b031663b8c766b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d657600080fd5b505afa1580156109ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0e9190611b54565b15610a2b5760405162461bcd60e51b81526004016108a790611e3b565b6002546040516370a0823160e01b815283916001600160a01b0316906370a0823190610a5b908890600401611c18565b60206040518083038186803b158015610a7357600080fd5b505afa158015610a87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aab9190611c00565b1015610ac95760405162461bcd60e51b81526004016108a790611f05565b6001600160a01b03841660009081526009602052604090208054610af957600a54610af5906001611545565b600a555b8054610b059084611545565b8155600854610b149084611545565b6008556040516323b872dd60e01b81526001600160a01b038716906323b872dd90610b4790889088908890600401611c91565b602060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b999190611b54565b610bb55760405162461bcd60e51b81526004016108a790611d0a565b846001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d84604051610bee9190611cc0565b60405180910390a250600195945050505050565b60165481565b610c1133610c82565b610c4c5760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b610c646000805160206120c583398151915282610d2d565b50565b60045481565b6000908152601c602052604090206002015490565b6000610c9c6000805160206120c58339815191528361118e565b92915050565b7f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c881565b6000828152601c6020526040902060020154610ce49061067461159f565b610d1f5760405162461bcd60e51b815260040180806020018281038252602f815260200180612044602f913960400191505060405180910390fd5b610d2982826115a3565b5050565b610d3561159f565b6001600160a01b0316816001600160a01b031614610d845760405162461bcd60e51b815260040180806020018281038252602f81526020018061212b602f913960400191505060405180910390fd5b610d29828261160c565b610d9733610c82565b610dd25760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b6001600160a01b038116610df85760405162461bcd60e51b81526004016108a790611e04565b806001600160a01b0316610e0a611520565b6001600160a01b03161415610e315760405162461bcd60e51b81526004016108a790611e6c565b610e3a81611675565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000806000610e8085856116dd565b915091508086148015610ea45750816001600160a01b0316876001600160a01b0316145b610ec05760405162461bcd60e51b81526004016108a790611d78565b610ecc33898484610909565b610ee85760405162461bcd60e51b81526004016108a790611ec1565b506001979650505050505050565b6002546001600160a01b031681565b60055481565b60085481565b6000610f1b611520565b905090565b600c5460ff1681565b6001546001600160a01b031681565b6010546001600160a01b031681565b601b5460ff1681565b6011546001600160a01b031681565b600f546001600160a01b031681565b610f7733610c82565b610fb25760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b610c646000805160206120c583398151915282610cc6565b60195481565b610fd933610c82565b6110145760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b6001600160a01b03811661106a576040805162461bcd60e51b815260206004820152601860248201527741636365737369626c653a207a65726f206164647265737360401b604482015290519081900360640190fd5b336001600160a01b03821614156110c1576040805162461bcd60e51b815260206004820152601660248201527520b1b1b2b9b9b4b136329d1039b0b6b29030b236b4b760511b604482015290519081900360640190fd5b6110d96000805160206120c583398151915282610cc6565b610c646000805160206120c583398151915233610d2d565b6000805160206120c583398151915281565b61110c33610c82565b6111475760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b600c805460ff1916911515919091179055565b600a5481565b600e546001600160a01b031681565b6000828152601c6020526040812061118790836116f7565b9392505050565b6000828152601c602052604081206111879083611703565b6012546001600160a01b031681565b6000806111c06118c8565b5050600254600354604080516060810182526004548152600554602082015260065491810191909152600754600854600a546001600160a01b03958616979590941695509193909290565b600c5461010090046001600160a01b031681565b600c54600160a81b900460ff1681565b600081565b6009602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290919060ff1687565b60075481565b6000818152601c60205260408120610c9c90611718565b600d546001600160a01b031681565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b6000828152601c60205260409020600201546112e29061067461159f565b610d845760405162461bcd60e51b81526004018080602001828103825260308152602001806120956030913960400191505060405180910390fd5b6001600160a01b03166000908152600960205260409020805460018201546002830154600384015460048501546005860154600690960154949693959294919390929160ff1690565b601a5481565b60175481565b60185481565b61138133610c82565b6113bc5760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b6000546001600160a01b0316156113e55760405162461bcd60e51b81526004016108a790611dc2565b6001600160a01b03821615801590611409575060408301516001600160a01b031615155b8015611419575060208101518151105b6114355760405162461bcd60e51b81526004016108a790611d41565b8251600080546001600160a01b03199081166001600160a01b03938416179091556020808601516002805484169185169190911790556040808701516003805485169186169190911790556060870151600c805491861661010002610100600160a81b031990921691909117905560018054948716948416949094179093556012805490921690915582516004558201516005819055908201516114d99190611545565b600655505050565b6003546001600160a01b031681565b6000546001600160a01b031681565b60135481565b3b151590565b6000611187836001600160a01b038416611723565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b600082820183811015611187576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6000828152601c602052604090206115bb908261150b565b15610d29576115c861159f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152601c60205260409020611624908261176d565b15610d295761163161159f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b61167e81611505565b6116b95760405162461bcd60e51b81526004018080602001828103825260468152602001806120e56046913960600191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000806116ec8385018561197a565b909590945092505050565b60006111878383611782565b6000611187836001600160a01b0384166117e6565b6000610c9c826117fe565b600061172f83836117e6565b61176557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c9c565b506000610c9c565b6000611187836001600160a01b038416611802565b815460009082106117c45760405162461bcd60e51b81526004018080602001828103825260228152602001806120226022913960400191505060405180910390fd5b8260000182815481106117d357fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b600081815260018301602052604081205480156118be578354600019808301919081019060009087908390811061183557fe5b906000526020600020015490508087600001848154811061185257fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061188257fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610c9c565b6000915050610c9c565b60405180606001604052806003906020820280368337509192915050565b80356108f281611ffe565b600082601f830112611901578081fd5b6040516060810181811067ffffffffffffffff8211171561191e57fe5b604052808360608101861015611932578384fd5b835b6003811015611953578135835260209283019290910190600101611934565b509195945050505050565b60006020828403121561196f578081fd5b813561118781611ffe565b6000806040838503121561198c578081fd5b823561199781611ffe565b946020939093013593505050565b600080600080608085870312156119ba578182fd5b84356119c581611ffe565b935060208501356119d581611ffe565b925060408501356119e581611ffe565b9396929550929360600135925050565b600080600080600060808688031215611a0c578081fd5b8535611a1781611ffe565b94506020860135611a2781611ffe565b935060408601359250606086013567ffffffffffffffff80821115611a4a578283fd5b818801915088601f830112611a5d578283fd5b813581811115611a6b578384fd5b896020828501011115611a7c578384fd5b9699959850939650602001949392505050565b60008060006101008486031215611aa4578283fd5b84601f850112611ab2578283fd5b6040516080810181811067ffffffffffffffff82111715611acf57fe5b60405280856080810188811115611ae4578687fd5b865b6004811015611b0f578235611afa81611ffe565b84526020938401939290920191600101611ae6565b50839650611b1c816118e6565b955050505050611b2f8560a086016118f1565b90509250925092565b600060208284031215611b49578081fd5b813561118781612013565b600060208284031215611b65578081fd5b815161118781612013565b600060208284031215611b81578081fd5b5035919050565b60008060408385031215611b9a578182fd5b823591506020830135611bac81611ffe565b809150509250929050565b60008060408385031215611bc9578182fd5b50508035926020909101359150565b600060208284031215611be9578081fd5b81356001600160e01b031981168114611187578182fd5b600060208284031215611c11578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b038781168252861660208083019190915261010082019060408301908760005b6003811015611c7057815184529282019290820190600101611c53565b505050508460a08301528360c08301528260e0830152979650505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b90815260200190565b60208082526021908201527f5374616b65544f4e50726f78793a20706572696f64206e6f7420616c6c6f77656040820152601960fa1b606082015260800190565b6020808252601c908201527f5374616b65544f4e50726f78793a207472616e73666572206661696c00000000604082015260600190565b6020808252601b908201527f5374616b65544f4e50726f78793a20736574496e6974206661696c0000000000604082015260600190565b6020808252602a908201527f5374616b65544f4e50726f78793a20746f6e416d6f756e7420213d207374616b604082015269034b733a0b6b7bab73a160b51b606082015260800190565b60208082526022908201527f5374616b65544f4e50726f78793a20616c726561647920696e697469616c697a604082015261195960f21b606082015260800190565b6020808252601c908201527f5374616b65544f4e50726f78793a20696e707574206973207a65726f00000000604082015260600190565b6020808252601790820152765374616b65544f4e50726f78793a20656e642073616c6560481b604082015260600190565b60208082526035908201527f5374616b65544f4e50726f78793a2054686520696e70757420616464726573736040820152742069732073616d652061732074686520737461746560581b606082015260800190565b60208082526024908201527f5374616b65544f4e50726f78793a207374616b654f6e417070726f7665206661604082015263034b639960e51b606082015260800190565b60208082526019908201527814dd185ad95513d3941c9bde1e4e881a5b9cdd59999a595b9d603a1b604082015260600190565b60208082526027908201527f5374616b65544f4e50726f78793a207374616b654f6e417070726f766520696e6040820152661a5d0819985a5b60ca1b606082015260800190565b6020808252602d908201527f5374616b65544f4e50726f78793a20696d706c206973207a65726f204f52207060408201526c726f78792069732066616c736560981b606082015260800190565b968752602087019590955260408601939093526060850191909152608084015260a0830152151560c082015260e00190565b6001600160a01b0381168114610c6457600080fd5b8015158114610c6457600080fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7441636365737369626c653a2043616c6c6572206973206e6f7420616e2061646d696e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65df8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4250726f7879426173653a2043616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212205d588506f19c5c82a10fac6c9eb427627270214b4799c2a3ab4f704ef2baa2ab64736f6c63430007060033df8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4250726f7879426173653a2043616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000000000000000000d08c561507fd6f6df662a239bb49b8a773e6e411
Deployed Bytecode
0x6080604052600436106102ce5760003560e01c8063722853261161017b578063acc3a939116100d7578063e09974b911610085578063e09974b9146107c6578063e58e2747146107db578063e6a7bc87146107f0578063e7bf950c14610805578063fbfa77cf14610825578063fc0c546a1461083a578063fd7fa4601461084f576102dd565b8063acc3a939146106f4578063b2d4d6a314610727578063ca15c8731461073c578063cc48b9471461075c578063d539139314610771578063d547741f14610786578063dac3fc3f146107a6576102dd565b80639010d07c116101345780639010d07c1461063957806391d148541461065957806392ea3b4c146106795780639a88be2f1461068e5780639d84ca35146106b5578063a1f5f50e146106ca578063a217fddf146106df576102dd565b806372285326146105a557806375829def146105ba57806375b238fc146105da5780637cb00d25146105ef578063869890381461060f5780638d62d94914610624576102dd565b80633659cfe61161022a57806363a8fd89116101e357806363a8fd8914610507578063683048351461051c5780636c7ac9d8146105315780636e7cf534146105465780636ec4be901461055b5780636fb7f558146105705780637048027514610585576102dd565b80633659cfe6146104665780634273ca161461048657806343b0934a146104a657806348cd4cb1146104c8578063567e98f9146104dd5780635c60da1b146104f2576102dd565b80631785f53c116102875780631785f53c1461039c57806320027275146103bc578063248a9ca3146103d157806324d7806c146103f1578063282c51f3146104115780632f2ff15d1461042657806336568abe14610446576102dd565b806301ffc9a7146102e557806305871b781461031b578063083c63231461033d5780630ac8e0f3146103525780630bfb3841146103675780630ea3d9c914610387576102dd565b366102dd576102db610864565b005b6102db610864565b3480156102f157600080fd5b50610305610300366004611bd8565b6108d4565b6040516103129190611cb5565b60405180910390f35b34801561032757600080fd5b506103306108f7565b6040516103129190611cc0565b34801561034957600080fd5b506103306108fd565b34801561035e57600080fd5b50610330610903565b34801561037357600080fd5b506103056103823660046119a5565b610909565b34801561039357600080fd5b50610330610c02565b3480156103a857600080fd5b506102db6103b736600461195e565b610c08565b3480156103c857600080fd5b50610330610c67565b3480156103dd57600080fd5b506103306103ec366004611b70565b610c6d565b3480156103fd57600080fd5b5061030561040c36600461195e565b610c82565b34801561041d57600080fd5b50610330610ca2565b34801561043257600080fd5b506102db610441366004611b88565b610cc6565b34801561045257600080fd5b506102db610461366004611b88565b610d2d565b34801561047257600080fd5b506102db61048136600461195e565b610d8e565b34801561049257600080fd5b506103056104a13660046119f5565b610e71565b3480156104b257600080fd5b506104bb610ef6565b6040516103129190611c18565b3480156104d457600080fd5b50610330610f05565b3480156104e957600080fd5b50610330610f0b565b3480156104fe57600080fd5b506104bb610f11565b34801561051357600080fd5b50610305610f20565b34801561052857600080fd5b506104bb610f29565b34801561053d57600080fd5b506104bb610f38565b34801561055257600080fd5b50610305610f47565b34801561056757600080fd5b506104bb610f50565b34801561057c57600080fd5b506104bb610f5f565b34801561059157600080fd5b506102db6105a036600461195e565b610f6e565b3480156105b157600080fd5b50610330610fca565b3480156105c657600080fd5b506102db6105d536600461195e565b610fd0565b3480156105e657600080fd5b506103306110f1565b3480156105fb57600080fd5b506102db61060a366004611b38565b611103565b34801561061b57600080fd5b5061033061115a565b34801561063057600080fd5b506104bb611160565b34801561064557600080fd5b506104bb610654366004611bb7565b61116f565b34801561066557600080fd5b50610305610674366004611b88565b61118e565b34801561068557600080fd5b506104bb6111a6565b34801561069a57600080fd5b506106a36111b5565b60405161031296959493929190611c2c565b3480156106c157600080fd5b506104bb61120b565b3480156106d657600080fd5b5061030561121f565b3480156106eb57600080fd5b5061033061122f565b34801561070057600080fd5b5061071461070f36600461195e565b611234565b6040516103129796959493929190611fcc565b34801561073357600080fd5b50610330611274565b34801561074857600080fd5b50610330610757366004611b70565b61127a565b34801561076857600080fd5b506104bb611291565b34801561077d57600080fd5b506103306112a0565b34801561079257600080fd5b506102db6107a1366004611b88565b6112c4565b3480156107b257600080fd5b506107146107c136600461195e565b61131d565b3480156107d257600080fd5b50610330611366565b3480156107e757600080fd5b5061033061136c565b3480156107fc57600080fd5b50610330611372565b34801561081157600080fd5b506102db610820366004611a8f565b611378565b34801561083157600080fd5b506104bb6114e1565b34801561084657600080fd5b506104bb6114f0565b34801561085b57600080fd5b506103306114ff565b600061086e611520565b90506001600160a01b0381161580159061088b5750600c5460ff16155b6108b05760405162461bcd60e51b81526004016108a790611f7f565b60405180910390fd5b3660008037600080366000845af43d6000803e8080156108cf573d6000f35b3d6000fd5b6001600160e01b031981166000908152601d602052604090205460ff165b919050565b60155481565b60065481565b60145481565b6002546000906001600160a01b0386811691161480156109295750600082115b801561093d57506001600160a01b03831630145b6109595760405162461bcd60e51b81526004016108a790611f38565b600454431015801561096c575060055443105b6109885760405162461bcd60e51b81526004016108a790611cc9565b600360009054906101000a90046001600160a01b03166001600160a01b031663b8c766b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d657600080fd5b505afa1580156109ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0e9190611b54565b15610a2b5760405162461bcd60e51b81526004016108a790611e3b565b6002546040516370a0823160e01b815283916001600160a01b0316906370a0823190610a5b908890600401611c18565b60206040518083038186803b158015610a7357600080fd5b505afa158015610a87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aab9190611c00565b1015610ac95760405162461bcd60e51b81526004016108a790611f05565b6001600160a01b03841660009081526009602052604090208054610af957600a54610af5906001611545565b600a555b8054610b059084611545565b8155600854610b149084611545565b6008556040516323b872dd60e01b81526001600160a01b038716906323b872dd90610b4790889088908890600401611c91565b602060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b999190611b54565b610bb55760405162461bcd60e51b81526004016108a790611d0a565b846001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d84604051610bee9190611cc0565b60405180910390a250600195945050505050565b60165481565b610c1133610c82565b610c4c5760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b610c646000805160206120c583398151915282610d2d565b50565b60045481565b6000908152601c602052604090206002015490565b6000610c9c6000805160206120c58339815191528361118e565b92915050565b7f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c881565b6000828152601c6020526040902060020154610ce49061067461159f565b610d1f5760405162461bcd60e51b815260040180806020018281038252602f815260200180612044602f913960400191505060405180910390fd5b610d2982826115a3565b5050565b610d3561159f565b6001600160a01b0316816001600160a01b031614610d845760405162461bcd60e51b815260040180806020018281038252602f81526020018061212b602f913960400191505060405180910390fd5b610d29828261160c565b610d9733610c82565b610dd25760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b6001600160a01b038116610df85760405162461bcd60e51b81526004016108a790611e04565b806001600160a01b0316610e0a611520565b6001600160a01b03161415610e315760405162461bcd60e51b81526004016108a790611e6c565b610e3a81611675565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000806000610e8085856116dd565b915091508086148015610ea45750816001600160a01b0316876001600160a01b0316145b610ec05760405162461bcd60e51b81526004016108a790611d78565b610ecc33898484610909565b610ee85760405162461bcd60e51b81526004016108a790611ec1565b506001979650505050505050565b6002546001600160a01b031681565b60055481565b60085481565b6000610f1b611520565b905090565b600c5460ff1681565b6001546001600160a01b031681565b6010546001600160a01b031681565b601b5460ff1681565b6011546001600160a01b031681565b600f546001600160a01b031681565b610f7733610c82565b610fb25760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b610c646000805160206120c583398151915282610cc6565b60195481565b610fd933610c82565b6110145760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b6001600160a01b03811661106a576040805162461bcd60e51b815260206004820152601860248201527741636365737369626c653a207a65726f206164647265737360401b604482015290519081900360640190fd5b336001600160a01b03821614156110c1576040805162461bcd60e51b815260206004820152601660248201527520b1b1b2b9b9b4b136329d1039b0b6b29030b236b4b760511b604482015290519081900360640190fd5b6110d96000805160206120c583398151915282610cc6565b610c646000805160206120c583398151915233610d2d565b6000805160206120c583398151915281565b61110c33610c82565b6111475760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b600c805460ff1916911515919091179055565b600a5481565b600e546001600160a01b031681565b6000828152601c6020526040812061118790836116f7565b9392505050565b6000828152601c602052604081206111879083611703565b6012546001600160a01b031681565b6000806111c06118c8565b5050600254600354604080516060810182526004548152600554602082015260065491810191909152600754600854600a546001600160a01b03958616979590941695509193909290565b600c5461010090046001600160a01b031681565b600c54600160a81b900460ff1681565b600081565b6009602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290919060ff1687565b60075481565b6000818152601c60205260408120610c9c90611718565b600d546001600160a01b031681565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b6000828152601c60205260409020600201546112e29061067461159f565b610d845760405162461bcd60e51b81526004018080602001828103825260308152602001806120956030913960400191505060405180910390fd5b6001600160a01b03166000908152600960205260409020805460018201546002830154600384015460048501546005860154600690960154949693959294919390929160ff1690565b601a5481565b60175481565b60185481565b61138133610c82565b6113bc5760405162461bcd60e51b81526004018080602001828103825260228152602001806120736022913960400191505060405180910390fd5b6000546001600160a01b0316156113e55760405162461bcd60e51b81526004016108a790611dc2565b6001600160a01b03821615801590611409575060408301516001600160a01b031615155b8015611419575060208101518151105b6114355760405162461bcd60e51b81526004016108a790611d41565b8251600080546001600160a01b03199081166001600160a01b03938416179091556020808601516002805484169185169190911790556040808701516003805485169186169190911790556060870151600c805491861661010002610100600160a81b031990921691909117905560018054948716948416949094179093556012805490921690915582516004558201516005819055908201516114d99190611545565b600655505050565b6003546001600160a01b031681565b6000546001600160a01b031681565b60135481565b3b151590565b6000611187836001600160a01b038416611723565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b600082820183811015611187576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6000828152601c602052604090206115bb908261150b565b15610d29576115c861159f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152601c60205260409020611624908261176d565b15610d295761163161159f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b61167e81611505565b6116b95760405162461bcd60e51b81526004018080602001828103825260468152602001806120e56046913960600191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000806116ec8385018561197a565b909590945092505050565b60006111878383611782565b6000611187836001600160a01b0384166117e6565b6000610c9c826117fe565b600061172f83836117e6565b61176557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c9c565b506000610c9c565b6000611187836001600160a01b038416611802565b815460009082106117c45760405162461bcd60e51b81526004018080602001828103825260228152602001806120226022913960400191505060405180910390fd5b8260000182815481106117d357fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b600081815260018301602052604081205480156118be578354600019808301919081019060009087908390811061183557fe5b906000526020600020015490508087600001848154811061185257fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061188257fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610c9c565b6000915050610c9c565b60405180606001604052806003906020820280368337509192915050565b80356108f281611ffe565b600082601f830112611901578081fd5b6040516060810181811067ffffffffffffffff8211171561191e57fe5b604052808360608101861015611932578384fd5b835b6003811015611953578135835260209283019290910190600101611934565b509195945050505050565b60006020828403121561196f578081fd5b813561118781611ffe565b6000806040838503121561198c578081fd5b823561199781611ffe565b946020939093013593505050565b600080600080608085870312156119ba578182fd5b84356119c581611ffe565b935060208501356119d581611ffe565b925060408501356119e581611ffe565b9396929550929360600135925050565b600080600080600060808688031215611a0c578081fd5b8535611a1781611ffe565b94506020860135611a2781611ffe565b935060408601359250606086013567ffffffffffffffff80821115611a4a578283fd5b818801915088601f830112611a5d578283fd5b813581811115611a6b578384fd5b896020828501011115611a7c578384fd5b9699959850939650602001949392505050565b60008060006101008486031215611aa4578283fd5b84601f850112611ab2578283fd5b6040516080810181811067ffffffffffffffff82111715611acf57fe5b60405280856080810188811115611ae4578687fd5b865b6004811015611b0f578235611afa81611ffe565b84526020938401939290920191600101611ae6565b50839650611b1c816118e6565b955050505050611b2f8560a086016118f1565b90509250925092565b600060208284031215611b49578081fd5b813561118781612013565b600060208284031215611b65578081fd5b815161118781612013565b600060208284031215611b81578081fd5b5035919050565b60008060408385031215611b9a578182fd5b823591506020830135611bac81611ffe565b809150509250929050565b60008060408385031215611bc9578182fd5b50508035926020909101359150565b600060208284031215611be9578081fd5b81356001600160e01b031981168114611187578182fd5b600060208284031215611c11578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b038781168252861660208083019190915261010082019060408301908760005b6003811015611c7057815184529282019290820190600101611c53565b505050508460a08301528360c08301528260e0830152979650505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b90815260200190565b60208082526021908201527f5374616b65544f4e50726f78793a20706572696f64206e6f7420616c6c6f77656040820152601960fa1b606082015260800190565b6020808252601c908201527f5374616b65544f4e50726f78793a207472616e73666572206661696c00000000604082015260600190565b6020808252601b908201527f5374616b65544f4e50726f78793a20736574496e6974206661696c0000000000604082015260600190565b6020808252602a908201527f5374616b65544f4e50726f78793a20746f6e416d6f756e7420213d207374616b604082015269034b733a0b6b7bab73a160b51b606082015260800190565b60208082526022908201527f5374616b65544f4e50726f78793a20616c726561647920696e697469616c697a604082015261195960f21b606082015260800190565b6020808252601c908201527f5374616b65544f4e50726f78793a20696e707574206973207a65726f00000000604082015260600190565b6020808252601790820152765374616b65544f4e50726f78793a20656e642073616c6560481b604082015260600190565b60208082526035908201527f5374616b65544f4e50726f78793a2054686520696e70757420616464726573736040820152742069732073616d652061732074686520737461746560581b606082015260800190565b60208082526024908201527f5374616b65544f4e50726f78793a207374616b654f6e417070726f7665206661604082015263034b639960e51b606082015260800190565b60208082526019908201527814dd185ad95513d3941c9bde1e4e881a5b9cdd59999a595b9d603a1b604082015260600190565b60208082526027908201527f5374616b65544f4e50726f78793a207374616b654f6e417070726f766520696e6040820152661a5d0819985a5b60ca1b606082015260800190565b6020808252602d908201527f5374616b65544f4e50726f78793a20696d706c206973207a65726f204f52207060408201526c726f78792069732066616c736560981b606082015260800190565b968752602087019590955260408601939093526060850191909152608084015260a0830152151560c082015260e00190565b6001600160a01b0381168114610c6457600080fd5b8015158114610c6457600080fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7441636365737369626c653a2043616c6c6572206973206e6f7420616e2061646d696e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65df8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4250726f7879426173653a2043616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212205d588506f19c5c82a10fac6c9eb427627270214b4799c2a3ab4f704ef2baa2ab64736f6c63430007060033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$2,224.50
Net Worth in ETH
1.155055
Token Allocations
TON
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.503514 | 4,417.9501 | $2,224.5 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.