Source Code
Overview
ETH Balance
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 28292679 | 20 hrs ago | 0 ETH | ||||
| 28292479 | 20 hrs ago | 0 ETH | ||||
| 28269062 | 35 hrs ago | 0 ETH | ||||
| 28266971 | 36 hrs ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH | ||||
| 28195986 | 3 days ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Minter
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 800 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.13;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol";
import "contracts/interfaces/IMinter.sol";
import "contracts/interfaces/IRewardsDistributor.sol";
import "contracts/interfaces/IEmissionsToken.sol";
import "contracts/interfaces/IVoter.sol";
import "contracts/interfaces/IVotingEscrow.sol";
/// @notice codifies the minting rules as per ve(3,3)
contract Minter is IMinter, Initializable {
uint256 internal constant WEEK = 86400 * 7; /// @notice allows minting once per week (reset every Thursday 00:00 UTC)
uint256 internal flation;
uint256 internal constant PRECISION = 1000;
uint256 internal growth; // 50%
uint256 internal incentivesSize;
uint256 public weekly;
uint256 public activePeriod;
uint256 public firstPeriod;
address public timelock;
address public msig;
address public commandCenter;
IEmissionsToken public emissionsToken; /// @notice this is the token emitted by the protocol weekly
IVoter public voter;
IVotingEscrow public ve;
IRewardsDistributor public rewardsDistributor;
event SetVeDist(address _value);
event SetVoter(address _value);
event Mint(address indexed sender, uint256 weekly, uint256 growth);
modifier onlyTimelock() {
require(msg.sender == timelock, "!TL");
_;
}
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize(
address _voter, // the voting & distribution system
address _ve, // the ve(3,3) system that will be locked into
address _rewardsDistributor, // the distribution system that ensures users aren't diluted
uint256 initialSupply, // preminted supply from epoch 0
address _msig, // Multisig
address _timelock, // Timelock contract
address _commandCenter, // IncentivesController contract
uint256 _incentivesSize // Growth variable of the weekly share from IncentivesController
) external initializer {
emissionsToken = IEmissionsToken(IVotingEscrow(_ve).emissionsToken());
voter = IVoter(_voter);
ve = IVotingEscrow(_ve);
rewardsDistributor = IRewardsDistributor(_rewardsDistributor);
msig = _msig;
timelock = _timelock;
commandCenter = _commandCenter;
emit SetVeDist(_rewardsDistributor);
emit SetVoter(_voter);
if (initialSupply > 0) {
emissionsToken.mint(_msig, initialSupply);
}
weekly = 1_000 * 1e18; // represents a starting weekly emission of 1,000
incentivesSize = _incentivesSize;
flation = 990;
growth = 250;
activePeriod = type(uint256).max / 2;
}
function reinitializeCommandCenter(
address _commandCenter
) external reinitializer(2) {
commandCenter = _commandCenter;
}
/// @notice weekly emissions based on flation (mutable value via timelock)
function weeklyEmission() public view returns (uint256) {
return (weekly * flation) / PRECISION;
}
/// @notice calculate inflation and adjust ve balances accordingly
/// @notice takes the minimum of rate (increases weekly) and the growth variable (max rebase)
function calculateGrowth(uint256 _minted) public view returns (uint256) {
uint256 rate = (activePeriod / WEEK - firstPeriod / WEEK + 25) * 10;
return (MathUpgradeable.min(rate, growth) * _minted) / PRECISION;
}
/// @notice starts emissions for the first time (epoch 0)
// can only be called once while firstPeriod is 0
function initiateEpochZero() external {
require(msg.sender == msig, "!MSIG");
require(firstPeriod == 0, "STARTED");
activePeriod = (block.timestamp / WEEK) * WEEK + WEEK;
firstPeriod = activePeriod;
emissionsToken.mint(msig, weekly);
rewardsDistributor.checkpointToken();
rewardsDistributor.checkpointTotalSupply();
emit Mint(msg.sender, weekly, 0);
}
/// @notice update period can only be called once per epoch (1 week)
function updatePeriod() external returns (uint256) {
uint256 _period = activePeriod;
/// @dev > instead of >= period timestamp, to ensure ve balance cannot change anymore
if (block.timestamp > _period + WEEK) {
/// @dev only trigger if it's a new week (epoch)
_period = (block.timestamp / WEEK) * WEEK;
activePeriod = _period;
weekly = weeklyEmission();
uint256 _growth = calculateGrowth(weekly);
uint256 _required = _growth + weekly;
uint256 _balanceOf = emissionsToken.balanceOf(address(this));
if (_balanceOf < _required) {
emissionsToken.mint(address(this), _required - _balanceOf); // Minted emissions
emissionsToken.mint(commandCenter, incentivesSize); /// @dev Mint equivalent in growth to the incentivesController contract
}
require(
emissionsToken.transfer(address(rewardsDistributor), _growth)
);
rewardsDistributor.checkpointToken(); // checkpoint token balance that was just minted in rewards distributor
rewardsDistributor.checkpointTotalSupply(); // checkpoint supply
emissionsToken.approve(address(voter), weekly);
voter.notifyRewardAmount(weekly); // notify the weekly emissions to the voter for distribution
emit Mint(msg.sender, weekly, _growth);
}
return _period;
}
/// @notice updates in/de flation for the following epoch
function updateFlation(uint256 _flation) external {
require(msg.sender == commandCenter, "!commandCenter");
flation = _flation;
}
/// @notice update the rebase cap
function updateGrowthCap(uint256 _newGrowthCap) external {
require(msg.sender == commandCenter, "!commandCenter");
growth = _newGrowthCap;
}
/// @notice update the incentivesController's weekly growth in nominal value
function updateIncentivesSize(uint256 _incentivesSize) external {
require(msg.sender == commandCenter, "!commandCenter");
incentivesSize = _incentivesSize;
}
/// @notice change the incentivesController's address if a new deployment is necessary
function updateCommandCenter(
address _newCommandCenter
) external onlyTimelock {
commandCenter = _newCommandCenter;
}
function updateTimelock(address _timelock) external onlyTimelock {
timelock = _timelock;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or 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 {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library MathUpgradeable {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @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 == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
interface IEmissionsToken {
function totalSupply() external view returns (uint256);
function balanceOf(address) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address, uint256) external returns (bool);
function transferFrom(address, address, uint256) external returns (bool);
function mint(address, uint256) external;
function minter() external returns (address);
function burn(uint256 amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "contracts/interfaces/IRewardsDistributor.sol";
interface IMinter {
function updatePeriod() external returns (uint256);
function activePeriod() external view returns (uint256);
function rewardsDistributor() external view returns (IRewardsDistributor);
function timelock() external view returns (address);
function updateFlation(uint256 _flation) external;
function updateGrowthCap(uint256 _newGrowthCap) external;
function updateIncentivesSize(uint256 _newGrowth) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
interface IRewardsDistributor {
function checkpointToken() external;
function checkpointTotalSupply() external;
function claimable(uint256 _tokenId) external view returns (uint256);
function claim(uint256 _tokenId) external returns (uint256);
function claimMany(uint256[] memory _tokenIds) external returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity =0.7.6 || ^0.8.13;
pragma abicoder v2;
interface IVoter {
function _ve() external view returns (address);
function governor() external view returns (address);
function emergencyCouncil() external view returns (address);
function attachTokenToGauge(uint256 _tokenId, address account) external;
function detachTokenFromGauge(uint256 _tokenId, address account) external;
function emitDeposit(
uint256 _tokenId,
address account,
uint256 amount
) external;
function emitWithdraw(
uint256 _tokenId,
address account,
uint256 amount
) external;
function isWhitelisted(address token) external view returns (bool);
function notifyRewardAmount(uint256 amount) external;
function distribute(address _gauge) external;
function gauges(address pool) external view returns (address);
function feeDistributors(address gauge) external view returns (address);
function gaugefactory() external view returns (address);
function feeDistributorFactory() external view returns (address);
function minter() external view returns (address);
function factory() external view returns (address);
function length() external view returns (uint256);
function pools(uint256) external view returns (address);
function isAlive(address) external view returns (bool);
function setXRatio(uint256 _xRatio) external;
function setPoolXRatio(
address[] calldata _gauges,
uint256[] calldata _xRaRatios
) external;
function resetGaugeXRatio(address[] calldata _gauges) external;
function whitelist(address _token) external;
function forbid(address _token, bool _status) external;
function whitelistOperator() external view returns (address);
function gaugeXRatio(address gauge) external view returns (uint256);
function isGauge(address gauge) external view returns (bool);
function killGauge(address _gauge) external;
function reviveGauge(address _gauge) external;
function stale(uint256 _tokenID) external view returns (bool);
function poolForGauge(address gauge) external view returns (address pool);
function recoverFees(
address[] calldata fees,
address[][] calldata tokens
) external;
function designateStale(uint256 _tokenId, bool _status) external;
function base() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity =0.7.6 || ^0.8.13;
pragma abicoder v2;
interface IVotingEscrow {
struct Point {
int128 bias;
int128 slope; // # -dweight / dt
uint256 ts;
uint256 blk; // block
}
struct LockedBalance {
int128 amount;
uint256 end;
}
function emissionsToken() external view returns (address);
function team() external returns (address);
function epoch() external view returns (uint256);
function pointHistory(uint256 loc) external view returns (Point memory);
function userPointHistory(
uint256 tokenId,
uint256 loc
) external view returns (Point memory);
function userPointEpoch(uint256 tokenId) external view returns (uint256);
function ownerOf(uint256) external view returns (address);
function isApprovedOrOwner(address, uint256) external view returns (bool);
function transferFrom(address, address, uint256) external;
function voting(uint256 tokenId) external;
function abstain(uint256 tokenId) external;
function attach(uint256 tokenId) external;
function detach(uint256 tokenId) external;
function checkpoint() external;
function depositFor(uint256 tokenId, uint256 value) external;
function createLockFor(
uint256,
uint256,
address
) external returns (uint256);
function balanceOfNFT(uint256) external view returns (uint256);
function balanceOfNFTAt(uint256, uint256) external view returns (uint256);
function totalSupply() external view returns (uint256);
function locked__end(uint256) external view returns (uint256);
function balanceOf(address) external view returns (uint256);
function tokenOfOwnerByIndex(
address,
uint256
) external view returns (uint256);
function increaseUnlockTime(uint256 tokenID, uint256 duration) external;
function locked(
uint256 tokenID
) external view returns (uint256 amount, uint256 unlockTime);
function increaseAmount(uint256 _tokenId, uint256 _value) external;
function isDelegate(
address _operator,
uint256 _tokenId
) external view returns (bool);
}{
"optimizer": {
"enabled": true,
"runs": 800
},
"evmVersion": "paris",
"viaIR": true,
"metadata": {
"bytecodeHash": "none"
},
"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":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"weekly","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"growth","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_value","type":"address"}],"name":"SetVeDist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_value","type":"address"}],"name":"SetVoter","type":"event"},{"inputs":[],"name":"activePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minted","type":"uint256"}],"name":"calculateGrowth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commandCenter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emissionsToken","outputs":[{"internalType":"contract IEmissionsToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_voter","type":"address"},{"internalType":"address","name":"_ve","type":"address"},{"internalType":"address","name":"_rewardsDistributor","type":"address"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"address","name":"_msig","type":"address"},{"internalType":"address","name":"_timelock","type":"address"},{"internalType":"address","name":"_commandCenter","type":"address"},{"internalType":"uint256","name":"_incentivesSize","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initiateEpochZero","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"msig","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_commandCenter","type":"address"}],"name":"reinitializeCommandCenter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsDistributor","outputs":[{"internalType":"contract IRewardsDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newCommandCenter","type":"address"}],"name":"updateCommandCenter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_flation","type":"uint256"}],"name":"updateFlation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newGrowthCap","type":"uint256"}],"name":"updateGrowthCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_incentivesSize","type":"uint256"}],"name":"updateIncentivesSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_timelock","type":"address"}],"name":"updateTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ve","outputs":[{"internalType":"contract IVotingEscrow","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"voter","outputs":[{"internalType":"contract IVoter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weekly","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weeklyEmission","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608080604052346100c1576000549060ff8260081c1661006f575060ff80821603610034575b60405161103790816100c78239f35b60ff90811916176000557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498602060405160ff8152a138610025565b62461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608490fd5b600080fdfe608060409080825260048036101561001657600080fd5b600092833560e01c9283630a441f7b14610e0e575082631f85071614610de6578263210ca05d14610dbe57826326cfc17b14610da057826337fa221b14610d785782633f2a554014610d5057826346c96aac14610d28578263621cb1cf14610a2957826373964119146109f957826376d4b2be146109585782637bb453bf14610930578263953e092f14610900578263a83627de146104c3578263a890c9101461047c578263c4e3a63b1461045d578263ce37fa6614610210578263d33219b4146101e8578263d70142fb146101bb578263e4a091da1461019557508163e923ffe414610161575063f8f897871461010d57600080fd5b3461015e57602036600319011261015e5761015b610129610e2a565b61013f6001600160a01b03600754163314610f9d565b6001600160a01b03166001600160a01b03196009541617600955565b80f35b80fd5b9050346101915760203660031901126101915761018a6001600160a01b03600954163314610f03565b3560025580f35b5080fd5b833461015e57602036600319011261015e57506101b460209235610fcf565b9051908152f35b833461015e578060031936011261015e57506103e86101e06020935460015490610f4f565b049051908152f35b8390346101915781600319360112610191576020906001600160a01b03600754169051908152f35b91503461036d578260031936011261036d576001600160a01b03806008541680330361041a576006546103d75762093a8080420490808202918083048214901517156103c45781018091116103b157908186939260055560065581600a5416908454823b156103ad576102b09285928389518096819582946340c10f1960e01b84528c8401602090939291936001600160a01b0360408201951681520152565b03925af190811561038f578391610399575b505080600d5416803b1561036d5782809185875180948193635f72ee1960e11b83525af190811561038f57839161037b575b5050600d5416803b15610191578180918486518094819363326a940760e01b83525af1801561037157610359575b50507f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f90549180519283528360208401523392a280f35b61036290610eb7565b61036d578238610322565b8280fd5b84513d84823e3d90fd5b61038490610eb7565b6101915781386102f4565b85513d85823e3d90fd5b6103a290610eb7565b6101915781386102c2565b8480fd5b634e487b7160e01b865260118452602486fd5b634e487b7160e01b875260118552602487fd5b835162461bcd60e51b8152602081850152600760248201527f53544152544544000000000000000000000000000000000000000000000000006044820152606490fd5b835162461bcd60e51b8152602081850152600560248201527f214d5349470000000000000000000000000000000000000000000000000000006044820152606490fd5b8390346101915781600319360112610191576020906006549051908152f35b833461015e57602036600319011261015e57610496610e2a565b6001600160a01b0319600754916001600160a01b03906104b98285163314610f9d565b1691161760075580f35b9091503461036d578260031936011261036d576005549162093a80908184018085116108ed5742116104fa575b6020848451908152f35b9080935042048381029381850414901517156108da57826005556103e8610525825460015490610f4f565b0480825561053281610fcf565b908101918282116108c557856001600160a01b0380600a54168651956370a0823160e01b875230858801526020968781602481865afa9081156108bb57859161088e575b5081811061079e575b5050506105c2858583600a541684600d5416868b5180968195829463a9059cbb60e01b84528c8401602090939291936001600160a01b0360408201951681520152565b03925af190811561074f578391610781575b50156101915780600d5416803b1561036d5782809185895180948193635f72ee1960e11b83525af1801561074f5790839161076d575b505080600d5416803b1561036d578280918589518094819363326a940760e01b83525af1801561074f57908391610759575b50506106818582600a541683600b541690865491868b5180968195829463095ea7b360e01b84528c8401602090939291936001600160a01b0360408201951681520152565b03925af1801561074f57610722575b50600b5416825490803b1561036d576024839288519485938492633c6b16ab60e01b8452888401525af1801561071857610700575b5060209550549183519283528201527f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f823392a238806104f0565b61070a8791610eb7565b61071457856106c5565b8580fd5b85513d89823e3d90fd5b61074190863d8811610748575b6107398183610ee1565b810190610f85565b5038610690565b503d61072f565b87513d85823e3d90fd5b61076290610eb7565b61019157813861063c565b61077690610eb7565b61019157813861060a565b6107989150863d8811610748576107398183610ee1565b386105d4565b6107a791610f78565b90803b1561088a5783885180928183816107e56340c10f1960e01b98898352308d8401602090939291936001600160a01b0360408201951681520152565b03925af180156108805790849161086c575b505081600a54169082600954169160035490803b1561071457610840938680948c519687958694859384528c8401602090939291936001600160a01b0360408201951681520152565b03925af1801561074f57908391610858575b8061057f565b61086190610eb7565b610191578138610852565b61087590610eb7565b61036d5782386107f7565b88513d86823e3d90fd5b8380fd5b90508781813d83116108b4575b6108a58183610ee1565b810103126103ad575138610576565b503d61089b565b89513d87823e3d90fd5b601190634e487b7160e01b6000525260246000fd5b634e487b7160e01b845260119052602483fd5b634e487b7160e01b865260118252602486fd5b838234610191576020366003190112610191576109296001600160a01b03600954163314610f03565b3560015580f35b8390346101915781600319360112610191576020906001600160a01b03600854169051908152f35b8390346101915760203660031901126101915760207f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498916109da61099a610e2a565b610102865460ff8160081c1615806109ec575b6109b690610e45565b61ffff19161786556001600160a01b03166001600160a01b03196009541617600955565b835461ff00191684555160028152a180f35b50600260ff8216106109ad565b83823461019157602036600319011261019157610a226001600160a01b03600954163314610f03565b3560035580f35b91503461036d5761010036600319011261036d57610a45610e2a565b602435916001600160a01b0391828416809403610714578560443593808516809503610191576064359060843593818516978886036103ad5760a435908382168092036107145760c43598848a16809a03610d245786549960ff8b60081c16159a8b809c610d17575b8015610d00575b610abe90610e45565b60ff19811660011789558b610cef575b508c519363210ca05d60e01b855260209c8d868d81885afa958615610ce4578e9689918c91610c9c575b50928794927fc6ff127433b785c51da9ae4088ee184c909b1a55b9afd82ae6c64224d3bc15d299927f427d619a0a9852319231312bf3a2f7e361f12399aae2c315cc710a8055cc6ba39795169a6001600160a01b0319938c85600a541617600a5516978884600b541617600b5583600c541617600c558483600d541617600d5582600854161760085581600754161760075560095416176009558d51908152a18a51908152a181610c28575b50505050683635c9adc5dea00000905560e4356003556103de60015560fa6002557f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600555610bf1578280f35b7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989161ff001984541684555160018152a138808280f35b803b1561036d5787516340c10f1960e01b81526001600160a01b039094168585019081526020810192909252839182908490829060400103925af18015610c9257610c76575b858180610ba4565b94610c8b683635c9adc5dea000009296610eb7565b9490610c6e565b85513d88823e3d90fd5b929593978092508391503d8311610cdd575b610cb88183610ee1565b81010312610cd95751918783168303610cd9578d9591939092889087610af8565b8980fd5b503d610cae565b508e513d8b823e3d90fd5b61ffff191661010117885538610ace565b50303b158015610ab5575060ff8116600114610ab5565b50600160ff821610610aae565b8680fd5b8390346101915781600319360112610191576020906001600160a01b03600b54169051908152f35b8390346101915781600319360112610191576020906001600160a01b03600d54169051908152f35b8390346101915781600319360112610191576020906001600160a01b03600954169051908152f35b91503461036d578260031936011261036d5760209250549051908152f35b8390346101915781600319360112610191576020906001600160a01b03600a54169051908152f35b8390346101915781600319360112610191576020906001600160a01b03600c54169051908152f35b8490346101915781600319360112610191576020906005548152f35b600435906001600160a01b0382168203610e4057565b600080fd5b15610e4c57565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608490fd5b67ffffffffffffffff8111610ecb57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610ecb57604052565b15610f0a57565b60405162461bcd60e51b815260206004820152600e60248201527f21636f6d6d616e6443656e7465720000000000000000000000000000000000006044820152606490fd5b81810292918115918404141715610f6257565b634e487b7160e01b600052601160045260246000fd5b91908203918211610f6257565b90816020910312610e4057518015158103610e405790565b15610fa457565b60405162461bcd60e51b815260206004820152600360248201526208551360ea1b6044820152606490fd5b610fe662093a808060055404906006540490610f78565b60198101809111610f6257600a810290808204600a1490151715610f62576103e89161101f916002548082106000146110235750610f4f565b0490565b9050610f4f56fea164736f6c6343000816000a
Deployed Bytecode
0x608060409080825260048036101561001657600080fd5b600092833560e01c9283630a441f7b14610e0e575082631f85071614610de6578263210ca05d14610dbe57826326cfc17b14610da057826337fa221b14610d785782633f2a554014610d5057826346c96aac14610d28578263621cb1cf14610a2957826373964119146109f957826376d4b2be146109585782637bb453bf14610930578263953e092f14610900578263a83627de146104c3578263a890c9101461047c578263c4e3a63b1461045d578263ce37fa6614610210578263d33219b4146101e8578263d70142fb146101bb578263e4a091da1461019557508163e923ffe414610161575063f8f897871461010d57600080fd5b3461015e57602036600319011261015e5761015b610129610e2a565b61013f6001600160a01b03600754163314610f9d565b6001600160a01b03166001600160a01b03196009541617600955565b80f35b80fd5b9050346101915760203660031901126101915761018a6001600160a01b03600954163314610f03565b3560025580f35b5080fd5b833461015e57602036600319011261015e57506101b460209235610fcf565b9051908152f35b833461015e578060031936011261015e57506103e86101e06020935460015490610f4f565b049051908152f35b8390346101915781600319360112610191576020906001600160a01b03600754169051908152f35b91503461036d578260031936011261036d576001600160a01b03806008541680330361041a576006546103d75762093a8080420490808202918083048214901517156103c45781018091116103b157908186939260055560065581600a5416908454823b156103ad576102b09285928389518096819582946340c10f1960e01b84528c8401602090939291936001600160a01b0360408201951681520152565b03925af190811561038f578391610399575b505080600d5416803b1561036d5782809185875180948193635f72ee1960e11b83525af190811561038f57839161037b575b5050600d5416803b15610191578180918486518094819363326a940760e01b83525af1801561037157610359575b50507f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f90549180519283528360208401523392a280f35b61036290610eb7565b61036d578238610322565b8280fd5b84513d84823e3d90fd5b61038490610eb7565b6101915781386102f4565b85513d85823e3d90fd5b6103a290610eb7565b6101915781386102c2565b8480fd5b634e487b7160e01b865260118452602486fd5b634e487b7160e01b875260118552602487fd5b835162461bcd60e51b8152602081850152600760248201527f53544152544544000000000000000000000000000000000000000000000000006044820152606490fd5b835162461bcd60e51b8152602081850152600560248201527f214d5349470000000000000000000000000000000000000000000000000000006044820152606490fd5b8390346101915781600319360112610191576020906006549051908152f35b833461015e57602036600319011261015e57610496610e2a565b6001600160a01b0319600754916001600160a01b03906104b98285163314610f9d565b1691161760075580f35b9091503461036d578260031936011261036d576005549162093a80908184018085116108ed5742116104fa575b6020848451908152f35b9080935042048381029381850414901517156108da57826005556103e8610525825460015490610f4f565b0480825561053281610fcf565b908101918282116108c557856001600160a01b0380600a54168651956370a0823160e01b875230858801526020968781602481865afa9081156108bb57859161088e575b5081811061079e575b5050506105c2858583600a541684600d5416868b5180968195829463a9059cbb60e01b84528c8401602090939291936001600160a01b0360408201951681520152565b03925af190811561074f578391610781575b50156101915780600d5416803b1561036d5782809185895180948193635f72ee1960e11b83525af1801561074f5790839161076d575b505080600d5416803b1561036d578280918589518094819363326a940760e01b83525af1801561074f57908391610759575b50506106818582600a541683600b541690865491868b5180968195829463095ea7b360e01b84528c8401602090939291936001600160a01b0360408201951681520152565b03925af1801561074f57610722575b50600b5416825490803b1561036d576024839288519485938492633c6b16ab60e01b8452888401525af1801561071857610700575b5060209550549183519283528201527f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f823392a238806104f0565b61070a8791610eb7565b61071457856106c5565b8580fd5b85513d89823e3d90fd5b61074190863d8811610748575b6107398183610ee1565b810190610f85565b5038610690565b503d61072f565b87513d85823e3d90fd5b61076290610eb7565b61019157813861063c565b61077690610eb7565b61019157813861060a565b6107989150863d8811610748576107398183610ee1565b386105d4565b6107a791610f78565b90803b1561088a5783885180928183816107e56340c10f1960e01b98898352308d8401602090939291936001600160a01b0360408201951681520152565b03925af180156108805790849161086c575b505081600a54169082600954169160035490803b1561071457610840938680948c519687958694859384528c8401602090939291936001600160a01b0360408201951681520152565b03925af1801561074f57908391610858575b8061057f565b61086190610eb7565b610191578138610852565b61087590610eb7565b61036d5782386107f7565b88513d86823e3d90fd5b8380fd5b90508781813d83116108b4575b6108a58183610ee1565b810103126103ad575138610576565b503d61089b565b89513d87823e3d90fd5b601190634e487b7160e01b6000525260246000fd5b634e487b7160e01b845260119052602483fd5b634e487b7160e01b865260118252602486fd5b838234610191576020366003190112610191576109296001600160a01b03600954163314610f03565b3560015580f35b8390346101915781600319360112610191576020906001600160a01b03600854169051908152f35b8390346101915760203660031901126101915760207f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498916109da61099a610e2a565b610102865460ff8160081c1615806109ec575b6109b690610e45565b61ffff19161786556001600160a01b03166001600160a01b03196009541617600955565b835461ff00191684555160028152a180f35b50600260ff8216106109ad565b83823461019157602036600319011261019157610a226001600160a01b03600954163314610f03565b3560035580f35b91503461036d5761010036600319011261036d57610a45610e2a565b602435916001600160a01b0391828416809403610714578560443593808516809503610191576064359060843593818516978886036103ad5760a435908382168092036107145760c43598848a16809a03610d245786549960ff8b60081c16159a8b809c610d17575b8015610d00575b610abe90610e45565b60ff19811660011789558b610cef575b508c519363210ca05d60e01b855260209c8d868d81885afa958615610ce4578e9689918c91610c9c575b50928794927fc6ff127433b785c51da9ae4088ee184c909b1a55b9afd82ae6c64224d3bc15d299927f427d619a0a9852319231312bf3a2f7e361f12399aae2c315cc710a8055cc6ba39795169a6001600160a01b0319938c85600a541617600a5516978884600b541617600b5583600c541617600c558483600d541617600d5582600854161760085581600754161760075560095416176009558d51908152a18a51908152a181610c28575b50505050683635c9adc5dea00000905560e4356003556103de60015560fa6002557f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600555610bf1578280f35b7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989161ff001984541684555160018152a138808280f35b803b1561036d5787516340c10f1960e01b81526001600160a01b039094168585019081526020810192909252839182908490829060400103925af18015610c9257610c76575b858180610ba4565b94610c8b683635c9adc5dea000009296610eb7565b9490610c6e565b85513d88823e3d90fd5b929593978092508391503d8311610cdd575b610cb88183610ee1565b81010312610cd95751918783168303610cd9578d9591939092889087610af8565b8980fd5b503d610cae565b508e513d8b823e3d90fd5b61ffff191661010117885538610ace565b50303b158015610ab5575060ff8116600114610ab5565b50600160ff821610610aae565b8680fd5b8390346101915781600319360112610191576020906001600160a01b03600b54169051908152f35b8390346101915781600319360112610191576020906001600160a01b03600d54169051908152f35b8390346101915781600319360112610191576020906001600160a01b03600954169051908152f35b91503461036d578260031936011261036d5760209250549051908152f35b8390346101915781600319360112610191576020906001600160a01b03600a54169051908152f35b8390346101915781600319360112610191576020906001600160a01b03600c54169051908152f35b8490346101915781600319360112610191576020906005548152f35b600435906001600160a01b0382168203610e4057565b600080fd5b15610e4c57565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608490fd5b67ffffffffffffffff8111610ecb57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610ecb57604052565b15610f0a57565b60405162461bcd60e51b815260206004820152600e60248201527f21636f6d6d616e6443656e7465720000000000000000000000000000000000006044820152606490fd5b81810292918115918404141715610f6257565b634e487b7160e01b600052601160045260246000fd5b91908203918211610f6257565b90816020910312610e4057518015158103610e405790565b15610fa457565b60405162461bcd60e51b815260206004820152600360248201526208551360ea1b6044820152606490fd5b610fe662093a808060055404906006540490610f78565b60198101809111610f6257600a810290808204600a1490151715610f62576103e89161101f916002548082106000146110235750610f4f565b0490565b9050610f4f56fea164736f6c6343000816000a
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
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.