Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 1,681 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 23506510 | 40 days ago | IN | 0 ETH | 0.00001343 | ||||
| Withdraw | 22588672 | 169 days ago | IN | 0 ETH | 0.00064294 | ||||
| Claim | 22588609 | 169 days ago | IN | 0 ETH | 0.00058036 | ||||
| Withdraw | 21859416 | 271 days ago | IN | 0 ETH | 0.00037917 | ||||
| Withdraw | 21848644 | 272 days ago | IN | 0 ETH | 0.00043101 | ||||
| Claim | 21848394 | 272 days ago | IN | 0 ETH | 0.00032059 | ||||
| Withdraw | 21742799 | 287 days ago | IN | 0 ETH | 0.00090629 | ||||
| Claim | 21742795 | 287 days ago | IN | 0 ETH | 0.00032805 | ||||
| Claim | 21616009 | 305 days ago | IN | 0 ETH | 0.00125817 | ||||
| Claim | 21539928 | 315 days ago | IN | 0 ETH | 0.00064968 | ||||
| Withdraw | 21519706 | 318 days ago | IN | 0 ETH | 0.00160999 | ||||
| Withdraw | 21496715 | 321 days ago | IN | 0 ETH | 0.00170689 | ||||
| Withdraw | 21476171 | 324 days ago | IN | 0 ETH | 0.00092396 | ||||
| Withdraw | 21475178 | 324 days ago | IN | 0 ETH | 0.00088804 | ||||
| Claim | 21475165 | 324 days ago | IN | 0 ETH | 0.0006498 | ||||
| Withdraw | 21403298 | 334 days ago | IN | 0 ETH | 0.00234256 | ||||
| Withdraw | 21399083 | 335 days ago | IN | 0 ETH | 0.00118471 | ||||
| Claim | 21392021 | 336 days ago | IN | 0 ETH | 0.00098273 | ||||
| Withdraw | 21391389 | 336 days ago | IN | 0 ETH | 0.00177981 | ||||
| Withdraw | 21389828 | 336 days ago | IN | 0 ETH | 0.00340588 | ||||
| Claim | 21389733 | 336 days ago | IN | 0 ETH | 0.00140903 | ||||
| Claim | 21389662 | 336 days ago | IN | 0 ETH | 0.00121042 | ||||
| Claim | 21389654 | 336 days ago | IN | 0 ETH | 0.00143607 | ||||
| Claim | 21389617 | 336 days ago | IN | 0 ETH | 0.00157155 | ||||
| Withdraw | 21389485 | 336 days ago | IN | 0 ETH | 0.00208278 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PawLockedStake
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// File: @openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//import "hardhat/console.sol";
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: @openzeppelin/contracts/utils/ReentrancyGuard.sol
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
// File: @openzeppelin/contracts/utils/Address.sol
/**
* @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;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(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
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
/// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/address/0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe#code
contract DividendStakingToken is ERC20 {
constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}
function _transfer(address from, address to, uint256 value) internal virtual override {
require(false, "Cant transfer dividend token");
super._transfer(from, to, value);
}
function _mint(address account, uint256 value) internal override {
super._mint(account, value);
}
function _burn(address account, uint256 value) internal override {
super._burn(account, value);
}
function _setDividendBalance(address account, uint256 newBalance) internal {
uint256 currentBalance = balanceOf(account);
if(newBalance > currentBalance) {
uint256 mintAmount = newBalance - currentBalance;
_mint(account, mintAmount);
} else if(newBalance < currentBalance) {
uint256 burnAmount = currentBalance - newBalance;
_burn(account, burnAmount);
}
}
}
interface IwPAWFlexibleStaking {
function stakingAmount(address _user) external view returns (uint256);
function isStakable(address _user) external view returns (bool);
function forceWithdraw(address _user) external;
}
contract PawLockedStake is Ownable, ReentrancyGuard, DividendStakingToken {
using SafeERC20 for IERC20Metadata;
// apy
uint256 public apy;
// Accrued token per share
uint256 public accTokenPerShare;
uint256 public totalStaked;
// The block number of the last pool update
uint256 public lastRewardTimeStamp;
// The precision factor
uint256 public PRECISION_FACTOR = uint256(10**12);
// The reward token
IERC20Metadata public wPAWToken;
// The staked token
IERC20Metadata public PAWToken;
// WPAW Staking
address public WPAWStaking;
// lock duration
uint256 public lockDuration;
// early withdraw penalty in percent
uint256 public earlyWithdrawPenalty;
// total early withdraw penalty
uint256 public totalPenalty;
// Info of each user that stakes tokens (PAWToken)
mapping(address => UserInfo) public userInfo;
struct UserInfo {
uint256 amount; // How many staked tokens the user has provided
uint256 rewardDebt; // Reward debt
uint256 unlockTime;
}
event Deposit(address indexed user, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 amount);
event NewAPY(uint256 apy);
event TokenRecovery(address indexed token, uint256 amount);
event Withdraw(address indexed user, uint256 amount);
event Claim(address indexed user, uint256 amount);
/**
* @notice Constructor
*/
constructor() DividendStakingToken("Paw Stake Tracker", "stPAWlock") {
PAWToken = IERC20Metadata(0xDc63269eA166b70d4780b3A11F5C825C2b761B01); //PAW
wPAWToken = IERC20Metadata(0xFF9E32AaF15953EC3F69FE899D220A705ce06dD0); //wPAW
// Set the lastRewardTimeStamp as the current timestamp
lastRewardTimeStamp = block.timestamp;
apy = 8;
lockDuration = 13 weeks;
earlyWithdrawPenalty = 10; // 10%
}
/*
* @notice Deposit staked tokens and collect reward tokens (if any)
* @param _amount: amount to withdraw (in wPAWToken)
*/
function deposit(uint256 _amount) external nonReentrant {
UserInfo storage user = userInfo[msg.sender];
user.unlockTime = block.timestamp + lockDuration;
_updatePool();
if (user.amount > 0) {
uint256 pending = (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
if (pending > 0) {
wPAWToken.safeTransfer(address(msg.sender), pending);
}
}
if (_amount > 0) {
totalStaked += _amount;
user.amount += _amount;
_setDividendBalance(msg.sender, user.amount);
PAWToken.safeTransferFrom(address(msg.sender), address(this), _amount);
}
user.rewardDebt = (user.amount * accTokenPerShare) / PRECISION_FACTOR;
emit Deposit(msg.sender, _amount);
}
/*
* @notice Withdraw staked tokens and collect reward tokens
* @param _amount: amount to withdraw (in wPAWToken)
*/
function withdraw(uint256 _amount) external nonReentrant {
UserInfo storage user = userInfo[msg.sender];
require(user.amount >= _amount, "Amount to withdraw too high");
require(block.timestamp >= user.unlockTime, "Cant do normal withdraw within lock duration");
_updatePool();
uint256 pending = (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
if (_amount > 0) {
totalStaked -= _amount;
user.amount -= _amount;
_setDividendBalance(msg.sender, user.amount);
PAWToken.safeTransfer(address(msg.sender), _amount);
}
if (pending > 0) {
wPAWToken.safeTransfer(address(msg.sender), pending);
}
user.rewardDebt = (user.amount * accTokenPerShare) / PRECISION_FACTOR;
if(user.amount == 0 && WPAWStaking != address(0)){
if(IwPAWFlexibleStaking(WPAWStaking).stakingAmount(msg.sender) > 0
&& !IwPAWFlexibleStaking(WPAWStaking).isStakable(msg.sender))
{
IwPAWFlexibleStaking(WPAWStaking).forceWithdraw(msg.sender);
}
}
emit Withdraw(msg.sender, _amount);
}
/*
* @notice Collect reward tokens
*/
function claim() external nonReentrant {
UserInfo storage user = userInfo[msg.sender];
_updatePool();
uint256 pending = (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
require (pending > 0, "No reward to claim");
wPAWToken.safeTransfer(address(msg.sender), pending);
user.rewardDebt = (user.amount * accTokenPerShare) / PRECISION_FACTOR;
emit Claim(msg.sender, pending);
}
/*
* @notice Withdraw staked tokens without caring about rewards rewards
* @dev Needs to be for emergency.
*/
function emergencyWithdraw() external nonReentrant {
UserInfo storage user = userInfo[msg.sender];
uint256 amountToTransfer = user.amount;
totalStaked = totalStaked - amountToTransfer;
if(block.timestamp < user.unlockTime){
uint256 penalty = amountToTransfer * earlyWithdrawPenalty / 100;
amountToTransfer -= penalty;
totalPenalty += penalty;
}
uint256 pending = (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
if(pending > 0){
rewardTreasure += pending;
_updatePool();
}
user.amount = 0;
user.rewardDebt = 0;
if (amountToTransfer > 0) {
PAWToken.safeTransfer(address(msg.sender), amountToTransfer);
}
_setDividendBalance(msg.sender, user.amount);
if(user.amount == 0 && WPAWStaking != address(0)){
if(IwPAWFlexibleStaking(WPAWStaking).stakingAmount(msg.sender) > 0
&& !IwPAWFlexibleStaking(WPAWStaking).isStakable(msg.sender))
{
IwPAWFlexibleStaking(WPAWStaking).forceWithdraw(msg.sender);
}
}
emit EmergencyWithdraw(msg.sender, user.amount);
}
/*
* @notice Withdraw Penalty for future usage
* @dev Only callable by owner.
*/
function withdrawPenalty() external onlyOwner {
require(totalPenalty > 0, "No penalty now");
PAWToken.safeTransfer(address(msg.sender), totalPenalty);
totalPenalty = 0;
}
/*
* @notice Stop rewards, withdraw all reward
* @dev Only callable by owner. Needs to be for emergency.
*/
function emergencyRewardWithdraw(uint256 _amount) external onlyOwner {
require(_amount <= rewardTreasure, "Exceed withdrawable amount");
wPAWToken.safeTransfer(address(msg.sender), _amount);
rewardTreasure -= _amount;
}
/**
* @notice Allows the owner to recover tokens sent to the contract by mistake
* @param _token: token address
* @dev Callable by owner
*/
function recoverToken(address _token) external onlyOwner {
require(_token != address(PAWToken), "Operations: Cannot recover staked token");
require(_token != address(wPAWToken), "Operations: Cannot recover reward token");
uint256 balance = IERC20Metadata(_token).balanceOf(address(this));
require(balance != 0, "Operations: Cannot recover zero balance");
IERC20Metadata(_token).safeTransfer(address(msg.sender), balance);
emit TokenRecovery(_token, balance);
}
/*
* @notice Update early withdraw penalty
* @dev Only callable by owner.
*/
function updateEarlyWithdrawPenalty(uint256 _newPenalty) external onlyOwner {
require(_newPenalty <= 30, "Penalty can't exceed 30%");
earlyWithdrawPenalty = _newPenalty;
}
/*
* @notice Update early withdraw penalty
* @dev Only callable by owner.
*/
function updateLockingDuration(uint256 _newDuration) external onlyOwner {
require(_newDuration <= 365 days, "Locking duration can't exceed one year");
lockDuration = _newDuration;
}
/*
* @notice Update APY
* @dev Only callable by owner. Change APY.
*/
function updateNewAPY(uint256 _newAPY) external onlyOwner {
_updatePool();
apy = _newAPY;
emit NewAPY(_newAPY);
}
/*
* @notice Set WPAW staking contract
* @dev Only callable by owner. Change APY.
*/
function setWPAWStakingContract(address _wPAWStaking) external onlyOwner {
WPAWStaking = _wPAWStaking;
}
/*
* @notice View function to see pending reward on frontend.
* @param _user: user address
* @return Pending reward for a given user
*/
function pendingReward(address _user) external view returns (uint256) {
UserInfo storage user = userInfo[_user];
if (block.timestamp > lastRewardTimeStamp && totalStaked != 0) {
uint256 multiplier = block.timestamp - lastRewardTimeStamp;
uint256 estimatedReward = multiplier * (((totalStaked * apy)/100) / (365 days));
if(estimatedReward > rewardTreasure){
estimatedReward = rewardTreasure;
}
uint256 adjustedTokenPerShare = accTokenPerShare + (estimatedReward * PRECISION_FACTOR) / totalStaked;
return (user.amount * adjustedTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
} else {
return (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
}
}
/*
* @notice Update reward variables of the given pool to be up-to-date.
*/
function _updatePool() internal {
if (block.timestamp <= lastRewardTimeStamp) {
return;
}
if (totalStaked == 0) {
lastRewardTimeStamp = block.timestamp;
return;
}
uint256 multiplier = block.timestamp - lastRewardTimeStamp;
uint256 estimatedReward = multiplier * (((totalStaked * apy)/100) / (365 days));
uint256 realReward = _allocateReward(estimatedReward);
accTokenPerShare += (realReward * PRECISION_FACTOR) / totalStaked;
lastRewardTimeStamp = block.timestamp;
}
uint256 public rewardTreasure;
uint256 public rewardAllocated;
function addRewardTreasure(uint256 _amount) external nonReentrant{
require( _amount > 0 , "err _amount=0");
uint256 oldBalance = wPAWToken.balanceOf(address(this));
wPAWToken.safeTransferFrom(msg.sender, address(this), _amount);
uint256 newBalance = wPAWToken.balanceOf(address(this));
uint256 realAmount = newBalance - oldBalance;
rewardTreasure += realAmount;
_updatePool();
}
function _allocateReward(uint256 amount ) internal returns(uint256){
uint256 allocatedAmount = amount;
if( amount >= rewardTreasure ){
allocatedAmount = rewardTreasure;
}
rewardTreasure -= allocatedAmount;
rewardAllocated += allocatedAmount;
return allocatedAmount;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"apy","type":"uint256"}],"name":"NewAPY","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"PAWToken","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WPAWStaking","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accTokenPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addRewardTreasure","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"apy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earlyWithdrawPenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyRewardWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastRewardTimeStamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardAllocated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTreasure","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wPAWStaking","type":"address"}],"name":"setWPAWStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPenalty","type":"uint256"}],"name":"updateEarlyWithdrawPenalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newDuration","type":"uint256"}],"name":"updateLockingDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAPY","type":"uint256"}],"name":"updateNewAPY","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wPAWToken","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawPenalty","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405264e8d4a51000600b553480156200001a57600080fd5b50604051806040016040528060118152602001702830bb9029ba30b5b2902a3930b1b5b2b960791b8152506040518060400160405280600981526020016873745041576c6f636b60b81b8152508181620000836200007d6200011a60201b60201c565b6200011e565b6001805581516200009c9060059060208501906200016e565b508051620000b29060069060208401906200016e565b5050600d80546001600160a01b031990811673dc63269ea166b70d4780b3a11f5c825c2b761b0117909155600c805490911673ff9e32aaf15953ec3f69fe899d220a705ce06dd0179055505042600a90815560086007556277f880600f556010555062000251565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200017c9062000214565b90600052602060002090601f016020900481019282620001a05760008555620001eb565b82601f10620001bb57805160ff1916838001178555620001eb565b82800160010185558215620001eb579182015b82811115620001eb578251825591602001919060010190620001ce565b50620001f9929150620001fd565b5090565b5b80821115620001f95760008155600101620001fe565b600181811c908216806200022957607f821691505b602082108114156200024b57634e487b7160e01b600052602260045260246000fd5b50919050565b61244780620002616000396000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c8063828ac8cd11610146578063ccd34cd5116100c3578063dbda80ca11610087578063dbda80ca146104db578063dd62ed3e146104ee578063e6af61c814610501578063f2fde38b1461050a578063f40f0f521461051d578063f4afdca11461053057600080fd5b8063ccd34cd51461049b578063d29004d9146104a4578063d6f0c025146104ad578063db2e21bc146104c0578063db7abe47146104c857600080fd5b80639be65a601161010a5780639be65a601461043c578063a457c2d71461044f578063a9059cbb14610462578063b6b55f2514610475578063b82adc211461048857600080fd5b8063828ac8cd146103e6578063873187a3146103ef5780638da5cb5b1461041a5780638f6629151461042b57806395d89b411461043457600080fd5b8063313ce567116101d45780634e71d92d116101985780634e71d92d1461039157806362ca19621461039957806370a08231146103ac578063715018a6146103d5578063817b1cd2146103dd57600080fd5b8063313ce5671461034a5780633279beab14610359578063356c72841461036c57806339509351146103755780633bcfc4b81461038857600080fd5b806318160ddd1161021b57806318160ddd146102ca5780631959a002146102d25780631a1ce2fc1461031c57806323b872dd146103245780632e1a7d4d1461033757600080fd5b8063045544431461025857806306fdde0314610274578063086801eb14610289578063095ea7b31461029e5780631063c0c4146102c1575b600080fd5b610261600f5481565b6040519081526020015b60405180910390f35b61027c610543565b60405161026b919061228b565b61029c61029736600461223d565b6105d5565b005b6102b16102ac3660046121f1565b610790565b604051901515815260200161026b565b61026160135481565b600454610261565b6103016102e0366004612167565b60126020526000908152604090208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161026b565b61029c6107a8565b6102b16103323660046121b5565b610839565b61029c61034536600461223d565b61085f565b6040516012815260200161026b565b61029c61036736600461223d565b610be3565b610261600a5481565b6102b16103833660046121f1565b610c90565b61026160075481565b61029c610cb2565b61029c6103a7366004612167565b610dde565b6102616103ba366004612167565b6001600160a01b031660009081526002602052604090205490565b61029c610e2a565b61026160095481565b61026160145481565b600d54610402906001600160a01b031681565b6040516001600160a01b03909116815260200161026b565b6000546001600160a01b0316610402565b61026160085481565b61027c610e60565b61029c61044a366004612167565b610e6f565b6102b161045d3660046121f1565b6110a9565b6102b16104703660046121f1565b61112f565b61029c61048336600461223d565b61113d565b600c54610402906001600160a01b031681565b610261600b5481565b61026160105481565b61029c6104bb36600461223d565b611294565b61029c611314565b61029c6104d636600461223d565b6115f0565b61029c6104e936600461223d565b611682565b6102616104fc366004612182565b6116ef565b61026160115481565b61029c610518366004612167565b61171a565b61026161052b366004612167565b6117b5565b600e54610402906001600160a01b031681565b606060058054610552906123c6565b80601f016020809104026020016040519081016040528092919081815260200182805461057e906123c6565b80156105cb5780601f106105a0576101008083540402835291602001916105cb565b820191906000526020600020905b8154815290600101906020018083116105ae57829003601f168201915b5050505050905090565b600260015414156106015760405162461bcd60e51b81526004016105f8906122f3565b60405180910390fd5b6002600155806106435760405162461bcd60e51b815260206004820152600d60248201526c0657272205f616d6f756e743d3609c1b60448201526064016105f8565b600c546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561068757600080fd5b505afa15801561069b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bf9190612256565b600c549091506106da906001600160a01b03163330856118d1565b600c546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561071e57600080fd5b505afa158015610732573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107569190612256565b905060006107648383612383565b90508060136000828254610778919061232a565b909155506107869050611942565b5050600180555050565b60003361079e8185856119ec565b5060019392505050565b6000546001600160a01b031633146107d25760405162461bcd60e51b81526004016105f8906122be565b6000601154116108155760405162461bcd60e51b815260206004820152600e60248201526d4e6f2070656e616c7479206e6f7760901b60448201526064016105f8565b601154600d54610832916001600160a01b03909116903390611b10565b6000601155565b600033610847858285611b45565b610852858585611bb9565b60019150505b9392505050565b600260015414156108825760405162461bcd60e51b81526004016105f8906122f3565b600260015533600090815260126020526040902080548211156108e75760405162461bcd60e51b815260206004820152601b60248201527f416d6f756e7420746f20776974686472617720746f6f2068696768000000000060448201526064016105f8565b80600201544210156109505760405162461bcd60e51b815260206004820152602c60248201527f43616e7420646f206e6f726d616c2077697468647261772077697468696e206c60448201526b37b1b590323ab930ba34b7b760a11b60648201526084016105f8565b610958611942565b60008160010154600b5460085484600001546109749190612364565b61097e9190612342565b6109889190612383565b905082156109e45782600960008282546109a29190612383565b90915550508154839083906000906109bb908490612383565b909155505081546109cd903390611c01565b600d546109e4906001600160a01b03163385611b10565b8015610a0157600c54610a01906001600160a01b03163383611b10565b600b546008548354610a139190612364565b610a1d9190612342565b60018301558154158015610a3b5750600e546001600160a01b031615155b15610ba457600e5460405163747bd8f760e11b81523360048201526000916001600160a01b03169063e8f7b1ee9060240160206040518083038186803b158015610a8457600080fd5b505afa158015610a98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abc9190612256565b118015610b415750600e546040516389f6e00d60e01b81523360048201526001600160a01b03909116906389f6e00d9060240160206040518083038186803b158015610b0757600080fd5b505afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f919061221b565b155b15610ba457600e546040516344179f0b60e11b81523360048201526001600160a01b039091169063882f3e1690602401600060405180830381600087803b158015610b8b57600080fd5b505af1158015610b9f573d6000803e3d6000fd5b505050505b60405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a250506001805550565b6000546001600160a01b03163314610c0d5760405162461bcd60e51b81526004016105f8906122be565b601354811115610c5f5760405162461bcd60e51b815260206004820152601a60248201527f45786365656420776974686472617761626c6520616d6f756e7400000000000060448201526064016105f8565b600c54610c76906001600160a01b03163383611b10565b8060136000828254610c889190612383565b909155505050565b60003361079e818585610ca383836116ef565b610cad919061232a565b6119ec565b60026001541415610cd55760405162461bcd60e51b81526004016105f8906122f3565b6002600155336000908152601260205260409020610cf1611942565b60008160010154600b546008548460000154610d0d9190612364565b610d179190612342565b610d219190612383565b905060008111610d685760405162461bcd60e51b81526020600482015260126024820152714e6f2072657761726420746f20636c61696d60701b60448201526064016105f8565b600c54610d7f906001600160a01b03163383611b10565b600b546008548354610d919190612364565b610d9b9190612342565b600183015560405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020015b60405180910390a2505060018055565b6000546001600160a01b03163314610e085760405162461bcd60e51b81526004016105f8906122be565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e545760405162461bcd60e51b81526004016105f8906122be565b610e5e6000611c5a565b565b606060068054610552906123c6565b6000546001600160a01b03163314610e995760405162461bcd60e51b81526004016105f8906122be565b600d546001600160a01b0382811691161415610f075760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207374616b6560448201526632103a37b5b2b760c91b60648201526084016105f8565b600c546001600160a01b0382811691161415610f755760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f76657220726577617260448201526632103a37b5b2b760c91b60648201526084016105f8565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610fb757600080fd5b505afa158015610fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fef9190612256565b90508061104e5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b60648201526084016105f8565b6110626001600160a01b0383163383611b10565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161109d91815260200190565b60405180910390a25050565b600033816110b782866116ef565b9050838110156111175760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105f8565b61112482868684036119ec565b506001949350505050565b60003361079e818585611bb9565b600260015414156111605760405162461bcd60e51b81526004016105f8906122f3565b6002600155336000908152601260205260409020600f54611181904261232a565b600282015561118e611942565b8054156111e65760008160010154600b5460085484600001546111b19190612364565b6111bb9190612342565b6111c59190612383565b905080156111e457600c546111e4906001600160a01b03163383611b10565b505b81156112415781600960008282546111fe919061232a565b909155505080548290829060009061121790849061232a565b90915550508054611229903390611c01565b600d54611241906001600160a01b03163330856118d1565b600b5460085482546112539190612364565b61125d9190612342565b600182015560405182815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90602001610dce565b6000546001600160a01b031633146112be5760405162461bcd60e51b81526004016105f8906122be565b601e81111561130f5760405162461bcd60e51b815260206004820152601860248201527f50656e616c74792063616e27742065786365656420333025000000000000000060448201526064016105f8565b601055565b600260015414156113375760405162461bcd60e51b81526004016105f8906122f3565b6002600155336000908152601260205260409020805460095461135b908290612383565b60095560028201544210156113ad57600060646010548361137c9190612364565b6113869190612342565b90506113928183612383565b915080601160008282546113a6919061232a565b9091555050505b60008260010154600b5460085485600001546113c99190612364565b6113d39190612342565b6113dd9190612383565b905080156114055780601360008282546113f7919061232a565b909155506114059050611942565b60008084556001840155811561142c57600d5461142c906001600160a01b03163384611b10565b61143a338460000154611c01565b82541580156114535750600e546001600160a01b031615155b156115bc57600e5460405163747bd8f760e11b81523360048201526000916001600160a01b03169063e8f7b1ee9060240160206040518083038186803b15801561149c57600080fd5b505afa1580156114b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d49190612256565b1180156115595750600e546040516389f6e00d60e01b81523360048201526001600160a01b03909116906389f6e00d9060240160206040518083038186803b15801561151f57600080fd5b505afa158015611533573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611557919061221b565b155b156115bc57600e546040516344179f0b60e11b81523360048201526001600160a01b039091169063882f3e1690602401600060405180830381600087803b1580156115a357600080fd5b505af11580156115b7573d6000803e3d6000fd5b505050505b825460405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969590602001610bd2565b6000546001600160a01b0316331461161a5760405162461bcd60e51b81526004016105f8906122be565b6301e1338081111561167d5760405162461bcd60e51b815260206004820152602660248201527f4c6f636b696e67206475726174696f6e2063616e277420657863656564206f6e60448201526532903cb2b0b960d11b60648201526084016105f8565b600f55565b6000546001600160a01b031633146116ac5760405162461bcd60e51b81526004016105f8906122be565b6116b4611942565b60078190556040518181527fdf6a785a3f6f4690f12091be4b76d03b768c8f82a8d1612aac2f53cb2b7a9cad9060200160405180910390a150565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6000546001600160a01b031633146117445760405162461bcd60e51b81526004016105f8906122be565b6001600160a01b0381166117a95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f8565b6117b281611c5a565b50565b6001600160a01b0381166000908152601260205260408120600a54421180156117df575060095415155b156118a0576000600a54426117f49190612383565b905060006301e13380606460075460095461180f9190612364565b6118199190612342565b6118239190612342565b61182d9083612364565b905060135481111561183e57506013545b6000600954600b54836118519190612364565b61185b9190612342565b600854611868919061232a565b90508360010154600b548286600001546118829190612364565b61188c9190612342565b6118969190612383565b9695505050505050565b6001810154600b5460085483546118b79190612364565b6118c19190612342565b6108589190612383565b50919050565b6040516001600160a01b038085166024830152831660448201526064810182905261193c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611caa565b50505050565b600a54421161194d57565b60095461195a5742600a55565b6000600a544261196a9190612383565b905060006301e1338060646007546009546119859190612364565b61198f9190612342565b6119999190612342565b6119a39083612364565b905060006119b082611d7c565b9050600954600b54826119c39190612364565b6119cd9190612342565b600860008282546119de919061232a565b909155505042600a55505050565b6001600160a01b038316611a4e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f8565b6001600160a01b038216611aaf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f8565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040516001600160a01b038316602482015260448101829052611b4090849063a9059cbb60e01b90606401611905565b505050565b6000611b5184846116ef565b9050600019811461193c5781811015611bac5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105f8565b61193c84848484036119ec565b60405162461bcd60e51b815260206004820152601c60248201527f43616e74207472616e73666572206469766964656e6420746f6b656e0000000060448201526064016105f8565b6001600160a01b03821660009081526002602052604090205480821115611c3a576000611c2e8284612383565b905061193c8482611dc6565b80821015611b40576000611c4e8383612383565b905061193c8482611dd4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611cff826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611dde9092919063ffffffff16565b805190915015611b405780806020019051810190611d1d919061221b565b611b405760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105f8565b60135460009082908110611d8f57506013545b8060136000828254611da19190612383565b925050819055508060146000828254611dba919061232a565b90915550909392505050565b611dd08282611df5565b5050565b611dd08282611eb6565b6060611ded8484600085611fea565b949350505050565b6001600160a01b038216611e4b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105f8565b8060046000828254611e5d919061232a565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216611f165760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105f8565b6001600160a01b03821660009081526002602052604090205481811015611f8a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105f8565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b60608247101561204b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105f8565b843b6120995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105f8565b600080866001600160a01b031685876040516120b5919061226f565b60006040518083038185875af1925050503d80600081146120f2576040519150601f19603f3d011682016040523d82523d6000602084013e6120f7565b606091505b5091509150612107828286612112565b979650505050505050565b60608315612121575081610858565b8251156121315782518084602001fd5b8160405162461bcd60e51b81526004016105f8919061228b565b80356001600160a01b038116811461216257600080fd5b919050565b60006020828403121561217957600080fd5b6108588261214b565b6000806040838503121561219557600080fd5b61219e8361214b565b91506121ac6020840161214b565b90509250929050565b6000806000606084860312156121ca57600080fd5b6121d38461214b565b92506121e16020850161214b565b9150604084013590509250925092565b6000806040838503121561220457600080fd5b61220d8361214b565b946020939093013593505050565b60006020828403121561222d57600080fd5b8151801515811461085857600080fd5b60006020828403121561224f57600080fd5b5035919050565b60006020828403121561226857600080fd5b5051919050565b6000825161228181846020870161239a565b9190910192915050565b60208152600082518060208401526122aa81604085016020870161239a565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561233d5761233d6123fb565b500190565b60008261235f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561237e5761237e6123fb565b500290565b600082821015612395576123956123fb565b500390565b60005b838110156123b557818101518382015260200161239d565b8381111561193c5750506000910152565b600181811c908216806123da57607f821691505b602082108114156118cb57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fdfea2646970667358221220af022c000e39cbe236ea44951325e9676a4683d26807e03b83c939379d90634964736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102535760003560e01c8063828ac8cd11610146578063ccd34cd5116100c3578063dbda80ca11610087578063dbda80ca146104db578063dd62ed3e146104ee578063e6af61c814610501578063f2fde38b1461050a578063f40f0f521461051d578063f4afdca11461053057600080fd5b8063ccd34cd51461049b578063d29004d9146104a4578063d6f0c025146104ad578063db2e21bc146104c0578063db7abe47146104c857600080fd5b80639be65a601161010a5780639be65a601461043c578063a457c2d71461044f578063a9059cbb14610462578063b6b55f2514610475578063b82adc211461048857600080fd5b8063828ac8cd146103e6578063873187a3146103ef5780638da5cb5b1461041a5780638f6629151461042b57806395d89b411461043457600080fd5b8063313ce567116101d45780634e71d92d116101985780634e71d92d1461039157806362ca19621461039957806370a08231146103ac578063715018a6146103d5578063817b1cd2146103dd57600080fd5b8063313ce5671461034a5780633279beab14610359578063356c72841461036c57806339509351146103755780633bcfc4b81461038857600080fd5b806318160ddd1161021b57806318160ddd146102ca5780631959a002146102d25780631a1ce2fc1461031c57806323b872dd146103245780632e1a7d4d1461033757600080fd5b8063045544431461025857806306fdde0314610274578063086801eb14610289578063095ea7b31461029e5780631063c0c4146102c1575b600080fd5b610261600f5481565b6040519081526020015b60405180910390f35b61027c610543565b60405161026b919061228b565b61029c61029736600461223d565b6105d5565b005b6102b16102ac3660046121f1565b610790565b604051901515815260200161026b565b61026160135481565b600454610261565b6103016102e0366004612167565b60126020526000908152604090208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161026b565b61029c6107a8565b6102b16103323660046121b5565b610839565b61029c61034536600461223d565b61085f565b6040516012815260200161026b565b61029c61036736600461223d565b610be3565b610261600a5481565b6102b16103833660046121f1565b610c90565b61026160075481565b61029c610cb2565b61029c6103a7366004612167565b610dde565b6102616103ba366004612167565b6001600160a01b031660009081526002602052604090205490565b61029c610e2a565b61026160095481565b61026160145481565b600d54610402906001600160a01b031681565b6040516001600160a01b03909116815260200161026b565b6000546001600160a01b0316610402565b61026160085481565b61027c610e60565b61029c61044a366004612167565b610e6f565b6102b161045d3660046121f1565b6110a9565b6102b16104703660046121f1565b61112f565b61029c61048336600461223d565b61113d565b600c54610402906001600160a01b031681565b610261600b5481565b61026160105481565b61029c6104bb36600461223d565b611294565b61029c611314565b61029c6104d636600461223d565b6115f0565b61029c6104e936600461223d565b611682565b6102616104fc366004612182565b6116ef565b61026160115481565b61029c610518366004612167565b61171a565b61026161052b366004612167565b6117b5565b600e54610402906001600160a01b031681565b606060058054610552906123c6565b80601f016020809104026020016040519081016040528092919081815260200182805461057e906123c6565b80156105cb5780601f106105a0576101008083540402835291602001916105cb565b820191906000526020600020905b8154815290600101906020018083116105ae57829003601f168201915b5050505050905090565b600260015414156106015760405162461bcd60e51b81526004016105f8906122f3565b60405180910390fd5b6002600155806106435760405162461bcd60e51b815260206004820152600d60248201526c0657272205f616d6f756e743d3609c1b60448201526064016105f8565b600c546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561068757600080fd5b505afa15801561069b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bf9190612256565b600c549091506106da906001600160a01b03163330856118d1565b600c546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561071e57600080fd5b505afa158015610732573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107569190612256565b905060006107648383612383565b90508060136000828254610778919061232a565b909155506107869050611942565b5050600180555050565b60003361079e8185856119ec565b5060019392505050565b6000546001600160a01b031633146107d25760405162461bcd60e51b81526004016105f8906122be565b6000601154116108155760405162461bcd60e51b815260206004820152600e60248201526d4e6f2070656e616c7479206e6f7760901b60448201526064016105f8565b601154600d54610832916001600160a01b03909116903390611b10565b6000601155565b600033610847858285611b45565b610852858585611bb9565b60019150505b9392505050565b600260015414156108825760405162461bcd60e51b81526004016105f8906122f3565b600260015533600090815260126020526040902080548211156108e75760405162461bcd60e51b815260206004820152601b60248201527f416d6f756e7420746f20776974686472617720746f6f2068696768000000000060448201526064016105f8565b80600201544210156109505760405162461bcd60e51b815260206004820152602c60248201527f43616e7420646f206e6f726d616c2077697468647261772077697468696e206c60448201526b37b1b590323ab930ba34b7b760a11b60648201526084016105f8565b610958611942565b60008160010154600b5460085484600001546109749190612364565b61097e9190612342565b6109889190612383565b905082156109e45782600960008282546109a29190612383565b90915550508154839083906000906109bb908490612383565b909155505081546109cd903390611c01565b600d546109e4906001600160a01b03163385611b10565b8015610a0157600c54610a01906001600160a01b03163383611b10565b600b546008548354610a139190612364565b610a1d9190612342565b60018301558154158015610a3b5750600e546001600160a01b031615155b15610ba457600e5460405163747bd8f760e11b81523360048201526000916001600160a01b03169063e8f7b1ee9060240160206040518083038186803b158015610a8457600080fd5b505afa158015610a98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abc9190612256565b118015610b415750600e546040516389f6e00d60e01b81523360048201526001600160a01b03909116906389f6e00d9060240160206040518083038186803b158015610b0757600080fd5b505afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f919061221b565b155b15610ba457600e546040516344179f0b60e11b81523360048201526001600160a01b039091169063882f3e1690602401600060405180830381600087803b158015610b8b57600080fd5b505af1158015610b9f573d6000803e3d6000fd5b505050505b60405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a250506001805550565b6000546001600160a01b03163314610c0d5760405162461bcd60e51b81526004016105f8906122be565b601354811115610c5f5760405162461bcd60e51b815260206004820152601a60248201527f45786365656420776974686472617761626c6520616d6f756e7400000000000060448201526064016105f8565b600c54610c76906001600160a01b03163383611b10565b8060136000828254610c889190612383565b909155505050565b60003361079e818585610ca383836116ef565b610cad919061232a565b6119ec565b60026001541415610cd55760405162461bcd60e51b81526004016105f8906122f3565b6002600155336000908152601260205260409020610cf1611942565b60008160010154600b546008548460000154610d0d9190612364565b610d179190612342565b610d219190612383565b905060008111610d685760405162461bcd60e51b81526020600482015260126024820152714e6f2072657761726420746f20636c61696d60701b60448201526064016105f8565b600c54610d7f906001600160a01b03163383611b10565b600b546008548354610d919190612364565b610d9b9190612342565b600183015560405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020015b60405180910390a2505060018055565b6000546001600160a01b03163314610e085760405162461bcd60e51b81526004016105f8906122be565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e545760405162461bcd60e51b81526004016105f8906122be565b610e5e6000611c5a565b565b606060068054610552906123c6565b6000546001600160a01b03163314610e995760405162461bcd60e51b81526004016105f8906122be565b600d546001600160a01b0382811691161415610f075760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207374616b6560448201526632103a37b5b2b760c91b60648201526084016105f8565b600c546001600160a01b0382811691161415610f755760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f76657220726577617260448201526632103a37b5b2b760c91b60648201526084016105f8565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610fb757600080fd5b505afa158015610fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fef9190612256565b90508061104e5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b60648201526084016105f8565b6110626001600160a01b0383163383611b10565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161109d91815260200190565b60405180910390a25050565b600033816110b782866116ef565b9050838110156111175760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105f8565b61112482868684036119ec565b506001949350505050565b60003361079e818585611bb9565b600260015414156111605760405162461bcd60e51b81526004016105f8906122f3565b6002600155336000908152601260205260409020600f54611181904261232a565b600282015561118e611942565b8054156111e65760008160010154600b5460085484600001546111b19190612364565b6111bb9190612342565b6111c59190612383565b905080156111e457600c546111e4906001600160a01b03163383611b10565b505b81156112415781600960008282546111fe919061232a565b909155505080548290829060009061121790849061232a565b90915550508054611229903390611c01565b600d54611241906001600160a01b03163330856118d1565b600b5460085482546112539190612364565b61125d9190612342565b600182015560405182815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90602001610dce565b6000546001600160a01b031633146112be5760405162461bcd60e51b81526004016105f8906122be565b601e81111561130f5760405162461bcd60e51b815260206004820152601860248201527f50656e616c74792063616e27742065786365656420333025000000000000000060448201526064016105f8565b601055565b600260015414156113375760405162461bcd60e51b81526004016105f8906122f3565b6002600155336000908152601260205260409020805460095461135b908290612383565b60095560028201544210156113ad57600060646010548361137c9190612364565b6113869190612342565b90506113928183612383565b915080601160008282546113a6919061232a565b9091555050505b60008260010154600b5460085485600001546113c99190612364565b6113d39190612342565b6113dd9190612383565b905080156114055780601360008282546113f7919061232a565b909155506114059050611942565b60008084556001840155811561142c57600d5461142c906001600160a01b03163384611b10565b61143a338460000154611c01565b82541580156114535750600e546001600160a01b031615155b156115bc57600e5460405163747bd8f760e11b81523360048201526000916001600160a01b03169063e8f7b1ee9060240160206040518083038186803b15801561149c57600080fd5b505afa1580156114b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d49190612256565b1180156115595750600e546040516389f6e00d60e01b81523360048201526001600160a01b03909116906389f6e00d9060240160206040518083038186803b15801561151f57600080fd5b505afa158015611533573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611557919061221b565b155b156115bc57600e546040516344179f0b60e11b81523360048201526001600160a01b039091169063882f3e1690602401600060405180830381600087803b1580156115a357600080fd5b505af11580156115b7573d6000803e3d6000fd5b505050505b825460405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969590602001610bd2565b6000546001600160a01b0316331461161a5760405162461bcd60e51b81526004016105f8906122be565b6301e1338081111561167d5760405162461bcd60e51b815260206004820152602660248201527f4c6f636b696e67206475726174696f6e2063616e277420657863656564206f6e60448201526532903cb2b0b960d11b60648201526084016105f8565b600f55565b6000546001600160a01b031633146116ac5760405162461bcd60e51b81526004016105f8906122be565b6116b4611942565b60078190556040518181527fdf6a785a3f6f4690f12091be4b76d03b768c8f82a8d1612aac2f53cb2b7a9cad9060200160405180910390a150565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6000546001600160a01b031633146117445760405162461bcd60e51b81526004016105f8906122be565b6001600160a01b0381166117a95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f8565b6117b281611c5a565b50565b6001600160a01b0381166000908152601260205260408120600a54421180156117df575060095415155b156118a0576000600a54426117f49190612383565b905060006301e13380606460075460095461180f9190612364565b6118199190612342565b6118239190612342565b61182d9083612364565b905060135481111561183e57506013545b6000600954600b54836118519190612364565b61185b9190612342565b600854611868919061232a565b90508360010154600b548286600001546118829190612364565b61188c9190612342565b6118969190612383565b9695505050505050565b6001810154600b5460085483546118b79190612364565b6118c19190612342565b6108589190612383565b50919050565b6040516001600160a01b038085166024830152831660448201526064810182905261193c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611caa565b50505050565b600a54421161194d57565b60095461195a5742600a55565b6000600a544261196a9190612383565b905060006301e1338060646007546009546119859190612364565b61198f9190612342565b6119999190612342565b6119a39083612364565b905060006119b082611d7c565b9050600954600b54826119c39190612364565b6119cd9190612342565b600860008282546119de919061232a565b909155505042600a55505050565b6001600160a01b038316611a4e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f8565b6001600160a01b038216611aaf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f8565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040516001600160a01b038316602482015260448101829052611b4090849063a9059cbb60e01b90606401611905565b505050565b6000611b5184846116ef565b9050600019811461193c5781811015611bac5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105f8565b61193c84848484036119ec565b60405162461bcd60e51b815260206004820152601c60248201527f43616e74207472616e73666572206469766964656e6420746f6b656e0000000060448201526064016105f8565b6001600160a01b03821660009081526002602052604090205480821115611c3a576000611c2e8284612383565b905061193c8482611dc6565b80821015611b40576000611c4e8383612383565b905061193c8482611dd4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611cff826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611dde9092919063ffffffff16565b805190915015611b405780806020019051810190611d1d919061221b565b611b405760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105f8565b60135460009082908110611d8f57506013545b8060136000828254611da19190612383565b925050819055508060146000828254611dba919061232a565b90915550909392505050565b611dd08282611df5565b5050565b611dd08282611eb6565b6060611ded8484600085611fea565b949350505050565b6001600160a01b038216611e4b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105f8565b8060046000828254611e5d919061232a565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216611f165760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105f8565b6001600160a01b03821660009081526002602052604090205481811015611f8a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105f8565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b60608247101561204b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105f8565b843b6120995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105f8565b600080866001600160a01b031685876040516120b5919061226f565b60006040518083038185875af1925050503d80600081146120f2576040519150601f19603f3d011682016040523d82523d6000602084013e6120f7565b606091505b5091509150612107828286612112565b979650505050505050565b60608315612121575081610858565b8251156121315782518084602001fd5b8160405162461bcd60e51b81526004016105f8919061228b565b80356001600160a01b038116811461216257600080fd5b919050565b60006020828403121561217957600080fd5b6108588261214b565b6000806040838503121561219557600080fd5b61219e8361214b565b91506121ac6020840161214b565b90509250929050565b6000806000606084860312156121ca57600080fd5b6121d38461214b565b92506121e16020850161214b565b9150604084013590509250925092565b6000806040838503121561220457600080fd5b61220d8361214b565b946020939093013593505050565b60006020828403121561222d57600080fd5b8151801515811461085857600080fd5b60006020828403121561224f57600080fd5b5035919050565b60006020828403121561226857600080fd5b5051919050565b6000825161228181846020870161239a565b9190910192915050565b60208152600082518060208401526122aa81604085016020870161239a565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561233d5761233d6123fb565b500190565b60008261235f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561237e5761237e6123fb565b500290565b600082821015612395576123956123fb565b500390565b60005b838110156123b557818101518382015260200161239d565b8381111561193c5750506000910152565b600181811c908216806123da57607f821691505b602082108114156118cb57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fdfea2646970667358221220af022c000e39cbe236ea44951325e9676a4683d26807e03b83c939379d90634964736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.