Source Code
Latest 25 from a total of 263 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Stake | 23017685 | 104 days ago | IN | 0 ETH | 0.00007993 | ||||
| Stake | 23014517 | 105 days ago | IN | 0 ETH | 0.00005593 | ||||
| Stake | 23010828 | 105 days ago | IN | 0 ETH | 0.00027538 | ||||
| Stake | 23010533 | 105 days ago | IN | 0 ETH | 0.00016155 | ||||
| Stake | 23009761 | 105 days ago | IN | 0 ETH | 0.00015199 | ||||
| Stake | 23009303 | 105 days ago | IN | 0 ETH | 0.00015106 | ||||
| Stake | 23009175 | 105 days ago | IN | 0 ETH | 0.00001652 | ||||
| Stake | 23009110 | 105 days ago | IN | 0 ETH | 0.00017296 | ||||
| Stake | 23009052 | 105 days ago | IN | 0 ETH | 0.00002746 | ||||
| Stake | 23008495 | 106 days ago | IN | 0 ETH | 0.00015109 | ||||
| Stake | 23006872 | 106 days ago | IN | 0 ETH | 0.00008694 | ||||
| Stake | 23006003 | 106 days ago | IN | 0 ETH | 0.00015055 | ||||
| Stake | 23005952 | 106 days ago | IN | 0 ETH | 0.00027362 | ||||
| Stake | 23005819 | 106 days ago | IN | 0 ETH | 0.00014885 | ||||
| Stake | 23005737 | 106 days ago | IN | 0 ETH | 0.00015169 | ||||
| Stake | 23005634 | 106 days ago | IN | 0 ETH | 0.00028909 | ||||
| Stake | 23005563 | 106 days ago | IN | 0 ETH | 0.0001772 | ||||
| Stake | 23005207 | 106 days ago | IN | 0 ETH | 0.00015353 | ||||
| Stake | 23005063 | 106 days ago | IN | 0 ETH | 0.00015437 | ||||
| Stake | 23004950 | 106 days ago | IN | 0 ETH | 0.00015384 | ||||
| Stake | 23004807 | 106 days ago | IN | 0 ETH | 0.0001562 | ||||
| Stake | 23004793 | 106 days ago | IN | 0 ETH | 0.00029253 | ||||
| Stake | 23001408 | 107 days ago | IN | 0 ETH | 0.00016013 | ||||
| Stake | 23001123 | 107 days ago | IN | 0 ETH | 0.00028649 | ||||
| Stake | 23000991 | 107 days ago | IN | 0 ETH | 0.00016103 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Staking
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
using SafeERC20 for IERC20;
// Struct to hold user data
struct UserData {
uint256 lockStart; // The time when the user last staked
int256 lockRemaining; // The time remaining before unlock
uint256 balance; // The balance of staked tokens
uint256 rewards; // The balance of rewards
}
contract Staking is Ownable, Pausable, ReentrancyGuard {
// Keep the normalized balance of stake tokens for a user
mapping(address => uint256) public userBalance;
// Keep the initial balance of stake tokens for a user
mapping(address => uint256) public userBalanceInitial;
// Keep the time of staking for a user
mapping(address => uint256) public userLock;
// Address of the vault to hold reward tokens
address public immutable vault;
// Address of the token to be staked
IERC20 public immutable token;
// Total amount of tokens staked
uint256 public totalStaked;
// APY of the rewards (in percentage ex. 20)
uint16 public apy;
// Lock time (in seconds)
uint256 public lock;
// Global compound index for calculating compound interest
uint256 public compoundIndex;
// Last update time for the compound index
uint256 public lastUpdateTime;
// compoundIndex precision
uint256 constant ONE = 1e18;
// number representing 100% in apy calculations
uint256 constant APY_ONE = 100;
// seconds in a year: 365 * 24 * 60 * 60
uint256 constant YEAR = 31536000;
// Events
event Stake(address indexed user, uint256 amount);
event Unstake(address indexed user, uint256 amount);
event Claim(address indexed user, uint256 amount);
event Withdraw(address indexed vault, uint256 amount);
event ApySet(uint256 apy);
event LockSet(uint256 lock);
constructor(IERC20 _token, address _owner, address _vault, uint16 _apy, uint256 _lock) Ownable(_owner) {
token = _token;
apy = _apy;
lock = _lock;
vault = _vault;
compoundIndex = ONE; // Initialize to 1.0 (scaled by 1e18 for precision)
lastUpdateTime = block.timestamp;
emit ApySet(_apy);
emit LockSet(_lock);
}
/*
* Internal function to update the compound index based on the elapsed time
* @params _amount The amount to stake (in wei)
*/
function stake(uint256 _amount) external nonReentrant whenNotPaused {
require(_amount > 0, "Cannot stake 0 tokens");
require(_amount <= token.balanceOf(msg.sender), "No fund available");
// Update the compound index
updateIndex();
// Transfer the tokens from the user to the contract
token.safeTransferFrom(msg.sender, address(this), _amount);
// Calculate the adjusted amount based on the current compound index
uint256 adjustedAmount = (_amount * ONE) / compoundIndex;
// Update the user
userBalance[msg.sender] += adjustedAmount;
userBalanceInitial[msg.sender] += _amount;
userLock[msg.sender] = block.timestamp;
totalStaked += _amount;
emit Stake(msg.sender, _amount);
}
/*
* Function to unstake
*/
function unstake() external nonReentrant whenNotPaused {
uint256 _amount = userBalanceInitial[msg.sender];
require(_amount > 0, "Cannot unstake 0 tokens");
require(block.timestamp - userLock[msg.sender] >= lock, "Tokens are locked");
// Update the compound index
updateIndex();
// Calculate rewards
uint256 userCompoundBalance = (userBalance[msg.sender] * compoundIndex) / ONE;
uint256 rewards = userCompoundBalance - _amount;
// Transfer the total amount back to the user
require(token.balanceOf(address(this)) - totalStaked >= rewards, "No fund available");
token.safeTransfer(msg.sender, userCompoundBalance);
// Update the user
delete userBalance[msg.sender];
delete userBalanceInitial[msg.sender];
delete userLock[msg.sender];
totalStaked -= _amount;
emit Unstake(msg.sender, _amount);
emit Claim(msg.sender, rewards);
}
/*
* Function to claim rewards
*/
function claimRewards() external nonReentrant whenNotPaused {
uint256 userStakedAmount = userBalanceInitial[msg.sender];
require(userStakedAmount > 0, "No tokens staked");
// Update the compound index
updateIndex();
// Calculate the rewards
uint256 userCompoundBalance = (userBalance[msg.sender] * compoundIndex) / ONE;
uint256 rewards = userCompoundBalance - userStakedAmount;
require(rewards > 0, "No rewards available");
require(token.balanceOf(address(this)) - totalStaked >= rewards, "No fund available");
// Transfer the rewards to the user
token.safeTransfer(msg.sender, rewards);
// Update the balance
userBalance[msg.sender] = userStakedAmount * ONE / compoundIndex;
emit Claim(msg.sender, rewards);
}
/*
* Function to check the balance of a user
* @params _user Address of the user to check
*/
function balanceOf(address _user) public view returns (UserData memory) {
int256 remaining = int256(userLock[_user] + lock) - int256(block.timestamp);
UserData memory data;
data.lockStart = userLock[_user];
data.lockRemaining = remaining;
data.balance = userBalanceInitial[msg.sender];
data.rewards = pendingRewards(_user);
return data;
}
// HELPERS
/*
* Internal function to update the compound index based on the elapsed time
*/
function updateIndex() internal {
if (block.timestamp > lastUpdateTime) {
compoundIndex = calculateUpdatedIndex();
lastUpdateTime = block.timestamp;
}
}
/*
* Internal function to calculate the pending rewards of a user
* @param _user user to calculate rewards for
*/
function pendingRewards(address _user) internal view returns (uint256) {
uint256 userStakedAmount = userBalanceInitial[_user];
if (userStakedAmount == 0) return 0;
uint256 currentCompoundIndex = calculateUpdatedIndex();
uint256 userCompoundBalance = (userBalance[_user] * currentCompoundIndex) / ONE;
uint256 rewards = userCompoundBalance - userStakedAmount;
return rewards;
}
function calculateUpdatedIndex() internal view returns (uint256 indexUpdated) {
uint256 timeElapsed = block.timestamp - lastUpdateTime;
uint256 _compoundIndex = compoundIndex;
indexUpdated = _compoundIndex + _compoundIndex * uint256(apy) * timeElapsed / (APY_ONE * YEAR);
}
// ADMIN
/*
* Function to withdraw rewards
* Only the fund added for the rewards can be withdrawn.
*/
function withdraw() external onlyOwner {
require(token.balanceOf(address(this)) - totalStaked > 0, "No rewards to withdraw");
uint256 balance = token.balanceOf(address(this)) - totalStaked;
token.safeTransfer(vault, balance);
emit Withdraw(vault, balance);
}
function withdrawAll(address _user) external onlyOwner {
require(_user != address(0), "Invalid user address");
uint256 amount = token.balanceOf(address(this));
token.safeTransfer(_user, amount);
emit Withdraw(_user, amount);
}
/*
* Function to set the APY
* @params _apy The new apy. Effective immediately. in percent, like 20 (meaning 20%)
*/
function setApy(uint16 _apy) external onlyOwner {
updateIndex();
apy = _apy;
emit ApySet(_apy);
}
/*
* Function to set lock period
* @params _lock The new lock period (in seconds). Effective immediately. 1 day = 86 400 seconds
*/
function setLock(uint256 _lock) external onlyOwner {
lock = _lock;
emit LockSet(_lock);
}
/*
* Function to pause the staking
*/
function pause() external onlyOwner {
require(!paused(), "Staking is already paused");
_pause();
}
/*
* Function to unpause the staking
*/
function unpause() external onlyOwner {
require(paused(), "Staking is not paused");
_unpause();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../utils/introspection/IERC165.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../token/ERC20/IERC20.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 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 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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).
*
* This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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).
*
* This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert Errors.FailedCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// 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 ("memory-safe") {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert Errors.FailedCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* 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[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
bool private _paused;
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* 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;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
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 making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}{
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 1000000
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"uint16","name":"_apy","type":"uint16"},{"internalType":"uint256","name":"_lock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"apy","type":"uint256"}],"name":"ApySet","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":false,"internalType":"uint256","name":"lock","type":"uint256"}],"name":"LockSet","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"apy","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"balanceOf","outputs":[{"components":[{"internalType":"uint256","name":"lockStart","type":"uint256"},{"internalType":"int256","name":"lockRemaining","type":"int256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"rewards","type":"uint256"}],"internalType":"struct UserData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compoundIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_apy","type":"uint16"}],"name":"setApy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lock","type":"uint256"}],"name":"setLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userBalanceInitial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60c0346101b657601f611c9e38819003918201601f19168301916001600160401b038311848410176101bb5780849260a0946040528339810103126101b6578051906001600160a01b03821682036101b65761005d602082016101d1565b610069604083016101d1565b60608301519261ffff84168094036101b657608001516001600160a01b039092169384156101a0577fc96ac8f962bbb0ee952304839108c72982a49173fa73e62ede62c943e10f5742946020947feb96c2afe223f01218957822de6a706141023973470929f7cdff34537ac4369493869360005493604051948160018060a01b0382167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36001600160a81b031916176000556001805560a0526006805461ffff1916831790556007869055608052670de0b6b3a7640000600855426009558152a1604051908152a1604051611ab890816101e682396080518181816101e60152610fa4015260a051818181610172015281816102970152818161067501528181610e860152818161118001526114560152f35b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101b65756fe608080604052600436101561001357600080fd5b60003560e01c9081630103c92b1461164b575080632def66201461137a578063372500ab146110ed5780633bcfc4b8146110ad5780633ccfd60b14610e4d5780633f4ba83a14610d585780634277766a14610d1c5780635617a6e814610cb45780635c975abb14610c7057806370a0823114610b7f578063715018a614610ae3578063817b1cd214610aa75780638456cb59146109935780638da5cb5b14610941578063a3f211051461089c578063a694fc3a146105ff578063b4b69cba14610597578063c8f33c911461055b578063d3e15747146104f1578063f2fde38b146103fc578063f83d08ba146103c0578063fa09e6301461020a578063fbfa77cf1461019b5763fc0c546a1461012757600080fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b600080fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff81169081810361019657610263611910565b8115610362576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000060208260248173ffffffffffffffffffffffffffffffffffffffff85165afa9182156103565760009261031d575b5090610314817f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364946020946118b1565b604051908152a2005b90916020823d60201161034e575b8161033860209383611709565b8101031261034b575051906103146102e4565b80fd5b3d915061032b565b6040513d6000823e3d90fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e76616c6964207573657220616464726573730000000000000000000000006044820152fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576020600754604051908152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff811680910361019657610454611910565b80156104c25773ffffffffffffffffffffffffffffffffffffffff600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f1e4fbdf700000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196577fc96ac8f962bbb0ee952304839108c72982a49173fa73e62ede62c943e10f5742602060043561054e611910565b80600755604051908152a1005b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576020600954604051908152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff81168091036101965760005260036020526020604060002054604051908152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657600435610639611821565b61064161185c565b801561083e576040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000060208260248173ffffffffffffffffffffffffffffffffffffffff85165afa91821561035657600092610808575b506106d261072a92841115611779565b6106da611895565b604051907f23b872dd00000000000000000000000000000000000000000000000000000000602083015233602483015230604483015283606483015260648252610725608483611709565b6119f7565b670de0b6b3a76400008102818104670de0b6b3a7640000036107d957600854610752916116d0565b33600052600260205261076b6040600020918254611814565b90553360005260036020526040600020610786828254611814565b9055336000526004602052426040600020556107a481600554611814565b6005556040519081527febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a60203392a260018055005b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b91506020823d602011610836575b8161082360209383611709565b81010312610196579051906106d26106c2565b3d9150610816565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f43616e6e6f74207374616b65203020746f6b656e7300000000000000000000006044820152fd5b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043561ffff81168091036101965760207feb96c2afe223f01218957822de6a706141023973470929f7cdff34537ac4369491610906611910565b61090e611895565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00006006541617600655604051908152a1005b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576109ca611910565b60005460ff8160a01c16610a49577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7401000000000000000000000000000000000000000091610a1861185c565b16176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5374616b696e6720697320616c726561647920706175736564000000000000006044820152fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576020600554604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657610b1a611910565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff811680820361019657610bd76117de565b50806000526004602052610bf360406000205460075490611814565b42810390600042128183128116918313901516176107d957608092610c166117de565b926000526004602052604060002054835260208301918252336000526003602052610c4d604060002054916040850192835261195f565b916060840192835260405193518452516020840152516040830152516060820152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602060ff60005460a01c166040519015158152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff81168091036101965760005260046020526020604060002054604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576020600854604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657610d8f611910565b60005460ff8160a01c1615610def577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5374616b696e67206973206e6f742070617573656400000000000000000000006044820152fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657610e84611910565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8116604051907f70a08231000000000000000000000000000000000000000000000000000000008252306004830152602082602481845afa91821561035657600092611079575b50610f0f60055480936116b0565b1561101b576020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa90811561035657600091610fd5575b5073ffffffffffffffffffffffffffffffffffffffff610f9d7f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364936020936116b0565b93610fca857f000000000000000000000000000000000000000000000000000000000000000080936118b1565b6040519485521692a2005b90506020813d602011611013575b81610ff060209383611709565b81010312610196575173ffffffffffffffffffffffffffffffffffffffff610f5a565b3d9150610fe3565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f207265776172647320746f207769746864726177000000000000000000006044820152fd5b9091506020813d6020116110a5575b8161109560209383611709565b8101031261019657519083610f01565b3d9150611088565b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602061ffff60065416604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657611124611821565b61112c61185c565b336000526003602052604060002054801561131c57611149611895565b33600052600260205261117781670de0b6b3a7640000611171604060002054600854906116bd565b046116b0565b9081156112be577f00000000000000000000000000000000000000000000000000000000000000006040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260208160248173ffffffffffffffffffffffffffffffffffffffff86165afa8015610356578491600091611287575b50916112178261121061121e95600554906116b0565b1015611779565b33906118b1565b670de0b6b3a76400008102908104670de0b6b3a7640000036107d957600854611246916116d0565b3360005260026020526040600020556040519081527f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d460203392a260018055005b9150506020813d6020116112b6575b816112a360209383611709565b81010312610196575183906112176111fa565b3d9150611296565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207265776172647320617661696c61626c650000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f20746f6b656e73207374616b6564000000000000000000000000000000006044820152fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576113b1611821565b6113b961185c565b33600052600360205260406000205480156115ed573360005260046020526113e6604060002054426116b0565b6007541161158f576113f6611895565b336000526002602052670de0b6b3a764000061141a604060002054600854906116bd565b049061142681836116b0565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290927f000000000000000000000000000000000000000000000000000000000000000060208360248173ffffffffffffffffffffffffffffffffffffffff85165afa8015610356578593600091611556575b506114b99361121061121792600554906116b0565b3360005260026020526000604081205533600052600360205260006040812055336000526004602052600060408120556114f5816005546116b0565b6005556040519081527f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd60203392a26040519081527f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d460203392a260018055005b9350506020833d602011611587575b8161157260209383611709565b810103126101965791518492906114b96114a4565b3d9150611565565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f546f6b656e7320617265206c6f636b65640000000000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f7420756e7374616b65203020746f6b656e730000000000000000006044820152fd5b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576004359073ffffffffffffffffffffffffffffffffffffffff821680920361019657602091600052600282526040600020548152f35b919082039182116107d957565b818102929181159184041417156107d957565b81156116da570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761174a57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b1561178057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f2066756e6420617661696c61626c650000000000000000000000000000006044820152fd5b604051906080820182811067ffffffffffffffff82111761174a5760405260006060838281528260208201528260408201520152565b919082018092116107d957565b600260015414611832576002600155565b7f3ee5aeb50000000000000000000000000000000000000000000000000000000060005260046000fd5b60ff60005460a01c1661186b57565b7fd93c06650000000000000000000000000000000000000000000000000000000060005260046000fd5b60095442116118a057565b6118a86119c0565b60085542600955565b61190e9273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb000000000000000000000000000000000000000000000000000000006020860152166024840152604483015260448252610725606483611709565b565b73ffffffffffffffffffffffffffffffffffffffff60005416330361193157565b7f118cdaa7000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff1680600052600360205260406000205480156119b957670de0b6b3a76400006111716119b6936119a26119c0565b9060005260026020526040600020546116bd565b90565b5050600090565b6119b66119cf600954426116b0565b63bbf81e006119f0600854926119eb61ffff60065416856116bd565b6116bd565b0490611814565b906000602091828151910182855af115610356576000513d611a79575073ffffffffffffffffffffffffffffffffffffffff81163b155b611a355750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b60011415611a2e56fea2646970667358221220ccfca2d2ccbf7e30cdfd9774a47a5a8392cd02a5e7139d9716e4995aa2eb2a5c64736f6c634300081b00330000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c2463000000000000000000000000ea42f017a9d962019e36ce4d7d376d0421855b660000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce18800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e13380
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60003560e01c9081630103c92b1461164b575080632def66201461137a578063372500ab146110ed5780633bcfc4b8146110ad5780633ccfd60b14610e4d5780633f4ba83a14610d585780634277766a14610d1c5780635617a6e814610cb45780635c975abb14610c7057806370a0823114610b7f578063715018a614610ae3578063817b1cd214610aa75780638456cb59146109935780638da5cb5b14610941578063a3f211051461089c578063a694fc3a146105ff578063b4b69cba14610597578063c8f33c911461055b578063d3e15747146104f1578063f2fde38b146103fc578063f83d08ba146103c0578063fa09e6301461020a578063fbfa77cf1461019b5763fc0c546a1461012757600080fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c2463168152f35b600080fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce188168152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff81169081810361019657610263611910565b8115610362576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c246360208260248173ffffffffffffffffffffffffffffffffffffffff85165afa9182156103565760009261031d575b5090610314817f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364946020946118b1565b604051908152a2005b90916020823d60201161034e575b8161033860209383611709565b8101031261034b575051906103146102e4565b80fd5b3d915061032b565b6040513d6000823e3d90fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e76616c6964207573657220616464726573730000000000000000000000006044820152fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576020600754604051908152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff811680910361019657610454611910565b80156104c25773ffffffffffffffffffffffffffffffffffffffff600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f1e4fbdf700000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196577fc96ac8f962bbb0ee952304839108c72982a49173fa73e62ede62c943e10f5742602060043561054e611910565b80600755604051908152a1005b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576020600954604051908152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff81168091036101965760005260036020526020604060002054604051908152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657600435610639611821565b61064161185c565b801561083e576040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201527f0000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c246360208260248173ffffffffffffffffffffffffffffffffffffffff85165afa91821561035657600092610808575b506106d261072a92841115611779565b6106da611895565b604051907f23b872dd00000000000000000000000000000000000000000000000000000000602083015233602483015230604483015283606483015260648252610725608483611709565b6119f7565b670de0b6b3a76400008102818104670de0b6b3a7640000036107d957600854610752916116d0565b33600052600260205261076b6040600020918254611814565b90553360005260036020526040600020610786828254611814565b9055336000526004602052426040600020556107a481600554611814565b6005556040519081527febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a60203392a260018055005b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b91506020823d602011610836575b8161082360209383611709565b81010312610196579051906106d26106c2565b3d9150610816565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f43616e6e6f74207374616b65203020746f6b656e7300000000000000000000006044820152fd5b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043561ffff81168091036101965760207feb96c2afe223f01218957822de6a706141023973470929f7cdff34537ac4369491610906611910565b61090e611895565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00006006541617600655604051908152a1005b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576109ca611910565b60005460ff8160a01c16610a49577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7401000000000000000000000000000000000000000091610a1861185c565b16176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5374616b696e6720697320616c726561647920706175736564000000000000006044820152fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576020600554604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657610b1a611910565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff811680820361019657610bd76117de565b50806000526004602052610bf360406000205460075490611814565b42810390600042128183128116918313901516176107d957608092610c166117de565b926000526004602052604060002054835260208301918252336000526003602052610c4d604060002054916040850192835261195f565b916060840192835260405193518452516020840152516040830152516060820152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602060ff60005460a01c166040519015158152f35b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101965760043573ffffffffffffffffffffffffffffffffffffffff81168091036101965760005260046020526020604060002054604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576020600854604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657610d8f611910565b60005460ff8160a01c1615610def577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5374616b696e67206973206e6f742070617573656400000000000000000000006044820152fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657610e84611910565b7f0000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c246373ffffffffffffffffffffffffffffffffffffffff8116604051907f70a08231000000000000000000000000000000000000000000000000000000008252306004830152602082602481845afa91821561035657600092611079575b50610f0f60055480936116b0565b1561101b576020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa90811561035657600091610fd5575b5073ffffffffffffffffffffffffffffffffffffffff610f9d7f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364936020936116b0565b93610fca857f0000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce18880936118b1565b6040519485521692a2005b90506020813d602011611013575b81610ff060209383611709565b81010312610196575173ffffffffffffffffffffffffffffffffffffffff610f5a565b3d9150610fe3565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f207265776172647320746f207769746864726177000000000000000000006044820152fd5b9091506020813d6020116110a5575b8161109560209383611709565b8101031261019657519083610f01565b3d9150611088565b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657602061ffff60065416604051908152f35b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019657611124611821565b61112c61185c565b336000526003602052604060002054801561131c57611149611895565b33600052600260205261117781670de0b6b3a7640000611171604060002054600854906116bd565b046116b0565b9081156112be577f0000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c24636040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260208160248173ffffffffffffffffffffffffffffffffffffffff86165afa8015610356578491600091611287575b50916112178261121061121e95600554906116b0565b1015611779565b33906118b1565b670de0b6b3a76400008102908104670de0b6b3a7640000036107d957600854611246916116d0565b3360005260026020526040600020556040519081527f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d460203392a260018055005b9150506020813d6020116112b6575b816112a360209383611709565b81010312610196575183906112176111fa565b3d9150611296565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207265776172647320617661696c61626c650000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f20746f6b656e73207374616b6564000000000000000000000000000000006044820152fd5b346101965760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576113b1611821565b6113b961185c565b33600052600360205260406000205480156115ed573360005260046020526113e6604060002054426116b0565b6007541161158f576113f6611895565b336000526002602052670de0b6b3a764000061141a604060002054600854906116bd565b049061142681836116b0565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290927f0000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c246360208360248173ffffffffffffffffffffffffffffffffffffffff85165afa8015610356578593600091611556575b506114b99361121061121792600554906116b0565b3360005260026020526000604081205533600052600360205260006040812055336000526004602052600060408120556114f5816005546116b0565b6005556040519081527f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd60203392a26040519081527f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d460203392a260018055005b9350506020833d602011611587575b8161157260209383611709565b810103126101965791518492906114b96114a4565b3d9150611565565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f546f6b656e7320617265206c6f636b65640000000000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f7420756e7374616b65203020746f6b656e730000000000000000006044820152fd5b346101965760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610196576004359073ffffffffffffffffffffffffffffffffffffffff821680920361019657602091600052600282526040600020548152f35b919082039182116107d957565b818102929181159184041417156107d957565b81156116da570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761174a57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b1561178057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f2066756e6420617661696c61626c650000000000000000000000000000006044820152fd5b604051906080820182811067ffffffffffffffff82111761174a5760405260006060838281528260208201528260408201520152565b919082018092116107d957565b600260015414611832576002600155565b7f3ee5aeb50000000000000000000000000000000000000000000000000000000060005260046000fd5b60ff60005460a01c1661186b57565b7fd93c06650000000000000000000000000000000000000000000000000000000060005260046000fd5b60095442116118a057565b6118a86119c0565b60085542600955565b61190e9273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb000000000000000000000000000000000000000000000000000000006020860152166024840152604483015260448252610725606483611709565b565b73ffffffffffffffffffffffffffffffffffffffff60005416330361193157565b7f118cdaa7000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff1680600052600360205260406000205480156119b957670de0b6b3a76400006111716119b6936119a26119c0565b9060005260026020526040600020546116bd565b90565b5050600090565b6119b66119cf600954426116b0565b63bbf81e006119f0600854926119eb61ffff60065416856116bd565b6116bd565b0490611814565b906000602091828151910182855af115610356576000513d611a79575073ffffffffffffffffffffffffffffffffffffffff81163b155b611a355750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b60011415611a2e56fea2646970667358221220ccfca2d2ccbf7e30cdfd9774a47a5a8392cd02a5e7139d9716e4995aa2eb2a5c64736f6c634300081b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c2463000000000000000000000000ea42f017a9d962019e36ce4d7d376d0421855b660000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce18800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e13380
-----Decoded View---------------
Arg [0] : _token (address): 0x4123a133ae3c521FD134D7b13A2dEC35b56c2463
Arg [1] : _owner (address): 0xea42f017a9D962019E36ce4D7d376D0421855b66
Arg [2] : _vault (address): 0x4fBc79d384235e59574A2ebB6c721E4B939Ce188
Arg [3] : _apy (uint16): 0
Arg [4] : _lock (uint256): 31536000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000004123a133ae3c521fd134d7b13a2dec35b56c2463
Arg [1] : 000000000000000000000000ea42f017a9d962019e36ce4d7d376d0421855b66
Arg [2] : 0000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce188
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000001e13380
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.00023 | 56,105,524.173 | $12,896.98 |
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.