Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 156 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 18778333 | 402 days ago | IN | 0 ETH | 0.00309634 | ||||
Withdraw | 18661697 | 418 days ago | IN | 0 ETH | 0.00121972 | ||||
Set End Time | 18618571 | 424 days ago | IN | 0 ETH | 0.00079687 | ||||
Swap | 18618325 | 424 days ago | IN | 0 ETH | 0.00275749 | ||||
Swap | 18616660 | 425 days ago | IN | 0 ETH | 0.00534038 | ||||
Set End Time | 18614416 | 425 days ago | IN | 0 ETH | 0.00106052 | ||||
Swap | 18586456 | 429 days ago | IN | 0 ETH | 0.00398655 | ||||
Swap | 18585151 | 429 days ago | IN | 0 ETH | 0.00384067 | ||||
Set End Time | 18585027 | 429 days ago | IN | 0 ETH | 0.0010257 | ||||
Swap | 18582285 | 429 days ago | IN | 0 ETH | 0.00283071 | ||||
Swap | 18581792 | 430 days ago | IN | 0 ETH | 0.0029881 | ||||
Withdraw | 18577720 | 430 days ago | IN | 0 ETH | 0.00129705 | ||||
Set End Time | 18577452 | 430 days ago | IN | 0 ETH | 0.00092898 | ||||
Swap | 18539750 | 435 days ago | IN | 0 ETH | 0.00303958 | ||||
Swap | 18539630 | 435 days ago | IN | 0 ETH | 0.00291933 | ||||
Swap | 18535367 | 436 days ago | IN | 0 ETH | 0.01296224 | ||||
Swap | 18534766 | 436 days ago | IN | 0 ETH | 0.00467803 | ||||
Swap | 18533019 | 436 days ago | IN | 0 ETH | 0.00274544 | ||||
Swap | 18530934 | 437 days ago | IN | 0 ETH | 0.00242061 | ||||
Swap | 18527072 | 437 days ago | IN | 0 ETH | 0.0025217 | ||||
Swap | 18524119 | 438 days ago | IN | 0 ETH | 0.00168377 | ||||
Swap | 18523011 | 438 days ago | IN | 0 ETH | 0.00270613 | ||||
Swap | 18522590 | 438 days ago | IN | 0 ETH | 0.002843 | ||||
Set End Time | 18522211 | 438 days ago | IN | 0 ETH | 0.00080077 | ||||
Swap | 18518500 | 438 days ago | IN | 0 ETH | 0.00191238 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
LaiSwapV2
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BSL pragma solidity 0.8.19; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract LaiSwapV2 is Pausable, Ownable, ReentrancyGuard { using SafeERC20 for IERC20; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address public immutable gpt; address public immutable lai; uint256 public totalSwapped; uint256 public startTime; uint256 public endTime; event Swapped(address indexed user, uint256 amount); event StartTimeChanged(uint256 fromTime, uint256 toTime); event EndTimeChanged(uint256 fromTime, uint256 toTime); struct MonitoredAddress { address _address; uint256 _amount; } MonitoredAddress public monitoredBalance; MonitoredAddress public monitoredSupply; event MonitoredBalanceChanged( address indexed fromAddress, address indexed toAddress, uint256 fromAmount, uint256 toAmount ); event MonitoredSupplyChanged( address indexed fromAddress, address indexed toAddress, uint256 fromAmount, uint256 toAmount ); constructor( address _gpt, address _lai, uint256 _startTime, uint256 _endTime ) { gpt = _gpt; lai = _lai; startTime = _startTime; endTime = _endTime; } modifier whenLive() { require( block.timestamp >= startTime && block.timestamp < endTime, "LaiSwap: not live" ); _; } /** * @notice This modifier checks if the total supply of GPT tokens mathces the monitored amount. * @dev The modifier is only relevant if the monitored address is set. */ modifier ensureMonitoredSupply() { (address address_, uint256 amount_) = ( monitoredSupply._address, monitoredSupply._amount ); if (address_ == address(0)) { _; } else { require( IERC20(address_).totalSupply() == amount_, "LaiSwap: monitored supply mismatch" ); _; } } /** * @notice This modifier checks if the monitored address has the monitored amount of GPT tokens. * @dev The modifier is only relevant if the monitored address is set. */ modifier ensureMonitoredBalance() { (address address_, uint256 amount_) = ( monitoredBalance._address, monitoredBalance._amount ); if (address_ == address(0)) { _; } else { require(msg.sender != address_, "LaiSwap: sender is monitored"); require( IERC20(gpt).balanceOf(address_) == amount_, "LaiSwap: monitored balance mismatch" ); _; } } /** * @notice This function allows a user to swap their GPT tokens for LAI tokens. * @dev The function can only be called when the contract is not paused and during the live period. * Additionally, it requires the monitored address to have the monitored amount of GPT tokens. * @param amount The amount of GPT tokens the user wants to swap for LAI tokens. */ function swap( uint256 amount ) external nonReentrant whenNotPaused whenLive ensureMonitoredSupply ensureMonitoredBalance { require(amount > 0, "LaiSwap: amount must be greater than 0"); totalSwapped += amount; IERC20(gpt).safeTransferFrom(msg.sender, DEAD, amount); IERC20(lai).safeTransfer(msg.sender, amount); emit Swapped(msg.sender, amount); } // Owner functions function togglePause() external onlyOwner { if (paused()) { _unpause(); } else { _pause(); } } function setStartTime(uint256 _startTime) external onlyOwner { emit StartTimeChanged(startTime, _startTime); startTime = _startTime; } function setEndTime(uint256 _endTime) external onlyOwner { emit EndTimeChanged(endTime, _endTime); endTime = _endTime; } function setTimes(uint256 _startTime, uint256 _endTime) external onlyOwner { require( _startTime != startTime || _endTime != endTime, "LaiSwap: no time changes" ); if (_startTime != startTime) { emit StartTimeChanged(startTime, _startTime); startTime = _startTime; } if (_endTime != endTime) { emit EndTimeChanged(endTime, _endTime); endTime = _endTime; } } function setMonitoredBalance( address _address, uint256 _amount ) external onlyOwner { emit MonitoredBalanceChanged( monitoredBalance._address, _address, monitoredBalance._amount, _amount ); monitoredBalance = MonitoredAddress(_address, _amount); } function setMonitoredSupply( address _address, uint256 _amount ) external onlyOwner { emit MonitoredSupplyChanged( monitoredSupply._address, _address, monitoredSupply._amount, _amount ); monitoredSupply = MonitoredAddress(_address, _amount); } function withdraw(address token, uint256 amount) external onlyOwner { IERC20(token).safeTransfer(msg.sender, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * 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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../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 { /** * @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. */ constructor() { _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()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @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 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; 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 require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // 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; } }
// 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 IERC20Permit { /** * @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 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 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.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.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 SafeERC20 { using Address 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(IERC20 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(IERC20 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(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' 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(IERC20 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(IERC20 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. 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. */ function forceApprove(IERC20 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( IERC20Permit 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(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. 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(IERC20 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))) && Address.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 Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * 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; /** * @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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/" ], "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_gpt","type":"address"},{"internalType":"address","name":"_lai","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fromTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTime","type":"uint256"}],"name":"EndTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"fromAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toAmount","type":"uint256"}],"name":"MonitoredBalanceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"fromAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toAmount","type":"uint256"}],"name":"MonitoredSupplyChanged","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":"uint256","name":"fromTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTime","type":"uint256"}],"name":"StartTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Swapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gpt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lai","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"monitoredBalance","outputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"monitoredSupply","outputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"setEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMonitoredBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMonitoredSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"setTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSwapped","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":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162001628380380620016288339810160408190526200003491620000e7565b6000805460ff19169055620000493362000071565b600180556001600160a01b039384166080529190921660a0526003919091556004556200012f565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b80516001600160a01b0381168114620000e257600080fd5b919050565b60008060008060808587031215620000fe57600080fd5b6200010985620000ca565b93506200011960208601620000ca565b6040860151606090960151949790965092505050565b60805160a05161148d6200019b600039600081816102090152818161054901528181610717015281816108b70152610a8501526000818161027a0152818161051201528181610611015281816106e0015281816108800152818161097f0152610a4e015261148d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80639780d011116100ad578063ea84d7bc11610071578063ea84d7bc14610262578063f053309a14610275578063f2fde38b1461029c578063f3fef3a3146102af578063fbe03308146102c257600080fd5b80639780d01114610204578063c4ae31681461022b578063c55f37f314610233578063ccb98ffc14610246578063d8501f4f1461025957600080fd5b8063715018a6116100f4578063715018a61461018057806378e9792514610188578063803b3eac146101915780638da5cb5b146101c757806394b918de146101f157600080fd5b806322434836146101265780633197cbb61461013b5780633e0a322d146101575780635c975abb1461016a575b600080fd5b610139610134366004611236565b6102d9565b005b61014460045481565b6040519081526020015b60405180910390f35b610139610165366004611258565b6103df565b60005460ff16604051901515815260200161014e565b610139610428565b61014460035481565b6005546006546101a8916001600160a01b03169082565b604080516001600160a01b03909316835260208301919091520161014e565b60005461010090046001600160a01b03165b6040516001600160a01b03909116815260200161014e565b6101396101ff366004611258565b61043c565b6101d97f000000000000000000000000000000000000000000000000000000000000000081565b610139610ae1565b61013961024136600461128d565b610b04565b610139610254366004611258565b610b92565b61014460025481565b61013961027036600461128d565b610bdb565b6101d97f000000000000000000000000000000000000000000000000000000000000000081565b6101396102aa3660046112b7565b610c69565b6101396102bd36600461128d565b610cdf565b6007546008546101a8916001600160a01b03169082565b6102e1610cfb565b600354821415806102f457506004548114155b6103455760405162461bcd60e51b815260206004820152601860248201527f4c6169537761703a206e6f2074696d65206368616e676573000000000000000060448201526064015b60405180910390fd5b60035482146103905760035460408051918252602082018490527fbefe8e3983c0dc663c4ba451fc82d4ff7eb2e4ccc4b944874abea1ecc841feae910160405180910390a160038290555b60045481146103db5760045460408051918252602082018390527f6cdad8629a6fd97b72424fa66d4b88752e2dfb2eb667e5d2b609a6544441aa3a910160405180910390a160048190555b5050565b6103e7610cfb565b60035460408051918252602082018390527fbefe8e3983c0dc663c4ba451fc82d4ff7eb2e4ccc4b944874abea1ecc841feae910160405180910390a1600355565b610430610cfb565b61043a6000610d5b565b565b610444610db4565b61044c610e0d565b600354421015801561045f575060045442105b61049f5760405162461bcd60e51b81526020600482015260116024820152704c6169537761703a206e6f74206c69766560781b604482015260640161033c565b6007546008546001600160a01b039091169081610769576005546006546001600160a01b03909116908161059857600085116104ed5760405162461bcd60e51b815260040161033c906112d9565b84600260008282546104ff919061131f565b9091555061053c90506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163361dead88610e53565b6105706001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163387610ec4565b60405185815233906000805160206114388339815191529060200160405180910390a2610762565b6001600160a01b03821633036105f05760405162461bcd60e51b815260206004820152601c60248201527f4c6169537761703a2073656e646572206973206d6f6e69746f72656400000000604482015260640161033c565b6040516370a0823160e01b81526001600160a01b03838116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561065a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067e9190611346565b1461069b5760405162461bcd60e51b815260040161033c9061135f565b600085116106bb5760405162461bcd60e51b815260040161033c906112d9565b84600260008282546106cd919061131f565b9091555061070a90506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163361dead88610e53565b61073e6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163387610ec4565b60405185815233906000805160206114388339815191529060200160405180910390a25b5050610ad3565b80826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cc9190611346565b146108245760405162461bcd60e51b815260206004820152602260248201527f4c6169537761703a206d6f6e69746f72656420737570706c79206d69736d61746044820152610c6d60f31b606482015260840161033c565b6005546006546001600160a01b039091169081610906576000851161085b5760405162461bcd60e51b815260040161033c906112d9565b846002600082825461086d919061131f565b909155506108aa90506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163361dead88610e53565b6108de6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163387610ec4565b60405185815233906000805160206114388339815191529060200160405180910390a2610ad0565b6001600160a01b038216330361095e5760405162461bcd60e51b815260206004820152601c60248201527f4c6169537761703a2073656e646572206973206d6f6e69746f72656400000000604482015260640161033c565b6040516370a0823160e01b81526001600160a01b03838116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156109c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ec9190611346565b14610a095760405162461bcd60e51b815260040161033c9061135f565b60008511610a295760405162461bcd60e51b815260040161033c906112d9565b8460026000828254610a3b919061131f565b90915550610a7890506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163361dead88610e53565b610aac6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163387610ec4565b60405185815233906000805160206114388339815191529060200160405180910390a25b50505b5050610ade60018055565b50565b610ae9610cfb565b60005460ff1615610afc5761043a610ef9565b61043a610f4b565b610b0c610cfb565b60055460065460408051918252602082018490526001600160a01b038581169316917fe92dde79e9f108f6095bd0863baa5e60c97fbba13b135a2a4b2c62d8288176f2910160405180910390a3604080518082019091526001600160a01b039092168083526020909201819052600580546001600160a01b031916909217909155600655565b610b9a610cfb565b60045460408051918252602082018390527f6cdad8629a6fd97b72424fa66d4b88752e2dfb2eb667e5d2b609a6544441aa3a910160405180910390a1600455565b610be3610cfb565b60075460085460408051918252602082018490526001600160a01b038581169316917f80706281e3404feb65680cfee11fbe668e071599c95d65ec7af8a23fdfdeaa8c910160405180910390a3604080518082019091526001600160a01b039092168083526020909201819052600780546001600160a01b031916909217909155600855565b610c71610cfb565b6001600160a01b038116610cd65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161033c565b610ade81610d5b565b610ce7610cfb565b6103db6001600160a01b0383163383610ec4565b6000546001600160a01b0361010090910416331461043a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161033c565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600260015403610e065760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161033c565b6002600155565b60005460ff161561043a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161033c565b6040516001600160a01b0380851660248301528316604482015260648101829052610ebe9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610f88565b50505050565b6040516001600160a01b038316602482015260448101829052610ef490849063a9059cbb60e01b90606401610e87565b505050565b610f0161105d565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610f53610e0d565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f2e3390565b6000610fdd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110a69092919063ffffffff16565b9050805160001480610ffe575080806020019051810190610ffe91906113a2565b610ef45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161033c565b60005460ff1661043a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161033c565b60606110b584846000856110bd565b949350505050565b60608247101561111e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161033c565b600080866001600160a01b0316858760405161113a91906113e8565b60006040518083038185875af1925050503d8060008114611177576040519150601f19603f3d011682016040523d82523d6000602084013e61117c565b606091505b509150915061118d87838387611198565b979650505050505050565b60608315611207578251600003611200576001600160a01b0385163b6112005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161033c565b50816110b5565b6110b5838381511561121c5781518083602001fd5b8060405162461bcd60e51b815260040161033c9190611404565b6000806040838503121561124957600080fd5b50508035926020909101359150565b60006020828403121561126a57600080fd5b5035919050565b80356001600160a01b038116811461128857600080fd5b919050565b600080604083850312156112a057600080fd5b6112a983611271565b946020939093013593505050565b6000602082840312156112c957600080fd5b6112d282611271565b9392505050565b60208082526026908201527f4c6169537761703a20616d6f756e74206d75737420626520677265617465722060408201526507468616e20360d41b606082015260800190565b8082018082111561134057634e487b7160e01b600052601160045260246000fd5b92915050565b60006020828403121561135857600080fd5b5051919050565b60208082526023908201527f4c6169537761703a206d6f6e69746f7265642062616c616e6365206d69736d616040820152620e8c6d60eb1b606082015260800190565b6000602082840312156113b457600080fd5b815180151581146112d257600080fd5b60005b838110156113df5781810151838201526020016113c7565b50506000910152565b600082516113fa8184602087016113c4565b9190910192915050565b60208152600082518060208401526114238160408501602087016113c4565b601f01601f1916919091016040019291505056fecdee897399ab5e465acb1bd3ed5e32c695f196321764546c59720fa6c9ce4c69a2646970667358221220cf5b16c2a564feca5701783f02c3e21ecbcd103f46ef6f2e5ddb478642331f0964736f6c63430008130033000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8000000000000000000000000168e209d7b2f58f1f24b8ae7b7d35e662bbf11cc0000000000000000000000000000000000000000000000000000000064fb1ad000000000000000000000000000000000000000000000000000000000654a18b0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80639780d011116100ad578063ea84d7bc11610071578063ea84d7bc14610262578063f053309a14610275578063f2fde38b1461029c578063f3fef3a3146102af578063fbe03308146102c257600080fd5b80639780d01114610204578063c4ae31681461022b578063c55f37f314610233578063ccb98ffc14610246578063d8501f4f1461025957600080fd5b8063715018a6116100f4578063715018a61461018057806378e9792514610188578063803b3eac146101915780638da5cb5b146101c757806394b918de146101f157600080fd5b806322434836146101265780633197cbb61461013b5780633e0a322d146101575780635c975abb1461016a575b600080fd5b610139610134366004611236565b6102d9565b005b61014460045481565b6040519081526020015b60405180910390f35b610139610165366004611258565b6103df565b60005460ff16604051901515815260200161014e565b610139610428565b61014460035481565b6005546006546101a8916001600160a01b03169082565b604080516001600160a01b03909316835260208301919091520161014e565b60005461010090046001600160a01b03165b6040516001600160a01b03909116815260200161014e565b6101396101ff366004611258565b61043c565b6101d97f000000000000000000000000168e209d7b2f58f1f24b8ae7b7d35e662bbf11cc81565b610139610ae1565b61013961024136600461128d565b610b04565b610139610254366004611258565b610b92565b61014460025481565b61013961027036600461128d565b610bdb565b6101d97f000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f881565b6101396102aa3660046112b7565b610c69565b6101396102bd36600461128d565b610cdf565b6007546008546101a8916001600160a01b03169082565b6102e1610cfb565b600354821415806102f457506004548114155b6103455760405162461bcd60e51b815260206004820152601860248201527f4c6169537761703a206e6f2074696d65206368616e676573000000000000000060448201526064015b60405180910390fd5b60035482146103905760035460408051918252602082018490527fbefe8e3983c0dc663c4ba451fc82d4ff7eb2e4ccc4b944874abea1ecc841feae910160405180910390a160038290555b60045481146103db5760045460408051918252602082018390527f6cdad8629a6fd97b72424fa66d4b88752e2dfb2eb667e5d2b609a6544441aa3a910160405180910390a160048190555b5050565b6103e7610cfb565b60035460408051918252602082018390527fbefe8e3983c0dc663c4ba451fc82d4ff7eb2e4ccc4b944874abea1ecc841feae910160405180910390a1600355565b610430610cfb565b61043a6000610d5b565b565b610444610db4565b61044c610e0d565b600354421015801561045f575060045442105b61049f5760405162461bcd60e51b81526020600482015260116024820152704c6169537761703a206e6f74206c69766560781b604482015260640161033c565b6007546008546001600160a01b039091169081610769576005546006546001600160a01b03909116908161059857600085116104ed5760405162461bcd60e51b815260040161033c906112d9565b84600260008282546104ff919061131f565b9091555061053c90506001600160a01b037f000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8163361dead88610e53565b6105706001600160a01b037f000000000000000000000000168e209d7b2f58f1f24b8ae7b7d35e662bbf11cc163387610ec4565b60405185815233906000805160206114388339815191529060200160405180910390a2610762565b6001600160a01b03821633036105f05760405162461bcd60e51b815260206004820152601c60248201527f4c6169537761703a2073656e646572206973206d6f6e69746f72656400000000604482015260640161033c565b6040516370a0823160e01b81526001600160a01b03838116600483015282917f000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8909116906370a0823190602401602060405180830381865afa15801561065a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067e9190611346565b1461069b5760405162461bcd60e51b815260040161033c9061135f565b600085116106bb5760405162461bcd60e51b815260040161033c906112d9565b84600260008282546106cd919061131f565b9091555061070a90506001600160a01b037f000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8163361dead88610e53565b61073e6001600160a01b037f000000000000000000000000168e209d7b2f58f1f24b8ae7b7d35e662bbf11cc163387610ec4565b60405185815233906000805160206114388339815191529060200160405180910390a25b5050610ad3565b80826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cc9190611346565b146108245760405162461bcd60e51b815260206004820152602260248201527f4c6169537761703a206d6f6e69746f72656420737570706c79206d69736d61746044820152610c6d60f31b606482015260840161033c565b6005546006546001600160a01b039091169081610906576000851161085b5760405162461bcd60e51b815260040161033c906112d9565b846002600082825461086d919061131f565b909155506108aa90506001600160a01b037f000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8163361dead88610e53565b6108de6001600160a01b037f000000000000000000000000168e209d7b2f58f1f24b8ae7b7d35e662bbf11cc163387610ec4565b60405185815233906000805160206114388339815191529060200160405180910390a2610ad0565b6001600160a01b038216330361095e5760405162461bcd60e51b815260206004820152601c60248201527f4c6169537761703a2073656e646572206973206d6f6e69746f72656400000000604482015260640161033c565b6040516370a0823160e01b81526001600160a01b03838116600483015282917f000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8909116906370a0823190602401602060405180830381865afa1580156109c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ec9190611346565b14610a095760405162461bcd60e51b815260040161033c9061135f565b60008511610a295760405162461bcd60e51b815260040161033c906112d9565b8460026000828254610a3b919061131f565b90915550610a7890506001600160a01b037f000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8163361dead88610e53565b610aac6001600160a01b037f000000000000000000000000168e209d7b2f58f1f24b8ae7b7d35e662bbf11cc163387610ec4565b60405185815233906000805160206114388339815191529060200160405180910390a25b50505b5050610ade60018055565b50565b610ae9610cfb565b60005460ff1615610afc5761043a610ef9565b61043a610f4b565b610b0c610cfb565b60055460065460408051918252602082018490526001600160a01b038581169316917fe92dde79e9f108f6095bd0863baa5e60c97fbba13b135a2a4b2c62d8288176f2910160405180910390a3604080518082019091526001600160a01b039092168083526020909201819052600580546001600160a01b031916909217909155600655565b610b9a610cfb565b60045460408051918252602082018390527f6cdad8629a6fd97b72424fa66d4b88752e2dfb2eb667e5d2b609a6544441aa3a910160405180910390a1600455565b610be3610cfb565b60075460085460408051918252602082018490526001600160a01b038581169316917f80706281e3404feb65680cfee11fbe668e071599c95d65ec7af8a23fdfdeaa8c910160405180910390a3604080518082019091526001600160a01b039092168083526020909201819052600780546001600160a01b031916909217909155600855565b610c71610cfb565b6001600160a01b038116610cd65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161033c565b610ade81610d5b565b610ce7610cfb565b6103db6001600160a01b0383163383610ec4565b6000546001600160a01b0361010090910416331461043a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161033c565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600260015403610e065760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161033c565b6002600155565b60005460ff161561043a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161033c565b6040516001600160a01b0380851660248301528316604482015260648101829052610ebe9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610f88565b50505050565b6040516001600160a01b038316602482015260448101829052610ef490849063a9059cbb60e01b90606401610e87565b505050565b610f0161105d565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610f53610e0d565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f2e3390565b6000610fdd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110a69092919063ffffffff16565b9050805160001480610ffe575080806020019051810190610ffe91906113a2565b610ef45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161033c565b60005460ff1661043a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161033c565b60606110b584846000856110bd565b949350505050565b60608247101561111e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161033c565b600080866001600160a01b0316858760405161113a91906113e8565b60006040518083038185875af1925050503d8060008114611177576040519150601f19603f3d011682016040523d82523d6000602084013e61117c565b606091505b509150915061118d87838387611198565b979650505050505050565b60608315611207578251600003611200576001600160a01b0385163b6112005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161033c565b50816110b5565b6110b5838381511561121c5781518083602001fd5b8060405162461bcd60e51b815260040161033c9190611404565b6000806040838503121561124957600080fd5b50508035926020909101359150565b60006020828403121561126a57600080fd5b5035919050565b80356001600160a01b038116811461128857600080fd5b919050565b600080604083850312156112a057600080fd5b6112a983611271565b946020939093013593505050565b6000602082840312156112c957600080fd5b6112d282611271565b9392505050565b60208082526026908201527f4c6169537761703a20616d6f756e74206d75737420626520677265617465722060408201526507468616e20360d41b606082015260800190565b8082018082111561134057634e487b7160e01b600052601160045260246000fd5b92915050565b60006020828403121561135857600080fd5b5051919050565b60208082526023908201527f4c6169537761703a206d6f6e69746f7265642062616c616e6365206d69736d616040820152620e8c6d60eb1b606082015260800190565b6000602082840312156113b457600080fd5b815180151581146112d257600080fd5b60005b838110156113df5781810151838201526020016113c7565b50506000910152565b600082516113fa8184602087016113c4565b9190910192915050565b60208152600082518060208401526114238160408501602087016113c4565b601f01601f1916919091016040019291505056fecdee897399ab5e465acb1bd3ed5e32c695f196321764546c59720fa6c9ce4c69a2646970667358221220cf5b16c2a564feca5701783f02c3e21ecbcd103f46ef6f2e5ddb478642331f0964736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8000000000000000000000000168e209d7b2f58f1f24b8ae7b7d35e662bbf11cc0000000000000000000000000000000000000000000000000000000064fb1ad000000000000000000000000000000000000000000000000000000000654a18b0
-----Decoded View---------------
Arg [0] : _gpt (address): 0xD04E772BC0d591fBD288f2E2a86aFA3D3CB647F8
Arg [1] : _lai (address): 0x168e209D7b2F58f1f24b8Ae7B7d35E662bBF11Cc
Arg [2] : _startTime (uint256): 1694178000
Arg [3] : _endTime (uint256): 1699354800
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000d04e772bc0d591fbd288f2e2a86afa3d3cb647f8
Arg [1] : 000000000000000000000000168e209d7b2f58f1f24b8ae7b7d35e662bbf11cc
Arg [2] : 0000000000000000000000000000000000000000000000000000000064fb1ad0
Arg [3] : 00000000000000000000000000000000000000000000000000000000654a18b0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.