Source Code
Latest 25 from a total of 82 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Exit | 14413819 | 1457 days ago | IN | 0 ETH | 0.0055395 | ||||
| Notify Reward Am... | 14402527 | 1459 days ago | IN | 0 ETH | 0.00091522 | ||||
| Stake | 13704508 | 1567 days ago | IN | 0 ETH | 0.01775519 | ||||
| Notify Reward Am... | 13694614 | 1569 days ago | IN | 0 ETH | 0.00870811 | ||||
| Exit | 13638959 | 1578 days ago | IN | 0 ETH | 0.01179341 | ||||
| Stake | 13380608 | 1618 days ago | IN | 0 ETH | 0.01209034 | ||||
| Notify Reward Am... | 13230879 | 1641 days ago | IN | 0 ETH | 0.00476609 | ||||
| Exit | 13175401 | 1650 days ago | IN | 0 ETH | 0.01042501 | ||||
| Exit | 13036141 | 1672 days ago | IN | 0 ETH | 0.00389576 | ||||
| Exit | 13017535 | 1674 days ago | IN | 0 ETH | 0.00455758 | ||||
| Get Reward | 13017523 | 1674 days ago | IN | 0 ETH | 0.00259166 | ||||
| Exit | 12864694 | 1698 days ago | IN | 0 ETH | 0.00183205 | ||||
| Unstake | 12841392 | 1702 days ago | IN | 0 ETH | 0.00178622 | ||||
| Stake | 12841353 | 1702 days ago | IN | 0 ETH | 0.00194855 | ||||
| Unstake | 12791672 | 1710 days ago | IN | 0 ETH | 0.00157187 | ||||
| Stake | 12781537 | 1711 days ago | IN | 0 ETH | 0.00269521 | ||||
| Exit | 12774759 | 1712 days ago | IN | 0 ETH | 0.00584918 | ||||
| Get Reward | 12759975 | 1715 days ago | IN | 0 ETH | 0.00106192 | ||||
| Stake | 12736259 | 1718 days ago | IN | 0 ETH | 0.0025649 | ||||
| Stake | 12702402 | 1724 days ago | IN | 0 ETH | 0.00088302 | ||||
| Get Reward | 12702384 | 1724 days ago | IN | 0 ETH | 0.00122322 | ||||
| Exit | 12688648 | 1726 days ago | IN | 0 ETH | 0.00143826 | ||||
| Exit | 12683772 | 1727 days ago | IN | 0 ETH | 0.00435579 | ||||
| Get Reward | 12679869 | 1727 days ago | IN | 0 ETH | 0.00107226 | ||||
| Exit | 12666055 | 1729 days ago | IN | 0 ETH | 0.00216384 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
FinminityStaking
Compiler Version
v0.7.4+commit.3f05b770
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2021-04-28
*/
// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
require(
success,
"Address: unable to send value, recipient may have reverted"
);
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return
functionCallWithValue(
target,
data,
value,
"Address: low-level call with value failed"
);
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(
address(this).balance >= value,
"Address: insufficient balance for call"
);
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) =
target.call{value: value}(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
return
functionStaticCall(
target,
data,
"Address: low-level static call failed"
);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/
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.3._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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
);
}
// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/SafeERC20.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @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 SafeMath for uint256;
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transfer.selector, to, value)
);
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
);
}
/**
* @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'
// solhint-disable-next-line max-line-length
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(
token,
abi.encodeWithSelector(token.approve.selector, spender, value)
);
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance =
token.allowance(address(this), spender).add(value);
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance =
token.allowance(address(this), spender).sub(
value,
"SafeERC20: decreased allowance below zero"
);
_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
// solhint-disable-next-line max-line-length
require(
abi.decode(returndata, (bool)),
"SafeERC20: ERC20 operation did not succeed"
);
}
}
}
// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/Context.sol
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract 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() {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view 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 {
emit OwnershipTransferred(_owner, address(0));
_owner = 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"
);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + (((a % 2) + (b % 2)) / 2);
}
}
// File: contracts/FinminityStaking.sol
pragma solidity 0.7.4;
contract FinminityStaking is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public stakeToken;
IERC20 public rewardToken;
uint256 public constant DURATION = 61 days;
uint256 private _totalSupply;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
address public rewardDistribution;
mapping(address => uint256) private _balances;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Unstaked(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
event RecoverToken(address indexed token, uint256 indexed amount);
modifier onlyRewardDistribution() {
require(
msg.sender == rewardDistribution,
"Caller is not reward distribution"
);
_;
}
modifier updateReward(address account) {
rewardPerTokenStored = rewardPerToken();
lastUpdateTime = lastTimeRewardApplicable();
if (account != address(0)) {
rewards[account] = earned(account);
userRewardPerTokenPaid[account] = rewardPerTokenStored;
}
_;
}
constructor(IERC20 _stakeToken, IERC20 _rewardToken) {
stakeToken = _stakeToken;
rewardToken = _rewardToken;
}
function lastTimeRewardApplicable() public view returns (uint256) {
return Math.min(block.timestamp, periodFinish);
}
function rewardPerToken() public view returns (uint256) {
if (totalSupply() == 0) {
return rewardPerTokenStored;
}
return
rewardPerTokenStored.add(
lastTimeRewardApplicable()
.sub(lastUpdateTime)
.mul(rewardRate)
.mul(1e18)
.div(totalSupply())
);
}
function earned(address account) public view returns (uint256) {
return
balanceOf(account)
.mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
.div(1e18)
.add(rewards[account]);
}
function stake(uint256 amount) public updateReward(msg.sender) {
require(amount > 0, "Cannot stake 0");
_totalSupply = _totalSupply.add(amount);
_balances[msg.sender] = _balances[msg.sender].add(amount);
stakeToken.safeTransferFrom(msg.sender, address(this), amount);
emit Staked(msg.sender, amount);
}
function unstake(uint256 amount) public updateReward(msg.sender) {
require(amount > 0, "Cannot withdraw 0");
_totalSupply = _totalSupply.sub(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
stakeToken.safeTransfer(msg.sender, amount);
emit Unstaked(msg.sender, amount);
}
function exit() external {
unstake(balanceOf(msg.sender));
getReward();
}
function getReward() public updateReward(msg.sender) {
uint256 reward = earned(msg.sender);
if (reward > 0) {
rewards[msg.sender] = 0;
rewardToken.safeTransfer(msg.sender, reward);
emit RewardPaid(msg.sender, reward);
}
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
if (block.timestamp >= periodFinish) {
rewardRate = reward.div(DURATION);
} else {
uint256 remaining = periodFinish.sub(block.timestamp);
uint256 leftover = remaining.mul(rewardRate);
rewardRate = reward.add(leftover).div(DURATION);
}
lastUpdateTime = block.timestamp;
periodFinish = block.timestamp.add(DURATION);
emit RewardAdded(reward);
}
function setRewardDistribution(address _rewardDistribution)
external
onlyOwner
{
rewardDistribution = _rewardDistribution;
}
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function recoverExcessToken(address token, uint256 amount)
external
onlyOwner
{
IERC20(token).safeTransfer(_msgSender(), amount);
emit RecoverToken(token, amount);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"_stakeToken","type":"address"},{"internalType":"contract IERC20","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoverToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"DURATION","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":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverExcessToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardDistribution","type":"address"}],"name":"setRewardDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60806040526000600455600060055534801561001a57600080fd5b506040516113e43803806113e48339818101604052604081101561003d57600080fd5b50805160209091015160006100506100cb565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039384166001600160a01b031991821617909155600280549290931691161790556100cf565b3390565b611306806100de6000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c80637b0a47ee116100de578063c8f33c9111610097578063e9fad8ee11610071578063e9fad8ee14610348578063ebe2b12b14610350578063f2fde38b14610358578063f7c618c11461037e57610172565b8063c8f33c9114610330578063cd3daf9d14610338578063df136d651461034057610172565b80637b0a47ee146102a957806380faa57d146102b15780638b876347146102b95780638da5cb5b146102df578063a694fc3a146102e7578063aa9700c51461030457610172565b80632e17de78116101305780632e17de78146102315780633c6b16ab1461024e5780633d18b9121461026b57806351ed6a301461027357806370a082311461027b578063715018a6146102a157610172565b80628cc262146101775780630700037d146101af5780630d68b761146101d5578063101114cf146101fd57806318160ddd146102215780631be0528914610229575b600080fd5b61019d6004803603602081101561018d57600080fd5b50356001600160a01b0316610386565b60408051918252519081900360200190f35b61019d600480360360208110156101c557600080fd5b50356001600160a01b03166103f4565b6101fb600480360360208110156101eb57600080fd5b50356001600160a01b0316610406565b005b610205610480565b604080516001600160a01b039092168252519081900360200190f35b61019d61048f565b61019d610496565b6101fb6004803603602081101561024757600080fd5b503561049d565b6101fb6004803603602081101561026457600080fd5b50356105d1565b6101fb610723565b6102056107f5565b61019d6004803603602081101561029157600080fd5b50356001600160a01b0316610804565b6101fb61081f565b61019d6108c1565b61019d6108c7565b61019d600480360360208110156102cf57600080fd5b50356001600160a01b03166108da565b6102056108ec565b6101fb600480360360208110156102fd57600080fd5b50356108fb565b6101fb6004803603604081101561031a57600080fd5b506001600160a01b038135169060200135610a2d565b61019d610adb565b61019d610ae1565b61019d610b2f565b6101fb610b35565b61019d610b50565b6101fb6004803603602081101561036e57600080fd5b50356001600160a01b0316610b56565b610205610c4e565b6001600160a01b0381166000908152600b6020908152604080832054600a9092528220546103ee91906103e890670de0b6b3a7640000906103e2906103d3906103cd610ae1565b90610c5d565b6103dc88610804565b90610ca6565b90610cff565b90610d41565b92915050565b600b6020526000908152604090205481565b61040e610d9b565b6000546001600160a01b0390811691161461045e576040805162461bcd60e51b81526020600482018190526024820152600080516020611266833981519152604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b031681565b6003545b90565b62506b8081565b336104a6610ae1565b6007556104b16108c7565b6006556001600160a01b038116156104f8576104cc81610386565b6001600160a01b0382166000908152600b6020908152604080832093909355600754600a909152919020555b60008211610541576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b60035461054e9083610c5d565b6003553360009081526009602052604090205461056b9083610c5d565b33600081815260096020526040902091909155600154610597916001600160a01b039091169084610d9f565b60408051838152905133917f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75919081900360200190a25050565b6008546001600160a01b0316331461061a5760405162461bcd60e51b81526004018080602001828103825260218152602001806112866021913960400191505060405180910390fd5b6000610624610ae1565b60075561062f6108c7565b6006556001600160a01b038116156106765761064a81610386565b6001600160a01b0382166000908152600b6020908152604080832093909355600754600a909152919020555b60045442106106945761068c8262506b80610cff565b6005556106d6565b6004546000906106a49042610c5d565b905060006106bd60055483610ca690919063ffffffff16565b90506106d062506b806103e28684610d41565b60055550505b4260068190556106e99062506b80610d41565b6004556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b3361072c610ae1565b6007556107376108c7565b6006556001600160a01b0381161561077e5761075281610386565b6001600160a01b0382166000908152600b6020908152604080832093909355600754600a909152919020555b600061078933610386565b905080156107f157336000818152600b60205260408120556002546107ba916001600160a01b039091169083610d9f565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6001546001600160a01b031681565b6001600160a01b031660009081526009602052604090205490565b610827610d9b565b6000546001600160a01b03908116911614610877576040805162461bcd60e51b81526020600482018190526024820152600080516020611266833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60055481565b60006108d542600454610df6565b905090565b600a6020526000908152604090205481565b6000546001600160a01b031690565b33610904610ae1565b60075561090f6108c7565b6006556001600160a01b038116156109565761092a81610386565b6001600160a01b0382166000908152600b6020908152604080832093909355600754600a909152919020555b6000821161099c576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6003546109a99083610d41565b600355336000908152600960205260409020546109c69083610d41565b336000818152600960205260409020919091556001546109f3916001600160a01b03909116903085610e0c565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b610a35610d9b565b6000546001600160a01b03908116911614610a85576040805162461bcd60e51b81526020600482018190526024820152600080516020611266833981519152604482015290519081900360640190fd5b610aa1610a90610d9b565b6001600160a01b0384169083610d9f565b60405181906001600160a01b038416907ffba2d3bdfb2d601eb66a89783a2c614856101cadce71556753c2edadd60c831c90600090a35050565b60065481565b6000610aeb61048f565b610af85750600754610493565b6108d5610b26610b0661048f565b6103e2670de0b6b3a76400006103dc6005546103dc6006546103cd6108c7565b60075490610d41565b60075481565b610b46610b4133610804565b61049d565b610b4e610723565b565b60045481565b610b5e610d9b565b6000546001600160a01b03908116911614610bae576040805162461bcd60e51b81526020600482018190526024820152600080516020611266833981519152604482015290519081900360640190fd5b6001600160a01b038116610bf35760405162461bcd60e51b81526004018080602001828103825260268152602001806111f96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b6000610c9f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e6c565b9392505050565b600082610cb5575060006103ee565b82820282848281610cc257fe5b0414610c9f5760405162461bcd60e51b81526004018080602001828103825260218152602001806112456021913960400191505060405180910390fd5b6000610c9f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f03565b600082820183811015610c9f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610df1908490610f68565b505050565b6000818310610e055781610c9f565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610e66908590610f68565b50505050565b60008184841115610efb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ec0578181015183820152602001610ea8565b50505050905090810190601f168015610eed5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610f525760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610ec0578181015183820152602001610ea8565b506000838581610f5e57fe5b0495945050505050565b6060610fbd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110199092919063ffffffff16565b805190915015610df157808060200190516020811015610fdc57600080fd5b5051610df15760405162461bcd60e51b815260040180806020018281038252602a8152602001806112a7602a913960400191505060405180910390fd5b60606110288484600085611030565b949350505050565b6060824710156110715760405162461bcd60e51b815260040180806020018281038252602681526020018061121f6026913960400191505060405180910390fd5b61107a8561118c565b6110cb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061110a5780518252601f1990920191602091820191016110eb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461116c576040519150601f19603f3d011682016040523d82523d6000602084013e611171565b606091505b5091509150611181828286611192565b979650505050505050565b3b151590565b606083156111a1575081610c9f565b8251156111b15782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315610ec0578181015183820152602001610ea856fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657243616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a5d06ef1dc071090e619310f969c6540163824ce9240ba339ada44d90633926664736f6c63430007040033000000000000000000000000b81be6f200de9cf5bfe5a6361073e6a8bb8d1f0d00000000000000000000000099c6e435ec259a7e8d65e1955c9423db624ba54c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101725760003560e01c80637b0a47ee116100de578063c8f33c9111610097578063e9fad8ee11610071578063e9fad8ee14610348578063ebe2b12b14610350578063f2fde38b14610358578063f7c618c11461037e57610172565b8063c8f33c9114610330578063cd3daf9d14610338578063df136d651461034057610172565b80637b0a47ee146102a957806380faa57d146102b15780638b876347146102b95780638da5cb5b146102df578063a694fc3a146102e7578063aa9700c51461030457610172565b80632e17de78116101305780632e17de78146102315780633c6b16ab1461024e5780633d18b9121461026b57806351ed6a301461027357806370a082311461027b578063715018a6146102a157610172565b80628cc262146101775780630700037d146101af5780630d68b761146101d5578063101114cf146101fd57806318160ddd146102215780631be0528914610229575b600080fd5b61019d6004803603602081101561018d57600080fd5b50356001600160a01b0316610386565b60408051918252519081900360200190f35b61019d600480360360208110156101c557600080fd5b50356001600160a01b03166103f4565b6101fb600480360360208110156101eb57600080fd5b50356001600160a01b0316610406565b005b610205610480565b604080516001600160a01b039092168252519081900360200190f35b61019d61048f565b61019d610496565b6101fb6004803603602081101561024757600080fd5b503561049d565b6101fb6004803603602081101561026457600080fd5b50356105d1565b6101fb610723565b6102056107f5565b61019d6004803603602081101561029157600080fd5b50356001600160a01b0316610804565b6101fb61081f565b61019d6108c1565b61019d6108c7565b61019d600480360360208110156102cf57600080fd5b50356001600160a01b03166108da565b6102056108ec565b6101fb600480360360208110156102fd57600080fd5b50356108fb565b6101fb6004803603604081101561031a57600080fd5b506001600160a01b038135169060200135610a2d565b61019d610adb565b61019d610ae1565b61019d610b2f565b6101fb610b35565b61019d610b50565b6101fb6004803603602081101561036e57600080fd5b50356001600160a01b0316610b56565b610205610c4e565b6001600160a01b0381166000908152600b6020908152604080832054600a9092528220546103ee91906103e890670de0b6b3a7640000906103e2906103d3906103cd610ae1565b90610c5d565b6103dc88610804565b90610ca6565b90610cff565b90610d41565b92915050565b600b6020526000908152604090205481565b61040e610d9b565b6000546001600160a01b0390811691161461045e576040805162461bcd60e51b81526020600482018190526024820152600080516020611266833981519152604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b031681565b6003545b90565b62506b8081565b336104a6610ae1565b6007556104b16108c7565b6006556001600160a01b038116156104f8576104cc81610386565b6001600160a01b0382166000908152600b6020908152604080832093909355600754600a909152919020555b60008211610541576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b60035461054e9083610c5d565b6003553360009081526009602052604090205461056b9083610c5d565b33600081815260096020526040902091909155600154610597916001600160a01b039091169084610d9f565b60408051838152905133917f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75919081900360200190a25050565b6008546001600160a01b0316331461061a5760405162461bcd60e51b81526004018080602001828103825260218152602001806112866021913960400191505060405180910390fd5b6000610624610ae1565b60075561062f6108c7565b6006556001600160a01b038116156106765761064a81610386565b6001600160a01b0382166000908152600b6020908152604080832093909355600754600a909152919020555b60045442106106945761068c8262506b80610cff565b6005556106d6565b6004546000906106a49042610c5d565b905060006106bd60055483610ca690919063ffffffff16565b90506106d062506b806103e28684610d41565b60055550505b4260068190556106e99062506b80610d41565b6004556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b3361072c610ae1565b6007556107376108c7565b6006556001600160a01b0381161561077e5761075281610386565b6001600160a01b0382166000908152600b6020908152604080832093909355600754600a909152919020555b600061078933610386565b905080156107f157336000818152600b60205260408120556002546107ba916001600160a01b039091169083610d9f565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6001546001600160a01b031681565b6001600160a01b031660009081526009602052604090205490565b610827610d9b565b6000546001600160a01b03908116911614610877576040805162461bcd60e51b81526020600482018190526024820152600080516020611266833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60055481565b60006108d542600454610df6565b905090565b600a6020526000908152604090205481565b6000546001600160a01b031690565b33610904610ae1565b60075561090f6108c7565b6006556001600160a01b038116156109565761092a81610386565b6001600160a01b0382166000908152600b6020908152604080832093909355600754600a909152919020555b6000821161099c576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6003546109a99083610d41565b600355336000908152600960205260409020546109c69083610d41565b336000818152600960205260409020919091556001546109f3916001600160a01b03909116903085610e0c565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b610a35610d9b565b6000546001600160a01b03908116911614610a85576040805162461bcd60e51b81526020600482018190526024820152600080516020611266833981519152604482015290519081900360640190fd5b610aa1610a90610d9b565b6001600160a01b0384169083610d9f565b60405181906001600160a01b038416907ffba2d3bdfb2d601eb66a89783a2c614856101cadce71556753c2edadd60c831c90600090a35050565b60065481565b6000610aeb61048f565b610af85750600754610493565b6108d5610b26610b0661048f565b6103e2670de0b6b3a76400006103dc6005546103dc6006546103cd6108c7565b60075490610d41565b60075481565b610b46610b4133610804565b61049d565b610b4e610723565b565b60045481565b610b5e610d9b565b6000546001600160a01b03908116911614610bae576040805162461bcd60e51b81526020600482018190526024820152600080516020611266833981519152604482015290519081900360640190fd5b6001600160a01b038116610bf35760405162461bcd60e51b81526004018080602001828103825260268152602001806111f96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b6000610c9f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e6c565b9392505050565b600082610cb5575060006103ee565b82820282848281610cc257fe5b0414610c9f5760405162461bcd60e51b81526004018080602001828103825260218152602001806112456021913960400191505060405180910390fd5b6000610c9f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f03565b600082820183811015610c9f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610df1908490610f68565b505050565b6000818310610e055781610c9f565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610e66908590610f68565b50505050565b60008184841115610efb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ec0578181015183820152602001610ea8565b50505050905090810190601f168015610eed5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610f525760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610ec0578181015183820152602001610ea8565b506000838581610f5e57fe5b0495945050505050565b6060610fbd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110199092919063ffffffff16565b805190915015610df157808060200190516020811015610fdc57600080fd5b5051610df15760405162461bcd60e51b815260040180806020018281038252602a8152602001806112a7602a913960400191505060405180910390fd5b60606110288484600085611030565b949350505050565b6060824710156110715760405162461bcd60e51b815260040180806020018281038252602681526020018061121f6026913960400191505060405180910390fd5b61107a8561118c565b6110cb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061110a5780518252601f1990920191602091820191016110eb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461116c576040519150601f19603f3d011682016040523d82523d6000602084013e611171565b606091505b5091509150611181828286611192565b979650505050505050565b3b151590565b606083156111a1575081610c9f565b8251156111b15782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315610ec0578181015183820152602001610ea856fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657243616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a5d06ef1dc071090e619310f969c6540163824ce9240ba339ada44d90633926664736f6c63430007040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b81be6f200de9cf5bfe5a6361073e6a8bb8d1f0d00000000000000000000000099c6e435ec259a7e8d65e1955c9423db624ba54c
-----Decoded View---------------
Arg [0] : _stakeToken (address): 0xb81bE6f200De9CF5bFe5a6361073e6a8Bb8D1f0D
Arg [1] : _rewardToken (address): 0x99c6e435eC259A7E8d65E1955C9423DB624bA54C
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b81be6f200de9cf5bfe5a6361073e6a8bb8d1f0d
Arg [1] : 00000000000000000000000099c6e435ec259a7e8d65e1955c9423db624ba54c
Deployed Bytecode Sourcemap
26243:4730:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28392:265;;;;;;;;;;;;;;;;-1:-1:-1;28392:265:0;-1:-1:-1;;;;;28392:265:0;;:::i;:::-;;;;;;;;;;;;;;;;26816:42;;;;;;;;;;;;;;;;-1:-1:-1;26816:42:0;-1:-1:-1;;;;;26816:42:0;;:::i;30373:161::-;;;;;;;;;;;;;;;;-1:-1:-1;30373:161:0;-1:-1:-1;;;;;30373:161:0;;:::i;:::-;;26658:33;;;:::i;:::-;;;;-1:-1:-1;;;;;26658:33:0;;;;;;;;;;;;;;30542:91;;;:::i;26420:42::-;;;:::i;29025:340::-;;;;;;;;;;;;;;;;-1:-1:-1;29025:340:0;;:::i;29777:588::-;;;;;;;;;;;;;;;;-1:-1:-1;29777:588:0;;:::i;29477:292::-;;;:::i;26355:24::-;;;:::i;30641:110::-;;;;;;;;;;;;;;;;-1:-1:-1;30641:110:0;-1:-1:-1;;;;;30641:110:0;;:::i;19125:148::-;;;:::i;26542:29::-;;;:::i;27825:131::-;;;:::i;26752:57::-;;;;;;;;;;;;;;;;-1:-1:-1;26752:57:0;-1:-1:-1;;;;;26752:57:0;;:::i;18483:79::-;;;:::i;28665:352::-;;;;;;;;;;;;;;;;-1:-1:-1;28665:352:0;;:::i;30759:211::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;30759:211:0;;;;;;;;:::i;26578:29::-;;;:::i;27964:420::-;;;:::i;26614:35::-;;;:::i;29373:96::-;;;:::i;26504:31::-;;;:::i;19428:281::-;;;;;;;;;;;;;;;;-1:-1:-1;19428:281:0;-1:-1:-1;;;;;19428:281:0;;:::i;26386:25::-;;;:::i;28392:265::-;-1:-1:-1;;;;;28632:16:0;;28446:7;28632:16;;;:7;:16;;;;;;;;;28548:22;:31;;;;;;28486:163;;28632:16;28486:123;;28604:4;;28486:95;;28527:53;;:16;:14;:16::i;:::-;:20;;:53::i;:::-;28486:18;28496:7;28486:9;:18::i;:::-;:40;;:95::i;:::-;:117;;:123::i;:::-;:145;;:163::i;:::-;28466:183;28392:265;-1:-1:-1;;28392:265:0:o;26816:42::-;;;;;;;;;;;;;:::o;30373:161::-;18705:12;:10;:12::i;:::-;18695:6;;-1:-1:-1;;;;;18695:6:0;;;:22;;;18687:67;;;;;-1:-1:-1;;;18687:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;18687:67:0;;;;;;;;;;;;;;;30486:18:::1;:40:::0;;-1:-1:-1;;;;;;30486:40:0::1;-1:-1:-1::0;;;;;30486:40:0;;;::::1;::::0;;;::::1;::::0;;30373:161::o;26658:33::-;;;-1:-1:-1;;;;;26658:33:0;;:::o;30542:91::-;30613:12;;30542:91;;:::o;26420:42::-;26455:7;26420:42;:::o;29025:340::-;29078:10;27419:16;:14;:16::i;:::-;27396:20;:39;27463:26;:24;:26::i;:::-;27446:14;:43;-1:-1:-1;;;;;27504:21:0;;;27500:157;;27561:15;27568:7;27561:6;:15::i;:::-;-1:-1:-1;;;;;27542:16:0;;;;;;:7;:16;;;;;;;;:34;;;;27625:20;;27591:22;:31;;;;;;:54;27500:157;29118:1:::1;29109:6;:10;29101:40;;;::::0;;-1:-1:-1;;;29101:40:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;29101:40:0;;;;;;;;;;;;;::::1;;29167:12;::::0;:24:::1;::::0;29184:6;29167:16:::1;:24::i;:::-;29152:12;:39:::0;29236:10:::1;29226:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;29252:6;29226:25:::1;:33::i;:::-;29212:10;29202:21;::::0;;;:9:::1;:21;::::0;;;;:57;;;;29270:10:::1;::::0;:43:::1;::::0;-1:-1:-1;;;;;29270:10:0;;::::1;::::0;29306:6;29270:23:::1;:43::i;:::-;29329:28;::::0;;;;;;;29338:10:::1;::::0;29329:28:::1;::::0;;;;;::::1;::::0;;::::1;29025:340:::0;;:::o;29777:588::-;27239:18;;-1:-1:-1;;;;;27239:18:0;27225:10;:32;27203:115;;;;-1:-1:-1;;;27203:115:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29901:1:::1;27419:16;:14;:16::i;:::-;27396:20;:39:::0;27463:26:::1;:24;:26::i;:::-;27446:14;:43:::0;-1:-1:-1;;;;;27504:21:0;::::1;::::0;27500:157:::1;;27561:15;27568:7;27561:6;:15::i;:::-;-1:-1:-1::0;;;;;27542:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;27625:20:::1;::::0;27591:22:::1;:31:::0;;;;;;:54;27500:157:::1;29944:12:::2;;29925:15;:31;29921:304;;29986:20;:6:::0;26455:7:::2;29986:10;:20::i;:::-;29973:10;:33:::0;29921:304:::2;;;30059:12;::::0;30039:17:::2;::::0;30059:33:::2;::::0;30076:15:::2;30059:16;:33::i;:::-;30039:53;;30107:16;30126:25;30140:10;;30126:9;:13;;:25;;;;:::i;:::-;30107:44:::0;-1:-1:-1;30179:34:0::2;26455:7;30179:20;:6:::0;30107:44;30179:10:::2;:20::i;:34::-;30166:10;:47:::0;-1:-1:-1;;29921:304:0::2;30252:15;30235:14;:32:::0;;;30293:29:::2;::::0;26455:7:::2;30293:19;:29::i;:::-;30278:12;:44:::0;30338:19:::2;::::0;;;;;;;::::2;::::0;;;;::::2;::::0;;::::2;27329:1:::1;29777:588:::0;:::o;29477:292::-;29518:10;27419:16;:14;:16::i;:::-;27396:20;:39;27463:26;:24;:26::i;:::-;27446:14;:43;-1:-1:-1;;;;;27504:21:0;;;27500:157;;27561:15;27568:7;27561:6;:15::i;:::-;-1:-1:-1;;;;;27542:16:0;;;;;;:7;:16;;;;;;;;:34;;;;27625:20;;27591:22;:31;;;;;;:54;27500:157;29541:14:::1;29558:18;29565:10;29558:6;:18::i;:::-;29541:35:::0;-1:-1:-1;29591:10:0;;29587:175:::1;;29626:10;29640:1;29618:19:::0;;;:7:::1;:19;::::0;;;;:23;29656:11:::1;::::0;:44:::1;::::0;-1:-1:-1;;;;;29656:11:0;;::::1;::::0;29693:6;29656:24:::1;:44::i;:::-;29720:30;::::0;;;;;;;29731:10:::1;::::0;29720:30:::1;::::0;;;;;::::1;::::0;;::::1;29587:175;27667:1;29477:292:::0;:::o;26355:24::-;;;-1:-1:-1;;;;;26355:24:0;;:::o;30641:110::-;-1:-1:-1;;;;;30725:18:0;30698:7;30725:18;;;:9;:18;;;;;;;30641:110::o;19125:148::-;18705:12;:10;:12::i;:::-;18695:6;;-1:-1:-1;;;;;18695:6:0;;;:22;;;18687:67;;;;;-1:-1:-1;;;18687:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;18687:67:0;;;;;;;;;;;;;;;19232:1:::1;19216:6:::0;;19195:40:::1;::::0;-1:-1:-1;;;;;19216:6:0;;::::1;::::0;19195:40:::1;::::0;19232:1;;19195:40:::1;19263:1;19246:19:::0;;-1:-1:-1;;;;;;19246:19:0::1;::::0;;19125:148::o;26542:29::-;;;;:::o;27825:131::-;27882:7;27909:39;27918:15;27935:12;;27909:8;:39::i;:::-;27902:46;;27825:131;:::o;26752:57::-;;;;;;;;;;;;;:::o;18483:79::-;18521:7;18548:6;-1:-1:-1;;;;;18548:6:0;18483:79;:::o;28665:352::-;28716:10;27419:16;:14;:16::i;:::-;27396:20;:39;27463:26;:24;:26::i;:::-;27446:14;:43;-1:-1:-1;;;;;27504:21:0;;;27500:157;;27561:15;27568:7;27561:6;:15::i;:::-;-1:-1:-1;;;;;27542:16:0;;;;;;:7;:16;;;;;;;;:34;;;;27625:20;;27591:22;:31;;;;;;:54;27500:157;28756:1:::1;28747:6;:10;28739:37;;;::::0;;-1:-1:-1;;;28739:37:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;28739:37:0;;;;;;;;;;;;;::::1;;28802:12;::::0;:24:::1;::::0;28819:6;28802:16:::1;:24::i;:::-;28787:12;:39:::0;28871:10:::1;28861:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;28887:6;28861:25:::1;:33::i;:::-;28847:10;28837:21;::::0;;;:9:::1;:21;::::0;;;;:57;;;;28905:10:::1;::::0;:62:::1;::::0;-1:-1:-1;;;;;28905:10:0;;::::1;::::0;28953:4:::1;28960:6:::0;28905:27:::1;:62::i;:::-;28983:26;::::0;;;;;;;28990:10:::1;::::0;28983:26:::1;::::0;;;;;::::1;::::0;;::::1;28665:352:::0;;:::o;30759:211::-;18705:12;:10;:12::i;:::-;18695:6;;-1:-1:-1;;;;;18695:6:0;;;:22;;;18687:67;;;;;-1:-1:-1;;;18687:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;18687:67:0;;;;;;;;;;;;;;;30871:48:::1;30898:12;:10;:12::i;:::-;-1:-1:-1::0;;;;;30871:26:0;::::1;::::0;30912:6;30871:26:::1;:48::i;:::-;30935:27;::::0;30955:6;;-1:-1:-1;;;;;30935:27:0;::::1;::::0;::::1;::::0;;;::::1;30759:211:::0;;:::o;26578:29::-;;;;:::o;27964:420::-;28011:7;28035:13;:11;:13::i;:::-;28031:78;;-1:-1:-1;28077:20:0;;28070:27;;28031:78;28139:237;28182:179;28347:13;:11;:13::i;:::-;28182:138;28315:4;28182:106;28277:10;;28182:68;28235:14;;28182:26;:24;:26::i;:179::-;28139:20;;;:24;:237::i;26614:35::-;;;;:::o;29373:96::-;29409:30;29417:21;29427:10;29417:9;:21::i;:::-;29409:7;:30::i;:::-;29450:11;:9;:11::i;:::-;29373:96::o;26504:31::-;;;;:::o;19428:281::-;18705:12;:10;:12::i;:::-;18695:6;;-1:-1:-1;;;;;18695:6:0;;;:22;;;18687:67;;;;;-1:-1:-1;;;18687:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;18687:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;19531:22:0;::::1;19509:110;;;;-1:-1:-1::0;;;19509:110:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19656:6;::::0;;19635:38:::1;::::0;-1:-1:-1;;;;;19635:38:0;;::::1;::::0;19656:6;::::1;::::0;19635:38:::1;::::0;::::1;19684:6;:17:::0;;-1:-1:-1;;;;;;19684:17:0::1;-1:-1:-1::0;;;;;19684:17:0;;;::::1;::::0;;;::::1;::::0;;19428:281::o;26386:25::-;;;-1:-1:-1;;;;;26386:25:0;;:::o;21162:136::-;21220:7;21247:43;21251:1;21254;21247:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;21240:50;21162:136;-1:-1:-1;;;21162:136:0:o;22086:471::-;22144:7;22389:6;22385:47;;-1:-1:-1;22419:1:0;22412:8;;22385:47;22456:5;;;22460:1;22456;:5;:1;22480:5;;;;;:10;22472:56;;;;-1:-1:-1;;;22472:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23033:132;23091:7;23118:39;23122:1;23125;23118:39;;;;;;;;;;;;;;;;;:3;:39::i;20698:181::-;20756:7;20788:5;;;20812:6;;;;20804:46;;;;;-1:-1:-1;;;20804:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;16954:106;17042:10;16954:106;:::o;12489:248::-;12660:58;;;-1:-1:-1;;;;;12660:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12660:58:0;-1:-1:-1;;;12660:58:0;;;12606:123;;12640:5;;12606:19;:123::i;:::-;12489:248;;;:::o;25745:106::-;25803:7;25834:1;25830;:5;:13;;25842:1;25830:13;;;-1:-1:-1;25838:1:0;;25745:106;-1:-1:-1;25745:106:0:o;12745:285::-;12943:68;;;-1:-1:-1;;;;;12943:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12943:68:0;-1:-1:-1;;;12943:68:0;;;12889:133;;12923:5;;12889:19;:133::i;:::-;12745:285;;;;:::o;21601:226::-;21721:7;21757:12;21749:6;;;;21741:29;;;;-1:-1:-1;;;21741:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21793:5:0;;;21601:226::o;23661:312::-;23781:7;23816:12;23809:5;23801:28;;;;-1:-1:-1;;;23801:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23840:9;23856:1;23852;:5;;;;;;;23661:312;-1:-1:-1;;;;;23661:312:0:o;15379:885::-;15803:23;15842:118;15888:4;15842:118;;;;;;;;;;;;;;;;;15850:5;-1:-1:-1;;;;;15842:27:0;;;:118;;;;;:::i;:::-;15975:17;;15803:157;;-1:-1:-1;15975:21:0;15971:286;;16148:10;16137:30;;;;;;;;;;;;;;;-1:-1:-1;16137:30:0;16111:134;;;;-1:-1:-1;;;16111:134:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3895:229;4032:12;4064:52;4086:6;4094:4;4100:1;4103:12;4064:21;:52::i;:::-;4057:59;3895:229;-1:-1:-1;;;;3895:229:0:o;5111:621::-;5281:12;5353:5;5328:21;:30;;5306:118;;;;-1:-1:-1;;;5306:118:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5443:18;5454:6;5443:10;:18::i;:::-;5435:60;;;;;-1:-1:-1;;;5435:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5569:12;5583:23;5623:6;-1:-1:-1;;;;;5623:11:0;5642:5;5649:4;5623:31;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5623:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5568:86;;;;5672:52;5690:7;5699:10;5711:12;5672:17;:52::i;:::-;5665:59;5111:621;-1:-1:-1;;;;;;;5111:621:0:o;858:444::-;1238:20;1286:8;;;858:444::o;8023:777::-;8173:12;8202:7;8198:595;;;-1:-1:-1;8233:10:0;8226:17;;8198:595;8347:17;;:21;8343:439;;8610:10;8604:17;8671:15;8658:10;8654:2;8650:19;8643:44;8558:148;8746:20;;-1:-1:-1;;;8746:20:0;;;;;;;;;;;;;;;;;8753:12;;8746:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
ipfs://a5d06ef1dc071090e619310f969c6540163824ce9240ba339ada44d906339266
Loading...
Loading
Loading...
Loading
Net Worth in USD
$11.66
Net Worth in ETH
0.005555
Token Allocations
FMT
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.004282 | 2,722.4875 | $11.66 |
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.