Source Code
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
StakingRewardsFactory
Compiler Version
v0.5.16+commit.9c3226ce
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2020-11-14
*/
// _________ _______ ________ __ __ _________ __
// / _____/ \ \ \_____ \/ \ / \/ _____// |_ ___________ _____
// \_____ \ / | \ / | \ \/\/ /\_____ \\ __\/ _ \_ __ \/ \
// / \/ | \/ | \ / / \| | ( <_> ) | \/ Y Y \
// /_______ /\____|__ /\_______ /\__/\ / /_______ /|__| \____/|__| |__|_| /
// \/ \/ \/ \/ \/ \/
// Snowstorm token geyser factory
// Based off SNX and UNI staking contracts
// Rebasing staking coin support added for ousd
// Users should recieve rebased rewards
pragma solidity ^0.5.16;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see `ERC20Detailed`.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transfer(address recipient, uint256 amount)
external
returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through `transferFrom`. This is
* zero by default.
*
* This value changes when `approve` or `transferFrom` are called.
*/
function allowance(address owner, address spender)
external
view
returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* > Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an `Approval` event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to `approve`. `value` is the new allowance.
*/
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @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.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be aplied to your functions to restrict their use to
* the owner.
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
/**
* @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(isOwner(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
return msg.sender == _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 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 onlyOwner {
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
}
/**
* @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);
}
}
/**
* @dev Optional functions from the ERC20 standard.
*/
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
constructor(
string memory name,
string memory symbol,
uint8 decimals
) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei.
*
* > Note that this information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* `IERC20.balanceOf` and `IERC20.transfer`.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
}
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly {
size := extcodesize(account)
}
return size > 0;
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
callOptionalReturn(
token,
abi.encodeWithSelector(token.transfer.selector, to, value)
);
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
callOptionalReturn(
token,
abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
);
}
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
callOptionalReturn(
token,
abi.encodeWithSelector(token.approve.selector, spender, value)
);
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(
value
);
callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(
value
);
callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checked to verify it contains contract code
// 2. The call itself is made, and success asserted
// 3. The return value is decoded, which in turn checks the size of the returned data.
// solhint-disable-next-line max-line-length
require(address(token).isContract(), "SafeERC20: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
// solhint-disable-next-line max-line-length
require(
abi.decode(returndata, (bool)),
"SafeERC20: ERC20 operation did not succeed"
);
}
}
}
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the `nonReentrant` modifier
* available, which can be aplied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*/
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor() internal {
// The counter starts at one to prevent changing it from zero to a non-zero
// value, which is a more expensive operation.
_guardCounter = 1;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_guardCounter += 1;
uint256 localCounter = _guardCounter;
_;
require(
localCounter == _guardCounter,
"ReentrancyGuard: reentrant call"
);
}
}
// Inheritance
interface IStakingRewards {
// Views
function lastTimeRewardApplicable() external view returns (uint256);
function rewardPerToken() external view returns (uint256);
function earned(address account) external view returns (uint256);
function getRewardForDuration() external view returns (uint256);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
// Mutative
function stake(uint256 amount) external;
function withdraw(uint256 amount) external;
function getReward() external;
function exit() external;
}
interface IOriginUSD {
// Views
function rebasingCredits() external view returns (uint256);
function rebasingCreditsPerToken() external view returns (uint256);
// Mutative
function rebaseOptIn() external;
}
contract RewardsDistributionRecipient {
address public rewardsDistribution;
function notifyRewardAmount(uint256 reward) external;
modifier onlyRewardsDistribution() {
require(
msg.sender == rewardsDistribution,
"Caller is not RewardsDistribution contract"
);
_;
}
}
contract StakingRewards is
IStakingRewards,
RewardsDistributionRecipient,
ReentrancyGuard
{
using SafeMath for uint256;
using SafeERC20 for IERC20;
address ousdAddress = 0x2A8e1E676Ec238d8A992307B495b45B3fEAa5e86;
/* ========== STATE VARIABLES ========== */
IERC20 public rewardsToken;
IERC20 public stakingToken;
IOriginUSD public ousd;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public rewardsDuration = 60 days;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
/* ========== CONSTRUCTOR ========== */
constructor(
address _rewardsDistribution,
address _rewardsToken,
address _stakingToken
) public {
rewardsToken = IERC20(_rewardsToken);
stakingToken = IERC20(_stakingToken);
rewardsDistribution = _rewardsDistribution;
//opt-in to oUSD yields
ousd = IOriginUSD(ousdAddress);
}
/* ========== VIEWS ========== */
function totalSupply() external view returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) external view returns (uint256) {
return _balances[account];
}
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
_balances[account]
.mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
.div(1e18)
.add(rewards[account]);
}
function getRewardForDuration() external view returns (uint256) {
return rewardRate.mul(rewardsDuration);
}
/* ========== MUTATIVE FUNCTIONS ========== */
// function stakeWithPermit(uint256 amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external nonReentrant updateReward(msg.sender) {
// require(amount > 0, "Cannot stake 0");
// _totalSupply = _totalSupply.add(amount);
// _balances[msg.sender] = _balances[msg.sender].add(amount);
// // permit
// IUniswapV2ERC20(address(stakingToken)).permit(msg.sender, address(this), amount, deadline, v, r, s);
// stakingToken.safeTransferFrom(msg.sender, address(this), amount);
// emit Staked(msg.sender, amount);
// }
function stake(uint256 amount)
external
nonReentrant
updateReward(msg.sender)
{
require(amount > 0, "Cannot stake 0");
if (_totalSupply == 0) {
ousd.rebaseOptIn();
}
_totalSupply = _totalSupply.add(
amount.mul(ousd.rebasingCreditsPerToken()).div(1e18)
);
// We set the ousd base amount on the sender balance as we recalculate it on withdrawal
// The base amount is calculated as (initialAmount * ousd rebasingCreditsPerToken)
_balances[msg.sender] = _balances[msg.sender].add(
amount.mul(ousd.rebasingCreditsPerToken()).div(1e18)
);
stakingToken.safeTransferFrom(msg.sender, address(this), amount);
emit Staked(msg.sender, amount);
}
function withdraw(uint256 amount)
public
nonReentrant
updateReward(msg.sender)
{
require(amount > 0, "Cannot withdraw 0");
_totalSupply = _totalSupply.sub(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
// We return the rebased value to the user
stakingToken.safeTransfer(
msg.sender,
amount.mul(1e18).div(ousd.rebasingCreditsPerToken())
);
emit Withdrawn(msg.sender, amount);
}
function getReward() public nonReentrant updateReward(msg.sender) {
uint256 reward = rewards[msg.sender];
if (reward > 0) {
rewards[msg.sender] = 0;
rewardsToken.safeTransfer(msg.sender, reward);
emit RewardPaid(msg.sender, reward);
}
}
function exit() external {
withdraw(_balances[msg.sender]);
getReward();
}
/* ========== RESTRICTED FUNCTIONS ========== */
function notifyRewardAmount(uint256 reward)
external
onlyRewardsDistribution
updateReward(address(0))
{
if (block.timestamp >= periodFinish) {
rewardRate = reward.div(rewardsDuration);
} else {
uint256 remaining = periodFinish.sub(block.timestamp);
uint256 leftover = remaining.mul(rewardRate);
rewardRate = reward.add(leftover).div(rewardsDuration);
}
// Ensure the provided reward amount is not more than the balance in the contract.
// This keeps the reward rate in the right range, preventing overflows due to
// very high values of rewardRate in the earned and rewardsPerToken functions;
// Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
uint256 balance = rewardsToken.balanceOf(address(this));
require(
rewardRate <= balance.div(rewardsDuration),
"Provided reward too high"
);
lastUpdateTime = block.timestamp;
periodFinish = block.timestamp.add(rewardsDuration);
emit RewardAdded(reward);
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
rewardPerTokenStored = rewardPerToken();
lastUpdateTime = lastTimeRewardApplicable();
if (account != address(0)) {
// bonus intial liquidity to bootstrap curve
if (_totalSupply == 0) {
rewards[account] = rewardRate.mul(rewardsDuration).mul(1e17).mul(rewardRate.sub(rewardRate).add(1e18).add(1e18).div(1e18)).add(earned(account));
// Ensure the provided reward amount is not more than the balance in the contract.
// This keeps the reward rate in the right range, preventing overflows due to
// very high values of rewardRate in the earned and rewardsPerToken functions;
// Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
uint256 balance = rewardsToken.balanceOf(address(this));
require(
rewards[account] <= balance,
"Provided reward too high"
);
}
rewards[account] = earned(account);
userRewardPerTokenPaid[account] = rewardPerTokenStored;
}
_;
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
}
// interface IUniswapV2ERC20 {
// function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
// }
contract StakingRewardsFactory is Ownable {
// immutables
address public rewardsToken;
uint256 public stakingRewardsGenesis;
// the staking tokens for which the rewards contract has been deployed
address[] public stakingTokens;
// info about rewards for a particular staking token
struct StakingRewardsInfo {
address stakingRewards;
uint256 rewardAmount;
}
// rewards info by staking token
mapping(address => StakingRewardsInfo)
public stakingRewardsInfoByStakingToken;
constructor(address _rewardsToken, uint256 _stakingRewardsGenesis)
public
Ownable()
{
require(
_stakingRewardsGenesis >= block.timestamp,
"StakingRewardsFactory::constructor: genesis too soon"
);
rewardsToken = _rewardsToken;
stakingRewardsGenesis = _stakingRewardsGenesis;
}
///// permissioned functions
// deploy a staking reward contract for the staking token, and store the reward amount
// the reward will be distributed to the staking reward contract no sooner than the genesis
function deploy(address stakingToken, uint256 rewardAmount)
public
onlyOwner
{
StakingRewardsInfo storage info
= stakingRewardsInfoByStakingToken[stakingToken];
require(
info.stakingRewards == address(0),
"StakingRewardsFactory::deploy: already deployed"
);
info.stakingRewards = address(
new StakingRewards(
/*_rewardsDistribution=*/
address(this),
rewardsToken,
stakingToken
)
);
info.rewardAmount = rewardAmount;
stakingTokens.push(stakingToken);
}
///// permissionless functions
// call notifyRewardAmount for all staking tokens.
function notifyRewardAmounts() public {
require(
stakingTokens.length > 0,
"StakingRewardsFactory::notifyRewardAmounts: called before any deploys"
);
for (uint256 i = 0; i < stakingTokens.length; i++) {
notifyRewardAmount(stakingTokens[i]);
}
}
// notify reward amount for an individual staking token.
// this is a fallback in case the notifyRewardAmounts costs too much gas to call for all contracts
function notifyRewardAmount(address stakingToken) public {
require(
block.timestamp >= stakingRewardsGenesis,
"StakingRewardsFactory::notifyRewardAmount: not ready"
);
StakingRewardsInfo storage info
= stakingRewardsInfoByStakingToken[stakingToken];
require(
info.stakingRewards != address(0),
"StakingRewardsFactory::notifyRewardAmount: not deployed"
);
if (info.rewardAmount > 0) {
uint256 rewardAmount = info.rewardAmount;
info.rewardAmount = 0;
require(
IERC20(rewardsToken).transfer(
info.stakingRewards,
rewardAmount
),
"StakingRewardsFactory::notifyRewardAmount: transfer failed"
);
StakingRewards(info.stakingRewards).notifyRewardAmount(
rewardAmount
);
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"uint256","name":"_stakingRewardsGenesis","type":"uint256"}],"payable":false,"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"},{"constant":false,"inputs":[{"internalType":"address","name":"stakingToken","type":"address"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"name":"deploy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"stakingToken","type":"address"}],"name":"notifyRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"notifyRewardAmounts","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingRewardsGenesis","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingRewardsInfoByStakingToken","outputs":[{"internalType":"address","name":"stakingRewards","type":"address"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakingTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506040516121f23803806121f28339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3428110156100c45760405162461bcd60e51b81526004018080602001828103825260348152602001806121be6034913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0393909316929092179091556002556120c7806100f76000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b1461018c5780638f32d59b14610194578063a0928c11146101b0578063ae741d8d146101ca578063d1af0c7d146101d2578063f2fde38b146101da576100a9565b8063344e5e34146100ae5780634956eaf0146100e75780636cf8caf814610115578063715018a61461015e57806381e1629814610166575b600080fd5b6100cb600480360360208110156100c457600080fd5b5035610200565b604080516001600160a01b039092168252519081900360200190f35b610113600480360360408110156100fd57600080fd5b506001600160a01b038135169060200135610227565b005b61013b6004803603602081101561012b57600080fd5b50356001600160a01b031661039b565b604080516001600160a01b03909316835260208301919091528051918290030190f35b6101136103c0565b6101136004803603602081101561017c57600080fd5b50356001600160a01b0316610463565b6100cb61063e565b61019c61064d565b604080519115158252519081900360200190f35b6101b861065e565b60408051918252519081900360200190f35b610113610664565b6100cb6106e4565b610113600480360360208110156101f057600080fd5b50356001600160a01b03166106f3565b6003818154811061020d57fe5b6000918252602090912001546001600160a01b0316905081565b61022f61064d565b610280576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0380831660009081526004602052604090208054909116156102da5760405162461bcd60e51b815260040180806020018281038252602f815260200180611f7a602f913960400191505060405180910390fd5b60015460405130916001600160a01b03169085906102f7906107f0565b6001600160a01b03938416815291831660208301529091166040808301919091525190819003606001906000f080158015610336573d6000803e3d6000fd5b5081546001600160a01b03199081166001600160a01b039283161783556001928301939093556003805492830181556000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180549092169216919091179055565b600460205260009081526040902080546001909101546001600160a01b039091169082565b6103c861064d565b610419576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6002544210156104a45760405162461bcd60e51b81526004018080602001828103825260348152602001806120286034913960400191505060405180910390fd5b6001600160a01b03808216600090815260046020526040902080549091166104fd5760405162461bcd60e51b815260040180806020018281038252603781526020018061205c6037913960400191505060405180910390fd5b60018101541561063a5760018082018054600091829055915483546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561056d57600080fd5b505af1158015610581573d6000803e3d6000fd5b505050506040513d602081101561059757600080fd5b50516105d45760405162461bcd60e51b815260040180806020018281038252603a815260200180611fee603a913960400191505060405180910390fd5b815460408051633c6b16ab60e01b81526004810184905290516001600160a01b0390921691633c6b16ab9160248082019260009290919082900301818387803b15801561062057600080fd5b505af1158015610634573d6000803e3d6000fd5b50505050505b5050565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b60025481565b6003546106a25760405162461bcd60e51b8152600401808060200182810382526045815260200180611fa96045913960600191505060405180910390fd5b60005b6003548110156106e1576106d9600382815481106106bf57fe5b6000918252602090912001546001600160a01b0316610463565b6001016106a5565b50565b6001546001600160a01b031681565b6106fb61064d565b61074c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6106e1816001600160a01b0381166107955760405162461bcd60e51b8152600401808060200182810382526026815260200180611f546026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611756806107fe8339019056fe6080604052600280546001600160a01b031916732a8e1e676ec238d8a992307b495b45b3feaa5e8617905560006006819055600755624f1a0060085534801561004757600080fd5b506040516117563803806117568339818101604052606081101561006a57600080fd5b508051602082015160409092015160018055600380546001600160a01b03199081166001600160a01b039586161790915560048054821692851692909217909155600080548216928416929092178255600254600580549190941691161790915561167b9081906100db90396000f3fe608060405234801561001057600080fd5b50600436106101415760003560e01c80637b0a47ee116100b8578063c8f33c911161007c578063c8f33c91146102ad578063cd3daf9d146102b5578063d1af0c7d146102bd578063df136d65146102c5578063e9fad8ee146102cd578063ebe2b12b146102d557610141565b80637b0a47ee1461025257806380faa57d1461025a5780638b87634714610262578063a694fc3a14610288578063bebacc8e146102a557610141565b8063386a95251161010a578063386a9525146101d35780633c6b16ab146101db5780633d18b912146101f85780633fc6df6e1461020057806370a082311461022457806372f702f31461024a57610141565b80628cc262146101465780630700037d1461017e57806318160ddd146101a45780631c1f78eb146101ac5780632e1a7d4d146101b4575b600080fd5b61016c6004803603602081101561015c57600080fd5b50356001600160a01b03166102dd565b60408051918252519081900360200190f35b61016c6004803603602081101561019457600080fd5b50356001600160a01b0316610373565b61016c610385565b61016c61038c565b6101d1600480360360208110156101ca57600080fd5b50356103aa565b005b61016c610742565b6101d1600480360360208110156101f157600080fd5b5035610748565b6101d1610a83565b610208610cb5565b604080516001600160a01b039092168252519081900360200190f35b61016c6004803603602081101561023a57600080fd5b50356001600160a01b0316610cc4565b610208610cdf565b61016c610cee565b61016c610cf4565b61016c6004803603602081101561027857600080fd5b50356001600160a01b0316610d02565b6101d16004803603602081101561029e57600080fd5b5035610d14565b610208611104565b61016c611113565b61016c611119565b610208611167565b61016c611176565b6101d161117c565b61016c61119f565b6001600160a01b0381166000908152600c6020908152604080832054600b90925282205461036d919061036190670de0b6b3a7640000906103559061033090610324611119565b9063ffffffff6111a516565b6001600160a01b0388166000908152600e60205260409020549063ffffffff61120216565b9063ffffffff61126216565b9063ffffffff6112cc16565b92915050565b600c6020526000908152604090205481565b600d545b90565b60006103a560085460075461120290919063ffffffff16565b905090565b60018054810190819055336103bd611119565b600a556103c8610cf4565b6009556001600160a01b0381161561057857600d546105435761045a6103ed826102dd565b61036161042b670de0b6b3a7640000610355670de0b6b3a7640000610361670de0b6b3a76400006103616007546007546111a590919063ffffffff16565b61044e67016345785d8a000061044e60085460075461120290919063ffffffff16565b9063ffffffff61120216565b6001600160a01b038083166000908152600c602090815260408083209490945560035484516370a0823160e01b8152306004820152945192949316926370a082319260248083019392829003018186803b1580156104b757600080fd5b505afa1580156104cb573d6000803e3d6000fd5b505050506040513d60208110156104e157600080fd5b50516001600160a01b0383166000908152600c6020526040902054909150811015610541576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b505b61054c816102dd565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b600083116105c1576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600d546105d4908463ffffffff6111a516565b600d55336000908152600e60205260409020546105f7908463ffffffff6111a516565b336000818152600e6020908152604091829020939093556005548151636691cb3d60e01b815291516106b194610698936001600160a01b0390931692636691cb3d9260048083019392829003018186803b15801561065457600080fd5b505afa158015610668573d6000803e3d6000fd5b505050506040513d602081101561067e57600080fd5b505161035587670de0b6b3a764000063ffffffff61120216565b6004546001600160a01b0316919063ffffffff61132616565b60408051848152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250600154811461073e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60085481565b6000546001600160a01b031633146107915760405162461bcd60e51b815260040180806020018281038252602a8152602001806115f3602a913960400191505060405180910390fd5b600061079b611119565b600a556107a6610cf4565b6009556001600160a01b038116156108e957600d546108b4576107cb6103ed826102dd565b6001600160a01b038083166000908152600c602090815260408083209490945560035484516370a0823160e01b8152306004820152945192949316926370a082319260248083019392829003018186803b15801561082857600080fd5b505afa15801561083c573d6000803e3d6000fd5b505050506040513d602081101561085257600080fd5b50516001600160a01b0383166000908152600c60205260409020549091508110156108b2576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b505b6108bd816102dd565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421061090e5760085461090690839063ffffffff61126216565b60075561095d565b600654600090610924904263ffffffff6111a516565b9050600061093d6007548361120290919063ffffffff16565b60085490915061095790610355868463ffffffff6112cc16565b60075550505b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156109a857600080fd5b505afa1580156109bc573d6000803e3d6000fd5b505050506040513d60208110156109d257600080fd5b50516008549091506109eb90829063ffffffff61126216565b6007541115610a2f576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b426009819055600854610a48919063ffffffff6112cc16565b6006556040805184815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1505050565b6001805481019081905533610a96611119565b600a55610aa1610cf4565b6009556001600160a01b03811615610be457600d54610baf57610ac66103ed826102dd565b6001600160a01b038083166000908152600c602090815260408083209490945560035484516370a0823160e01b8152306004820152945192949316926370a082319260248083019392829003018186803b158015610b2357600080fd5b505afa158015610b37573d6000803e3d6000fd5b505050506040513d6020811015610b4d57600080fd5b50516001600160a01b0383166000908152600c6020526040902054909150811015610bad576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b505b610bb8816102dd565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b336000908152600c60205260409020548015610c5a57336000818152600c6020526040812055600354610c23916001600160a01b039091169083611326565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001548114610cb2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b6000546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6004546001600160a01b031681565b60075481565b60006103a54260065461137d565b600b6020526000908152604090205481565b6001805481019081905533610d27611119565b600a55610d32610cf4565b6009556001600160a01b03811615610e7557600d54610e4057610d576103ed826102dd565b6001600160a01b038083166000908152600c602090815260408083209490945560035484516370a0823160e01b8152306004820152945192949316926370a082319260248083019392829003018186803b158015610db457600080fd5b505afa158015610dc8573d6000803e3d6000fd5b505050506040513d6020811015610dde57600080fd5b50516001600160a01b0383166000908152600c6020526040902054909150811015610e3e576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b505b610e49816102dd565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008311610ebb576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600d54610f2b57600560009054906101000a90046001600160a01b03166001600160a01b031663f51b0fd46040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610f1257600080fd5b505af1158015610f26573d6000803e3d6000fd5b505050505b610fd3610fc4670de0b6b3a7640000610355600560009054906101000a90046001600160a01b03166001600160a01b0316636691cb3d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8b57600080fd5b505afa158015610f9f573d6000803e3d6000fd5b505050506040513d6020811015610fb557600080fd5b5051879063ffffffff61120216565b600d549063ffffffff6112cc16565b600d5560055460408051636691cb3d60e01b8152905161104a9261102e92670de0b6b3a764000092610355926001600160a01b031691636691cb3d916004808301926020929190829003018186803b158015610f8b57600080fd5b336000908152600e60205260409020549063ffffffff6112cc16565b336000818152600e6020526040902091909155600454611077916001600160a01b03909116903086611393565b60408051848152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250600154811461073e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6005546001600160a01b031681565b60095481565b6000600d546000141561112f5750600a54610389565b6103a5611158600d54610355670de0b6b3a764000061044e60075461044e600954610324610cf4565b600a549063ffffffff6112cc16565b6003546001600160a01b031681565b600a5481565b336000908152600e6020526040902054611195906103aa565b61119d610a83565b565b60065481565b6000828211156111fc576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826112115750600061036d565b8282028284828161121e57fe5b041461125b5760405162461bcd60e51b81526004018080602001828103825260218152602001806115d26021913960400191505060405180910390fd5b9392505050565b60008082116112b8576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b60008284816112c357fe5b04949350505050565b60008282018381101561125b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526113789084906113f3565b505050565b600081831061138c578161125b565b5090919050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526113ed9085906113f3565b50505050565b611405826001600160a01b03166115ab565b611456576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106114945780518252601f199092019160209182019101611475565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114f6576040519150601f19603f3d011682016040523d82523d6000602084013e6114fb565b606091505b509150915081611552576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156113ed5780806020019051602081101561156e57600080fd5b50516113ed5760405162461bcd60e51b815260040180806020018281038252602a81526020018061161d602a913960400191505060405180910390fd5b3b15159056fe50726f76696465642072657761726420746f6f20686967680000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582056e20ea7653a090b7ae7f78939314356343deed374de9210e9432f80255bb97564736f6c634300051000324f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735374616b696e6752657761726473466163746f72793a3a6465706c6f793a20616c7265616479206465706c6f7965645374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e74733a2063616c6c6564206265666f726520616e79206465706c6f79735374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a207472616e73666572206661696c65645374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a206e6f742072656164795374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a206e6f74206465706c6f796564a265627a7a723158200175fef02db66c8ff2e466b5d475b00b7cc2f7b55f9aa141669792d7225f77ea64736f6c634300051000325374616b696e6752657761726473466163746f72793a3a636f6e7374727563746f723a2067656e6573697320746f6f20736f6f6e000000000000000000000000fe9a29ab92522d14fc65880d817214261d8479ae000000000000000000000000000000000000000000000000000000005fb0038b
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b1461018c5780638f32d59b14610194578063a0928c11146101b0578063ae741d8d146101ca578063d1af0c7d146101d2578063f2fde38b146101da576100a9565b8063344e5e34146100ae5780634956eaf0146100e75780636cf8caf814610115578063715018a61461015e57806381e1629814610166575b600080fd5b6100cb600480360360208110156100c457600080fd5b5035610200565b604080516001600160a01b039092168252519081900360200190f35b610113600480360360408110156100fd57600080fd5b506001600160a01b038135169060200135610227565b005b61013b6004803603602081101561012b57600080fd5b50356001600160a01b031661039b565b604080516001600160a01b03909316835260208301919091528051918290030190f35b6101136103c0565b6101136004803603602081101561017c57600080fd5b50356001600160a01b0316610463565b6100cb61063e565b61019c61064d565b604080519115158252519081900360200190f35b6101b861065e565b60408051918252519081900360200190f35b610113610664565b6100cb6106e4565b610113600480360360208110156101f057600080fd5b50356001600160a01b03166106f3565b6003818154811061020d57fe5b6000918252602090912001546001600160a01b0316905081565b61022f61064d565b610280576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0380831660009081526004602052604090208054909116156102da5760405162461bcd60e51b815260040180806020018281038252602f815260200180611f7a602f913960400191505060405180910390fd5b60015460405130916001600160a01b03169085906102f7906107f0565b6001600160a01b03938416815291831660208301529091166040808301919091525190819003606001906000f080158015610336573d6000803e3d6000fd5b5081546001600160a01b03199081166001600160a01b039283161783556001928301939093556003805492830181556000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180549092169216919091179055565b600460205260009081526040902080546001909101546001600160a01b039091169082565b6103c861064d565b610419576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6002544210156104a45760405162461bcd60e51b81526004018080602001828103825260348152602001806120286034913960400191505060405180910390fd5b6001600160a01b03808216600090815260046020526040902080549091166104fd5760405162461bcd60e51b815260040180806020018281038252603781526020018061205c6037913960400191505060405180910390fd5b60018101541561063a5760018082018054600091829055915483546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561056d57600080fd5b505af1158015610581573d6000803e3d6000fd5b505050506040513d602081101561059757600080fd5b50516105d45760405162461bcd60e51b815260040180806020018281038252603a815260200180611fee603a913960400191505060405180910390fd5b815460408051633c6b16ab60e01b81526004810184905290516001600160a01b0390921691633c6b16ab9160248082019260009290919082900301818387803b15801561062057600080fd5b505af1158015610634573d6000803e3d6000fd5b50505050505b5050565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b60025481565b6003546106a25760405162461bcd60e51b8152600401808060200182810382526045815260200180611fa96045913960600191505060405180910390fd5b60005b6003548110156106e1576106d9600382815481106106bf57fe5b6000918252602090912001546001600160a01b0316610463565b6001016106a5565b50565b6001546001600160a01b031681565b6106fb61064d565b61074c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6106e1816001600160a01b0381166107955760405162461bcd60e51b8152600401808060200182810382526026815260200180611f546026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611756806107fe8339019056fe6080604052600280546001600160a01b031916732a8e1e676ec238d8a992307b495b45b3feaa5e8617905560006006819055600755624f1a0060085534801561004757600080fd5b506040516117563803806117568339818101604052606081101561006a57600080fd5b508051602082015160409092015160018055600380546001600160a01b03199081166001600160a01b039586161790915560048054821692851692909217909155600080548216928416929092178255600254600580549190941691161790915561167b9081906100db90396000f3fe608060405234801561001057600080fd5b50600436106101415760003560e01c80637b0a47ee116100b8578063c8f33c911161007c578063c8f33c91146102ad578063cd3daf9d146102b5578063d1af0c7d146102bd578063df136d65146102c5578063e9fad8ee146102cd578063ebe2b12b146102d557610141565b80637b0a47ee1461025257806380faa57d1461025a5780638b87634714610262578063a694fc3a14610288578063bebacc8e146102a557610141565b8063386a95251161010a578063386a9525146101d35780633c6b16ab146101db5780633d18b912146101f85780633fc6df6e1461020057806370a082311461022457806372f702f31461024a57610141565b80628cc262146101465780630700037d1461017e57806318160ddd146101a45780631c1f78eb146101ac5780632e1a7d4d146101b4575b600080fd5b61016c6004803603602081101561015c57600080fd5b50356001600160a01b03166102dd565b60408051918252519081900360200190f35b61016c6004803603602081101561019457600080fd5b50356001600160a01b0316610373565b61016c610385565b61016c61038c565b6101d1600480360360208110156101ca57600080fd5b50356103aa565b005b61016c610742565b6101d1600480360360208110156101f157600080fd5b5035610748565b6101d1610a83565b610208610cb5565b604080516001600160a01b039092168252519081900360200190f35b61016c6004803603602081101561023a57600080fd5b50356001600160a01b0316610cc4565b610208610cdf565b61016c610cee565b61016c610cf4565b61016c6004803603602081101561027857600080fd5b50356001600160a01b0316610d02565b6101d16004803603602081101561029e57600080fd5b5035610d14565b610208611104565b61016c611113565b61016c611119565b610208611167565b61016c611176565b6101d161117c565b61016c61119f565b6001600160a01b0381166000908152600c6020908152604080832054600b90925282205461036d919061036190670de0b6b3a7640000906103559061033090610324611119565b9063ffffffff6111a516565b6001600160a01b0388166000908152600e60205260409020549063ffffffff61120216565b9063ffffffff61126216565b9063ffffffff6112cc16565b92915050565b600c6020526000908152604090205481565b600d545b90565b60006103a560085460075461120290919063ffffffff16565b905090565b60018054810190819055336103bd611119565b600a556103c8610cf4565b6009556001600160a01b0381161561057857600d546105435761045a6103ed826102dd565b61036161042b670de0b6b3a7640000610355670de0b6b3a7640000610361670de0b6b3a76400006103616007546007546111a590919063ffffffff16565b61044e67016345785d8a000061044e60085460075461120290919063ffffffff16565b9063ffffffff61120216565b6001600160a01b038083166000908152600c602090815260408083209490945560035484516370a0823160e01b8152306004820152945192949316926370a082319260248083019392829003018186803b1580156104b757600080fd5b505afa1580156104cb573d6000803e3d6000fd5b505050506040513d60208110156104e157600080fd5b50516001600160a01b0383166000908152600c6020526040902054909150811015610541576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b505b61054c816102dd565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b600083116105c1576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600d546105d4908463ffffffff6111a516565b600d55336000908152600e60205260409020546105f7908463ffffffff6111a516565b336000818152600e6020908152604091829020939093556005548151636691cb3d60e01b815291516106b194610698936001600160a01b0390931692636691cb3d9260048083019392829003018186803b15801561065457600080fd5b505afa158015610668573d6000803e3d6000fd5b505050506040513d602081101561067e57600080fd5b505161035587670de0b6b3a764000063ffffffff61120216565b6004546001600160a01b0316919063ffffffff61132616565b60408051848152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250600154811461073e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60085481565b6000546001600160a01b031633146107915760405162461bcd60e51b815260040180806020018281038252602a8152602001806115f3602a913960400191505060405180910390fd5b600061079b611119565b600a556107a6610cf4565b6009556001600160a01b038116156108e957600d546108b4576107cb6103ed826102dd565b6001600160a01b038083166000908152600c602090815260408083209490945560035484516370a0823160e01b8152306004820152945192949316926370a082319260248083019392829003018186803b15801561082857600080fd5b505afa15801561083c573d6000803e3d6000fd5b505050506040513d602081101561085257600080fd5b50516001600160a01b0383166000908152600c60205260409020549091508110156108b2576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b505b6108bd816102dd565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421061090e5760085461090690839063ffffffff61126216565b60075561095d565b600654600090610924904263ffffffff6111a516565b9050600061093d6007548361120290919063ffffffff16565b60085490915061095790610355868463ffffffff6112cc16565b60075550505b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156109a857600080fd5b505afa1580156109bc573d6000803e3d6000fd5b505050506040513d60208110156109d257600080fd5b50516008549091506109eb90829063ffffffff61126216565b6007541115610a2f576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b426009819055600854610a48919063ffffffff6112cc16565b6006556040805184815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1505050565b6001805481019081905533610a96611119565b600a55610aa1610cf4565b6009556001600160a01b03811615610be457600d54610baf57610ac66103ed826102dd565b6001600160a01b038083166000908152600c602090815260408083209490945560035484516370a0823160e01b8152306004820152945192949316926370a082319260248083019392829003018186803b158015610b2357600080fd5b505afa158015610b37573d6000803e3d6000fd5b505050506040513d6020811015610b4d57600080fd5b50516001600160a01b0383166000908152600c6020526040902054909150811015610bad576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b505b610bb8816102dd565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b336000908152600c60205260409020548015610c5a57336000818152600c6020526040812055600354610c23916001600160a01b039091169083611326565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001548114610cb2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b6000546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6004546001600160a01b031681565b60075481565b60006103a54260065461137d565b600b6020526000908152604090205481565b6001805481019081905533610d27611119565b600a55610d32610cf4565b6009556001600160a01b03811615610e7557600d54610e4057610d576103ed826102dd565b6001600160a01b038083166000908152600c602090815260408083209490945560035484516370a0823160e01b8152306004820152945192949316926370a082319260248083019392829003018186803b158015610db457600080fd5b505afa158015610dc8573d6000803e3d6000fd5b505050506040513d6020811015610dde57600080fd5b50516001600160a01b0383166000908152600c6020526040902054909150811015610e3e576040805162461bcd60e51b815260206004820152601860248201526000805160206115b2833981519152604482015290519081900360640190fd5b505b610e49816102dd565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008311610ebb576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600d54610f2b57600560009054906101000a90046001600160a01b03166001600160a01b031663f51b0fd46040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610f1257600080fd5b505af1158015610f26573d6000803e3d6000fd5b505050505b610fd3610fc4670de0b6b3a7640000610355600560009054906101000a90046001600160a01b03166001600160a01b0316636691cb3d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8b57600080fd5b505afa158015610f9f573d6000803e3d6000fd5b505050506040513d6020811015610fb557600080fd5b5051879063ffffffff61120216565b600d549063ffffffff6112cc16565b600d5560055460408051636691cb3d60e01b8152905161104a9261102e92670de0b6b3a764000092610355926001600160a01b031691636691cb3d916004808301926020929190829003018186803b158015610f8b57600080fd5b336000908152600e60205260409020549063ffffffff6112cc16565b336000818152600e6020526040902091909155600454611077916001600160a01b03909116903086611393565b60408051848152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250600154811461073e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6005546001600160a01b031681565b60095481565b6000600d546000141561112f5750600a54610389565b6103a5611158600d54610355670de0b6b3a764000061044e60075461044e600954610324610cf4565b600a549063ffffffff6112cc16565b6003546001600160a01b031681565b600a5481565b336000908152600e6020526040902054611195906103aa565b61119d610a83565b565b60065481565b6000828211156111fc576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826112115750600061036d565b8282028284828161121e57fe5b041461125b5760405162461bcd60e51b81526004018080602001828103825260218152602001806115d26021913960400191505060405180910390fd5b9392505050565b60008082116112b8576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b60008284816112c357fe5b04949350505050565b60008282018381101561125b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526113789084906113f3565b505050565b600081831061138c578161125b565b5090919050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526113ed9085906113f3565b50505050565b611405826001600160a01b03166115ab565b611456576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106114945780518252601f199092019160209182019101611475565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114f6576040519150601f19603f3d011682016040523d82523d6000602084013e6114fb565b606091505b509150915081611552576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156113ed5780806020019051602081101561156e57600080fd5b50516113ed5760405162461bcd60e51b815260040180806020018281038252602a81526020018061161d602a913960400191505060405180910390fd5b3b15159056fe50726f76696465642072657761726420746f6f20686967680000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582056e20ea7653a090b7ae7f78939314356343deed374de9210e9432f80255bb97564736f6c634300051000324f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735374616b696e6752657761726473466163746f72793a3a6465706c6f793a20616c7265616479206465706c6f7965645374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e74733a2063616c6c6564206265666f726520616e79206465706c6f79735374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a207472616e73666572206661696c65645374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a206e6f742072656164795374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a206e6f74206465706c6f796564a265627a7a723158200175fef02db66c8ff2e466b5d475b00b7cc2f7b55f9aa141669792d7225f77ea64736f6c63430005100032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fe9a29ab92522d14fc65880d817214261d8479ae000000000000000000000000000000000000000000000000000000005fb0038b
-----Decoded View---------------
Arg [0] : _rewardsToken (address): 0xfe9A29aB92522D14Fc65880d817214261D8479AE
Arg [1] : _stakingRewardsGenesis (uint256): 1605370763
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000fe9a29ab92522d14fc65880d817214261d8479ae
Arg [1] : 000000000000000000000000000000000000000000000000000000005fb0038b
Deployed Bytecode Sourcemap
27858:3438:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;27858:3438:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28081:30;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;28081:30:0;;:::i;:::-;;;;-1:-1:-1;;;;;28081:30:0;;;;;;;;;;;;;;29018:680;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;29018:680:0;;;;;;;;:::i;:::-;;28322:87;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;28322:87:0;-1:-1:-1;;;;;28322:87:0;;:::i;:::-;;;;-1:-1:-1;;;;;28322:87:0;;;;;;;;;;;;;;;;;;;;;5258:140;;;:::i;30298:995::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;30298:995:0;-1:-1:-1;;;;;30298:995:0;;:::i;4447:79::-;;;:::i;4813:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;27960:36;;;:::i;:::-;;;;;;;;;;;;;;;;29800:324;;;:::i;27926:27::-;;;:::i;5553:109::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5553:109:0;-1:-1:-1;;;;;5553:109:0;;:::i;28081:30::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28081:30:0;;-1:-1:-1;28081:30:0;:::o;29018:680::-;4659:9;:7;:9::i;:::-;4651:54;;;;;-1:-1:-1;;;4651:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;29179:46:0;;;29135:31;29179:46;;;:32;:46;;;;;29258:19;;29179:46;;29258:19;:33;29236:130;;;;-1:-1:-1;;;29236:130:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29535:12;;29423:170;;29511:4;;-1:-1:-1;;;;;29535:12:0;;29566;;29423:170;;;:::i;:::-;-1:-1:-1;;;;;29423:170:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;29423:170:0;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;29379:225:0;;-1:-1:-1;;;;;;29379:225:0;;;-1:-1:-1;;;;;29379:225:0;;;;;;-1:-1:-1;29615:17:0;;;:32;;;;29658:13;27:10:-1;;23:18;;;45:23;;-1:-1;29658:32:0;;;;;;;;;;;;;;;;;;29018:680::o;28322:87::-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28322:87:0;;;;;:::o;5258:140::-;4659:9;:7;:9::i;:::-;4651:54;;;;;-1:-1:-1;;;4651:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5357:1;5341:6;;5320:40;;-1:-1:-1;;;;;5341:6:0;;;;5320:40;;5357:1;;5320:40;5388:1;5371:19;;-1:-1:-1;;;;;;5371:19:0;;;5258:140::o;30298:995::-;30407:21;;30388:15;:40;;30366:142;;;;-1:-1:-1;;;30366:142:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30571:46:0;;;30527:31;30571:46;;;:32;:46;;;;;30650:19;;30571:46;;30650:19;30628:138;;;;-1:-1:-1;;;30628:138:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30783:17;;;;:21;30779:507;;30844:17;;;;;;30821:20;30876:21;;;;30947:12;;30992:19;;30940:125;;;-1:-1:-1;;;30940:125:0;;-1:-1:-1;;;;;30992:19:0;;;30940:125;;;;;;;;;;;;30947:12;;;;;30940:29;;:125;;;;;;;;;;;;;;;;;;30947:12;30940:125;;;5:2:-1;;;;30:1;27;20:12;5:2;30940:125:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30940:125:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;30940:125:0;30914:245;;;;-1:-1:-1;;;30914:245:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31189:19;;31174:100;;;-1:-1:-1;;;31174:100:0;;;;;;;;;;-1:-1:-1;;;;;31189:19:0;;;;31174:54;;:100;;;;;31189:19;;31174:100;;;;;;;;31189:19;;31174:100;;;5:2:-1;;;;30:1;27;20:12;5:2;31174:100:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31174:100:0;;;;30779:507;;30298:995;;:::o;4447:79::-;4485:7;4512:6;-1:-1:-1;;;;;4512:6:0;4447:79;:::o;4813:92::-;4853:4;4891:6;-1:-1:-1;;;;;4891:6:0;4877:10;:20;;4813:92::o;27960:36::-;;;;:::o;29800:324::-;29871:13;:20;29849:143;;;;-1:-1:-1;;;29849:143:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30008:9;30003:114;30027:13;:20;30023:24;;30003:114;;;30069:36;30088:13;30102:1;30088:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30088:16:0;30069:18;:36::i;:::-;30049:3;;30003:114;;;;29800:324::o;27926:27::-;;;-1:-1:-1;;;;;27926:27:0;;:::o;5553:109::-;4659:9;:7;:9::i;:::-;4651:54;;;;;-1:-1:-1;;;4651:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5626:28;5645:8;-1:-1:-1;;;;;5856:22:0;;5834:110;;;;-1:-1:-1;;;5834:110:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5981:6;;;5960:38;;-1:-1:-1;;;;;5960:38:0;;;;5981:6;;;5960:38;;;6009:6;:17;;-1:-1:-1;;;;;;6009:17:0;-1:-1:-1;;;;;6009:17:0;;;;;;;;;;5768:266::o;27858:3438::-;;;;;;;;:::o
Swarm Source
bzzr://0175fef02db66c8ff2e466b5d475b00b7cc2f7b55f9aa141669792d7225f77ea
Loading...
Loading
Loading...
Loading
Net Worth in USD
$131.14
Net Worth in ETH
0.054402
Token Allocations
SNOW
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.048787 | 2,688 | $131.14 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.