Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 1,144 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Claim | 16187626 | 1071 days ago | IN | 0 ETH | 0.00047194 | ||||
| Claim | 15977485 | 1101 days ago | IN | 0 ETH | 0.00067894 | ||||
| Claim | 15713512 | 1138 days ago | IN | 0 ETH | 0.00671275 | ||||
| Claim | 15712945 | 1138 days ago | IN | 0 ETH | 0.01586562 | ||||
| Claim | 15712940 | 1138 days ago | IN | 0 ETH | 0.01702474 | ||||
| Claim | 15712618 | 1138 days ago | IN | 0 ETH | 0.00964304 | ||||
| Claim | 15712371 | 1138 days ago | IN | 0 ETH | 0.00808558 | ||||
| Claim | 15712273 | 1138 days ago | IN | 0 ETH | 0.00623551 | ||||
| Claim | 15711857 | 1138 days ago | IN | 0 ETH | 0.00547858 | ||||
| Claim | 15711725 | 1138 days ago | IN | 0 ETH | 0.00159555 | ||||
| Claim | 15711225 | 1138 days ago | IN | 0 ETH | 0.00758296 | ||||
| Claim | 15710421 | 1138 days ago | IN | 0 ETH | 0.00557402 | ||||
| Claim | 15706920 | 1138 days ago | IN | 0 ETH | 0.0063753 | ||||
| Claim | 15703244 | 1139 days ago | IN | 0 ETH | 0.00317744 | ||||
| Claim | 15700304 | 1139 days ago | IN | 0 ETH | 0.00315303 | ||||
| Claim | 15696412 | 1140 days ago | IN | 0 ETH | 0.00416698 | ||||
| Claim | 15695068 | 1140 days ago | IN | 0 ETH | 0.00055402 | ||||
| Claim | 15694299 | 1140 days ago | IN | 0 ETH | 0.00170083 | ||||
| Claim | 15690504 | 1141 days ago | IN | 0 ETH | 0.00461791 | ||||
| Claim | 15689221 | 1141 days ago | IN | 0 ETH | 0.00295439 | ||||
| Claim | 15688888 | 1141 days ago | IN | 0 ETH | 0.00077656 | ||||
| Claim | 15686867 | 1141 days ago | IN | 0 ETH | 0.00139616 | ||||
| Claim | 15680920 | 1142 days ago | IN | 0 ETH | 0.00117311 | ||||
| Claim | 15679778 | 1142 days ago | IN | 0 ETH | 0.00238904 | ||||
| Claim | 15679585 | 1142 days ago | IN | 0 ETH | 0.00296167 |
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
OptionalLockupDistributor
Compiler Version
v0.8.11+commit.d7f03943
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2022-07-11
*/
// SPDX-License-Identifier: MIT
/*
* @title OGV Optional Lockup Merkle Distributor
* @author Origin Protocol Labs
*
* Origin Protocol
* https://originprotocol.com
* https://ousd.com
*
* Released under the MIT license
* https://github.com/OriginProtocol/origin-dollar
* https://github.com/OriginProtocol/ousd-governance
*
* Copyright 2022 Origin Protocol Labs
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity ^0.8.4;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20Upgradeable {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev 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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20MetadataUpgradeable is IERC20Upgradeable {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)
/**
* @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
* ====
*
* [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://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return 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");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
/**
* @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]
* ```
* 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. Equivalent to `reinitializer(1)`.
*/
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.
*
* `initializer` is equivalent to `reinitializer(1)`, so 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.
*
* 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.
*/
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.
*/
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 Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
__ERC20_init_unchained(name_, symbol_);
}
function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_balances[to] += amount;
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[45] private __gap;
}
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {
function __ERC20Burnable_init() internal onlyInitializing {
}
function __ERC20Burnable_init_unchained() internal onlyInitializing {
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = _efficientHash(computedHash, proofElement);
} else {
// Hash(current element of the proof + current computed hash)
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
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);
}
abstract contract AbstractLockupDistributor {
//@notice This event is triggered whenever a call to #claim succeeds.
event Claimed(uint256 indexed index, address indexed account, uint256 amount);
event OGVBurned(uint256 amount);
address public immutable token;
bytes32 public immutable merkleRoot;
address public immutable stakingContract;
uint256 public immutable endBlock;
// This is a packed array of booleans.
mapping(uint256 => uint256) private claimedBitMap;
constructor(
address _token,
bytes32 _merkleRoot,
address _stakingContract,
uint256 _endBlock
) {
token = _token;
merkleRoot = _merkleRoot;
stakingContract = _stakingContract;
endBlock = _endBlock;
}
/**
* @dev
* @param _index Index in the tree
*/
function isClaimed(uint256 _index) public view returns (bool) {
uint256 claimedWordIndex = _index / 256;
uint256 claimedBitIndex = _index % 256;
uint256 claimedWord = claimedBitMap[claimedWordIndex];
uint256 mask = (1 << claimedBitIndex);
return claimedWord & mask == mask;
}
/**
* @dev
* @param _index Index in the tree
*/
function setClaimed(uint256 _index) internal {
uint256 claimedWordIndex = _index / 256;
uint256 claimedBitIndex = _index % 256;
claimedBitMap[claimedWordIndex] =
claimedBitMap[claimedWordIndex] |
(1 << claimedBitIndex);
}
function isProofValid(
uint256 _index,
uint256 _amount,
address _account,
bytes32[] calldata _merkleProof
) external view returns (bool) {
// Verify the Merkle proof.
bytes32 node = keccak256(abi.encodePacked(_index, _account, _amount));
return MerkleProof.verify(_merkleProof, merkleRoot, node);
}
/**
* @dev burn all the remaining OGV balance
*/
function burnRemainingOGV() external {
require(block.number >= endBlock, "Can not yet burn the remaining OGV");
uint256 burnAmount = IERC20(token).balanceOf(address(this));
ERC20BurnableUpgradeable(token).burn(burnAmount);
emit OGVBurned(burnAmount);
}
}
interface IOGVStaking {
function stake(
uint256 amount,
uint256 end,
address _account
) external;
}
contract OptionalLockupDistributor is AbstractLockupDistributor {
constructor(
address _token,
bytes32 _merkleRoot,
address _stakingContract,
uint256 _endBlock
) AbstractLockupDistributor(_token, _merkleRoot, _stakingContract, _endBlock) {}
/**
* @dev Execute a claim using a merkle proof with optional stake in the staking contract.
* @param _index Index in the tree
* @param _amount Amount eligiblle to claim
* @param _merkleProof The proof
* @param _stakeDuration Duration of the stake to create
*/
function claim(
uint256 _index,
uint256 _amount,
bytes32[] calldata _merkleProof,
uint256 _stakeDuration
) external {
require(!isClaimed(_index), "MerkleDistributor: Drop already claimed.");
require(block.number < endBlock, "Can no longer claim. Claim period expired");
// Verify the merkle proof.
bytes32 node = keccak256(abi.encodePacked(_index, msg.sender, _amount));
require(
MerkleProof.verify(_merkleProof, merkleRoot, node),
"MerkleDistributor: Invalid proof."
);
// Mark it claimed and send the token.
setClaimed(_index);
if (_stakeDuration > 0) {
IERC20(token).approve(stakingContract, _amount);
// stakingContract.stake(_amount, _stakeDuration, msg.sender),
IOGVStaking(stakingContract).stake(
_amount,
_stakeDuration,
msg.sender
);
} else {
require(
IERC20(token).transfer(msg.sender, _amount),
"MerkleDistributor: Transfer failed."
);
}
emit Claimed(_index, msg.sender, _amount);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"address","name":"_stakingContract","type":"address"},{"internalType":"uint256","name":"_endBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"OGVBurned","type":"event"},{"inputs":[],"name":"burnRemainingOGV","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_stakeDuration","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"isProofValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
61010060405234801561001157600080fd5b50604051610ceb380380610ceb8339810160408190526100309161006e565b6001600160a01b0393841660805260a09290925290911660c05260e0526100b2565b80516001600160a01b038116811461006957600080fd5b919050565b6000806000806080858703121561008457600080fd5b61008d85610052565b9350602085015192506100a260408601610052565b6060959095015193969295505050565b60805160a05160c05160e051610bbc61012f600039600081816092015281816101a90152610415015260008181610146015281816105ba015261067a01526000818160cc0152818161051301526108930152600081816101850152818161023f015281816102cb015281816105e901526106ff0152610bbc6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063a4fa47a31161005b578063a4fa47a31461011b578063cb26baeb1461012e578063ee99205c14610141578063fc0c546a1461018057600080fd5b8063083c63231461008d5780632eb4a7ab146100c75780638f6f6966146100ee5780639e34070f146100f8575b600080fd5b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6100f66101a7565b005b61010b610106366004610991565b61036b565b60405190151581526020016100be565b6100f66101293660046109f6565b6103ac565b61010b61013c366004610a51565b61080b565b6101687f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100be565b6101687f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000004310156102275760405162461bcd60e51b815260206004820152602260248201527f43616e206e6f7420796574206275726e207468652072656d61696e696e67204f60448201526123ab60f11b60648201526084015b60405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610ac7565b604051630852cd8d60e31b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561031757600080fd5b505af115801561032b573d6000803e3d6000fd5b505050507f6c503bd76738aacb466b50f0e1e1a98baeb5c216e2f170a86c048cea6bbb16148160405161036091815260200190565b60405180910390a150565b60008061037a61010084610af6565b9050600061038a61010085610b0a565b60009283526020839052604090922054600190921b9182169091149392505050565b6103b58561036b565b156104135760405162461bcd60e51b815260206004820152602860248201527f4d65726b6c654469737472696275746f723a2044726f7020616c72656164792060448201526731b630b4b6b2b21760c11b606482015260840161021e565b7f000000000000000000000000000000000000000000000000000000000000000043106104945760405162461bcd60e51b815260206004820152602960248201527f43616e206e6f206c6f6e67657220636c61696d2e20436c61696d20706572696f6044820152681908195e1c1a5c995960ba1b606482015260840161021e565b60408051602081018790526bffffffffffffffffffffffff193360601b16918101919091526054810185905260009060740160405160208183030381529060405280519060200120905061053e8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506108c99050565b6105945760405162461bcd60e51b815260206004820152602160248201527f4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f666044820152601760f91b606482015260840161021e565b61059d866108df565b81156106e35760405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018790527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af1158015610632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106569190610b1e565b50604051637628a37d60e01b815260048101869052602481018390523360448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637628a37d90606401600060405180830381600087803b1580156106c657600080fd5b505af11580156106da573d6000803e3d6000fd5b505050506107cc565b60405163a9059cbb60e01b8152336004820152602481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610750573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107749190610b1e565b6107cc5760405162461bcd60e51b815260206004820152602360248201527f4d65726b6c654469737472696275746f723a205472616e73666572206661696c60448201526232b21760e91b606482015260840161021e565b604051858152339087907f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269060200160405180910390a3505050505050565b6000808685876040516020016108469392919092835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6040516020818303038152906040528051906020012090506108be8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506108c99050565b979650505050505050565b6000826108d6858461091d565b14949350505050565b60006108ed61010083610af6565b905060006108fd61010084610b0a565b6000928352602083905260409092208054600190931b9092179091555050565b600081815b845181101561098957600085828151811061093f5761093f610b47565b602002602001015190508083116109655760008381526020829052604090209250610976565b600081815260208490526040902092505b508061098181610b5d565b915050610922565b509392505050565b6000602082840312156109a357600080fd5b5035919050565b60008083601f8401126109bc57600080fd5b50813567ffffffffffffffff8111156109d457600080fd5b6020830191508360208260051b85010111156109ef57600080fd5b9250929050565b600080600080600060808688031215610a0e57600080fd5b8535945060208601359350604086013567ffffffffffffffff811115610a3357600080fd5b610a3f888289016109aa565b96999598509660600135949350505050565b600080600080600060808688031215610a6957600080fd5b853594506020860135935060408601356001600160a01b0381168114610a8e57600080fd5b9250606086013567ffffffffffffffff811115610aaa57600080fd5b610ab6888289016109aa565b969995985093965092949392505050565b600060208284031215610ad957600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b600082610b0557610b05610ae0565b500490565b600082610b1957610b19610ae0565b500690565b600060208284031215610b3057600080fd5b81518015158114610b4057600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610b7f57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220dd9e46d9db0ddeab340a52a6fffe3badf6a1b6a7a470d93afd2ef7d89c85a48464736f6c634300080b00330000000000000000000000009c354503c38481a7a7a51629142963f98ecc12d0d673d841af2fb506b28a4783c7c471172b3d2f1c4f54bb57cfd4277bbe83509b0000000000000000000000000c4576ca1c365868e162554af8e385dc3e7c66d90000000000000000000000000000000000000000000000000000000000efc560
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063a4fa47a31161005b578063a4fa47a31461011b578063cb26baeb1461012e578063ee99205c14610141578063fc0c546a1461018057600080fd5b8063083c63231461008d5780632eb4a7ab146100c75780638f6f6966146100ee5780639e34070f146100f8575b600080fd5b6100b47f0000000000000000000000000000000000000000000000000000000000efc56081565b6040519081526020015b60405180910390f35b6100b47fd673d841af2fb506b28a4783c7c471172b3d2f1c4f54bb57cfd4277bbe83509b81565b6100f66101a7565b005b61010b610106366004610991565b61036b565b60405190151581526020016100be565b6100f66101293660046109f6565b6103ac565b61010b61013c366004610a51565b61080b565b6101687f0000000000000000000000000c4576ca1c365868e162554af8e385dc3e7c66d981565b6040516001600160a01b0390911681526020016100be565b6101687f0000000000000000000000009c354503c38481a7a7a51629142963f98ecc12d081565b7f0000000000000000000000000000000000000000000000000000000000efc5604310156102275760405162461bcd60e51b815260206004820152602260248201527f43616e206e6f7420796574206275726e207468652072656d61696e696e67204f60448201526123ab60f11b60648201526084015b60405180910390fd5b6040516370a0823160e01b81523060048201526000907f0000000000000000000000009c354503c38481a7a7a51629142963f98ecc12d06001600160a01b0316906370a0823190602401602060405180830381865afa15801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610ac7565b604051630852cd8d60e31b8152600481018290529091507f0000000000000000000000009c354503c38481a7a7a51629142963f98ecc12d06001600160a01b0316906342966c6890602401600060405180830381600087803b15801561031757600080fd5b505af115801561032b573d6000803e3d6000fd5b505050507f6c503bd76738aacb466b50f0e1e1a98baeb5c216e2f170a86c048cea6bbb16148160405161036091815260200190565b60405180910390a150565b60008061037a61010084610af6565b9050600061038a61010085610b0a565b60009283526020839052604090922054600190921b9182169091149392505050565b6103b58561036b565b156104135760405162461bcd60e51b815260206004820152602860248201527f4d65726b6c654469737472696275746f723a2044726f7020616c72656164792060448201526731b630b4b6b2b21760c11b606482015260840161021e565b7f0000000000000000000000000000000000000000000000000000000000efc56043106104945760405162461bcd60e51b815260206004820152602960248201527f43616e206e6f206c6f6e67657220636c61696d2e20436c61696d20706572696f6044820152681908195e1c1a5c995960ba1b606482015260840161021e565b60408051602081018790526bffffffffffffffffffffffff193360601b16918101919091526054810185905260009060740160405160208183030381529060405280519060200120905061053e8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507fd673d841af2fb506b28a4783c7c471172b3d2f1c4f54bb57cfd4277bbe83509b92508591506108c99050565b6105945760405162461bcd60e51b815260206004820152602160248201527f4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f666044820152601760f91b606482015260840161021e565b61059d866108df565b81156106e35760405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000c4576ca1c365868e162554af8e385dc3e7c66d981166004830152602482018790527f0000000000000000000000009c354503c38481a7a7a51629142963f98ecc12d0169063095ea7b3906044016020604051808303816000875af1158015610632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106569190610b1e565b50604051637628a37d60e01b815260048101869052602481018390523360448201527f0000000000000000000000000c4576ca1c365868e162554af8e385dc3e7c66d96001600160a01b031690637628a37d90606401600060405180830381600087803b1580156106c657600080fd5b505af11580156106da573d6000803e3d6000fd5b505050506107cc565b60405163a9059cbb60e01b8152336004820152602481018690527f0000000000000000000000009c354503c38481a7a7a51629142963f98ecc12d06001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610750573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107749190610b1e565b6107cc5760405162461bcd60e51b815260206004820152602360248201527f4d65726b6c654469737472696275746f723a205472616e73666572206661696c60448201526232b21760e91b606482015260840161021e565b604051858152339087907f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269060200160405180910390a3505050505050565b6000808685876040516020016108469392919092835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6040516020818303038152906040528051906020012090506108be8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507fd673d841af2fb506b28a4783c7c471172b3d2f1c4f54bb57cfd4277bbe83509b92508591506108c99050565b979650505050505050565b6000826108d6858461091d565b14949350505050565b60006108ed61010083610af6565b905060006108fd61010084610b0a565b6000928352602083905260409092208054600190931b9092179091555050565b600081815b845181101561098957600085828151811061093f5761093f610b47565b602002602001015190508083116109655760008381526020829052604090209250610976565b600081815260208490526040902092505b508061098181610b5d565b915050610922565b509392505050565b6000602082840312156109a357600080fd5b5035919050565b60008083601f8401126109bc57600080fd5b50813567ffffffffffffffff8111156109d457600080fd5b6020830191508360208260051b85010111156109ef57600080fd5b9250929050565b600080600080600060808688031215610a0e57600080fd5b8535945060208601359350604086013567ffffffffffffffff811115610a3357600080fd5b610a3f888289016109aa565b96999598509660600135949350505050565b600080600080600060808688031215610a6957600080fd5b853594506020860135935060408601356001600160a01b0381168114610a8e57600080fd5b9250606086013567ffffffffffffffff811115610aaa57600080fd5b610ab6888289016109aa565b969995985093965092949392505050565b600060208284031215610ad957600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b600082610b0557610b05610ae0565b500490565b600082610b1957610b19610ae0565b500690565b600060208284031215610b3057600080fd5b81518015158114610b4057600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610b7f57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220dd9e46d9db0ddeab340a52a6fffe3badf6a1b6a7a470d93afd2ef7d89c85a48464736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009c354503c38481a7a7a51629142963f98ecc12d0d673d841af2fb506b28a4783c7c471172b3d2f1c4f54bb57cfd4277bbe83509b0000000000000000000000000c4576ca1c365868e162554af8e385dc3e7c66d90000000000000000000000000000000000000000000000000000000000efc560
-----Decoded View---------------
Arg [0] : _token (address): 0x9c354503C38481a7A7a51629142963F98eCC12D0
Arg [1] : _merkleRoot (bytes32): 0xd673d841af2fb506b28a4783c7c471172b3d2f1c4f54bb57cfd4277bbe83509b
Arg [2] : _stakingContract (address): 0x0C4576Ca1c365868E162554AF8e385dc3e7C66D9
Arg [3] : _endBlock (uint256): 15713632
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000009c354503c38481a7a7a51629142963f98ecc12d0
Arg [1] : d673d841af2fb506b28a4783c7c471172b3d2f1c4f54bb57cfd4277bbe83509b
Arg [2] : 0000000000000000000000000c4576ca1c365868e162554af8e385dc3e7c66d9
Arg [3] : 0000000000000000000000000000000000000000000000000000000000efc560
Deployed Bytecode Sourcemap
42023:1843:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39950:33;;;;;;;;160:25:1;;;148:2;133:18;39950:33:0;;;;;;;;39861:35;;;;;41590:285;;;:::i;:::-;;40454:325;;;;;;:::i;:::-;;:::i;:::-;;;728:14:1;;721:22;703:41;;691:2;676:18;40454:325:0;563:187:1;42621:1242:0;;;;;;:::i;:::-;;:::i;41145:371::-;;;;;;:::i;:::-;;:::i;39903:40::-;;;;;;;;-1:-1:-1;;;;;2691:32:1;;;2673:51;;2661:2;2646:18;39903:40:0;2527:203:1;39824:30:0;;;;;41590:285;41659:8;41643:12;:24;;41635:71;;;;-1:-1:-1;;;41635:71:0;;2937:2:1;41635:71:0;;;2919:21:1;2976:2;2956:18;;;2949:30;3015:34;2995:18;;;2988:62;-1:-1:-1;;;3066:18:1;;;3059:32;3108:19;;41635:71:0;;;;;;;;;41735:38;;-1:-1:-1;;;41735:38:0;;41767:4;41735:38;;;2673:51:1;41714:18:0;;41742:5;-1:-1:-1;;;;;41735:23:0;;;;2646:18:1;;41735:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;41783:48;;-1:-1:-1;;;41783:48:0;;;;;160:25:1;;;41714:59:0;;-1:-1:-1;41808:5:0;-1:-1:-1;;;;;41783:36:0;;;;133:18:1;;41783:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41844:21;41854:10;41844:21;;;;160:25:1;;148:2;133:18;;14:177;41844:21:0;;;;;;;;41627:248;41590:285::o;40454:325::-;40510:4;;40554:12;40563:3;40554:6;:12;:::i;:::-;40527:39;-1:-1:-1;40577:23:0;40603:12;40612:3;40603:6;:12;:::i;:::-;40626:19;40648:31;;;;;;;;;;;;40706:1;:20;;;40745:18;;;:26;;;;40454:325;-1:-1:-1;;;40454:325:0:o;42621:1242::-;42798:17;42808:6;42798:9;:17::i;:::-;42797:18;42789:71;;;;-1:-1:-1;;;42789:71:0;;3903:2:1;42789:71:0;;;3885:21:1;3942:2;3922:18;;;3915:30;3981:34;3961:18;;;3954:62;-1:-1:-1;;;4032:18:1;;;4025:38;4080:19;;42789:71:0;3701:404:1;42789:71:0;42894:8;42879:12;:23;42871:77;;;;-1:-1:-1;;;42871:77:0;;4312:2:1;42871:77:0;;;4294:21:1;4351:2;4331:18;;;4324:30;4390:34;4370:18;;;4363:62;-1:-1:-1;;;4441:18:1;;;4434:39;4490:19;;42871:77:0;4110:405:1;42871:77:0;43023:45;;;;;;4705:19:1;;;-1:-1:-1;;43048:10:0;4762:2:1;4758:15;4754:53;4740:12;;;4733:75;;;;4824:12;;;4817:28;;;42998:12:0;;4861::1;;43023:45:0;;;;;;;;;;;;43013:56;;;;;;42998:71;;43102:50;43121:12;;43102:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43135:10:0;;-1:-1:-1;43147:4:0;;-1:-1:-1;43102:18:0;;-1:-1:-1;43102:50:0:i;:::-;43080:133;;;;-1:-1:-1;;;43080:133:0;;5086:2:1;43080:133:0;;;5068:21:1;5125:2;5105:18;;;5098:30;5164:34;5144:18;;;5137:62;-1:-1:-1;;;5215:18:1;;;5208:31;5256:19;;43080:133:0;4884:397:1;43080:133:0;43274:18;43285:6;43274:10;:18::i;:::-;43307;;43303:499;;43342:47;;-1:-1:-1;;;43342:47:0;;-1:-1:-1;;;;;43364:15:0;5478:32:1;;43342:47:0;;;5460:51:1;5527:18;;;5520:34;;;43349:5:0;43342:21;;;;5433:18:1;;43342:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;43480:137:0;;-1:-1:-1;;;43480:137:0;;;;;6049:25:1;;;6090:18;;;6083:34;;;43592:10:0;6133:18:1;;;6126:60;43492:15:0;-1:-1:-1;;;;;43480:34:0;;;;6022:18:1;;43480:137:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43303:499;;;43676:43;;-1:-1:-1;;;43676:43:0;;43699:10;43676:43;;;5460:51:1;5527:18;;;5520:34;;;43683:5:0;-1:-1:-1;;;;;43676:22:0;;;;5433:18:1;;43676:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;43650:140;;;;-1:-1:-1;;;43650:140:0;;6399:2:1;43650:140:0;;;6381:21:1;6438:2;6418:18;;;6411:30;6477:34;6457:18;;;6450:62;-1:-1:-1;;;6528:18:1;;;6521:33;6571:19;;43650:140:0;6197:399:1;43650:140:0;43819:36;;160:25:1;;;43835:10:0;;43827:6;;43819:36;;148:2:1;133:18;43819:36:0;;;;;;;42778:1085;42621:1242;;;;;:::o;41145:371::-;41317:4;41371:12;41413:6;41421:8;41431:7;41396:43;;;;;;;;;4705:19:1;;;4762:2;4758:15;;;;-1:-1:-1;;4754:53:1;4749:2;4740:12;;4733:75;4833:2;4824:12;;4817:28;4870:2;4861:12;;4520:359;41396:43:0;;;;;;;;;;;;;41386:54;;;;;;41371:69;;41458:50;41477:12;;41458:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41491:10:0;;-1:-1:-1;41503:4:0;;-1:-1:-1;41458:18:0;;-1:-1:-1;41458:50:0:i;:::-;41451:57;41145:371;-1:-1:-1;;;;;;;41145:371:0:o;35314:190::-;35439:4;35492;35463:25;35476:5;35483:4;35463:12;:25::i;:::-;:33;;35314:190;-1:-1:-1;;;;35314:190:0:o;40858:279::-;40914:24;40941:12;40950:3;40941:6;:12;:::i;:::-;40914:39;-1:-1:-1;40964:23:0;40990:12;40999:3;40990:6;:12;:::i;:::-;41060:13;:31;;;;;;;;;;;;;41108:1;:20;;;41060:69;;;41013:116;;;-1:-1:-1;;40858:279:0:o;35865:675::-;35948:7;35991:4;35948:7;36006:497;36030:5;:12;36026:1;:16;36006:497;;;36064:20;36087:5;36093:1;36087:8;;;;;;;;:::i;:::-;;;;;;;36064:31;;36130:12;36114;:28;36110:382;;36616:13;36666:15;;;36702:4;36695:15;;;36749:4;36733:21;;36242:57;;36110:382;;;36616:13;36666:15;;;36702:4;36695:15;;;36749:4;36733:21;;36419:57;;36110:382;-1:-1:-1;36044:3:0;;;;:::i;:::-;;;;36006:497;;;-1:-1:-1;36520:12:0;35865:675;-1:-1:-1;;;35865:675:0:o;378:180:1:-;437:6;490:2;478:9;469:7;465:23;461:32;458:52;;;506:1;503;496:12;458:52;-1:-1:-1;529:23:1;;378:180;-1:-1:-1;378:180:1:o;755:367::-;818:8;828:6;882:3;875:4;867:6;863:17;859:27;849:55;;900:1;897;890:12;849:55;-1:-1:-1;923:20:1;;966:18;955:30;;952:50;;;998:1;995;988:12;952:50;1035:4;1027:6;1023:17;1011:29;;1095:3;1088:4;1078:6;1075:1;1071:14;1063:6;1059:27;1055:38;1052:47;1049:67;;;1112:1;1109;1102:12;1049:67;755:367;;;;;:::o;1127:642::-;1240:6;1248;1256;1264;1272;1325:3;1313:9;1304:7;1300:23;1296:33;1293:53;;;1342:1;1339;1332:12;1293:53;1378:9;1365:23;1355:33;;1435:2;1424:9;1420:18;1407:32;1397:42;;1490:2;1479:9;1475:18;1462:32;1517:18;1509:6;1506:30;1503:50;;;1549:1;1546;1539:12;1503:50;1588:70;1650:7;1641:6;1630:9;1626:22;1588:70;:::i;:::-;1127:642;;;;-1:-1:-1;1677:8:1;1759:2;1744:18;1731:32;;1127:642;-1:-1:-1;;;;1127:642:1:o;1774:748::-;1887:6;1895;1903;1911;1919;1972:3;1960:9;1951:7;1947:23;1943:33;1940:53;;;1989:1;1986;1979:12;1940:53;2012:23;;;-1:-1:-1;2082:2:1;2067:18;;2054:32;;-1:-1:-1;2136:2:1;2121:18;;2108:32;-1:-1:-1;;;;;2169:31:1;;2159:42;;2149:70;;2215:1;2212;2205:12;2149:70;2238:5;-1:-1:-1;2294:2:1;2279:18;;2266:32;2321:18;2310:30;;2307:50;;;2353:1;2350;2343:12;2307:50;2392:70;2454:7;2445:6;2434:9;2430:22;2392:70;:::i;:::-;1774:748;;;;-1:-1:-1;1774:748:1;;-1:-1:-1;2481:8:1;;2366:96;1774:748;-1:-1:-1;;;1774:748:1:o;3138:184::-;3208:6;3261:2;3249:9;3240:7;3236:23;3232:32;3229:52;;;3277:1;3274;3267:12;3229:52;-1:-1:-1;3300:16:1;;3138:184;-1:-1:-1;3138:184:1:o;3327:127::-;3388:10;3383:3;3379:20;3376:1;3369:31;3419:4;3416:1;3409:15;3443:4;3440:1;3433:15;3459:120;3499:1;3525;3515:35;;3530:18;;:::i;:::-;-1:-1:-1;3564:9:1;;3459:120::o;3584:112::-;3616:1;3642;3632:35;;3647:18;;:::i;:::-;-1:-1:-1;3681:9:1;;3584:112::o;5565:277::-;5632:6;5685:2;5673:9;5664:7;5660:23;5656:32;5653:52;;;5701:1;5698;5691:12;5653:52;5733:9;5727:16;5786:5;5779:13;5772:21;5765:5;5762:32;5752:60;;5808:1;5805;5798:12;5752:60;5831:5;5565:277;-1:-1:-1;;;5565:277:1:o;6601:127::-;6662:10;6657:3;6653:20;6650:1;6643:31;6693:4;6690:1;6683:15;6717:4;6714:1;6707:15;6733:232;6772:3;-1:-1:-1;;6793:17:1;;6790:140;;;6852:10;6847:3;6843:20;6840:1;6833:31;6887:4;6884:1;6877:15;6915:4;6912:1;6905:15;6790:140;-1:-1:-1;6957:1:1;6946:13;;6733:232::o
Swarm Source
ipfs://dd9e46d9db0ddeab340a52a6fffe3badf6a1b6a7a470d93afd2ef7d89c85a484
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| POL | 100.00% | $2,886.1 | 0.025 | $72.15 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.