Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Latest 25 from a total of 78 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Exit | 14102437 | 1491 days ago | IN | 0 ETH | 0.02073682 | ||||
| Exit | 14091823 | 1493 days ago | IN | 0 ETH | 0.01328311 | ||||
| Exit | 14067248 | 1497 days ago | IN | 0 ETH | 0.00811334 | ||||
| Exit | 14061297 | 1498 days ago | IN | 0 ETH | 0.01161984 | ||||
| Exit | 14047185 | 1500 days ago | IN | 0 ETH | 0.02113377 | ||||
| Exit | 14046808 | 1500 days ago | IN | 0 ETH | 0.01549606 | ||||
| Withdraw | 14044206 | 1500 days ago | IN | 0 ETH | 0.00876486 | ||||
| Stake | 14043211 | 1500 days ago | IN | 0 ETH | 0.00794338 | ||||
| Exit | 14043045 | 1500 days ago | IN | 0 ETH | 0.01092078 | ||||
| Exit | 14042189 | 1501 days ago | IN | 0 ETH | 0.00865588 | ||||
| Exit | 14041035 | 1501 days ago | IN | 0 ETH | 0.01016775 | ||||
| Exit | 14040145 | 1501 days ago | IN | 0 ETH | 0.01691218 | ||||
| Exit | 14038811 | 1501 days ago | IN | 0 ETH | 0.01554245 | ||||
| Exit | 14037837 | 1501 days ago | IN | 0 ETH | 0.01055031 | ||||
| Exit | 14037544 | 1501 days ago | IN | 0 ETH | 0.02908631 | ||||
| Exit | 14037221 | 1501 days ago | IN | 0 ETH | 0.01374801 | ||||
| Exit | 14035881 | 1502 days ago | IN | 0 ETH | 0.01175199 | ||||
| Stake | 14031709 | 1502 days ago | IN | 0 ETH | 0.01005741 | ||||
| Exit | 14030555 | 1502 days ago | IN | 0 ETH | 0.01229038 | ||||
| Stake | 14028167 | 1503 days ago | IN | 0 ETH | 0.01015972 | ||||
| Stake | 14023565 | 1503 days ago | IN | 0 ETH | 0.01420438 | ||||
| Stake | 14018762 | 1504 days ago | IN | 0 ETH | 0.01279833 | ||||
| Stake | 14016268 | 1505 days ago | IN | 0 ETH | 0.01040383 | ||||
| Stake | 14005620 | 1506 days ago | IN | 0 ETH | 0.01475702 | ||||
| Stake | 13999433 | 1507 days ago | IN | 0 ETH | 0.02003441 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
StakingRewards
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
import "./StakingRewardsEvents.sol";
/// @title StakingRewards
/// @author Forked form SetProtocol
/// https://github.com/SetProtocol/index-coop-contracts/blob/master/contracts/staking/StakingRewards.sol
/// @notice The `StakingRewards` contracts allows to stake an ERC20 token to receive as reward another ERC20
/// @dev This contracts is managed by the reward distributor and implements the staking interface
contract StakingRewards is StakingRewardsEvents, IStakingRewards, ReentrancyGuard {
using SafeERC20 for IERC20;
/// @notice Checks to see if it is the `rewardsDistribution` calling this contract
/// @dev There is no Access Control here, because it can be handled cheaply through these modifiers
modifier onlyRewardsDistribution() {
require(msg.sender == rewardsDistribution, "1");
_;
}
// ============================ References to contracts ========================
/// @notice ERC20 token given as reward
IERC20 public immutable override rewardToken;
/// @notice ERC20 token used for staking
IERC20 public immutable stakingToken;
/// @notice Base of the staked token, it is going to be used in the case of sanTokens
/// which are not in base 10**18
uint256 public immutable stakingBase;
/// @notice Rewards Distribution contract for this staking contract
address public rewardsDistribution;
// ============================ Staking parameters =============================
/// @notice Time at which distribution ends
uint256 public periodFinish;
/// @notice Reward per second given to the staking contract, split among the staked tokens
uint256 public rewardRate;
/// @notice Duration of the reward distribution
uint256 public rewardsDuration;
/// @notice Last time `rewardPerTokenStored` was updated
uint256 public lastUpdateTime;
/// @notice Helps to compute the amount earned by someone
/// Cumulates rewards accumulated for one token since the beginning.
/// Stored as a uint so it is actually a float times the base of the reward token
uint256 public rewardPerTokenStored;
/// @notice Stores for each account the `rewardPerToken`: we do the difference
/// between the current and the old value to compute what has been earned by an account
mapping(address => uint256) public userRewardPerTokenPaid;
/// @notice Stores for each account the accumulated rewards
mapping(address => uint256) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
// ============================ Constructor ====================================
/// @notice Initializes the staking contract with a first set of parameters
/// @param _rewardsDistribution Address owning the rewards token
/// @param _rewardToken ERC20 token given as reward
/// @param _stakingToken ERC20 token used for staking
/// @param _rewardsDuration Duration of the staking contract
constructor(
address _rewardsDistribution,
address _rewardToken,
address _stakingToken,
uint256 _rewardsDuration
) {
require(_stakingToken != address(0) && _rewardToken != address(0) && _rewardsDistribution != address(0), "0");
// We are not checking the compatibility of the reward token between the distributor and this contract here
// because it is checked by the `RewardsDistributor` when activating the staking contract
// Parameters
rewardToken = IERC20(_rewardToken);
stakingToken = IERC20(_stakingToken);
rewardsDuration = _rewardsDuration;
rewardsDistribution = _rewardsDistribution;
stakingBase = 10**IERC20Metadata(_stakingToken).decimals();
}
// ============================ Modifiers ======================================
/// @notice Checks to see if the calling address is the zero address
/// @param account Address to check
modifier zeroCheck(address account) {
require(account != address(0), "0");
_;
}
/// @notice Called frequently to update the staking parameters associated to an address
/// @param account Address of the account to update
modifier updateReward(address account) {
rewardPerTokenStored = rewardPerToken();
lastUpdateTime = lastTimeRewardApplicable();
if (account != address(0)) {
rewards[account] = earned(account);
userRewardPerTokenPaid[account] = rewardPerTokenStored;
}
_;
}
// ============================ View functions =================================
/// @notice Accesses the total supply
/// @dev Used instead of having a public variable to respect the ERC20 standard
function totalSupply() external view returns (uint256) {
return _totalSupply;
}
/// @notice Accesses the number of token staked by an account
/// @param account Account to query the balance of
/// @dev Used instead of having a public variable to respect the ERC20 standard
function balanceOf(address account) external view returns (uint256) {
return _balances[account];
}
/// @notice Queries the last timestamp at which a reward was distributed
/// @dev Returns the current timestamp if a reward is being distributed and the end of the staking
/// period if staking is done
function lastTimeRewardApplicable() public view returns (uint256) {
return Math.min(block.timestamp, periodFinish);
}
/// @notice Used to actualize the `rewardPerTokenStored`
/// @dev It adds to the reward per token: the time elapsed since the `rewardPerTokenStored` was
/// last updated multiplied by the `rewardRate` divided by the number of tokens
function rewardPerToken() public view returns (uint256) {
if (_totalSupply == 0) {
return rewardPerTokenStored;
}
return
rewardPerTokenStored +
(((lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * stakingBase) / _totalSupply);
}
/// @notice Returns how much a given account earned rewards
/// @param account Address for which the request is made
/// @return How much a given account earned rewards
/// @dev It adds to the rewards the amount of reward earned since last time that is the difference
/// in reward per token from now and last time multiplied by the number of tokens staked by the person
function earned(address account) public view returns (uint256) {
return
(_balances[account] * (rewardPerToken() - userRewardPerTokenPaid[account])) /
stakingBase +
rewards[account];
}
// ======================== Mutative functions forked ==========================
/// @notice Lets someone stake a given amount of `stakingTokens`
/// @param amount Amount of ERC20 staking token that the `msg.sender` wants to stake
function stake(uint256 amount) external nonReentrant updateReward(msg.sender) {
_stake(amount, msg.sender);
}
/// @notice Lets a user withdraw a given amount of collateral from the staking contract
/// @param amount Amount of the ERC20 staking token that the `msg.sender` wants to withdraw
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
require(amount > 0, "89");
_totalSupply = _totalSupply - amount;
_balances[msg.sender] = _balances[msg.sender] - amount;
stakingToken.safeTransfer(msg.sender, amount);
emit Withdrawn(msg.sender, amount);
}
/// @notice Triggers a payment of the reward earned to the msg.sender
function getReward() public nonReentrant updateReward(msg.sender) {
uint256 reward = rewards[msg.sender];
if (reward > 0) {
rewards[msg.sender] = 0;
rewardToken.safeTransfer(msg.sender, reward);
emit RewardPaid(msg.sender, reward);
}
}
/// @notice Exits someone
/// @dev This function lets the caller withdraw its staking and claim rewards
// Attention here, there may be reentrancy attacks because of the following call
// to an external contract done before other things are modified, yet since the `rewardToken`
// is mostly going to be a trusted contract controlled by governance (namely the ANGLE token),
// this is not an issue. If the `rewardToken` changes to an untrusted contract, this need to be updated.
function exit() external {
withdraw(_balances[msg.sender]);
getReward();
}
// ====================== Functions added by Angle Core Team ===================
/// @notice Allows to stake on behalf of another address
/// @param amount Amount to stake
/// @param onBehalf Address to stake onBehalf of
function stakeOnBehalf(uint256 amount, address onBehalf)
external
nonReentrant
zeroCheck(onBehalf)
updateReward(onBehalf)
{
_stake(amount, onBehalf);
}
/// @notice Internal function to stake called by `stake` and `stakeOnBehalf`
/// @param amount Amount to stake
/// @param onBehalf Address to stake on behalf of
/// @dev Before calling this function, it has already been verified whether this address was a zero address or not
function _stake(uint256 amount, address onBehalf) internal {
require(amount > 0, "90");
stakingToken.safeTransferFrom(msg.sender, address(this), amount);
_totalSupply = _totalSupply + amount;
_balances[onBehalf] = _balances[onBehalf] + amount;
emit Staked(onBehalf, amount);
}
// ====================== Restricted Functions =================================
/// @notice Adds rewards to be distributed
/// @param reward Amount of reward tokens to distribute
/// @dev This reward will be distributed during `rewardsDuration` set previously
function notifyRewardAmount(uint256 reward)
external
override
onlyRewardsDistribution
nonReentrant
updateReward(address(0))
{
if (block.timestamp >= periodFinish) {
// If no reward is currently being distributed, the new rate is just `reward / duration`
rewardRate = reward / rewardsDuration;
} else {
// Otherwise, cancel the future reward and add the amount left to distribute to reward
uint256 remaining = periodFinish - block.timestamp;
uint256 leftover = remaining * rewardRate;
rewardRate = (reward + leftover) / rewardsDuration;
}
// Ensures 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 = rewardToken.balanceOf(address(this));
require(rewardRate <= balance / rewardsDuration, "91");
lastUpdateTime = block.timestamp;
periodFinish = block.timestamp + rewardsDuration; // Change the duration
emit RewardAdded(reward);
}
/// @notice Withdraws ERC20 tokens that could accrue on this contract
/// @param tokenAddress Address of the ERC20 token to withdraw
/// @param to Address to transfer to
/// @param amount Amount to transfer
/// @dev A use case would be to claim tokens if the staked tokens accumulate rewards
function recoverERC20(
address tokenAddress,
address to,
uint256 amount
) external override onlyRewardsDistribution {
require(tokenAddress != address(stakingToken) && tokenAddress != address(rewardToken), "20");
IERC20(tokenAddress).safeTransfer(to, amount);
emit Recovered(tokenAddress, to, amount);
}
/// @notice Changes the rewards distributor associated to this contract
/// @param _rewardsDistribution Address of the new rewards distributor contract
/// @dev This function was also added by Angle Core Team
/// @dev A compatibility check of the reward token is already performed in the current `RewardsDistributor` implementation
/// which has right to call this function
function setNewRewardsDistribution(address _rewardsDistribution) external override onlyRewardsDistribution {
rewardsDistribution = _rewardsDistribution;
emit RewardsDistributionUpdated(_rewardsDistribution);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^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);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^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;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^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 meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^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.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a / b + (a % b == 0 ? 0 : 1);
}
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "../interfaces/IAccessControl.sol";
/**
* @dev This contract is fully forked from OpenZeppelin `AccessControl`.
* The only difference is the removal of the ERC165 implementation as it's not
* needed in Angle.
*
* Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
*/
function _checkRole(bytes32 role, address account) internal view {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external override {
require(account == _msgSender(), "71");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*/
function _setupRole(bytes32 role, address account) internal {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal {
emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
_roles[role].adminRole = adminRole;
}
function _grantRole(bytes32 role, address account) internal {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) internal {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
/// @title IAccessControl
/// @author Forked from OpenZeppelin
/// @notice Interface for `AccessControl` contracts
interface IAccessControl {
function hasRole(bytes32 role, address account) external view returns (bool);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function grantRole(bytes32 role, address account) external;
function revokeRole(bytes32 role, address account) external;
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./IStakingRewards.sol";
/// @title IRewardsDistributor
/// @author Angle Core Team, inspired from Fei protocol
/// (https://github.com/fei-protocol/fei-protocol-core/blob/master/contracts/staking/IRewardsDistributor.sol)
/// @notice Rewards Distributor interface
interface IRewardsDistributor {
// ========================= Public Parameter Getter ===========================
function rewardToken() external view returns (IERC20);
// ======================== External User Available Function ===================
function drip(IStakingRewards stakingContract) external returns (uint256);
// ========================= Governor Functions ================================
function governorWithdrawRewardToken(uint256 amount, address governance) external;
function governorRecover(
address tokenAddress,
address to,
uint256 amount,
IStakingRewards stakingContract
) external;
function setUpdateFrequency(uint256 _frequency, IStakingRewards stakingContract) external;
function setIncentiveAmount(uint256 _incentiveAmount, IStakingRewards stakingContract) external;
function setAmountToDistribute(uint256 _amountToDistribute, IStakingRewards stakingContract) external;
function setDuration(uint256 _duration, IStakingRewards stakingContract) external;
function setStakingContract(
address _stakingContract,
uint256 _duration,
uint256 _incentiveAmount,
uint256 _dripFrequency,
uint256 _amountToDistribute
) external;
function setNewRewardsDistributor(address newRewardsDistributor) external;
function removeStakingContract(IStakingRewards stakingContract) external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/// @title IStakingRewardsFunctions
/// @author Angle Core Team
/// @notice Interface for the staking rewards contract that interact with the `RewardsDistributor` contract
interface IStakingRewardsFunctions {
function notifyRewardAmount(uint256 reward) external;
function recoverERC20(
address tokenAddress,
address to,
uint256 tokenAmount
) external;
function setNewRewardsDistribution(address newRewardsDistribution) external;
}
/// @title IStakingRewards
/// @author Angle Core Team
/// @notice Previous interface with additionnal getters for public variables
interface IStakingRewards is IStakingRewardsFunctions {
function rewardToken() external view returns (IERC20);
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "../external/AccessControl.sol";
import "../interfaces/IRewardsDistributor.sol";
import "../interfaces/IStakingRewards.sol";
/// @title StakingRewardsEvents
/// @author Angle Core Team
/// @notice All the events used in `StakingRewards` contract
contract StakingRewardsEvents {
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);
event Recovered(address indexed tokenAddress, address indexed to, uint256 amount);
event RewardsDistributionUpdated(address indexed _rewardsDistribution);
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 1000000
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","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":"_rewardsDistribution","type":"address"}],"name":"RewardsDistributionUpdated","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":"Withdrawn","type":"event"},{"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":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","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":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"}],"name":"setNewRewardsDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"onBehalf","type":"address"}],"name":"stakeOnBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","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":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60e06040523480156200001157600080fd5b5060405162001d6938038062001d6983398101604081905262000034916200018f565b60016000556001600160a01b038216158015906200005a57506001600160a01b03831615155b80156200006f57506001600160a01b03841615155b620000a45760405162461bcd60e51b81526020600482015260016024820152600360fc1b604482015260640160405180910390fd5b6001600160601b0319606084811b821660805283901b1660a0526004818155600180546001600160a01b038781166001600160a01b0319909216919091179091556040805163313ce56760e01b815290519185169263313ce567928282019260209290829003018186803b1580156200011c57600080fd5b505afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620001e1565b6200016490600a62000256565b60c052506200032d92505050565b80516001600160a01b03811681146200018a57600080fd5b919050565b60008060008060808587031215620001a657600080fd5b620001b18562000172565b9350620001c16020860162000172565b9250620001d16040860162000172565b6060959095015193969295505050565b600060208284031215620001f457600080fd5b815160ff811681146200020657600080fd5b9392505050565b600181815b808511156200024e57816000190482111562000232576200023262000317565b808516156200024057918102915b93841c939080029062000212565b509250929050565b60006200020660ff841683600082620002725750600162000311565b81620002815750600062000311565b81600181146200029a5760028114620002a557620002c5565b600191505062000311565b60ff841115620002b957620002b962000317565b50506001821b62000311565b5060208310610133831016604e8410600b8410161715620002ea575081810a62000311565b620002f683836200020d565b80600019048211156200030d576200030d62000317565b0290505b92915050565b634e487b7160e01b600052601160045260246000fd5b60805160601c60a05160601c60c0516119ce6200039b60003960008181610280015281816103ee01526111030152600081816102dd015281816104f20152818161082101526112fd0152600081816103990152818161054901528181610a960152610d0501526119ce6000f3fe608060405234801561001057600080fd5b50600436106101975760003560e01c80637b0a47ee116100e3578063c8f33c911161008c578063e9fad8ee11610066578063e9fad8ee14610383578063ebe2b12b1461038b578063f7c618c11461039457600080fd5b8063c8f33c9114610369578063cd3daf9d14610372578063df136d651461037a57600080fd5b80638b876347116100bd5780638b87634714610323578063a694fc3a14610343578063aceccf8f1461035657600080fd5b80637b0a47ee146102ff57806380faa57d14610308578063873291bb1461031057600080fd5b80633c6b16ab116101455780636041c34f1161011f5780636041c34f1461027b57806370a08231146102a257806372f702f3146102d857600080fd5b80633c6b16ab1461021b5780633d18b9121461022e5780633fc6df6e1461023657600080fd5b806318160ddd1161017657806318160ddd146101f75780632e1a7d4d146101ff578063386a95251461021257600080fd5b80628cc2621461019c5780630700037d146101c25780631171bda9146101e2575b600080fd5b6101af6101aa366004611752565b6103bb565b6040519081526020015b60405180910390f35b6101af6101d0366004611752565b60086020526000908152604090205481565b6101f56101f036600461176d565b61046a565b005b6009546101af565b6101f561020d3660046117cb565b61068b565b6101af60045481565b6101f56102293660046117cb565b61089c565b6101f5610bf2565b6001546102569073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b9565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101af6102b0366004611752565b73ffffffffffffffffffffffffffffffffffffffff166000908152600a602052604090205490565b6102567f000000000000000000000000000000000000000000000000000000000000000081565b6101af60035481565b6101af610d7c565b6101f561031e366004611752565b610d8f565b6101af610331366004611752565b60076020526000908152604090205481565b6101f56103513660046117cb565b610e7f565b6101f56103643660046117fd565b610f70565b6101af60055481565b6101af6110ea565b6101af60065481565b6101f5611165565b6101af60025481565b6102567f000000000000000000000000000000000000000000000000000000000000000081565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602090815260408083205460079092528220547f0000000000000000000000000000000000000000000000000000000000000000906104166110ea565b6104209190611926565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600a602052604090205461045091906118e9565b61045a91906118ae565b6104649190611896565b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561059857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6105fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f323000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b61061f73ffffffffffffffffffffffffffffffffffffffff84168383611188565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b6488360405161067e91815260200190565b60405180910390a3505050565b600260005414156106f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b6002600055336107066110ea565b600655610711610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff81161561077257610739816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b600082116107dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f383900000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b816009546107ea9190611926565b600955336000908152600a6020526040902054610808908390611926565b336000818152600a602052604090209190915561085d907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169084611188565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250506001600055565b60015473ffffffffffffffffffffffffffffffffffffffff16331461091d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b6002600054141561098a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b600260009081556109996110ea565b6006556109a4610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b6002544210610a2357600454610a1b90836118ae565b600355610a65565b600042600254610a339190611926565b9050600060035482610a4591906118e9565b600454909150610a558286611896565b610a5f91906118ae565b60035550505b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015610aed57600080fd5b505afa158015610b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2591906117e4565b905060045481610b3591906118ae565b6003541115610ba0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f393100000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b426005819055600454610bb291611896565b6002556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050600160005550565b60026000541415610c5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b600260005533610c6d6110ea565b600655610c78610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff811615610cd957610ca0816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b336000908152600860205260409020548015610d735733600081815260086020526040812055610d41907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169083611188565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200161088b565b50506001600055565b6000610d8a42600254611261565b905090565b60015473ffffffffffffffffffffffffffffffffffffffff163314610e10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f1c794a043683a294127c95bc365bae91b63b651eb9884a2c9120afee2bb690b490600090a250565b60026000541415610eec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b600260005533610efa6110ea565b600655610f05610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff811615610f6657610f2d816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b610d738233611279565b60026000541415610fdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b60026000558073ffffffffffffffffffffffffffffffffffffffff8116611060576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f300000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b816110696110ea565b600655611074610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff8116156110d55761109c816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b6110df8484611279565b505060016000555050565b6000600954600014156110fe575060065490565b6009547f0000000000000000000000000000000000000000000000000000000000000000600354600554611130610d7c565b61113a9190611926565b61114491906118e9565b61114e91906118e9565b61115891906118ae565b600654610d8a9190611896565b336000908152600a602052604090205461117e9061068b565b611186610bf2565b565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261125c9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526113cf565b505050565b60008183106112705781611272565b825b9392505050565b600082116112e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f393000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b61132573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163330856114db565b816009546113339190611896565b60095573ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902054611367908390611896565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a6020526040908190209290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906113c39085815260200190565b60405180910390a25050565b6000611431826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661153f9092919063ffffffff16565b80519091501561125c578080602001905181019061144f91906117a9565b61125c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104e7565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526115399085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016111da565b50505050565b606061154e8484600085611556565b949350505050565b6060824710156115e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104e7565b843b611650576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104e7565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516116799190611829565b60006040518083038185875af1925050503d80600081146116b6576040519150601f19603f3d011682016040523d82523d6000602084013e6116bb565b606091505b50915091506116cb8282866116d6565b979650505050505050565b606083156116e5575081611272565b8251156116f55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e79190611845565b803573ffffffffffffffffffffffffffffffffffffffff8116811461174d57600080fd5b919050565b60006020828403121561176457600080fd5b61127282611729565b60008060006060848603121561178257600080fd5b61178b84611729565b925061179960208501611729565b9150604084013590509250925092565b6000602082840312156117bb57600080fd5b8151801515811461127257600080fd5b6000602082840312156117dd57600080fd5b5035919050565b6000602082840312156117f657600080fd5b5051919050565b6000806040838503121561181057600080fd5b8235915061182060208401611729565b90509250929050565b6000825161183b81846020870161193d565b9190910192915050565b602081526000825180602084015261186481604085016020870161193d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600082198211156118a9576118a9611969565b500190565b6000826118e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561192157611921611969565b500290565b60008282101561193857611938611969565b500390565b60005b83811015611958578181015183820152602001611940565b838111156115395750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122077f991a49e4728e59e531169e15d2eda16ef6a44d51ad55135afbbba85844e7b64736f6c63430008070033000000000000000000000000c06481fc1d0196c138770fd2148dcb306cb24e2000000000000000000000000031429d1856ad1377a8a0079410b297e1a9e214c20000000000000000000000005d8d3ac6d21c016f9c935030480b7057b21ec8040000000000000000000000000000000000000000000000000000000000093f30
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101975760003560e01c80637b0a47ee116100e3578063c8f33c911161008c578063e9fad8ee11610066578063e9fad8ee14610383578063ebe2b12b1461038b578063f7c618c11461039457600080fd5b8063c8f33c9114610369578063cd3daf9d14610372578063df136d651461037a57600080fd5b80638b876347116100bd5780638b87634714610323578063a694fc3a14610343578063aceccf8f1461035657600080fd5b80637b0a47ee146102ff57806380faa57d14610308578063873291bb1461031057600080fd5b80633c6b16ab116101455780636041c34f1161011f5780636041c34f1461027b57806370a08231146102a257806372f702f3146102d857600080fd5b80633c6b16ab1461021b5780633d18b9121461022e5780633fc6df6e1461023657600080fd5b806318160ddd1161017657806318160ddd146101f75780632e1a7d4d146101ff578063386a95251461021257600080fd5b80628cc2621461019c5780630700037d146101c25780631171bda9146101e2575b600080fd5b6101af6101aa366004611752565b6103bb565b6040519081526020015b60405180910390f35b6101af6101d0366004611752565b60086020526000908152604090205481565b6101f56101f036600461176d565b61046a565b005b6009546101af565b6101f561020d3660046117cb565b61068b565b6101af60045481565b6101f56102293660046117cb565b61089c565b6101f5610bf2565b6001546102569073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b9565b6101af7f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b6101af6102b0366004611752565b73ffffffffffffffffffffffffffffffffffffffff166000908152600a602052604090205490565b6102567f0000000000000000000000005d8d3ac6d21c016f9c935030480b7057b21ec80481565b6101af60035481565b6101af610d7c565b6101f561031e366004611752565b610d8f565b6101af610331366004611752565b60076020526000908152604090205481565b6101f56103513660046117cb565b610e7f565b6101f56103643660046117fd565b610f70565b6101af60055481565b6101af6110ea565b6101af60065481565b6101f5611165565b6101af60025481565b6102567f00000000000000000000000031429d1856ad1377a8a0079410b297e1a9e214c281565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602090815260408083205460079092528220547f0000000000000000000000000000000000000000000000000de0b6b3a7640000906104166110ea565b6104209190611926565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600a602052604090205461045091906118e9565b61045a91906118ae565b6104649190611896565b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b7f0000000000000000000000005d8d3ac6d21c016f9c935030480b7057b21ec80473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561059857507f00000000000000000000000031429d1856ad1377a8a0079410b297e1a9e214c273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6105fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f323000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b61061f73ffffffffffffffffffffffffffffffffffffffff84168383611188565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b6488360405161067e91815260200190565b60405180910390a3505050565b600260005414156106f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b6002600055336107066110ea565b600655610711610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff81161561077257610739816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b600082116107dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f383900000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b816009546107ea9190611926565b600955336000908152600a6020526040902054610808908390611926565b336000818152600a602052604090209190915561085d907f0000000000000000000000005d8d3ac6d21c016f9c935030480b7057b21ec80473ffffffffffffffffffffffffffffffffffffffff169084611188565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250506001600055565b60015473ffffffffffffffffffffffffffffffffffffffff16331461091d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b6002600054141561098a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b600260009081556109996110ea565b6006556109a4610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b6002544210610a2357600454610a1b90836118ae565b600355610a65565b600042600254610a339190611926565b9050600060035482610a4591906118e9565b600454909150610a558286611896565b610a5f91906118ae565b60035550505b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000031429d1856ad1377a8a0079410b297e1a9e214c273ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015610aed57600080fd5b505afa158015610b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2591906117e4565b905060045481610b3591906118ae565b6003541115610ba0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f393100000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b426005819055600454610bb291611896565b6002556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050600160005550565b60026000541415610c5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b600260005533610c6d6110ea565b600655610c78610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff811615610cd957610ca0816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b336000908152600860205260409020548015610d735733600081815260086020526040812055610d41907f00000000000000000000000031429d1856ad1377a8a0079410b297e1a9e214c273ffffffffffffffffffffffffffffffffffffffff169083611188565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200161088b565b50506001600055565b6000610d8a42600254611261565b905090565b60015473ffffffffffffffffffffffffffffffffffffffff163314610e10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f1c794a043683a294127c95bc365bae91b63b651eb9884a2c9120afee2bb690b490600090a250565b60026000541415610eec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b600260005533610efa6110ea565b600655610f05610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff811615610f6657610f2d816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b610d738233611279565b60026000541415610fdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e7565b60026000558073ffffffffffffffffffffffffffffffffffffffff8116611060576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f300000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b816110696110ea565b600655611074610d7c565b60055573ffffffffffffffffffffffffffffffffffffffff8116156110d55761109c816103bb565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600860209081526040808320939093556006546007909152919020555b6110df8484611279565b505060016000555050565b6000600954600014156110fe575060065490565b6009547f0000000000000000000000000000000000000000000000000de0b6b3a7640000600354600554611130610d7c565b61113a9190611926565b61114491906118e9565b61114e91906118e9565b61115891906118ae565b600654610d8a9190611896565b336000908152600a602052604090205461117e9061068b565b611186610bf2565b565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261125c9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526113cf565b505050565b60008183106112705781611272565b825b9392505050565b600082116112e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f393000000000000000000000000000000000000000000000000000000000000060448201526064016104e7565b61132573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000005d8d3ac6d21c016f9c935030480b7057b21ec804163330856114db565b816009546113339190611896565b60095573ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902054611367908390611896565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a6020526040908190209290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906113c39085815260200190565b60405180910390a25050565b6000611431826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661153f9092919063ffffffff16565b80519091501561125c578080602001905181019061144f91906117a9565b61125c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104e7565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526115399085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016111da565b50505050565b606061154e8484600085611556565b949350505050565b6060824710156115e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104e7565b843b611650576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104e7565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516116799190611829565b60006040518083038185875af1925050503d80600081146116b6576040519150601f19603f3d011682016040523d82523d6000602084013e6116bb565b606091505b50915091506116cb8282866116d6565b979650505050505050565b606083156116e5575081611272565b8251156116f55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e79190611845565b803573ffffffffffffffffffffffffffffffffffffffff8116811461174d57600080fd5b919050565b60006020828403121561176457600080fd5b61127282611729565b60008060006060848603121561178257600080fd5b61178b84611729565b925061179960208501611729565b9150604084013590509250925092565b6000602082840312156117bb57600080fd5b8151801515811461127257600080fd5b6000602082840312156117dd57600080fd5b5035919050565b6000602082840312156117f657600080fd5b5051919050565b6000806040838503121561181057600080fd5b8235915061182060208401611729565b90509250929050565b6000825161183b81846020870161193d565b9190910192915050565b602081526000825180602084015261186481604085016020870161193d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600082198211156118a9576118a9611969565b500190565b6000826118e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561192157611921611969565b500290565b60008282101561193857611938611969565b500390565b60005b83811015611958578181015183820152602001611940565b838111156115395750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122077f991a49e4728e59e531169e15d2eda16ef6a44d51ad55135afbbba85844e7b64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c06481fc1d0196c138770fd2148dcb306cb24e2000000000000000000000000031429d1856ad1377a8a0079410b297e1a9e214c20000000000000000000000005d8d3ac6d21c016f9c935030480b7057b21ec8040000000000000000000000000000000000000000000000000000000000093f30
-----Decoded View---------------
Arg [0] : _rewardsDistribution (address): 0xC06481fc1D0196C138770fD2148DCB306cB24E20
Arg [1] : _rewardToken (address): 0x31429d1856aD1377A8A0079410B297e1a9e214c2
Arg [2] : _stakingToken (address): 0x5d8D3Ac6D21C016f9C935030480B7057B21EC804
Arg [3] : _rewardsDuration (uint256): 606000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000c06481fc1d0196c138770fd2148dcb306cb24e20
Arg [1] : 00000000000000000000000031429d1856ad1377a8a0079410b297e1a9e214c2
Arg [2] : 0000000000000000000000005d8d3ac6d21c016f9c935030480b7057b21ec804
Arg [3] : 0000000000000000000000000000000000000000000000000000000000093f30
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.75
Net Worth in ETH
0.000371
Token Allocations
ANGLE
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.017462 | 42.9171 | $0.7494 |
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.