Source Code
Overview
S Balance
S Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Add Recipient | 15215871 | 310 days ago | IN | 0 S | 0.00497975 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Distributor
Compiler Version
v0.7.5+commit.eb77ed08
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
import "./lib/SafeERC20.sol";
import "./lib/SafeMath.sol";
import "./lib/Address.sol";
import "./lib/IERC20.sol";
import "./lib/ITreasury.sol";
import "./lib/Policy.sol";
import "./lib/IStaking.sol";
contract Distributor is Policy {
using SafeMath for uint;
using SafeMath for uint32;
using SafeERC20 for IERC20;
/* ====== VARIABLES ====== */
address public immutable Solis;
address public immutable treasury;
uint32 public immutable epochLength;
uint32 public nextEpochTime;
mapping(uint => Adjust) public adjustments;
/* ====== STRUCTS ====== */
struct Info {
uint rate; // in ten-thousandths ( 5000 = 0.5% )
address recipient;
}
Info[] public info;
struct Adjust {
bool add;
uint rate;
uint target;
}
/* ====== CONSTRUCTOR ====== */
constructor(
address _treasury,
address _solis,
uint32 _epochLength,
uint32 _nextEpochTime
) {
require(_treasury != address(0));
treasury = _treasury;
require(_solis != address(0));
Solis = _solis;
epochLength = _epochLength;
nextEpochTime = _nextEpochTime;
}
/* ====== PUBLIC FUNCTIONS ====== */
/**
@notice send epoch reward to staking contract
*/
function distribute() external returns (bool) {
if (nextEpochTime <= uint32(block.timestamp)) {
nextEpochTime = nextEpochTime.add32(epochLength);
for (uint i = 0; i < info.length; i++) {
if (info[i].rate > 0) {
ITreasury(treasury).mintRewards(
info[i].recipient,
nextRewardAt(info[i].rate)
);
adjust(i);
}
}
return true;
} else {
return false;
}
}
/* ====== INTERNAL FUNCTIONS ====== */
/**
@notice increment reward rate for collector
*/
function adjust(uint _index) internal {
Adjust memory adjustment = adjustments[_index];
if (adjustment.rate != 0) {
if (adjustment.add) {
// if rate should increase
info[_index].rate = info[_index].rate.add(adjustment.rate); // raise rate
if (info[_index].rate >= adjustment.target) {
// if target met
adjustments[_index].rate = 0; // turn off adjustment
}
} else {
// if rate should decrease
info[_index].rate = info[_index].rate.sub(adjustment.rate); // lower rate
if (info[_index].rate <= adjustment.target) {
// if target met
adjustments[_index].rate = 0; // turn off adjustment
}
}
}
}
/* ====== VIEW FUNCTIONS ====== */
/**
@notice view function for next reward at given rate
@param _rate uint
@return uint
*/
function nextRewardAt(uint _rate) public view returns (uint) {
return IERC20(Solis).totalSupply().mul(_rate).div(1000000);
}
/**
@notice view function for next reward for specified address
@param _recipient address
@return uint
*/
function nextRewardFor(address _recipient) public view returns (uint) {
uint reward;
for (uint i = 0; i < info.length; i++) {
if (info[i].recipient == _recipient) {
reward = nextRewardAt(info[i].rate);
}
}
return reward;
}
/* ====== POLICY FUNCTIONS ====== */
/**
@notice adds recipient for distributions
@param _recipient address
@param _rewardRate uint
*/
function addRecipient(
address _recipient,
uint _rewardRate
) external onlyPolicy {
require(_recipient != address(0));
info.push(Info({recipient: _recipient, rate: _rewardRate}));
}
/**
@notice removes recipient for distributions
@param _index uint
@param _recipient address
*/
function removeRecipient(
uint _index,
address _recipient
) external onlyPolicy {
require(_recipient == info[_index].recipient);
info[_index].recipient = address(0);
info[_index].rate = 0;
}
/**
@notice set adjustment info for a collector's reward rate
@param _index uint
@param _add bool
@param _rate uint
@param _target uint
*/
function setAdjustment(
uint _index,
bool _add,
uint _rate,
uint _target
) external onlyPolicy {
adjustments[_index] = Adjust({add: _add, rate: _rate, target: _target});
}
}// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
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 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;
}
/**
* @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}
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
require(
success,
"Address: unable to send value, recipient may have reverted"
);
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return
functionCallWithValue(
target,
data,
value,
"Address: low-level call with value failed"
);
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(
address(this).balance >= value,
"Address: insufficient balance for call"
);
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{value: value}(
data
);
return _verifyCallResult(success, returndata, errorMessage);
}
function _functionCallWithValue(
address target,
bytes memory data,
uint256 weiValue,
string memory errorMessage
) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{value: weiValue}(
data
);
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data
) internal view returns (bytes memory) {
return
functionStaticCall(
target,
data,
"Address: low-level static call failed"
);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/
function functionDelegateCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return
functionDelegateCall(
target,
data,
"Address: low-level delegate call failed"
);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
function addressToString(
address _address
) internal pure returns (string memory) {
bytes32 _bytes = bytes32(uint256(_address));
bytes memory HEX = "0123456789abcdef";
bytes memory _addr = new bytes(42);
_addr[0] = "0";
_addr[1] = "x";
for (uint256 i = 0; i < 20; i++) {
_addr[2 + i * 2] = HEX[uint8(_bytes[i + 12] >> 4)];
_addr[3 + i * 2] = HEX[uint8(_bytes[i + 12] & 0x0f)];
}
return string(_addr);
}
}// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
interface IERC20 {
function decimals() external view returns (uint8);
/**
* @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: AGPL-3.0-or-later
pragma solidity 0.7.5;
interface IPolicy {
function policy() external view returns (address);
function renouncePolicy() external;
function pushPolicy( address newPolicy_ ) external;
function pullPolicy() external;
}// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
interface IStaking {
function stake(uint _amount, address _recipient) external returns (bool);
function claim(address _recipient) external;
struct Epoch {
uint number;
uint distribute;
uint32 length;
uint32 endTime;
}
function setEpochDistribution(uint _amount) external;
}// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
interface ITreasury {
function deposit(
uint _amount,
address _token,
uint _profit
) external returns (uint send_);
function withdraw(uint _amount, address _token) external;
function incurDebt(uint _amount, address _token) external;
function repayDebtWithReserve(uint _amount, address _token) external;
function repayDebtWithOHM(uint _amount) external;
function manage(address _token, uint _amount) external;
function mintRewards(address _recipient, uint _amount) external;
function auditReserves() external;
function totalReserves() external view returns (uint);
function totalDebt() external view returns (uint);
function excessReserves() external view returns (uint);
function valueOf(
address _token,
uint _amount
) external view returns (uint value_);
}// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
import "./IPolicy.sol";
contract Policy is IPolicy {
address internal _policy;
address internal _newPolicy;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
_policy = msg.sender;
emit OwnershipTransferred(address(0), _policy);
}
function policy() public view override returns (address) {
return _policy;
}
modifier onlyPolicy() {
require(_policy == msg.sender, "Ownable: caller is not the owner");
_;
}
function renouncePolicy() public virtual override onlyPolicy {
emit OwnershipTransferred(_policy, address(0));
_policy = address(0);
}
function pushPolicy(address newPolicy_) public virtual override onlyPolicy {
require(
newPolicy_ != address(0),
"Ownable: new owner is the zero address"
);
_newPolicy = newPolicy_;
}
function pullPolicy() public virtual override {
require(msg.sender == _newPolicy);
emit OwnershipTransferred(_policy, _newPolicy);
_policy = _newPolicy;
}
}// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
import "./SafeMath.sol";
import "./Address.sol";
import "./IERC20.sol";
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, "SafeERC20: decreased allowance below zero");
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// 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");
}
}
}// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function add32(uint32 a, uint32 b) internal pure returns (uint32) {
uint32 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function sub32(uint32 a, uint32 b) internal pure returns (uint32) {
return sub32(a, b, "SafeMath: subtraction overflow");
}
function sub32(
uint32 a,
uint32 b,
string memory errorMessage
) internal pure returns (uint32) {
require(b <= a, errorMessage);
uint32 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function mul32(uint32 a, uint32 b) internal pure returns (uint32) {
if (a == 0) {
return 0;
}
uint32 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
function sqrrt(uint256 a) internal pure returns (uint c) {
if (a > 3) {
c = a;
uint b = add(div(a, 2), 1);
while (b < c) {
c = b;
b = div(add(div(a, b), b), 2);
}
} else if (a != 0) {
c = 1;
}
}
function percentageAmount(
uint256 total_,
uint8 percentage_
) internal pure returns (uint256 percentAmount_) {
return div(mul(total_, percentage_), 1000);
}
function substractPercentage(
uint256 total_,
uint8 percentageToSub_
) internal pure returns (uint256 result_) {
return sub(total_, div(mul(total_, percentageToSub_), 1000));
}
function percentageOfTotal(
uint256 part_,
uint256 total_
) internal pure returns (uint256 percent_) {
return div(mul(part_, 100), total_);
}
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);
}
function quadraticPricing(
uint256 payment_,
uint256 multiplier_
) internal pure returns (uint256) {
return sqrrt(mul(multiplier_, payment_));
}
function bondingCurve(
uint256 supply_,
uint256 multiplier_
) internal pure returns (uint256) {
return mul(multiplier_, supply_);
}
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_solis","type":"address"},{"internalType":"uint32","name":"_epochLength","type":"uint32"},{"internalType":"uint32","name":"_nextEpochTime","type":"uint32"}],"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"},{"inputs":[],"name":"Solis","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_rewardRate","type":"uint256"}],"name":"addRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"adjustments","outputs":[{"internalType":"bool","name":"add","type":"bool"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"target","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distribute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epochLength","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"info","outputs":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextEpochTime","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"nextRewardAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"nextRewardFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"policy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pullPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPolicy_","type":"address"}],"name":"pushPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"removeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renouncePolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"bool","name":"_add","type":"bool"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_target","type":"uint256"}],"name":"setAdjustment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60e060405234801561001057600080fd5b506040516111793803806111798339818101604052608081101561003357600080fd5b5080516020820151604080840151606090940151600080546001600160a01b031916331780825592519495939491926001600160a01b0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36001600160a01b0384166100a457600080fd5b6001600160601b0319606085901b1660a0526001600160a01b0383166100c957600080fd5b606083811b6001600160601b03191660805260e083901b6001600160e01b03191660c0526001805463ffffffff60a01b1916600160a01b63ffffffff9485160217905560a0516001600160a01b0390941694509290921c9116611025610154600039806103ee528061080952508061053b528061088552508061055f528061073f52506110256000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638d3e429811610097578063c9fa8b2a11610066578063c9fa8b2a1461027e578063e4fc6b6d1461029b578063f7982243146102b7578063fe3fbbad146102e357610100565b80638d3e42981461020b578063a15ad07714610213578063a4b2398014610239578063bc3b2b121461024157610100565b806357d775f8116100d357806357d775f8146101c05780635beede08146101c85780635db854b0146101d257806361d027b31461020357610100565b80630505c8c9146101055780631da56eb3146101295780632e3405991461014a57806336d33f4414610188575b600080fd5b61010d61030f565b604080516001600160a01b039092168252519081900360200190f35b61013161031f565b6040805163ffffffff9092168252519081900360200190f35b6101676004803603602081101561016057600080fd5b5035610332565b604080519283526001600160a01b0390911660208301528051918290030190f35b6101ae6004803603602081101561019e57600080fd5b50356001600160a01b0316610369565b60408051918252519081900360200190f35b6101316103ec565b6101d0610410565b005b6101d0600480360360808110156101e857600080fd5b50803590602081013515159060408101359060600135610495565b61010d610539565b61010d61055d565b6101d06004803603602081101561022957600080fd5b50356001600160a01b0316610581565b6101d0610654565b61025e6004803603602081101561025757600080fd5b503561070a565b604080519315158452602084019290925282820152519081900360600190f35b6101ae6004803603602081101561029457600080fd5b5035610730565b6102a36107d4565b604080519115158252519081900360200190f35b6101d0600480360360408110156102cd57600080fd5b506001600160a01b038135169060200135610975565b6101d0600480360360408110156102f957600080fd5b50803590602001356001600160a01b0316610a89565b6000546001600160a01b03165b90565b600154600160a01b900463ffffffff1681565b6003818154811061034257600080fd5b6000918252602090912060029091020180546001909101549091506001600160a01b031682565b60008060005b6003548110156103e557836001600160a01b03166003828154811061039057fe5b60009182526020909120600160029092020101546001600160a01b031614156103dd576103da600382815481106103c357fe5b906000526020600020906002020160000154610730565b91505b60010161036f565b5092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001546001600160a01b0316331461042757600080fd5b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36001546000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6000546001600160a01b031633146104f4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6040805160608101825293151584526020808501938452848201928352600095865260029081905294209251835460ff19169015151783559051600183015551910155565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031633146105e0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106255760405162461bcd60e51b8152600401808060200182810382526026815260200180610fa96026913960400191505060405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106b3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600260208190526000918252604090912080546001820154919092015460ff9092169183565b60006107ce620f42406107c8847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561079657600080fd5b505afa1580156107aa573d6000803e3d6000fd5b505050506040513d60208110156107c057600080fd5b505190610b88565b90610be8565b92915050565b60015460009063ffffffff428116600160a01b909204161161096d5760015461082f9063ffffffff600160a01b9091048116907f000000000000000000000000000000000000000000000000000000000000000090610c2a16565b600160146101000a81548163ffffffff021916908363ffffffff16021790555060005b6003548110156109635760006003828154811061086b57fe5b906000526020600020906002020160000154111561095b577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636a20de92600383815481106108bf57fe5b906000526020600020906002020160010160009054906101000a90046001600160a01b03166108f4600385815481106103c357fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561093a57600080fd5b505af115801561094e573d6000803e3d6000fd5b5050505061095b81610c8d565b600101610852565b506001905061031c565b50600061031c565b6000546001600160a01b031633146109d4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0382166109e757600080fd5b604080518082019091529081526001600160a01b03918216602082019081526003805460018101825560009190915291517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b600290930292830155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909101805473ffffffffffffffffffffffffffffffffffffffff191691909216179055565b6000546001600160a01b03163314610ae8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60038281548110610af557fe5b60009182526020909120600160029092020101546001600160a01b03828116911614610b2057600080fd5b600060038381548110610b2f57fe5b906000526020600020906002020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600060038381548110610b7357fe5b60009182526020909120600290910201555050565b600082610b97575060006107ce565b82820282848281610ba457fe5b0414610be15760405162461bcd60e51b8152600401808060200182810382526021815260200180610fcf6021913960400191505060405180910390fd5b9392505050565b6000610be183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610df2565b600082820163ffffffff8085169082161015610be1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b610c95610f85565b506000818152600260208181526040928390208351606081018552815460ff16151581526001820154928101839052920154928201929092529015610dee57805115610d6757610d07816020015160038481548110610cf057fe5b600091825260209091206002909102015490610e94565b60038381548110610d1457fe5b600091825260209091206002909102015560408101516003805484908110610d3857fe5b90600052602060002090600202016000015410610d62576000828152600260205260408120600101555b610dee565b610d93816020015160038481548110610d7c57fe5b600091825260209091206002909102015490610eee565b60038381548110610da057fe5b600091825260209091206002909102015560408101516003805484908110610dc457fe5b90600052602060002090600202016000015411610dee576000828152600260205260408120600101555b5050565b60008183610e7e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e43578181015183820152602001610e2b565b50505050905090810190601f168015610e705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610e8a57fe5b0495945050505050565b600082820183811015610be1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610be183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060008184841115610f7d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610e43578181015183820152602001610e2b565b505050900390565b60405180606001604052806000151581526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220a21e6009df47acf830b96894749a61d0fb7a531aa951c3fa3be052add994495064736f6c63430007050033000000000000000000000000f551a76ec6ba817bd0a4d796be80a77d9d98e94f00000000000000000000000042ed764ec17ff0bc4a0d0e6c09d1d6444233effd00000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000067dea3c1
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638d3e429811610097578063c9fa8b2a11610066578063c9fa8b2a1461027e578063e4fc6b6d1461029b578063f7982243146102b7578063fe3fbbad146102e357610100565b80638d3e42981461020b578063a15ad07714610213578063a4b2398014610239578063bc3b2b121461024157610100565b806357d775f8116100d357806357d775f8146101c05780635beede08146101c85780635db854b0146101d257806361d027b31461020357610100565b80630505c8c9146101055780631da56eb3146101295780632e3405991461014a57806336d33f4414610188575b600080fd5b61010d61030f565b604080516001600160a01b039092168252519081900360200190f35b61013161031f565b6040805163ffffffff9092168252519081900360200190f35b6101676004803603602081101561016057600080fd5b5035610332565b604080519283526001600160a01b0390911660208301528051918290030190f35b6101ae6004803603602081101561019e57600080fd5b50356001600160a01b0316610369565b60408051918252519081900360200190f35b6101316103ec565b6101d0610410565b005b6101d0600480360360808110156101e857600080fd5b50803590602081013515159060408101359060600135610495565b61010d610539565b61010d61055d565b6101d06004803603602081101561022957600080fd5b50356001600160a01b0316610581565b6101d0610654565b61025e6004803603602081101561025757600080fd5b503561070a565b604080519315158452602084019290925282820152519081900360600190f35b6101ae6004803603602081101561029457600080fd5b5035610730565b6102a36107d4565b604080519115158252519081900360200190f35b6101d0600480360360408110156102cd57600080fd5b506001600160a01b038135169060200135610975565b6101d0600480360360408110156102f957600080fd5b50803590602001356001600160a01b0316610a89565b6000546001600160a01b03165b90565b600154600160a01b900463ffffffff1681565b6003818154811061034257600080fd5b6000918252602090912060029091020180546001909101549091506001600160a01b031682565b60008060005b6003548110156103e557836001600160a01b03166003828154811061039057fe5b60009182526020909120600160029092020101546001600160a01b031614156103dd576103da600382815481106103c357fe5b906000526020600020906002020160000154610730565b91505b60010161036f565b5092915050565b7f000000000000000000000000000000000000000000000000000000000000708081565b6001546001600160a01b0316331461042757600080fd5b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36001546000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6000546001600160a01b031633146104f4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6040805160608101825293151584526020808501938452848201928352600095865260029081905294209251835460ff19169015151783559051600183015551910155565b7f000000000000000000000000f551a76ec6ba817bd0a4d796be80a77d9d98e94f81565b7f00000000000000000000000042ed764ec17ff0bc4a0d0e6c09d1d6444233effd81565b6000546001600160a01b031633146105e0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106255760405162461bcd60e51b8152600401808060200182810382526026815260200180610fa96026913960400191505060405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106b3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600260208190526000918252604090912080546001820154919092015460ff9092169183565b60006107ce620f42406107c8847f00000000000000000000000042ed764ec17ff0bc4a0d0e6c09d1d6444233effd6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561079657600080fd5b505afa1580156107aa573d6000803e3d6000fd5b505050506040513d60208110156107c057600080fd5b505190610b88565b90610be8565b92915050565b60015460009063ffffffff428116600160a01b909204161161096d5760015461082f9063ffffffff600160a01b9091048116907f000000000000000000000000000000000000000000000000000000000000708090610c2a16565b600160146101000a81548163ffffffff021916908363ffffffff16021790555060005b6003548110156109635760006003828154811061086b57fe5b906000526020600020906002020160000154111561095b577f000000000000000000000000f551a76ec6ba817bd0a4d796be80a77d9d98e94f6001600160a01b0316636a20de92600383815481106108bf57fe5b906000526020600020906002020160010160009054906101000a90046001600160a01b03166108f4600385815481106103c357fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561093a57600080fd5b505af115801561094e573d6000803e3d6000fd5b5050505061095b81610c8d565b600101610852565b506001905061031c565b50600061031c565b6000546001600160a01b031633146109d4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0382166109e757600080fd5b604080518082019091529081526001600160a01b03918216602082019081526003805460018101825560009190915291517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b600290930292830155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909101805473ffffffffffffffffffffffffffffffffffffffff191691909216179055565b6000546001600160a01b03163314610ae8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60038281548110610af557fe5b60009182526020909120600160029092020101546001600160a01b03828116911614610b2057600080fd5b600060038381548110610b2f57fe5b906000526020600020906002020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600060038381548110610b7357fe5b60009182526020909120600290910201555050565b600082610b97575060006107ce565b82820282848281610ba457fe5b0414610be15760405162461bcd60e51b8152600401808060200182810382526021815260200180610fcf6021913960400191505060405180910390fd5b9392505050565b6000610be183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610df2565b600082820163ffffffff8085169082161015610be1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b610c95610f85565b506000818152600260208181526040928390208351606081018552815460ff16151581526001820154928101839052920154928201929092529015610dee57805115610d6757610d07816020015160038481548110610cf057fe5b600091825260209091206002909102015490610e94565b60038381548110610d1457fe5b600091825260209091206002909102015560408101516003805484908110610d3857fe5b90600052602060002090600202016000015410610d62576000828152600260205260408120600101555b610dee565b610d93816020015160038481548110610d7c57fe5b600091825260209091206002909102015490610eee565b60038381548110610da057fe5b600091825260209091206002909102015560408101516003805484908110610dc457fe5b90600052602060002090600202016000015411610dee576000828152600260205260408120600101555b5050565b60008183610e7e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e43578181015183820152602001610e2b565b50505050905090810190601f168015610e705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610e8a57fe5b0495945050505050565b600082820183811015610be1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610be183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060008184841115610f7d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610e43578181015183820152602001610e2b565b505050900390565b60405180606001604052806000151581526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220a21e6009df47acf830b96894749a61d0fb7a531aa951c3fa3be052add994495064736f6c63430007050033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f551a76ec6ba817bd0a4d796be80a77d9d98e94f00000000000000000000000042ed764ec17ff0bc4a0d0e6c09d1d6444233effd00000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000067dea3c1
-----Decoded View---------------
Arg [0] : _treasury (address): 0xF551a76eC6Ba817BD0a4d796Be80a77d9d98E94f
Arg [1] : _solis (address): 0x42ED764Ec17FF0bc4a0d0E6c09D1d6444233EfFD
Arg [2] : _epochLength (uint32): 28800
Arg [3] : _nextEpochTime (uint32): 1742644161
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000f551a76ec6ba817bd0a4d796be80a77d9d98e94f
Arg [1] : 00000000000000000000000042ed764ec17ff0bc4a0d0e6c09d1d6444233effd
Arg [2] : 0000000000000000000000000000000000000000000000000000000000007080
Arg [3] : 0000000000000000000000000000000000000000000000000000000067dea3c1
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.