Source Code
Latest 25 from a total of 5,656 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Claim | 61058657 | 9 hrs ago | IN | 0 S | 0.05309272 | ||||
| Deposit | 61058647 | 9 hrs ago | IN | 0 S | 0.0095388 | ||||
| Claim | 61058545 | 9 hrs ago | IN | 0 S | 0.05085442 | ||||
| Claim | 61030535 | 22 hrs ago | IN | 0 S | 0.05085442 | ||||
| Claim | 60997505 | 33 hrs ago | IN | 0 S | 0.00500951 | ||||
| Claim | 60958366 | 46 hrs ago | IN | 0 S | 0.05085442 | ||||
| Claim | 60899183 | 2 days ago | IN | 0 S | 0.00805702 | ||||
| Claim | 60883784 | 3 days ago | IN | 0 S | 0.00361339 | ||||
| Claim | 60869987 | 3 days ago | IN | 0 S | 0.00458166 | ||||
| Claim | 60846634 | 3 days ago | IN | 0 S | 0.05085442 | ||||
| Claim | 60814450 | 3 days ago | IN | 0 S | 0.05085442 | ||||
| Claim | 60772777 | 4 days ago | IN | 0 S | 0.05085442 | ||||
| Deposit | 60772766 | 4 days ago | IN | 0 S | 0.0095388 | ||||
| Claim | 60772679 | 4 days ago | IN | 0 S | 0.04996275 | ||||
| Claim | 60722057 | 5 days ago | IN | 0 S | 0.00310115 | ||||
| Claim | 60641312 | 6 days ago | IN | 0 S | 0.00460091 | ||||
| Deposit | 60641276 | 6 days ago | IN | 0 S | 0.00798264 | ||||
| Claim | 60633405 | 6 days ago | IN | 0 S | 0.04996275 | ||||
| Claim | 60627256 | 6 days ago | IN | 0 S | 0.00378401 | ||||
| Claim | 60626461 | 6 days ago | IN | 0 S | 0.0031178 | ||||
| Claim | 60618751 | 6 days ago | IN | 0 S | 0.00388274 | ||||
| Claim | 60602210 | 6 days ago | IN | 0 S | 0.04996275 | ||||
| Claim | 60599441 | 6 days ago | IN | 0 S | 0.0042901 | ||||
| Claim | 60588217 | 7 days ago | IN | 0 S | 0.00359414 | ||||
| Claim | 60584452 | 7 days ago | IN | 0 S | 0.00359414 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
GemsVestingProtocol
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
interface IERC20Burnable {
function burn(uint256 amount) external;
}
/**
* @title GemsVestingProtocol
* @notice Vesting contract for a specific protocol with fixed exchange rate
* @dev Users deposit GEMS tokens and receive vesting tokens at a fixed rate
*/
contract GemsVestingProtocol is Ownable, ReentrancyGuard, Pausable {
using SafeERC20 for IERC20;
// ========== STATE VARIABLES ==========
IERC20 public immutable gemToken;
IERC20 public immutable vestingToken;
uint256 public immutable vestingDuration; // Duration in seconds
uint256 public immutable exchangeRate; // How many vesting tokens per 1 GEMS (with 18 decimals)
string public protocolName;
address public protocolAddress;
uint256 public constant MAX_POSITIONS_PER_USER = 100;
struct VestingPosition {
uint256 totalAmount; // Total vesting tokens entitled
uint256 claimedAmount; // Amount already claimed
uint256 startTime; // Vesting start time
}
mapping(address => VestingPosition[]) public vestingPositions;
uint256 public totalDeposited; // Total GEMS deposited
uint256 public totalDistributed; // Total vesting tokens distributed
uint256 public totalClaimed; // Total vesting tokens claimed by users
// ========== EVENTS ==========
event Deposited(address indexed user, uint256 gemsAmount, uint256 vestingAmount, uint256 positionIndex);
event Claimed(address indexed user, uint256 amount);
event VestingTokensDeposited(uint256 amount);
event VestingTokensWithdrawn(uint256 amount);
event EmergencyWithdraw(address indexed token, uint256 amount);
event ContractPaused();
event ContractUnpaused();
// ========== ERRORS ==========
error InvalidAmount();
error NoVestingPosition();
error NothingToClaim();
error InsufficientVestingTokens();
error CannotWithdrawAllocatedTokens();
error TooManyPositions();
error VestingAmountTooSmall();
// ========== CONSTRUCTOR ==========
constructor(
address _gemToken,
address _vestingToken,
uint256 _vestingDuration,
uint256 _exchangeRate,
string memory _protocolName,
address _protocolAddress
) Ownable(msg.sender) {
require(_gemToken != address(0), "Invalid gem token");
require(_vestingToken != address(0), "Invalid vesting token");
require(_vestingDuration > 0, "Invalid vesting duration");
require(_exchangeRate > 0, "Invalid exchange rate");
require(_protocolAddress != address(0), "Invalid protocol address");
gemToken = IERC20(_gemToken);
vestingToken = IERC20(_vestingToken);
vestingDuration = _vestingDuration;
exchangeRate = _exchangeRate;
protocolName = _protocolName;
protocolAddress = _protocolAddress;
}
// ========== EXTERNAL FUNCTIONS ==========
/**
* @notice Deposit GEMS tokens to receive vesting tokens at fixed exchange rate
* @param gemsAmount Amount of GEMS tokens to deposit
*/
function deposit(uint256 gemsAmount) external nonReentrant whenNotPaused {
if (gemsAmount == 0) revert InvalidAmount();
// Prevent DoS by limiting positions per user
if (vestingPositions[msg.sender].length >= MAX_POSITIONS_PER_USER) revert TooManyPositions();
// Measure actual tokens received (for fee-on-transfer tokens)
uint256 balanceBefore = gemToken.balanceOf(address(this));
// Transfer GEMS from user
gemToken.safeTransferFrom(msg.sender, address(this), gemsAmount);
// Calculate actual amount received
uint256 actualReceived = gemToken.balanceOf(address(this)) - balanceBefore;
if (actualReceived == 0) revert InvalidAmount();
// Calculate vesting tokens to receive (exchange rate has 18 decimals)
uint256 vestingAmount = (actualReceived * exchangeRate) / 1e18;
// Enhanced dust protection - require minimum 1000 wei of vesting tokens
if (vestingAmount < 1000) revert VestingAmountTooSmall();
// Check available tokens with underflow protection
uint256 balance = vestingToken.balanceOf(address(this));
uint256 allocated = getTotalAllocated();
uint256 availableTokens = balance > allocated ? balance - allocated : 0;
if (vestingAmount > availableTokens) revert InsufficientVestingTokens();
// Update state before external calls (CEI pattern)
vestingPositions[msg.sender].push(VestingPosition({
totalAmount: vestingAmount,
startTime: block.timestamp,
claimedAmount: 0
}));
totalDeposited += actualReceived;
totalDistributed += vestingAmount;
emit Deposited(msg.sender, actualReceived, vestingAmount, vestingPositions[msg.sender].length - 1);
// Burn the GEMS tokens (external call after state updates)
try IERC20Burnable(address(gemToken)).burn(actualReceived) {
// Successfully burned
} catch {
// If burn fails, tokens remain in contract (effectively burned)
}
}
/**
* @notice Claim vested tokens from all positions
*/
function claim() external nonReentrant whenNotPaused {
VestingPosition[] storage positions = vestingPositions[msg.sender];
if (positions.length == 0) revert NoVestingPosition();
uint256 totalClaimable = 0;
for (uint256 i = 0; i < positions.length; i++) {
uint256 vested = getVestedAmountForPosition(positions[i]);
if (vested > positions[i].claimedAmount) {
uint256 claimable = vested - positions[i].claimedAmount;
positions[i].claimedAmount = vested;
totalClaimable += claimable;
}
}
if (totalClaimable == 0) revert NothingToClaim();
totalClaimed += totalClaimable;
vestingToken.safeTransfer(msg.sender, totalClaimable);
emit Claimed(msg.sender, totalClaimable);
}
// ========== VIEW FUNCTIONS ==========
/**
* @notice Get vested amount for a specific position
*/
function getVestedAmountForPosition(VestingPosition memory position) public view returns (uint256) {
if (position.totalAmount == 0) return 0;
// 50% immediate unlock
uint256 immediateAmount = position.totalAmount / 2;
// Calculate linear vesting for remaining 50%
uint256 elapsed = block.timestamp - position.startTime;
if (elapsed >= vestingDuration) {
return position.totalAmount;
}
uint256 vestingAmount = position.totalAmount - immediateAmount;
uint256 vestedFromSchedule = (vestingAmount * elapsed) / vestingDuration;
return immediateAmount + vestedFromSchedule;
}
/**
* @notice Get total vested amount for a user across all positions
*/
function getVestedAmount(address user) public view returns (uint256) {
VestingPosition[] memory positions = vestingPositions[user];
uint256 totalVested = 0;
for (uint256 i = 0; i < positions.length; i++) {
totalVested += getVestedAmountForPosition(positions[i]);
}
return totalVested;
}
/**
* @notice Get claimable amount for a user
*/
function getClaimableAmount(address user) public view returns (uint256) {
VestingPosition[] memory positions = vestingPositions[user];
uint256 totalClaimable = 0;
for (uint256 i = 0; i < positions.length; i++) {
uint256 vested = getVestedAmountForPosition(positions[i]);
if (vested > positions[i].claimedAmount) {
totalClaimable += vested - positions[i].claimedAmount;
}
}
return totalClaimable;
}
/**
* @notice Get user's vesting positions count
*/
function getUserPositionCount(address user) external view returns (uint256) {
return vestingPositions[user].length;
}
/**
* @notice Get a specific vesting position
*/
function getUserPosition(address user, uint256 index) external view returns (
uint256 totalAmount,
uint256 claimedAmount,
uint256 vestedAmount,
uint256 startTime
) {
require(index < vestingPositions[user].length, "Invalid position index");
VestingPosition memory position = vestingPositions[user][index];
return (
position.totalAmount,
position.claimedAmount,
getVestedAmountForPosition(position),
position.startTime
);
}
/**
* @notice Get all vesting positions for a user
* @dev Returns arrays of position data for easier frontend integration
*/
function getAllUserPositions(address user) external view returns (
uint256[] memory totalAmounts,
uint256[] memory claimedAmounts,
uint256[] memory vestedAmounts,
uint256[] memory startTimes
) {
VestingPosition[] memory positions = vestingPositions[user];
uint256 length = positions.length;
totalAmounts = new uint256[](length);
claimedAmounts = new uint256[](length);
vestedAmounts = new uint256[](length);
startTimes = new uint256[](length);
for (uint256 i = 0; i < length; i++) {
totalAmounts[i] = positions[i].totalAmount;
claimedAmounts[i] = positions[i].claimedAmount;
vestedAmounts[i] = getVestedAmountForPosition(positions[i]);
startTimes[i] = positions[i].startTime;
}
}
/**
* @notice Get contract's vesting token balance
*/
function getVestingTokenBalance() external view returns (uint256) {
return vestingToken.balanceOf(address(this));
}
/**
* @notice Get total allocated tokens (distributed but not yet claimed)
*/
function getTotalAllocated() public view returns (uint256) {
return totalDistributed - totalClaimed;
}
// ========== OWNER FUNCTIONS ==========
/**
* @notice Override renounceOwnership to prevent accidental loss of ownership
*/
function renounceOwnership() public view override onlyOwner {
revert("Ownership renunciation is disabled");
}
/**
* @notice Update the protocol address
* @param _protocolAddress New protocol address
*/
function setProtocolAddress(address _protocolAddress) external onlyOwner {
require(_protocolAddress != address(0), "Invalid protocol address");
protocolAddress = _protocolAddress;
}
/**
* @notice Pause the contract (stops deposits and claims)
*/
function pause() external onlyOwner {
_pause();
emit ContractPaused();
}
/**
* @notice Unpause the contract
*/
function unpause() external onlyOwner {
_unpause();
emit ContractUnpaused();
}
/**
* @notice Owner can deposit vesting tokens to the contract
*/
function depositVestingTokens(uint256 amount) external onlyOwner {
vestingToken.safeTransferFrom(msg.sender, address(this), amount);
emit VestingTokensDeposited(amount);
}
/**
* @notice Owner can withdraw excess vesting tokens
* @dev Can only withdraw tokens not allocated to users
*/
function withdrawExcessTokens(uint256 amount) external onlyOwner {
uint256 allocated = getTotalAllocated();
uint256 balance = vestingToken.balanceOf(address(this));
uint256 excess = balance > allocated ? balance - allocated : 0;
if (amount > excess) revert CannotWithdrawAllocatedTokens();
vestingToken.safeTransfer(msg.sender, amount);
emit VestingTokensWithdrawn(amount);
}
/**
* @notice Emergency withdrawal function for owner
* @dev This is a backdoor function - use with extreme caution
* @param token The token to withdraw (address(0) for native token)
* @param amount Amount to withdraw
*/
function emergencyWithdraw(address token, uint256 amount) external onlyOwner {
if (token == address(0)) {
// Withdraw native token
(bool success, ) = payable(owner()).call{value: amount}("");
require(success, "Native token transfer failed");
} else {
// Withdraw ERC20 token
IERC20(token).safeTransfer(owner(), amount);
}
emit EmergencyWithdraw(token, amount);
}
/**
* @notice Emergency withdrawal of all tokens
* @dev Nuclear option - withdraws everything including allocated tokens
*/
function emergencyWithdrawAll() external onlyOwner {
// Pause first to prevent further deposits/claims
if (!paused()) {
_pause();
}
// Withdraw all vesting tokens
uint256 vestingBalance = vestingToken.balanceOf(address(this));
if (vestingBalance > 0) {
vestingToken.safeTransfer(owner(), vestingBalance);
emit EmergencyWithdraw(address(vestingToken), vestingBalance);
}
// Withdraw any remaining GEMS tokens
uint256 gemsBalance = gemToken.balanceOf(address(this));
if (gemsBalance > 0) {
gemToken.safeTransfer(owner(), gemsBalance);
emit EmergencyWithdraw(address(gemToken), gemsBalance);
}
// Withdraw any native tokens
uint256 nativeBalance = address(this).balance;
if (nativeBalance > 0) {
(bool success, ) = payable(owner()).call{value: nativeBalance}("");
require(success, "Native token transfer failed");
emit EmergencyWithdraw(address(0), nativeBalance);
}
}
/**
* @notice Receive function to accept native token
*/
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.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.
*
* The initial owner is set to the address provided by the deployer. 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 Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @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 {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)
pragma solidity >=0.6.2;
import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)
pragma solidity >=0.4.16;
import {IERC165} from "../utils/introspection/IERC165.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)
pragma solidity >=0.4.16;
import {IERC20} from "../token/ERC20/IERC20.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @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(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (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(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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 silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.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 Pausable is Context {
bool private _paused;
/**
* @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);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @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 {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @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());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_gemToken","type":"address"},{"internalType":"address","name":"_vestingToken","type":"address"},{"internalType":"uint256","name":"_vestingDuration","type":"uint256"},{"internalType":"uint256","name":"_exchangeRate","type":"uint256"},{"internalType":"string","name":"_protocolName","type":"string"},{"internalType":"address","name":"_protocolAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CannotWithdrawAllocatedTokens","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"InsufficientVestingTokens","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"NoVestingPosition","type":"error"},{"inputs":[],"name":"NothingToClaim","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"TooManyPositions","type":"error"},{"inputs":[],"name":"VestingAmountTooSmall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[],"name":"ContractPaused","type":"event"},{"anonymous":false,"inputs":[],"name":"ContractUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"gemsAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"vestingAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"positionIndex","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","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":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"VestingTokensDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"VestingTokensWithdrawn","type":"event"},{"inputs":[],"name":"MAX_POSITIONS_PER_USER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gemsAmount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositVestingTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gemToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getAllUserPositions","outputs":[{"internalType":"uint256[]","name":"totalAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"claimedAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"vestedAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"startTimes","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getClaimableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAllocated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getUserPosition","outputs":[{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"vestedAmount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserPositionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getVestedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"internalType":"struct GemsVestingProtocol.VestingPosition","name":"position","type":"tuple"}],"name":"getVestedAmountForPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVestingTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"protocolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_protocolAddress","type":"address"}],"name":"setProtocolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDeposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDistributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"vestingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"vestingPositions","outputs":[{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawExcessTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6101006040523480156200001257600080fd5b5060405162002858380380620028588339810160408190526200003591620002e8565b33806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000688162000265565b50600180556001600160a01b038616620000b95760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21033b2b6903a37b5b2b760791b604482015260640162000054565b6001600160a01b038516620001115760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642076657374696e6720746f6b656e0000000000000000000000604482015260640162000054565b60008411620001635760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642076657374696e67206475726174696f6e0000000000000000604482015260640162000054565b60008311620001b55760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642065786368616e676520726174650000000000000000000000604482015260640162000054565b6001600160a01b0381166200020d5760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642070726f746f636f6c20616464726573730000000000000000604482015260640162000054565b6001600160a01b03808716608052851660a05260c084905260e0839052600362000238838262000497565b50600480546001600160a01b0319166001600160a01b039290921691909117905550620005639350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620002cd57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060c087890312156200030257600080fd5b6200030d87620002b5565b955060206200031e818901620002b5565b604089015160608a015160808b015192985090965094506001600160401b03808211156200034b57600080fd5b818a0191508a601f8301126200036057600080fd5b815181811115620003755762000375620002d2565b604051601f8201601f19908116603f01168101908382118183101715620003a057620003a0620002d2565b816040528281528d86848701011115620003b957600080fd5b600093505b82841015620003dd5784840186015181850187015292850192620003be565b6000868483010152809750505050505050620003fc60a08801620002b5565b90509295509295509295565b600181811c908216806200041d57607f821691505b6020821081036200043e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200049257600081815260208120601f850160051c810160208610156200046d5750805b601f850160051c820191505b818110156200048e5782815560010162000479565b5050505b505050565b81516001600160401b03811115620004b357620004b3620002d2565b620004cb81620004c4845462000408565b8462000444565b602080601f831160018114620005035760008415620004ea5750858301515b600019600386901b1c1916600185901b1785556200048e565b600085815260208120601f198616915b82811015620005345788860151825594840194600190910190840162000513565b5085821015620005535787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516122366200062260003960008181610343015261122801526000818161024201528181610d8c0152610dd00152600081816102840152818161092001528181610f8601528181611294015281816114cf01528181611630015281816116ca015281816116f3015281816119780152611a2f015260008181610626015281816110b401528181611136015281816111800152818161144a0152818161175b015281816117f5015261181e01526122366000f3fe6080604052600436106101e75760003560e01c80638da5cb5b11610102578063dd19171911610095578063efca2eed11610064578063efca2eed146105de578063f2fde38b146105f4578063ff2fb57c14610614578063ff50abdc1461064857600080fd5b8063dd19171914610567578063e111f6b41461057c578063e12f3a611461059c578063e567e869146105bc57600080fd5b8063b6b55f25116100d1578063b6b55f25146104f1578063cc279e8014610511578063d54ad2a114610531578063d5a73fdd1461054757600080fd5b80638da5cb5b1461046357806395ccea671461048157806396fa7800146104a1578063a7931397146104b657600080fd5b80634e71d92d1161017a578063715018a611610149578063715018a61461040457806382299a5c14610419578063828245681461042e5780638456cb591461044e57600080fd5b80634e71d92d1461037c57806358e47004146103915780635a999bea146103b15780635c975abb146103e157600080fd5b80632fcb3058116101b65780632fcb3058146102e657806331e8a7ef146102fb5780633ba0b9a9146103315780633f4ba83a1461036557600080fd5b80630676c1b7146101f35780631514617e1461023057806319d152fa146102725780631c88ef1e146102a657600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b50600454610213906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561023c57600080fd5b506102647f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610227565b34801561027e57600080fd5b506102137f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b257600080fd5b506102c66102c1366004611f1d565b61065e565b604080519485526020850193909352918301526060820152608001610227565b3480156102f257600080fd5b50610264606481565b34801561030757600080fd5b50610264610316366004611f47565b6001600160a01b031660009081526005602052604090205490565b34801561033d57600080fd5b506102647f000000000000000000000000000000000000000000000000000000000000000081565b34801561037157600080fd5b5061037a610755565b005b34801561038857600080fd5b5061037a610790565b34801561039d57600080fd5b5061037a6103ac366004611f47565b610989565b3480156103bd57600080fd5b506103d16103cc366004611f47565b610a09565b6040516102279493929190611fa4565b3480156103ed57600080fd5b5060025460ff166040519015158152602001610227565b34801561041057600080fd5b5061037a610cde565b34801561042557600080fd5b50610264610d39565b34801561043a57600080fd5b50610264610449366004612012565b610d50565b34801561045a57600080fd5b5061037a610e19565b34801561046f57600080fd5b506000546001600160a01b0316610213565b34801561048d57600080fd5b5061037a61049c366004611f1d565b610e54565b3480156104ad57600080fd5b50610264610f6e565b3480156104c257600080fd5b506104d66104d1366004611f1d565b610ff9565b60408051938452602084019290925290820152606001610227565b3480156104fd57600080fd5b5061037a61050c36600461207c565b61103b565b34801561051d57600080fd5b5061037a61052c36600461207c565b6114ba565b34801561053d57600080fd5b5061026460085481565b34801561055357600080fd5b50610264610562366004611f47565b61152d565b34801561057357600080fd5b5061037a6115fe565b34801561058857600080fd5b5061037a61059736600461207c565b611943565b3480156105a857600080fd5b506102646105b7366004611f47565b611a8f565b3480156105c857600080fd5b506105d1611bac565b6040516102279190612095565b3480156105ea57600080fd5b5061026460075481565b34801561060057600080fd5b5061037a61060f366004611f47565b611c3a565b34801561062057600080fd5b506102137f000000000000000000000000000000000000000000000000000000000000000081565b34801561065457600080fd5b5061026460065481565b6001600160a01b03821660009081526005602052604081205481908190819085106106c95760405162461bcd60e51b8152602060048201526016602482015275092dcecc2d8d2c840e0dee6d2e8d2dedc40d2dcc8caf60531b60448201526064015b60405180910390fd5b6001600160a01b03861660009081526005602052604081208054879081106106f3576106f36120e3565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505090508060000151816020015161073f83610d50565b6040909301519199909850919650945092505050565b61075d611c75565b610765611ca2565b6040517f0e5e3b3fb504c22cf5c42fa07d521225937514c654007e1f12646f89768d6f9490600090a1565b610798611cf4565b6107a0611d1e565b33600090815260056020526040812080549091036107d1576040516316b105f360e11b815260040160405180910390fd5b6000805b82548110156108d95760006108318483815481106107f5576107f56120e3565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050610d50565b9050838281548110610845576108456120e3565b9060005260206000209060030201600101548111156108c6576000848381548110610872576108726120e3565b9060005260206000209060030201600101548261088f919061210f565b9050818584815481106108a4576108a46120e3565b60009182526020909120600160039092020101556108c28185612128565b9350505b50806108d18161213b565b9150506107d5565b50806000036108fb576040516312d37ee560e31b815260040160405180910390fd5b806008600082825461090d9190612128565b9091555061094790506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611d42565b60405181815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a2505061098760018055565b565b610991611c75565b6001600160a01b0381166109e75760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642070726f746f636f6c2061646472657373000000000000000060448201526064016106c0565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b606080606080600060056000876001600160a01b03166001600160a01b03168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610aa65783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190610a56565b505082519293508291505067ffffffffffffffff811115610ac957610ac9611ffc565b604051908082528060200260200182016040528015610af2578160200160208202803683370190505b5095508067ffffffffffffffff811115610b0e57610b0e611ffc565b604051908082528060200260200182016040528015610b37578160200160208202803683370190505b5094508067ffffffffffffffff811115610b5357610b53611ffc565b604051908082528060200260200182016040528015610b7c578160200160208202803683370190505b5093508067ffffffffffffffff811115610b9857610b98611ffc565b604051908082528060200260200182016040528015610bc1578160200160208202803683370190505b50925060005b81811015610cd457828181518110610be157610be16120e3565b602002602001015160000151878281518110610bff57610bff6120e3565b602002602001018181525050828181518110610c1d57610c1d6120e3565b602002602001015160200151868281518110610c3b57610c3b6120e3565b602002602001018181525050610c69838281518110610c5c57610c5c6120e3565b6020026020010151610d50565b858281518110610c7b57610c7b6120e3565b602002602001018181525050828181518110610c9957610c996120e3565b602002602001015160400151848281518110610cb757610cb76120e3565b602090810291909101015280610ccc8161213b565b915050610bc7565b5050509193509193565b610ce6611c75565b60405162461bcd60e51b815260206004820152602260248201527f4f776e6572736869702072656e756e63696174696f6e2069732064697361626c604482015261195960f21b60648201526084016106c0565b6000600854600754610d4b919061210f565b905090565b80516000908103610d6357506000919050565b8151600090610d7490600290612154565b90506000836040015142610d88919061210f565b90507f00000000000000000000000000000000000000000000000000000000000000008110610dba5750509051919050565b8351600090610dca90849061210f565b905060007f0000000000000000000000000000000000000000000000000000000000000000610df98484612176565b610e039190612154565b9050610e0f8185612128565b9695505050505050565b610e21611c75565b610e29611da1565b6040517fab35696f06e428ebc5ceba8cd17f8fed287baf43440206d1943af1ee53e6d26790600090a1565b610e5c611c75565b6001600160a01b038216610f1357600080546040516001600160a01b039091169083908381818185875af1925050503d8060008114610eb7576040519150601f19603f3d011682016040523d82523d6000602084013e610ebc565b606091505b5050905080610f0d5760405162461bcd60e51b815260206004820152601c60248201527f4e617469766520746f6b656e207472616e73666572206661696c65640000000060448201526064016106c0565b50610f39565b610f39610f286000546001600160a01b031690565b6001600160a01b0384169083611d42565b816001600160a01b03166000805160206121e183398151915282604051610f6291815260200190565b60405180910390a25050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610fd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4b919061218d565b6005602052816000526040600020818154811061101557600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b611043611cf4565b61104b611d1e565b8060000361106c5760405163162908e360e11b815260040160405180910390fd5b3360009081526005602052604090205460641161109c57604051634218d0ad60e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611127919061218d565b905061115e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611dde565b6040516370a0823160e01b815230600482015260009082906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156111c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111eb919061218d565b6111f5919061210f565b9050806000036112185760405163162908e360e11b815260040160405180910390fd5b6000670de0b6b3a764000061124d7f000000000000000000000000000000000000000000000000000000000000000084612176565b6112579190612154565b90506103e881101561127c57604051630e75d8bd60e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156112e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611307919061218d565b90506000611313610d39565b9050600081831161132557600061132f565b61132f828461210f565b9050808411156113525760405163756091df60e01b815260040160405180910390fd5b33600090815260056020908152604080832081516060810183528881528084018581524293820193845282546001818101855593875294862091516003909502909101938455519083015551600290910155600680548792906113b6908490612128565b9250508190555083600760008282546113cf9190612128565b9091555050336000818152600560205260409020547f91ede45f04a37a7c170f5c1207df3b6bc748dc1e04ad5e917a241d0f52feada390879087906114169060019061210f565b6040805193845260208401929092529082015260600160405180910390a2604051630852cd8d60e31b8152600481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561149657600080fd5b505af19250505080156114a7575060015b505050505050506114b760018055565b50565b6114c2611c75565b6114f76001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084611dde565b6040518181527f638870bdfc5047937915a57198142d6d86a122894486c4e1d1a370565afcda8e9060200160405180910390a150565b6001600160a01b038116600090815260056020908152604080832080548251818502810185019093528083528493849084015b828210156115b05783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190611560565b5050505090506000805b82518110156115f6576115d8838281518110610c5c57610c5c6120e3565b6115e29083612128565b9150806115ee8161213b565b9150506115ba565b509392505050565b611606611c75565b60025460ff1661161857611618611da1565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561167f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a3919061218d565b90508015611743576116f16116c06000546001600160a01b031690565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083611d42565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000805160206121e18339815191528260405161173a91815260200190565b60405180910390a25b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156117aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ce919061218d565b9050801561186e5761181c6117eb6000546001600160a01b031690565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083611d42565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166000805160206121e18339815191528260405161186591815260200190565b60405180910390a25b47801561193e57600080546040516001600160a01b039091169083908381818185875af1925050503d80600081146118c2576040519150601f19603f3d011682016040523d82523d6000602084013e6118c7565b606091505b50509050806119185760405162461bcd60e51b815260206004820152601c60248201527f4e617469766520746f6b656e207472616e73666572206661696c65640000000060448201526064016106c0565b6040518281526000906000805160206121e18339815191529060200160405180910390a2505b505050565b61194b611c75565b6000611955610d39565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156119bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e3919061218d565b905060008282116119f55760006119ff565b6119ff838361210f565b905080841115611a22576040516368c7388f60e11b815260040160405180910390fd5b611a566001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163386611d42565b6040518481527fb11faaa25eeca66d7059069ff7f1678545eb1d9626a2c1ca88c9790b26ac84909060200160405180910390a150505050565b6001600160a01b038116600090815260056020908152604080832080548251818502810185019093528083528493849084015b82821015611b125783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190611ac2565b5050505090506000805b82518110156115f6576000611b3c848381518110610c5c57610c5c6120e3565b9050838281518110611b5057611b506120e3565b602002602001015160200151811115611b9957838281518110611b7557611b756120e3565b60200260200101516020015181611b8c919061210f565b611b969084612128565b92505b5080611ba48161213b565b915050611b1c565b60038054611bb9906121a6565b80601f0160208091040260200160405190810160405280929190818152602001828054611be5906121a6565b8015611c325780601f10611c0757610100808354040283529160200191611c32565b820191906000526020600020905b815481529060010190602001808311611c1557829003601f168201915b505050505081565b611c42611c75565b6001600160a01b038116611c6c57604051631e4fbdf760e01b8152600060048201526024016106c0565b6114b781611e1d565b6000546001600160a01b031633146109875760405163118cdaa760e01b81523360048201526024016106c0565b611caa611e6d565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600260015403611d1757604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b60025460ff16156109875760405163d93c066560e01b815260040160405180910390fd5b6040516001600160a01b0383811660248301526044820183905261193e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611e90565b611da9611d1e565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611cd73390565b6040516001600160a01b038481166024830152838116604483015260648201839052611e179186918216906323b872dd90608401611d6f565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff1661098757604051638dfc202b60e01b815260040160405180910390fd5b600080602060008451602086016000885af180611eb3576040513d6000823e3d81fd5b50506000513d91508115611ecb578060011415611ed8565b6001600160a01b0384163b155b15611e1757604051635274afe760e01b81526001600160a01b03851660048201526024016106c0565b80356001600160a01b0381168114611f1857600080fd5b919050565b60008060408385031215611f3057600080fd5b611f3983611f01565b946020939093013593505050565b600060208284031215611f5957600080fd5b611f6282611f01565b9392505050565b600081518084526020808501945080840160005b83811015611f9957815187529582019590820190600101611f7d565b509495945050505050565b608081526000611fb76080830187611f69565b8281036020840152611fc98187611f69565b90508281036040840152611fdd8186611f69565b90508281036060840152611ff18185611f69565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b60006060828403121561202457600080fd5b6040516060810181811067ffffffffffffffff8211171561205557634e487b7160e01b600052604160045260246000fd5b80604052508235815260208301356020820152604083013560408201528091505092915050565b60006020828403121561208e57600080fd5b5035919050565b600060208083528351808285015260005b818110156120c2578581018301518582016040015282016120a6565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612122576121226120f9565b92915050565b80820180821115612122576121226120f9565b60006001820161214d5761214d6120f9565b5060010190565b60008261217157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417612122576121226120f9565b60006020828403121561219f57600080fd5b5051919050565b600181811c908216806121ba57607f821691505b6020821081036121da57634e487b7160e01b600052602260045260246000fd5b5091905056fe5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695a264697066735822122063ce300deed40043bffd111d0ddeb98a13aa91c2546856f3fee9025d0e35fe1764736f6c634300081400330000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38000000000000000000000000000000000000000000000000000000000076a70000000000000000000000000000000000000000000000000007d1fea1f7e2100000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000ecbe5accade96ad03f89dd1999a38b6f0eff868100000000000000000000000000000000000000000000000000000000000000054265657473000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101e75760003560e01c80638da5cb5b11610102578063dd19171911610095578063efca2eed11610064578063efca2eed146105de578063f2fde38b146105f4578063ff2fb57c14610614578063ff50abdc1461064857600080fd5b8063dd19171914610567578063e111f6b41461057c578063e12f3a611461059c578063e567e869146105bc57600080fd5b8063b6b55f25116100d1578063b6b55f25146104f1578063cc279e8014610511578063d54ad2a114610531578063d5a73fdd1461054757600080fd5b80638da5cb5b1461046357806395ccea671461048157806396fa7800146104a1578063a7931397146104b657600080fd5b80634e71d92d1161017a578063715018a611610149578063715018a61461040457806382299a5c14610419578063828245681461042e5780638456cb591461044e57600080fd5b80634e71d92d1461037c57806358e47004146103915780635a999bea146103b15780635c975abb146103e157600080fd5b80632fcb3058116101b65780632fcb3058146102e657806331e8a7ef146102fb5780633ba0b9a9146103315780633f4ba83a1461036557600080fd5b80630676c1b7146101f35780631514617e1461023057806319d152fa146102725780631c88ef1e146102a657600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b50600454610213906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561023c57600080fd5b506102647f000000000000000000000000000000000000000000000000000000000076a70081565b604051908152602001610227565b34801561027e57600080fd5b506102137f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3881565b3480156102b257600080fd5b506102c66102c1366004611f1d565b61065e565b604080519485526020850193909352918301526060820152608001610227565b3480156102f257600080fd5b50610264606481565b34801561030757600080fd5b50610264610316366004611f47565b6001600160a01b031660009081526005602052604090205490565b34801561033d57600080fd5b506102647f00000000000000000000000000000000000000000000000007d1fea1f7e2100081565b34801561037157600080fd5b5061037a610755565b005b34801561038857600080fd5b5061037a610790565b34801561039d57600080fd5b5061037a6103ac366004611f47565b610989565b3480156103bd57600080fd5b506103d16103cc366004611f47565b610a09565b6040516102279493929190611fa4565b3480156103ed57600080fd5b5060025460ff166040519015158152602001610227565b34801561041057600080fd5b5061037a610cde565b34801561042557600080fd5b50610264610d39565b34801561043a57600080fd5b50610264610449366004612012565b610d50565b34801561045a57600080fd5b5061037a610e19565b34801561046f57600080fd5b506000546001600160a01b0316610213565b34801561048d57600080fd5b5061037a61049c366004611f1d565b610e54565b3480156104ad57600080fd5b50610264610f6e565b3480156104c257600080fd5b506104d66104d1366004611f1d565b610ff9565b60408051938452602084019290925290820152606001610227565b3480156104fd57600080fd5b5061037a61050c36600461207c565b61103b565b34801561051d57600080fd5b5061037a61052c36600461207c565b6114ba565b34801561053d57600080fd5b5061026460085481565b34801561055357600080fd5b50610264610562366004611f47565b61152d565b34801561057357600080fd5b5061037a6115fe565b34801561058857600080fd5b5061037a61059736600461207c565b611943565b3480156105a857600080fd5b506102646105b7366004611f47565b611a8f565b3480156105c857600080fd5b506105d1611bac565b6040516102279190612095565b3480156105ea57600080fd5b5061026460075481565b34801561060057600080fd5b5061037a61060f366004611f47565b611c3a565b34801561062057600080fd5b506102137f0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d81565b34801561065457600080fd5b5061026460065481565b6001600160a01b03821660009081526005602052604081205481908190819085106106c95760405162461bcd60e51b8152602060048201526016602482015275092dcecc2d8d2c840e0dee6d2e8d2dedc40d2dcc8caf60531b60448201526064015b60405180910390fd5b6001600160a01b03861660009081526005602052604081208054879081106106f3576106f36120e3565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505090508060000151816020015161073f83610d50565b6040909301519199909850919650945092505050565b61075d611c75565b610765611ca2565b6040517f0e5e3b3fb504c22cf5c42fa07d521225937514c654007e1f12646f89768d6f9490600090a1565b610798611cf4565b6107a0611d1e565b33600090815260056020526040812080549091036107d1576040516316b105f360e11b815260040160405180910390fd5b6000805b82548110156108d95760006108318483815481106107f5576107f56120e3565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050610d50565b9050838281548110610845576108456120e3565b9060005260206000209060030201600101548111156108c6576000848381548110610872576108726120e3565b9060005260206000209060030201600101548261088f919061210f565b9050818584815481106108a4576108a46120e3565b60009182526020909120600160039092020101556108c28185612128565b9350505b50806108d18161213b565b9150506107d5565b50806000036108fb576040516312d37ee560e31b815260040160405180910390fd5b806008600082825461090d9190612128565b9091555061094790506001600160a01b037f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38163383611d42565b60405181815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a2505061098760018055565b565b610991611c75565b6001600160a01b0381166109e75760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642070726f746f636f6c2061646472657373000000000000000060448201526064016106c0565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b606080606080600060056000876001600160a01b03166001600160a01b03168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610aa65783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190610a56565b505082519293508291505067ffffffffffffffff811115610ac957610ac9611ffc565b604051908082528060200260200182016040528015610af2578160200160208202803683370190505b5095508067ffffffffffffffff811115610b0e57610b0e611ffc565b604051908082528060200260200182016040528015610b37578160200160208202803683370190505b5094508067ffffffffffffffff811115610b5357610b53611ffc565b604051908082528060200260200182016040528015610b7c578160200160208202803683370190505b5093508067ffffffffffffffff811115610b9857610b98611ffc565b604051908082528060200260200182016040528015610bc1578160200160208202803683370190505b50925060005b81811015610cd457828181518110610be157610be16120e3565b602002602001015160000151878281518110610bff57610bff6120e3565b602002602001018181525050828181518110610c1d57610c1d6120e3565b602002602001015160200151868281518110610c3b57610c3b6120e3565b602002602001018181525050610c69838281518110610c5c57610c5c6120e3565b6020026020010151610d50565b858281518110610c7b57610c7b6120e3565b602002602001018181525050828181518110610c9957610c996120e3565b602002602001015160400151848281518110610cb757610cb76120e3565b602090810291909101015280610ccc8161213b565b915050610bc7565b5050509193509193565b610ce6611c75565b60405162461bcd60e51b815260206004820152602260248201527f4f776e6572736869702072656e756e63696174696f6e2069732064697361626c604482015261195960f21b60648201526084016106c0565b6000600854600754610d4b919061210f565b905090565b80516000908103610d6357506000919050565b8151600090610d7490600290612154565b90506000836040015142610d88919061210f565b90507f000000000000000000000000000000000000000000000000000000000076a7008110610dba5750509051919050565b8351600090610dca90849061210f565b905060007f000000000000000000000000000000000000000000000000000000000076a700610df98484612176565b610e039190612154565b9050610e0f8185612128565b9695505050505050565b610e21611c75565b610e29611da1565b6040517fab35696f06e428ebc5ceba8cd17f8fed287baf43440206d1943af1ee53e6d26790600090a1565b610e5c611c75565b6001600160a01b038216610f1357600080546040516001600160a01b039091169083908381818185875af1925050503d8060008114610eb7576040519150601f19603f3d011682016040523d82523d6000602084013e610ebc565b606091505b5050905080610f0d5760405162461bcd60e51b815260206004820152601c60248201527f4e617469766520746f6b656e207472616e73666572206661696c65640000000060448201526064016106c0565b50610f39565b610f39610f286000546001600160a01b031690565b6001600160a01b0384169083611d42565b816001600160a01b03166000805160206121e183398151915282604051610f6291815260200190565b60405180910390a25050565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316906370a0823190602401602060405180830381865afa158015610fd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4b919061218d565b6005602052816000526040600020818154811061101557600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b611043611cf4565b61104b611d1e565b8060000361106c5760405163162908e360e11b815260040160405180910390fd5b3360009081526005602052604090205460641161109c57604051634218d0ad60e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d6001600160a01b0316906370a0823190602401602060405180830381865afa158015611103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611127919061218d565b905061115e6001600160a01b037f0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d16333085611dde565b6040516370a0823160e01b815230600482015260009082906001600160a01b037f0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d16906370a0823190602401602060405180830381865afa1580156111c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111eb919061218d565b6111f5919061210f565b9050806000036112185760405163162908e360e11b815260040160405180910390fd5b6000670de0b6b3a764000061124d7f00000000000000000000000000000000000000000000000007d1fea1f7e2100084612176565b6112579190612154565b90506103e881101561127c57604051630e75d8bd60e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316906370a0823190602401602060405180830381865afa1580156112e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611307919061218d565b90506000611313610d39565b9050600081831161132557600061132f565b61132f828461210f565b9050808411156113525760405163756091df60e01b815260040160405180910390fd5b33600090815260056020908152604080832081516060810183528881528084018581524293820193845282546001818101855593875294862091516003909502909101938455519083015551600290910155600680548792906113b6908490612128565b9250508190555083600760008282546113cf9190612128565b9091555050336000818152600560205260409020547f91ede45f04a37a7c170f5c1207df3b6bc748dc1e04ad5e917a241d0f52feada390879087906114169060019061210f565b6040805193845260208401929092529082015260600160405180910390a2604051630852cd8d60e31b8152600481018690527f0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d6001600160a01b0316906342966c6890602401600060405180830381600087803b15801561149657600080fd5b505af19250505080156114a7575060015b505050505050506114b760018055565b50565b6114c2611c75565b6114f76001600160a01b037f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3816333084611dde565b6040518181527f638870bdfc5047937915a57198142d6d86a122894486c4e1d1a370565afcda8e9060200160405180910390a150565b6001600160a01b038116600090815260056020908152604080832080548251818502810185019093528083528493849084015b828210156115b05783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190611560565b5050505090506000805b82518110156115f6576115d8838281518110610c5c57610c5c6120e3565b6115e29083612128565b9150806115ee8161213b565b9150506115ba565b509392505050565b611606611c75565b60025460ff1661161857611618611da1565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b0316906370a0823190602401602060405180830381865afa15801561167f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a3919061218d565b90508015611743576116f16116c06000546001600160a01b031690565b6001600160a01b037f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38169083611d42565b7f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b03166000805160206121e18339815191528260405161173a91815260200190565b60405180910390a25b6040516370a0823160e01b81523060048201526000907f0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d6001600160a01b0316906370a0823190602401602060405180830381865afa1580156117aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ce919061218d565b9050801561186e5761181c6117eb6000546001600160a01b031690565b6001600160a01b037f0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d169083611d42565b7f0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d6001600160a01b03166000805160206121e18339815191528260405161186591815260200190565b60405180910390a25b47801561193e57600080546040516001600160a01b039091169083908381818185875af1925050503d80600081146118c2576040519150601f19603f3d011682016040523d82523d6000602084013e6118c7565b606091505b50509050806119185760405162461bcd60e51b815260206004820152601c60248201527f4e617469766520746f6b656e207472616e73666572206661696c65640000000060448201526064016106c0565b6040518281526000906000805160206121e18339815191529060200160405180910390a2505b505050565b61194b611c75565b6000611955610d39565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3816906370a0823190602401602060405180830381865afa1580156119bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e3919061218d565b905060008282116119f55760006119ff565b6119ff838361210f565b905080841115611a22576040516368c7388f60e11b815260040160405180910390fd5b611a566001600160a01b037f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38163386611d42565b6040518481527fb11faaa25eeca66d7059069ff7f1678545eb1d9626a2c1ca88c9790b26ac84909060200160405180910390a150505050565b6001600160a01b038116600090815260056020908152604080832080548251818502810185019093528083528493849084015b82821015611b125783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190611ac2565b5050505090506000805b82518110156115f6576000611b3c848381518110610c5c57610c5c6120e3565b9050838281518110611b5057611b506120e3565b602002602001015160200151811115611b9957838281518110611b7557611b756120e3565b60200260200101516020015181611b8c919061210f565b611b969084612128565b92505b5080611ba48161213b565b915050611b1c565b60038054611bb9906121a6565b80601f0160208091040260200160405190810160405280929190818152602001828054611be5906121a6565b8015611c325780601f10611c0757610100808354040283529160200191611c32565b820191906000526020600020905b815481529060010190602001808311611c1557829003601f168201915b505050505081565b611c42611c75565b6001600160a01b038116611c6c57604051631e4fbdf760e01b8152600060048201526024016106c0565b6114b781611e1d565b6000546001600160a01b031633146109875760405163118cdaa760e01b81523360048201526024016106c0565b611caa611e6d565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600260015403611d1757604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b60025460ff16156109875760405163d93c066560e01b815260040160405180910390fd5b6040516001600160a01b0383811660248301526044820183905261193e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611e90565b611da9611d1e565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611cd73390565b6040516001600160a01b038481166024830152838116604483015260648201839052611e179186918216906323b872dd90608401611d6f565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff1661098757604051638dfc202b60e01b815260040160405180910390fd5b600080602060008451602086016000885af180611eb3576040513d6000823e3d81fd5b50506000513d91508115611ecb578060011415611ed8565b6001600160a01b0384163b155b15611e1757604051635274afe760e01b81526001600160a01b03851660048201526024016106c0565b80356001600160a01b0381168114611f1857600080fd5b919050565b60008060408385031215611f3057600080fd5b611f3983611f01565b946020939093013593505050565b600060208284031215611f5957600080fd5b611f6282611f01565b9392505050565b600081518084526020808501945080840160005b83811015611f9957815187529582019590820190600101611f7d565b509495945050505050565b608081526000611fb76080830187611f69565b8281036020840152611fc98187611f69565b90508281036040840152611fdd8186611f69565b90508281036060840152611ff18185611f69565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b60006060828403121561202457600080fd5b6040516060810181811067ffffffffffffffff8211171561205557634e487b7160e01b600052604160045260246000fd5b80604052508235815260208301356020820152604083013560408201528091505092915050565b60006020828403121561208e57600080fd5b5035919050565b600060208083528351808285015260005b818110156120c2578581018301518582016040015282016120a6565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612122576121226120f9565b92915050565b80820180821115612122576121226120f9565b60006001820161214d5761214d6120f9565b5060010190565b60008261217157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417612122576121226120f9565b60006020828403121561219f57600080fd5b5051919050565b600181811c908216806121ba57607f821691505b6020821081036121da57634e487b7160e01b600052602260045260246000fd5b5091905056fe5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695a264697066735822122063ce300deed40043bffd111d0ddeb98a13aa91c2546856f3fee9025d0e35fe1764736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38000000000000000000000000000000000000000000000000000000000076a70000000000000000000000000000000000000000000000000007d1fea1f7e2100000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000ecbe5accade96ad03f89dd1999a38b6f0eff868100000000000000000000000000000000000000000000000000000000000000054265657473000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _gemToken (address): 0x3419966bC74fa8f951108d15b053bEd233974d3D
Arg [1] : _vestingToken (address): 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38
Arg [2] : _vestingDuration (uint256): 7776000
Arg [3] : _exchangeRate (uint256): 563511400000000000
Arg [4] : _protocolName (string): Beets
Arg [5] : _protocolAddress (address): 0xeCbe5accADe96aD03F89DD1999A38b6f0eff8681
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000003419966bc74fa8f951108d15b053bed233974d3d
Arg [1] : 000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38
Arg [2] : 000000000000000000000000000000000000000000000000000000000076a700
Arg [3] : 00000000000000000000000000000000000000000000000007d1fea1f7e21000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [5] : 000000000000000000000000ecbe5accade96ad03f89dd1999a38b6f0eff8681
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [7] : 4265657473000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$53,851.06
Net Worth in S
Token Allocations
WS
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| SONIC | 100.00% | $0.070394 | 764,994.9588 | $53,851.06 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.