Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Contract Name:
VaultkaClaimer
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
/// @notice contract that allows a treasury contract to send ERC20 this address and allow users to claim it
/// @dev this contract is pausable, and only the owner can pause it
contract VaultkaClaimer is PausableUpgradeable, OwnableUpgradeable {
using SafeERC20Upgradeable for IERC20Upgradeable;
struct ClaimableInfo {
address tokenAddress;
uint256 totalRemainingAmount;
uint256 id;
bool ended;
}
mapping(address => mapping(uint256 => bool)) public hasClaimable;
mapping(address => bool) public isHandler;
mapping(uint256 => ClaimableInfo) public claimableInfo;
mapping(address => bool) public tokenEnabled;
mapping(address => mapping(uint256 => uint256)) public claimableBalances;
mapping(uint256 => address[]) public usersCampaign;
uint256 public campaignID;
uint256[50] private __gaps;
event Claimed(uint256 campaignID, address indexed token, address indexed user, uint256 amount);
event HandlerSet(address handler, bool isActive);
event TokenEnabled(address token, bool enabled);
event ClaimableAmountsAdded(uint256 campaignID, address token, uint256 amount, uint256 timestamp);
event UsersRemoved(uint256 campaignID, address token, uint256 amount, uint256 timestamp);
event ClaimableAmountsChanged(uint256 campaignID, address token, uint256 amount, uint256 timestamp);
event CampaignStopped(uint256 campaignID, address token, uint256 amount, uint256 timestamp);
event UsersAddedToCampaign(uint256 campaignID, address token, uint256 amount, uint256 timestamp,address[] users);
///@notice modifier to check if the caller is a handler
modifier onlyHandler() {
require(isHandler[msg.sender], "handler only");
_;
}
///@custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize() public initializer {
isHandler[msg.sender] = true;
__Pausable_init();
__Ownable_init();
}
// -- Owner and Handler Functions -- //
function pause() external onlyHandler {
_pause();
}
function unpause() external onlyHandler {
_unpause();
}
function setHandler(address _handler, bool _isActive) external onlyOwner {
require(_handler != address(0), "Claimable: Invalid address");
isHandler[_handler] = _isActive;
emit HandlerSet(_handler, _isActive);
}
function whitelistToken(address _token, bool _enabled) external onlyOwner {
require(_token != address(0), "Claimable: Invalid address");
tokenEnabled[_token] = _enabled;
emit TokenEnabled(_token, _enabled);
}
function createCampaign(
address _token,
address[] memory _users,
uint256[] memory _balances
) external onlyHandler {
uint256 length = _users.length;
require(_token != address(0), "Claimable: token address cannot be zero");
require(length == _balances.length, "Claimable: user and balance array length mismatch");
require(tokenEnabled[_token], "Claimable: token not enabled");
uint256 _totalAmount;
uint256 _campaignID = campaignID;
for (uint256 i; i < length; i++) {
require(_users[i] != address(0), "Claimable: Invalid address");
address user = _users[i];
uint256 balance = _balances[i];
claimableBalances[user][_campaignID] += balance;
hasClaimable[user][_campaignID] = true;
_totalAmount += balance;
}
IERC20Upgradeable(_token).safeTransferFrom(msg.sender, address(this), _totalAmount);
ClaimableInfo storage claimable = claimableInfo[_campaignID];
claimable.totalRemainingAmount += _totalAmount;
claimable.id = _campaignID;
claimable.tokenAddress = _token;
address[] memory usersC = new address[](length);
usersC = _users;
usersCampaign[_campaignID] = usersC;
campaignID++;
emit ClaimableAmountsAdded(_campaignID,_token, _totalAmount, block.timestamp);
}
function stopCampaign(uint256 _campaignID) external onlyHandler {
ClaimableInfo storage claimable = claimableInfo[_campaignID];
address _token = claimable.tokenAddress;
require(_token != address(0), "Campaign doesnt exist");
require(claimable.ended == false, "Campaign has ended");
uint256 allUsers = usersCampaign[_campaignID].length;
for (uint256 i; i < allUsers; i++) {
address user = usersCampaign[_campaignID][i];
hasClaimable[user][_campaignID] = false;
claimableBalances[user][_campaignID] = 0;
}
uint256 _totalAmount = claimable.totalRemainingAmount;
claimable.totalRemainingAmount = 0;
claimable.ended = true;
delete usersCampaign[_campaignID];
IERC20Upgradeable(_token).safeTransfer(msg.sender, _totalAmount);
emit CampaignStopped(_campaignID, _token, _totalAmount, block.timestamp);
}
function editAirdropAmount(
address[] memory _users,
uint256[] memory _balances,
uint256 _campaignID,
bool _increase
) external onlyHandler {
ClaimableInfo storage claimable = claimableInfo[_campaignID];
address _token = claimable.tokenAddress;
require(tokenEnabled[_token], "Claimable: token not enabled");
require(_token != address(0), "Campaign doesnt exist");
uint256 length = _users.length;
require(length == _balances.length, "Claimable: user and balance array length mismatch");
require(claimable.ended == false, "Campaign has ended");
uint256 _totalAmount;
for (uint256 i; i < length; i++) {
address user = _users[i];
require(_users[i] != address(0), "Claimable: Invalid user");
uint256 balance = _balances[i];
if (_increase) {
if (!hasClaimable[user][_campaignID]) {
hasClaimable[user][_campaignID] = true;
usersCampaign[_campaignID].push(user);
}
claimableBalances[user][_campaignID] += balance;
} else {
require(balance < claimableBalances[user][_campaignID], "Claimable: removeable balance exceeds user balance, use removeUsersFromCampaign");
claimableBalances[user][_campaignID] -= balance;
}
_totalAmount += balance;
}
if (_increase) {
IERC20Upgradeable(_token).safeTransferFrom(msg.sender, address(this), _totalAmount);
claimable.totalRemainingAmount += _totalAmount;
} else {
IERC20Upgradeable(_token).safeTransfer(msg.sender, _totalAmount);
claimable.totalRemainingAmount -= _totalAmount;
}
emit ClaimableAmountsChanged(_campaignID, _token, _totalAmount, block.timestamp);
}
function removeUsersFromCampaign(
address _token,
address[] memory _users,
uint256 _campaignID
) external onlyHandler {
ClaimableInfo storage claimable = claimableInfo[_campaignID];
address _token = claimable.tokenAddress;
require(_token != address(0), "Campaign doesnt exist");
require(claimable.ended == false, "Campaign has ended");
uint256 length = _users.length;
uint256 _totalAmount;
for (uint256 i; i < length; i++) {
require(_users[i] != address(0), "Claimable: Invalid address");
address user = _users[i];
_totalAmount += claimableBalances[user][_campaignID];
hasClaimable[msg.sender][_campaignID] = false;
claimableBalances[user][_campaignID] = 0;
usersCampaign[_campaignID][i] = usersCampaign[_campaignID][usersCampaign[_campaignID].length - 1];
usersCampaign[_campaignID].pop();
}
IERC20Upgradeable(_token).safeTransfer(msg.sender, _totalAmount);
claimable.totalRemainingAmount -= _totalAmount;
emit UsersRemoved(_campaignID, _token, _totalAmount, block.timestamp);
}
// -- Public functions -- //
function claimAll() public whenNotPaused {
uint256 length = campaignID;
for (uint256 i; i < length; i++) {
if (hasClaimable[msg.sender][i] && claimableBalances[msg.sender][i] > 0) {
claim(i);
}
}
}
function claim(uint256 _campaignID) public whenNotPaused {
ClaimableInfo storage claimable = claimableInfo[_campaignID];
bool ended = claimable.ended;
if (!ended) {
address _token = claimable.tokenAddress;
require(tokenEnabled[_token], "Claimable: token not enabled");
require(hasClaimable[msg.sender][_campaignID], "Claimable: user does not have claimable balance");
require(claimableBalances[msg.sender][_campaignID] > 0, "Nothing to claim");
uint256 amount = claimableBalances[msg.sender][_campaignID];
claimableBalances[msg.sender][_campaignID] = 0;
hasClaimable[msg.sender][_campaignID] = false;
claimable.totalRemainingAmount -= amount;
IERC20Upgradeable(_token).safeTransfer(msg.sender, amount);
emit Claimed(_campaignID, _token, msg.sender, amount);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @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[49] private __gap;
}// 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.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
/**
* @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[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20PermitUpgradeable {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20Upgradeable.sol";
import "../extensions/IERC20PermitUpgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20Upgradeable {
using AddressUpgradeable for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
* 0 before setting it to a non-zero value.
*/
function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20PermitUpgradeable token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));
}
}// 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 v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @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;
}{
"optimizer": {
"enabled": true,
"runs": 1
},
"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":"uint256","name":"campaignID","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"CampaignStopped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ClaimableAmountsAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ClaimableAmountsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"handler","type":"address"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"HandlerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"TokenEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"users","type":"address[]"}],"name":"UsersAddedToCampaign","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UsersRemoved","type":"event"},{"inputs":[],"name":"campaignID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimableBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimableInfo","outputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"totalRemainingAmount","type":"uint256"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bool","name":"ended","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_balances","type":"uint256[]"}],"name":"createCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_balances","type":"uint256[]"},{"internalType":"uint256","name":"_campaignID","type":"uint256"},{"internalType":"bool","name":"_increase","type":"bool"}],"name":"editAirdropAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"hasClaimable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isHandler","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"removeUsersFromCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_handler","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"stopCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"usersCampaign","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"whitelistToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5061001961001e565b6100dd565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146100db576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6121c280620000ed6000396000f3fe608060405234801561001057600080fd5b50600436106101125760003560e01c80630ffb1d8b146101175780631657ca051461012c5780632e4600551461016f57806336eed9b61461018f578063379607f5146101a25780633f4ba83a146101b557806346ea87af146101bd57806349ed2fa9146101e05780635156ed87146101f75780635c975abb14610265578063715018a6146102705780638129fc1c146102785780638456cb59146102805780638da5cb5b146102885780639cb7de4b14610290578063af295b28146102a3578063d1058e59146102b6578063d6d110e7146102be578063d6f3837c146102e9578063e5afd711146102fc578063ec6c82161461031f578063f2fde38b14610332575b600080fd5b61012a610125366004611b5f565b610345565b005b61015a61013a366004611b96565b609760209081526000928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b61018261017d366004611bc0565b6103de565b6040516101669190611be2565b61012a61019d366004611d2c565b610416565b61012a6101b0366004611d9f565b61075a565b61012a610948565b61015a6101cb366004611db8565b60986020526000908152604090205460ff1681565b6101e9609d5481565b604051908152602001610166565b610239610205366004611d9f565b60996020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff1684565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610166565b60335460ff1661015a565b61012a610981565b61012a610993565b61012a610acd565b610182610b04565b61012a61029e366004611b5f565b610b13565b61012a6102b1366004611dda565b610b97565b61012a610fa3565b6101e96102cc366004611b96565b609b60209081526000928352604080842090915290825290205481565b61012a6102f7366004611e59565b611020565b61015a61030a366004611db8565b609a6020526000908152604090205460ff1681565b61012a61032d366004611d9f565b6112e7565b61012a610340366004611db8565b61148e565b61034d611504565b6001600160a01b03821661037c5760405162461bcd60e51b815260040161037390611eaf565b60405180910390fd5b6001600160a01b0382166000908152609a602052604090819020805460ff1916831515179055517fdaf9101d1252b2a64d581ac74c5158c51129acca2ba55c45d3477163f7070fba906103d29084908490611ee3565b60405180910390a15050565b609c60205281600052604060002081815481106103fa57600080fd5b6000918252602090912001546001600160a01b03169150829050565b3360009081526098602052604090205460ff166104455760405162461bcd60e51b815260040161037390611efe565b81516001600160a01b0384166104ad5760405162461bcd60e51b815260206004820152602760248201527f436c61696d61626c653a20746f6b656e20616464726573732063616e6e6f74206044820152666265207a65726f60c81b6064820152608401610373565b815181146104cd5760405162461bcd60e51b815260040161037390611f24565b6001600160a01b0384166000908152609a602052604090205460ff166105055760405162461bcd60e51b815260040161037390611f75565b609d54600090815b838110156106365760006001600160a01b031686828151811061053257610532611fab565b60200260200101516001600160a01b0316036105605760405162461bcd60e51b815260040161037390611eaf565b600086828151811061057457610574611fab565b60200260200101519050600086838151811061059257610592611fab565b6020026020010151905080609b6000846001600160a01b03166001600160a01b03168152602001908152602001600020600086815260200190815260200160002060008282546105e29190611fd7565b90915550506001600160a01b03821660009081526097602090815260408083208784529091529020805460ff1916600117905561061f8186611fd7565b94505050808061062e90611ff0565b91505061050d565b5061064c6001600160a01b038716333085611563565b60008181526099602052604081206001810180549192859261066f908490611fd7565b90915550506002810182905580546001600160a01b0319166001600160a01b0388161781556000846001600160401b038111156106ae576106ae611bf6565b6040519080825280602002602001820160405280156106d7578160200160208202803683370190505b5050506000828152609c60209081526040909120875188926106fd929190840190611aa1565b50609d805490600061070e83611ff0565b91905055507f3d788bf905972ad2661af2d7ec0959c11d7b67090443b2749767ab36059e6b59838986426040516107489493929190612009565b60405180910390a15050505050505050565b6107626115d4565b6000818152609960205260409020600381015460ff16806109435781546001600160a01b03166000818152609a602052604090205460ff166107b65760405162461bcd60e51b815260040161037390611f75565b33600090815260976020908152604080832087845290915290205460ff166108385760405162461bcd60e51b815260206004820152602f60248201527f436c61696d61626c653a207573657220646f6573206e6f74206861766520636c60448201526e61696d61626c652062616c616e636560881b6064820152608401610373565b336000908152609b602090815260408083208784529091529020546108925760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610373565b336000818152609b602090815260408083208884528252808320805490849055938352609782528083208884529091528120805460ff191690556001850180548392906108e090849061202d565b909155506108fa90506001600160a01b038316338361161a565b604080518681526020810183905233916001600160a01b038516917fce3bcb6e219596cf26007ffdfaae8953bc3f76e3f36c0a79b23e28020da3222e910160405180910390a350505b505050565b3360009081526098602052604090205460ff166109775760405162461bcd60e51b815260040161037390611efe565b61097f61164a565b565b610989611504565b61097f6000611696565b600054610100900460ff16158080156109b35750600054600160ff909116105b806109d457506109c2306116e8565b1580156109d4575060005460ff166001145b610a375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610373565b6000805460ff191660011790558015610a5a576000805461ff0019166101001790555b336000908152609860205260409020805460ff19166001179055610a7c6116f7565b610a84611726565b8015610aca576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b3360009081526098602052604090205460ff16610afc5760405162461bcd60e51b815260040161037390611efe565b61097f611755565b6065546001600160a01b031690565b610b1b611504565b6001600160a01b038216610b415760405162461bcd60e51b815260040161037390611eaf565b6001600160a01b03821660009081526098602052604090819020805460ff1916831515179055517f6cc67219f62a9e5d66cc9f2a62e16634cffcf48facd698a829bafcc1ad2c5c83906103d29084908490611ee3565b3360009081526098602052604090205460ff16610bc65760405162461bcd60e51b815260040161037390611efe565b600082815260996020908152604080832080546001600160a01b0316808552609a90935292205460ff16610c0c5760405162461bcd60e51b815260040161037390611f75565b6001600160a01b038116610c325760405162461bcd60e51b815260040161037390612040565b855185518114610c545760405162461bcd60e51b815260040161037390611f24565b600383015460ff1615610c795760405162461bcd60e51b81526004016103739061206f565b6000805b82811015610f05576000898281518110610c9957610c99611fab565b6020026020010151905060006001600160a01b03168a8381518110610cc057610cc0611fab565b60200260200101516001600160a01b031603610d185760405162461bcd60e51b815260206004820152601760248201527621b630b4b6b0b136329d1024b73b30b634b2103ab9b2b960491b6044820152606401610373565b6000898381518110610d2c57610d2c611fab565b602002602001015190508715610dfb576001600160a01b03821660009081526097602090815260408083208c845290915290205460ff16610dbd576001600160a01b03821660008181526097602090815260408083208d84528252808320805460ff19166001908117909155609c835290832080549182018155835291200180546001600160a01b03191690911790555b6001600160a01b0382166000908152609b602090815260408083208c845290915281208054839290610df0908490611fd7565b90915550610ee49050565b6001600160a01b0382166000908152609b602090815260408083208c84529091529020548110610eab5760405162461bcd60e51b815260206004820152604f60248201527f436c61696d61626c653a2072656d6f766561626c652062616c616e636520657860448201527f636565647320757365722062616c616e63652c207573652072656d6f7665557360648201526e32b939a33937b6a1b0b6b830b4b3b760891b608482015260a401610373565b6001600160a01b0382166000908152609b602090815260408083208c845290915281208054839290610ede90849061202d565b90915550505b610eee8185611fd7565b935050508080610efd90611ff0565b915050610c7d565b508415610f4057610f216001600160a01b038416333084611563565b80846001016000828254610f359190611fd7565b90915550610f6e9050565b610f546001600160a01b038416338361161a565b80846001016000828254610f68919061202d565b90915550505b7f7a2e26fb8deef8bfe500283a3786ab0529aeb73ffc4519ece927ef9571910cb5868483426040516107489493929190612009565b610fab6115d4565b609d5460005b8181101561101c5733600090815260976020908152604080832084845290915290205460ff168015610ffc5750336000908152609b6020908152604080832084845290915290205415155b1561100a5761100a8161075a565b8061101481611ff0565b915050610fb1565b5050565b3360009081526098602052604090205460ff1661104f5760405162461bcd60e51b815260040161037390611efe565b600081815260996020526040902080546001600160a01b0316806110855760405162461bcd60e51b815260040161037390612040565b600382015460ff16156110aa5760405162461bcd60e51b81526004016103739061206f565b83516000805b828110156112725760006001600160a01b03168782815181106110d5576110d5611fab565b60200260200101516001600160a01b0316036111035760405162461bcd60e51b815260040161037390611eaf565b600087828151811061111757611117611fab565b6020908102919091018101516001600160a01b0381166000908152609b835260408082208b835290935291909120549091506111539084611fd7565b3360009081526097602090815260408083208b84528252808320805460ff191690556001600160a01b0385168352609b82528083208b84528252808320839055609c90915290208054919450906111ac9060019061202d565b815481106111bc576111bc611fab565b6000918252602080832090910154898352609c909152604090912080546001600160a01b0390921691849081106111f5576111f5611fab565b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255888152609c9091526040902080548061123d5761123d61209b565b600082815260209020810160001990810180546001600160a01b0319169055019055508061126a81611ff0565b9150506110b0565b506112876001600160a01b038416338361161a565b8084600101600082825461129b919061202d565b90915550506040517ff593b2a01c9143ae6225927ad9b7583452c462b7cd74df91c7ed0e91d5b7c025906112d6908790869085904290612009565b60405180910390a150505050505050565b3360009081526098602052604090205460ff166113165760405162461bcd60e51b815260040161037390611efe565b600081815260996020526040902080546001600160a01b03168061134c5760405162461bcd60e51b815260040161037390612040565b600382015460ff16156113715760405162461bcd60e51b81526004016103739061206f565b6000838152609c6020526040812054905b81811015611403576000858152609c602052604081208054839081106113aa576113aa611fab565b60009182526020808320909101546001600160a01b03168083526097825260408084208a85528352808420805460ff19169055908352609b825280832089845290915281205550806113fb81611ff0565b915050611382565b506001808401805460009182905560038601805460ff1916909317909255858152609c6020526040812061143691611b06565b61144a6001600160a01b038416338361161a565b7f5e50f5329fb6b77c5fdc15f5c04392339a831876cc7c9700bae3dedabaffd15f8584834260405161147f9493929190612009565b60405180910390a15050505050565b611496611504565b6001600160a01b0381166114fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610373565b610aca81611696565b3361150d610b04565b6001600160a01b03161461097f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610373565b6040516001600160a01b03808516602483015283166044820152606481018290526115ce9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611792565b50505050565b60335460ff161561097f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610373565b6040516001600160a01b03831660248201526044810182905261094390849063a9059cbb60e01b90606401611597565b611652611867565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161168c9190611be2565b60405180910390a1565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03163b151590565b600054610100900460ff1661171e5760405162461bcd60e51b8152600401610373906120b1565b61097f6118b0565b600054610100900460ff1661174d5760405162461bcd60e51b8152600401610373906120b1565b61097f6118e3565b61175d6115d4565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861167f3390565b60006117e7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119139092919063ffffffff16565b905080516000148061180857508080602001905181019061180891906120fc565b6109435760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610373565b60335460ff1661097f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610373565b600054610100900460ff166118d75760405162461bcd60e51b8152600401610373906120b1565b6033805460ff19169055565b600054610100900460ff1661190a5760405162461bcd60e51b8152600401610373906120b1565b61097f33611696565b6060611922848460008561192a565b949350505050565b60608247101561198b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610373565b600080866001600160a01b031685876040516119a7919061213d565b60006040518083038185875af1925050503d80600081146119e4576040519150601f19603f3d011682016040523d82523d6000602084013e6119e9565b606091505b50915091506119fa87838387611a05565b979650505050505050565b60608315611a72578251600003611a6b57611a1f856116e8565b611a6b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610373565b5081611922565b6119228383815115611a875781518083602001fd5b8060405162461bcd60e51b81526004016103739190612159565b828054828255906000526020600020908101928215611af6579160200282015b82811115611af657825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611ac1565b50611b02929150611b20565b5090565b5080546000825590600052602060002090810190610aca91905b5b80821115611b025760008155600101611b21565b80356001600160a01b0381168114611b4c57600080fd5b919050565b8015158114610aca57600080fd5b60008060408385031215611b7257600080fd5b611b7b83611b35565b91506020830135611b8b81611b51565b809150509250929050565b60008060408385031215611ba957600080fd5b611bb283611b35565b946020939093013593505050565b60008060408385031215611bd357600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611c3457611c34611bf6565b604052919050565b60006001600160401b03821115611c5557611c55611bf6565b5060051b60200190565b600082601f830112611c7057600080fd5b81356020611c85611c8083611c3c565b611c0c565b82815260059290921b84018101918181019086841115611ca457600080fd5b8286015b84811015611cc657611cb981611b35565b8352918301918301611ca8565b509695505050505050565b600082601f830112611ce257600080fd5b81356020611cf2611c8083611c3c565b82815260059290921b84018101918181019086841115611d1157600080fd5b8286015b84811015611cc65780358352918301918301611d15565b600080600060608486031215611d4157600080fd5b611d4a84611b35565b925060208401356001600160401b0380821115611d6657600080fd5b611d7287838801611c5f565b93506040860135915080821115611d8857600080fd5b50611d9586828701611cd1565b9150509250925092565b600060208284031215611db157600080fd5b5035919050565b600060208284031215611dca57600080fd5b611dd382611b35565b9392505050565b60008060008060808587031215611df057600080fd5b84356001600160401b0380821115611e0757600080fd5b611e1388838901611c5f565b95506020870135915080821115611e2957600080fd5b50611e3687828801611cd1565b935050604085013591506060850135611e4e81611b51565b939692955090935050565b600080600060608486031215611e6e57600080fd5b611e7784611b35565b925060208401356001600160401b03811115611e9257600080fd5b611e9e86828701611c5f565b925050604084013590509250925092565b6020808252601a9082015279436c61696d61626c653a20496e76616c6964206164647265737360301b604082015260600190565b6001600160a01b039290921682521515602082015260400190565b6020808252600c908201526b68616e646c6572206f6e6c7960a01b604082015260600190565b60208082526031908201527f436c61696d61626c653a207573657220616e642062616c616e636520617272616040820152700f240d8cadccee8d040dad2e6dac2e8c6d607b1b606082015260800190565b6020808252601c908201527b10db185a5b58589b194e881d1bdad95b881b9bdd08195b98589b195960221b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115611fea57611fea611fc1565b92915050565b60006001820161200257612002611fc1565b5060010190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b81810381811115611fea57611fea611fc1565b60208082526015908201527410d85b5c185a59db88191bd95cdb9d08195e1a5cdd605a1b604082015260600190565b60208082526012908201527110d85b5c185a59db881a185cc8195b99195960721b604082015260600190565b634e487b7160e01b600052603160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561210e57600080fd5b8151611dd381611b51565b60005b8381101561213457818101518382015260200161211c565b50506000910152565b6000825161214f818460208701612119565b9190910192915050565b6020815260008251806020840152612178816040850160208701612119565b601f01601f1916919091016040019291505056fea26469706673582212203b64e6fd81ceeedefe2af1dfb1199dd3cc78f49a7f858d6859b6688116911e2864736f6c63430008120033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101125760003560e01c80630ffb1d8b146101175780631657ca051461012c5780632e4600551461016f57806336eed9b61461018f578063379607f5146101a25780633f4ba83a146101b557806346ea87af146101bd57806349ed2fa9146101e05780635156ed87146101f75780635c975abb14610265578063715018a6146102705780638129fc1c146102785780638456cb59146102805780638da5cb5b146102885780639cb7de4b14610290578063af295b28146102a3578063d1058e59146102b6578063d6d110e7146102be578063d6f3837c146102e9578063e5afd711146102fc578063ec6c82161461031f578063f2fde38b14610332575b600080fd5b61012a610125366004611b5f565b610345565b005b61015a61013a366004611b96565b609760209081526000928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b61018261017d366004611bc0565b6103de565b6040516101669190611be2565b61012a61019d366004611d2c565b610416565b61012a6101b0366004611d9f565b61075a565b61012a610948565b61015a6101cb366004611db8565b60986020526000908152604090205460ff1681565b6101e9609d5481565b604051908152602001610166565b610239610205366004611d9f565b60996020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff1684565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610166565b60335460ff1661015a565b61012a610981565b61012a610993565b61012a610acd565b610182610b04565b61012a61029e366004611b5f565b610b13565b61012a6102b1366004611dda565b610b97565b61012a610fa3565b6101e96102cc366004611b96565b609b60209081526000928352604080842090915290825290205481565b61012a6102f7366004611e59565b611020565b61015a61030a366004611db8565b609a6020526000908152604090205460ff1681565b61012a61032d366004611d9f565b6112e7565b61012a610340366004611db8565b61148e565b61034d611504565b6001600160a01b03821661037c5760405162461bcd60e51b815260040161037390611eaf565b60405180910390fd5b6001600160a01b0382166000908152609a602052604090819020805460ff1916831515179055517fdaf9101d1252b2a64d581ac74c5158c51129acca2ba55c45d3477163f7070fba906103d29084908490611ee3565b60405180910390a15050565b609c60205281600052604060002081815481106103fa57600080fd5b6000918252602090912001546001600160a01b03169150829050565b3360009081526098602052604090205460ff166104455760405162461bcd60e51b815260040161037390611efe565b81516001600160a01b0384166104ad5760405162461bcd60e51b815260206004820152602760248201527f436c61696d61626c653a20746f6b656e20616464726573732063616e6e6f74206044820152666265207a65726f60c81b6064820152608401610373565b815181146104cd5760405162461bcd60e51b815260040161037390611f24565b6001600160a01b0384166000908152609a602052604090205460ff166105055760405162461bcd60e51b815260040161037390611f75565b609d54600090815b838110156106365760006001600160a01b031686828151811061053257610532611fab565b60200260200101516001600160a01b0316036105605760405162461bcd60e51b815260040161037390611eaf565b600086828151811061057457610574611fab565b60200260200101519050600086838151811061059257610592611fab565b6020026020010151905080609b6000846001600160a01b03166001600160a01b03168152602001908152602001600020600086815260200190815260200160002060008282546105e29190611fd7565b90915550506001600160a01b03821660009081526097602090815260408083208784529091529020805460ff1916600117905561061f8186611fd7565b94505050808061062e90611ff0565b91505061050d565b5061064c6001600160a01b038716333085611563565b60008181526099602052604081206001810180549192859261066f908490611fd7565b90915550506002810182905580546001600160a01b0319166001600160a01b0388161781556000846001600160401b038111156106ae576106ae611bf6565b6040519080825280602002602001820160405280156106d7578160200160208202803683370190505b5050506000828152609c60209081526040909120875188926106fd929190840190611aa1565b50609d805490600061070e83611ff0565b91905055507f3d788bf905972ad2661af2d7ec0959c11d7b67090443b2749767ab36059e6b59838986426040516107489493929190612009565b60405180910390a15050505050505050565b6107626115d4565b6000818152609960205260409020600381015460ff16806109435781546001600160a01b03166000818152609a602052604090205460ff166107b65760405162461bcd60e51b815260040161037390611f75565b33600090815260976020908152604080832087845290915290205460ff166108385760405162461bcd60e51b815260206004820152602f60248201527f436c61696d61626c653a207573657220646f6573206e6f74206861766520636c60448201526e61696d61626c652062616c616e636560881b6064820152608401610373565b336000908152609b602090815260408083208784529091529020546108925760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610373565b336000818152609b602090815260408083208884528252808320805490849055938352609782528083208884529091528120805460ff191690556001850180548392906108e090849061202d565b909155506108fa90506001600160a01b038316338361161a565b604080518681526020810183905233916001600160a01b038516917fce3bcb6e219596cf26007ffdfaae8953bc3f76e3f36c0a79b23e28020da3222e910160405180910390a350505b505050565b3360009081526098602052604090205460ff166109775760405162461bcd60e51b815260040161037390611efe565b61097f61164a565b565b610989611504565b61097f6000611696565b600054610100900460ff16158080156109b35750600054600160ff909116105b806109d457506109c2306116e8565b1580156109d4575060005460ff166001145b610a375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610373565b6000805460ff191660011790558015610a5a576000805461ff0019166101001790555b336000908152609860205260409020805460ff19166001179055610a7c6116f7565b610a84611726565b8015610aca576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b3360009081526098602052604090205460ff16610afc5760405162461bcd60e51b815260040161037390611efe565b61097f611755565b6065546001600160a01b031690565b610b1b611504565b6001600160a01b038216610b415760405162461bcd60e51b815260040161037390611eaf565b6001600160a01b03821660009081526098602052604090819020805460ff1916831515179055517f6cc67219f62a9e5d66cc9f2a62e16634cffcf48facd698a829bafcc1ad2c5c83906103d29084908490611ee3565b3360009081526098602052604090205460ff16610bc65760405162461bcd60e51b815260040161037390611efe565b600082815260996020908152604080832080546001600160a01b0316808552609a90935292205460ff16610c0c5760405162461bcd60e51b815260040161037390611f75565b6001600160a01b038116610c325760405162461bcd60e51b815260040161037390612040565b855185518114610c545760405162461bcd60e51b815260040161037390611f24565b600383015460ff1615610c795760405162461bcd60e51b81526004016103739061206f565b6000805b82811015610f05576000898281518110610c9957610c99611fab565b6020026020010151905060006001600160a01b03168a8381518110610cc057610cc0611fab565b60200260200101516001600160a01b031603610d185760405162461bcd60e51b815260206004820152601760248201527621b630b4b6b0b136329d1024b73b30b634b2103ab9b2b960491b6044820152606401610373565b6000898381518110610d2c57610d2c611fab565b602002602001015190508715610dfb576001600160a01b03821660009081526097602090815260408083208c845290915290205460ff16610dbd576001600160a01b03821660008181526097602090815260408083208d84528252808320805460ff19166001908117909155609c835290832080549182018155835291200180546001600160a01b03191690911790555b6001600160a01b0382166000908152609b602090815260408083208c845290915281208054839290610df0908490611fd7565b90915550610ee49050565b6001600160a01b0382166000908152609b602090815260408083208c84529091529020548110610eab5760405162461bcd60e51b815260206004820152604f60248201527f436c61696d61626c653a2072656d6f766561626c652062616c616e636520657860448201527f636565647320757365722062616c616e63652c207573652072656d6f7665557360648201526e32b939a33937b6a1b0b6b830b4b3b760891b608482015260a401610373565b6001600160a01b0382166000908152609b602090815260408083208c845290915281208054839290610ede90849061202d565b90915550505b610eee8185611fd7565b935050508080610efd90611ff0565b915050610c7d565b508415610f4057610f216001600160a01b038416333084611563565b80846001016000828254610f359190611fd7565b90915550610f6e9050565b610f546001600160a01b038416338361161a565b80846001016000828254610f68919061202d565b90915550505b7f7a2e26fb8deef8bfe500283a3786ab0529aeb73ffc4519ece927ef9571910cb5868483426040516107489493929190612009565b610fab6115d4565b609d5460005b8181101561101c5733600090815260976020908152604080832084845290915290205460ff168015610ffc5750336000908152609b6020908152604080832084845290915290205415155b1561100a5761100a8161075a565b8061101481611ff0565b915050610fb1565b5050565b3360009081526098602052604090205460ff1661104f5760405162461bcd60e51b815260040161037390611efe565b600081815260996020526040902080546001600160a01b0316806110855760405162461bcd60e51b815260040161037390612040565b600382015460ff16156110aa5760405162461bcd60e51b81526004016103739061206f565b83516000805b828110156112725760006001600160a01b03168782815181106110d5576110d5611fab565b60200260200101516001600160a01b0316036111035760405162461bcd60e51b815260040161037390611eaf565b600087828151811061111757611117611fab565b6020908102919091018101516001600160a01b0381166000908152609b835260408082208b835290935291909120549091506111539084611fd7565b3360009081526097602090815260408083208b84528252808320805460ff191690556001600160a01b0385168352609b82528083208b84528252808320839055609c90915290208054919450906111ac9060019061202d565b815481106111bc576111bc611fab565b6000918252602080832090910154898352609c909152604090912080546001600160a01b0390921691849081106111f5576111f5611fab565b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255888152609c9091526040902080548061123d5761123d61209b565b600082815260209020810160001990810180546001600160a01b0319169055019055508061126a81611ff0565b9150506110b0565b506112876001600160a01b038416338361161a565b8084600101600082825461129b919061202d565b90915550506040517ff593b2a01c9143ae6225927ad9b7583452c462b7cd74df91c7ed0e91d5b7c025906112d6908790869085904290612009565b60405180910390a150505050505050565b3360009081526098602052604090205460ff166113165760405162461bcd60e51b815260040161037390611efe565b600081815260996020526040902080546001600160a01b03168061134c5760405162461bcd60e51b815260040161037390612040565b600382015460ff16156113715760405162461bcd60e51b81526004016103739061206f565b6000838152609c6020526040812054905b81811015611403576000858152609c602052604081208054839081106113aa576113aa611fab565b60009182526020808320909101546001600160a01b03168083526097825260408084208a85528352808420805460ff19169055908352609b825280832089845290915281205550806113fb81611ff0565b915050611382565b506001808401805460009182905560038601805460ff1916909317909255858152609c6020526040812061143691611b06565b61144a6001600160a01b038416338361161a565b7f5e50f5329fb6b77c5fdc15f5c04392339a831876cc7c9700bae3dedabaffd15f8584834260405161147f9493929190612009565b60405180910390a15050505050565b611496611504565b6001600160a01b0381166114fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610373565b610aca81611696565b3361150d610b04565b6001600160a01b03161461097f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610373565b6040516001600160a01b03808516602483015283166044820152606481018290526115ce9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611792565b50505050565b60335460ff161561097f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610373565b6040516001600160a01b03831660248201526044810182905261094390849063a9059cbb60e01b90606401611597565b611652611867565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161168c9190611be2565b60405180910390a1565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03163b151590565b600054610100900460ff1661171e5760405162461bcd60e51b8152600401610373906120b1565b61097f6118b0565b600054610100900460ff1661174d5760405162461bcd60e51b8152600401610373906120b1565b61097f6118e3565b61175d6115d4565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861167f3390565b60006117e7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119139092919063ffffffff16565b905080516000148061180857508080602001905181019061180891906120fc565b6109435760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610373565b60335460ff1661097f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610373565b600054610100900460ff166118d75760405162461bcd60e51b8152600401610373906120b1565b6033805460ff19169055565b600054610100900460ff1661190a5760405162461bcd60e51b8152600401610373906120b1565b61097f33611696565b6060611922848460008561192a565b949350505050565b60608247101561198b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610373565b600080866001600160a01b031685876040516119a7919061213d565b60006040518083038185875af1925050503d80600081146119e4576040519150601f19603f3d011682016040523d82523d6000602084013e6119e9565b606091505b50915091506119fa87838387611a05565b979650505050505050565b60608315611a72578251600003611a6b57611a1f856116e8565b611a6b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610373565b5081611922565b6119228383815115611a875781518083602001fd5b8060405162461bcd60e51b81526004016103739190612159565b828054828255906000526020600020908101928215611af6579160200282015b82811115611af657825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611ac1565b50611b02929150611b20565b5090565b5080546000825590600052602060002090810190610aca91905b5b80821115611b025760008155600101611b21565b80356001600160a01b0381168114611b4c57600080fd5b919050565b8015158114610aca57600080fd5b60008060408385031215611b7257600080fd5b611b7b83611b35565b91506020830135611b8b81611b51565b809150509250929050565b60008060408385031215611ba957600080fd5b611bb283611b35565b946020939093013593505050565b60008060408385031215611bd357600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611c3457611c34611bf6565b604052919050565b60006001600160401b03821115611c5557611c55611bf6565b5060051b60200190565b600082601f830112611c7057600080fd5b81356020611c85611c8083611c3c565b611c0c565b82815260059290921b84018101918181019086841115611ca457600080fd5b8286015b84811015611cc657611cb981611b35565b8352918301918301611ca8565b509695505050505050565b600082601f830112611ce257600080fd5b81356020611cf2611c8083611c3c565b82815260059290921b84018101918181019086841115611d1157600080fd5b8286015b84811015611cc65780358352918301918301611d15565b600080600060608486031215611d4157600080fd5b611d4a84611b35565b925060208401356001600160401b0380821115611d6657600080fd5b611d7287838801611c5f565b93506040860135915080821115611d8857600080fd5b50611d9586828701611cd1565b9150509250925092565b600060208284031215611db157600080fd5b5035919050565b600060208284031215611dca57600080fd5b611dd382611b35565b9392505050565b60008060008060808587031215611df057600080fd5b84356001600160401b0380821115611e0757600080fd5b611e1388838901611c5f565b95506020870135915080821115611e2957600080fd5b50611e3687828801611cd1565b935050604085013591506060850135611e4e81611b51565b939692955090935050565b600080600060608486031215611e6e57600080fd5b611e7784611b35565b925060208401356001600160401b03811115611e9257600080fd5b611e9e86828701611c5f565b925050604084013590509250925092565b6020808252601a9082015279436c61696d61626c653a20496e76616c6964206164647265737360301b604082015260600190565b6001600160a01b039290921682521515602082015260400190565b6020808252600c908201526b68616e646c6572206f6e6c7960a01b604082015260600190565b60208082526031908201527f436c61696d61626c653a207573657220616e642062616c616e636520617272616040820152700f240d8cadccee8d040dad2e6dac2e8c6d607b1b606082015260800190565b6020808252601c908201527b10db185a5b58589b194e881d1bdad95b881b9bdd08195b98589b195960221b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115611fea57611fea611fc1565b92915050565b60006001820161200257612002611fc1565b5060010190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b81810381811115611fea57611fea611fc1565b60208082526015908201527410d85b5c185a59db88191bd95cdb9d08195e1a5cdd605a1b604082015260600190565b60208082526012908201527110d85b5c185a59db881a185cc8195b99195960721b604082015260600190565b634e487b7160e01b600052603160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561210e57600080fd5b8151611dd381611b51565b60005b8381101561213457818101518382015260200161211c565b50506000910152565b6000825161214f818460208701612119565b9190910192915050565b6020815260008251806020840152612178816040850160208701612119565b601f01601f1916919091016040019291505056fea26469706673582212203b64e6fd81ceeedefe2af1dfb1199dd3cc78f49a7f858d6859b6688116911e2864736f6c63430008120033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.