Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ExtendContract
Compiler Version
v0.8.30+commit.73712a01
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
/**
* @title ExtendContract
* @dev Computing power purchase contract with USDT payment, referral system, and wallet allocation
* @author RWA Contract Team
*/
contract ExtendContract is ReentrancyGuard, Ownable, Pausable {
using SafeERC20 for IERC20;
address private usdtToken; // USDT token address
address private multisigWallet; // Multisig wallet
mapping(address => uint256) private usdtPurchasedAmount; // User USDT purchase amount
mapping(bytes32 => bool) private usedHashes; // Whether hash is already used
struct PurchaseRecord {
address user;
bytes32 hash;
uint256 minerId;
uint256 quantity;
uint256 originalPrice;
uint256 discountPrice;
uint256 totalPrice;
uint256 timestamp;
}
PurchaseRecord[] private usdtPurchaseRecords; // USDT purchase record details
mapping(address => uint256[]) private usdtPurchaseHistory; // User USDT purchase record id list mapping
event MultisigWalletUpdated(address indexed oldWallet, address indexed newWallet);
event ComputingPowerPurchased(
address indexed user,
bytes32 indexed hash,
uint256 indexed minerId,
uint256 quantity,
uint256 originalPrice,
uint256 discountPrice,
uint256 totalPrice,
uint256 timestamp
);
event EmergencyWithdraw(address indexed to, uint256 indexed amount);
error InvalidAddress();
error InvalidAmount();
error InsufficientBalance();
error InsufficientAllowance();
error OnlyIntegerAmount();
error NotAuthorized();
error DuplicateHash();
error InvalidHash();
error InvalidPrice();
error DiscountExceedsOriginal();
/**
* @dev Constructor
* @param _usdtToken USDT token contract address
* @param _multisigWallet Multisig wallet address for receiving funds
*/
constructor(
address _usdtToken,
address _multisigWallet
) Ownable(msg.sender) {
if (_usdtToken == address(0)) revert InvalidAddress();
if (_multisigWallet == address(0)) revert InvalidAddress();
usdtToken = _usdtToken;
multisigWallet = _multisigWallet;
}
/**
* @notice Set multisig wallet address
* @param _multisigWallet Multisig wallet address
*/
function setMultisigWallet(address _multisigWallet) external onlyOwner {
if (_multisigWallet == address(0)) revert InvalidAddress();
address oldWallet = multisigWallet;
multisigWallet = _multisigWallet;
emit MultisigWalletUpdated(oldWallet, _multisigWallet);
}
/**
* @notice Purchase function - transfer USDT to multisig wallet
* @param _hash Unique hash for this transaction (used for duplicate prevention)
* @param _minerId Miner ID
* @param _quantity Number of miners
* @param _originalPrice Original price per unit (6 decimals)
* @param _discountPrice Discount price per unit (6 decimals)
*/
function purchase(
bytes32 _hash,
uint256 _minerId,
uint256 _quantity,
uint256 _originalPrice,
uint256 _discountPrice
) external nonReentrant whenNotPaused {
// Validate parameters
if (_hash == bytes32(0)) revert InvalidHash();
if (usedHashes[_hash]) revert DuplicateHash();
if (_quantity == 0) revert InvalidAmount();
if (_originalPrice == 0) revert InvalidPrice();
if (_discountPrice > _originalPrice) revert DiscountExceedsOriginal();
// Calculate actual payment amount = (originalPrice - discountPrice) * quantity
uint256 unitPrice = _originalPrice - _discountPrice;
uint256 totalAmount = _quantity * unitPrice;
// Validate user balance and allowance
if (IERC20(usdtToken).balanceOf(msg.sender) < totalAmount) revert InsufficientBalance();
if (IERC20(usdtToken).allowance(msg.sender, address(this)) < totalAmount) revert InsufficientAllowance();
// Mark hash as used before external call to prevent reentrancy
usedHashes[_hash] = true;
// Transfer funds from user to multisig wallet
IERC20(usdtToken).safeTransferFrom(msg.sender, multisigWallet, totalAmount);
// Update user purchase amount
usdtPurchasedAmount[msg.sender] += totalAmount;
// Record purchase history
uint256 recordId = usdtPurchaseRecords.length;
usdtPurchaseRecords.push(PurchaseRecord({
user: msg.sender,
hash: _hash,
minerId: _minerId,
quantity: _quantity,
originalPrice: _originalPrice,
discountPrice: _discountPrice,
totalPrice: totalAmount,
timestamp: block.timestamp
}));
usdtPurchaseHistory[msg.sender].push(recordId);
// Emit event
emit ComputingPowerPurchased(
msg.sender,
_hash,
_minerId,
_quantity,
_originalPrice,
_discountPrice,
totalAmount,
block.timestamp
);
}
/**
* @notice Get all purchase history for a user
* @param _user User address
* @return Purchase record array
*/
function getPurchaseHistory(address _user)
external view returns (PurchaseRecord[] memory) {
uint256[] memory recordIds = usdtPurchaseHistory[_user];
if (recordIds.length == 0) {
return new PurchaseRecord[](0);
}
PurchaseRecord[] memory records = new PurchaseRecord[](recordIds.length);
for (uint256 i = 0; i < recordIds.length; i++) {
records[i] = usdtPurchaseRecords[recordIds[i]];
}
return records;
}
/**
* @notice Get user's total purchase amount
* @param _user User address
* @return Total purchase amount
*/
function getUsdtPurchasedAmount(address _user) external view returns (uint256) {
return usdtPurchasedAmount[_user];
}
/**
* @notice Get multisig wallet address
* @return Multisig wallet address
*/
function getMultisigWallet() external view returns (address) {
return multisigWallet;
}
/**
* @notice Emergency pause contract
*/
function pause() external onlyOwner {
_pause();
}
/**
* @notice Resume contract operation
*/
function unpause() external onlyOwner {
_unpause();
}
/**
* @notice Emergency withdraw any ERC20 token to owner (admin only)
* @param _amount Withdrawal amount
* @param _tokenAddress ERC20 token contract address
*/
function emergencyWithdraw(uint256 _amount, address _tokenAddress) external onlyOwner {
if (_amount == 0) revert InvalidAmount();
if (_tokenAddress == address(0)) revert InvalidAddress();
if (IERC20(_tokenAddress).balanceOf(address(this)) < _amount) revert InsufficientBalance();
IERC20(_tokenAddress).safeTransfer(msg.sender, _amount);
emit EmergencyWithdraw(msg.sender, _amount);
}
/**
* @notice Get USDT token contract address
* @return USDT token contract address
*/
function getUSDTToken() external view returns (address) {
return usdtToken;
}
/**
* @notice Disabled function - renounceOwnership is not allowed
* @dev This function is overridden to prevent renouncing ownership
*/
function renounceOwnership() public pure override {
revert("Renounce ownership is disabled");
}
}// 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.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) (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.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.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;
}
}// 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) (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) (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);
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_usdtToken","type":"address"},{"internalType":"address","name":"_multisigWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DiscountExceedsOriginal","type":"error"},{"inputs":[],"name":"DuplicateHash","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidHash","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"OnlyIntegerAmount","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"bytes32","name":"hash","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"minerId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"originalPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"discountPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ComputingPowerPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newWallet","type":"address"}],"name":"MultisigWalletUpdated","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"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getMultisigWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getPurchaseHistory","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint256","name":"minerId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"originalPrice","type":"uint256"},{"internalType":"uint256","name":"discountPrice","type":"uint256"},{"internalType":"uint256","name":"totalPrice","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct ExtendContract.PurchaseRecord[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUSDTToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUsdtPurchasedAmount","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":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"uint256","name":"_minerId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_originalPrice","type":"uint256"},{"internalType":"uint256","name":"_discountPrice","type":"uint256"}],"name":"purchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_multisigWallet","type":"address"}],"name":"setMultisigWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561000f575f5ffd5b50604051611e46380380611e468339818101604052810190610031919061032b565b3360015f819055505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100a9575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016100a09190610378565b60405180910390fd5b6100b88161020a60201b60201c565b505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361011e576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610183576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610391565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102fa826102d1565b9050919050565b61030a816102f0565b8114610314575f5ffd5b50565b5f8151905061032581610301565b92915050565b5f5f60408385031215610341576103406102cd565b5b5f61034e85828601610317565b925050602061035f85828601610317565b9150509250929050565b610372816102f0565b82525050565b5f60208201905061038b5f830184610369565b92915050565b611aa88061039e5f395ff3fe608060405234801561000f575f5ffd5b50600436106100cd575f3560e01c8063649134771161008a5780638456cb59116100645780638456cb59146101d5578063873673cd146101df5780638da5cb5b146101fd578063f2fde38b1461021b576100cd565b8063649134771461017f5780636f9caaef1461019b578063715018a6146101cb576100cd565b806321034444146100d15780632640e38614610101578063276010061461011d5780632f940c701461013b5780633f4ba83a146101575780635c975abb14610161575b5f5ffd5b6100eb60048036038101906100e6919061145a565b610237565b6040516100f8919061160d565b60405180910390f35b61011b60048036038101906101169190611681565b6104a7565b005b610125610a79565b6040516101329190611707565b60405180910390f35b61015560048036038101906101509190611720565b610aa1565b005b61015f610c6b565b005b610169610c7d565b6040516101769190611778565b60405180910390f35b6101996004803603810190610194919061145a565b610c93565b005b6101b560048036038101906101b0919061145a565b610dc3565b6040516101c291906117a0565b60405180910390f35b6101d3610e09565b005b6101dd610e44565b005b6101e7610e56565b6040516101f49190611707565b60405180910390f35b610205610e7e565b6040516102129190611707565b60405180910390f35b6102356004803603810190610230919061145a565b610ea6565b005b60605f60075f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806020026020016040519081016040528092919081815260200182805480156102bf57602002820191905f5260205f20905b8154815260200190600101908083116102ab575b505050505090505f81510361032a575f67ffffffffffffffff8111156102e8576102e76117b9565b5b60405190808252806020026020018201604052801561032157816020015b61030e6113a9565b8152602001906001900390816103065790505b509150506104a2565b5f815167ffffffffffffffff811115610346576103456117b9565b5b60405190808252806020026020018201604052801561037f57816020015b61036c6113a9565b8152602001906001900390816103645790505b5090505f5f90505b825181101561049b5760068382815181106103a5576103a46117e6565b5b6020026020010151815481106103be576103bd6117e6565b5b905f5260205f209060080201604051806101000160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481525050828281518110610483576104826117e6565b5b60200260200101819052508080600101915050610387565b5080925050505b919050565b6104af610f2a565b6104b7610f6e565b5f5f1b85036104f2576040517f0af806e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055f8681526020019081526020015f205f9054906101000a900460ff1615610547576040517f1fc0b7e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8303610580576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82036105b8576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818111156105f2576040517fcfa4ed6100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81836105ff9190611840565b90505f818561060e9190611873565b90508060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b815260040161066b9190611707565b602060405180830381865afa158015610686573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106aa91906118c8565b10156106e2576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b815260040161073f9291906118f3565b602060405180830381865afa15801561075a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077e91906118c8565b10156107b6576040517f13be252b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160055f8981526020019081526020015f205f6101000a81548160ff02191690831515021790555061084e3360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610faf909392919063ffffffff16565b8060045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461089a919061191a565b925050819055505f600680549050905060066040518061010001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018a815260200189815260200188815260200187815260200186815260200184815260200142815250908060018154018082558091505060019003905f5260205f2090600802015f909190919091505f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070155505060075f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505586883373ffffffffffffffffffffffffffffffffffffffff167f3453470384d536351d7233b626948d035e0e011f2cce87d9f77d1f114b1cb7988989898842604051610a5f95949392919061194d565b60405180910390a4505050610a72611031565b5050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610aa961103a565b5f8203610ae2576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b47576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610b819190611707565b602060405180830381865afa158015610b9c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc091906118c8565b1015610bf8576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c2333838373ffffffffffffffffffffffffffffffffffffffff166110c19092919063ffffffff16565b813373ffffffffffffffffffffffffffffffffffffffff167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969560405160405180910390a35050565b610c7361103a565b610c7b611140565b565b5f600160149054906101000a900460ff16905090565b610c9b61103a565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d00576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f86e5a79b116b1b58296614b8323eb315c7f0d67c5786fe97e11afc17fcb5b61960405160405180910390a35050565b5f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3b906119f8565b60405180910390fd5b610e4c61103a565b610e546111a2565b565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eae61103a565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f1e575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610f159190611707565b60405180910390fd5b610f2781611204565b50565b60025f5403610f65576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f81905550565b610f76610c7d565b15610fad576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61102b848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401610fe493929190611a16565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506112c7565b50505050565b60015f81905550565b611042611362565b73ffffffffffffffffffffffffffffffffffffffff16611060610e7e565b73ffffffffffffffffffffffffffffffffffffffff16146110bf57611083611362565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016110b69190611707565b60405180910390fd5b565b61113b838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016110f4929190611a4b565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506112c7565b505050565b611148611369565b5f600160146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61118b611362565b6040516111989190611707565b60405180910390a1565b6111aa610f6e565b60018060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111ed611362565b6040516111fa9190611707565b60405180910390a1565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5f60205f8451602086015f885af1806112e6576040513d5f823e3d81fd5b3d92505f519150505f82146112ff57600181141561131a565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b1561135c57836040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016113539190611707565b60405180910390fd5b50505050565b5f33905090565b611371610c7d565b6113a7576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6040518061010001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61142982611400565b9050919050565b6114398161141f565b8114611443575f5ffd5b50565b5f8135905061145481611430565b92915050565b5f6020828403121561146f5761146e6113fc565b5b5f61147c84828501611446565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6114b78161141f565b82525050565b5f819050919050565b6114cf816114bd565b82525050565b5f819050919050565b6114e7816114d5565b82525050565b61010082015f8201516115025f8501826114ae565b50602082015161151560208501826114c6565b50604082015161152860408501826114de565b50606082015161153b60608501826114de565b50608082015161154e60808501826114de565b5060a082015161156160a08501826114de565b5060c082015161157460c08501826114de565b5060e082015161158760e08501826114de565b50505050565b5f61159883836114ed565b6101008301905092915050565b5f602082019050919050565b5f6115bb82611485565b6115c5818561148f565b93506115d08361149f565b805f5b838110156116005781516115e7888261158d565b97506115f2836115a5565b9250506001810190506115d3565b5085935050505092915050565b5f6020820190508181035f83015261162581846115b1565b905092915050565b611636816114bd565b8114611640575f5ffd5b50565b5f813590506116518161162d565b92915050565b611660816114d5565b811461166a575f5ffd5b50565b5f8135905061167b81611657565b92915050565b5f5f5f5f5f60a0868803121561169a576116996113fc565b5b5f6116a788828901611643565b95505060206116b88882890161166d565b94505060406116c98882890161166d565b93505060606116da8882890161166d565b92505060806116eb8882890161166d565b9150509295509295909350565b6117018161141f565b82525050565b5f60208201905061171a5f8301846116f8565b92915050565b5f5f60408385031215611736576117356113fc565b5b5f6117438582860161166d565b925050602061175485828601611446565b9150509250929050565b5f8115159050919050565b6117728161175e565b82525050565b5f60208201905061178b5f830184611769565b92915050565b61179a816114d5565b82525050565b5f6020820190506117b35f830184611791565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61184a826114d5565b9150611855836114d5565b925082820390508181111561186d5761186c611813565b5b92915050565b5f61187d826114d5565b9150611888836114d5565b9250828202611896816114d5565b915082820484148315176118ad576118ac611813565b5b5092915050565b5f815190506118c281611657565b92915050565b5f602082840312156118dd576118dc6113fc565b5b5f6118ea848285016118b4565b91505092915050565b5f6040820190506119065f8301856116f8565b61191360208301846116f8565b9392505050565b5f611924826114d5565b915061192f836114d5565b925082820190508082111561194757611946611813565b5b92915050565b5f60a0820190506119605f830188611791565b61196d6020830187611791565b61197a6040830186611791565b6119876060830185611791565b6119946080830184611791565b9695505050505050565b5f82825260208201905092915050565b7f52656e6f756e6365206f776e6572736869702069732064697361626c656400005f82015250565b5f6119e2601e8361199e565b91506119ed826119ae565b602082019050919050565b5f6020820190508181035f830152611a0f816119d6565b9050919050565b5f606082019050611a295f8301866116f8565b611a3660208301856116f8565b611a436040830184611791565b949350505050565b5f604082019050611a5e5f8301856116f8565b611a6b6020830184611791565b939250505056fea2646970667358221220edf70ad8d049b6cc96fcfae375c04a87c7bdb67764f7a051fc71f5186c41bbf964736f6c634300081e0033000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000082aedd022e15170a245fa08cae77a77b8a730e24
Deployed Bytecode
0x608060405234801561000f575f5ffd5b50600436106100cd575f3560e01c8063649134771161008a5780638456cb59116100645780638456cb59146101d5578063873673cd146101df5780638da5cb5b146101fd578063f2fde38b1461021b576100cd565b8063649134771461017f5780636f9caaef1461019b578063715018a6146101cb576100cd565b806321034444146100d15780632640e38614610101578063276010061461011d5780632f940c701461013b5780633f4ba83a146101575780635c975abb14610161575b5f5ffd5b6100eb60048036038101906100e6919061145a565b610237565b6040516100f8919061160d565b60405180910390f35b61011b60048036038101906101169190611681565b6104a7565b005b610125610a79565b6040516101329190611707565b60405180910390f35b61015560048036038101906101509190611720565b610aa1565b005b61015f610c6b565b005b610169610c7d565b6040516101769190611778565b60405180910390f35b6101996004803603810190610194919061145a565b610c93565b005b6101b560048036038101906101b0919061145a565b610dc3565b6040516101c291906117a0565b60405180910390f35b6101d3610e09565b005b6101dd610e44565b005b6101e7610e56565b6040516101f49190611707565b60405180910390f35b610205610e7e565b6040516102129190611707565b60405180910390f35b6102356004803603810190610230919061145a565b610ea6565b005b60605f60075f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806020026020016040519081016040528092919081815260200182805480156102bf57602002820191905f5260205f20905b8154815260200190600101908083116102ab575b505050505090505f81510361032a575f67ffffffffffffffff8111156102e8576102e76117b9565b5b60405190808252806020026020018201604052801561032157816020015b61030e6113a9565b8152602001906001900390816103065790505b509150506104a2565b5f815167ffffffffffffffff811115610346576103456117b9565b5b60405190808252806020026020018201604052801561037f57816020015b61036c6113a9565b8152602001906001900390816103645790505b5090505f5f90505b825181101561049b5760068382815181106103a5576103a46117e6565b5b6020026020010151815481106103be576103bd6117e6565b5b905f5260205f209060080201604051806101000160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481525050828281518110610483576104826117e6565b5b60200260200101819052508080600101915050610387565b5080925050505b919050565b6104af610f2a565b6104b7610f6e565b5f5f1b85036104f2576040517f0af806e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055f8681526020019081526020015f205f9054906101000a900460ff1615610547576040517f1fc0b7e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8303610580576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82036105b8576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818111156105f2576040517fcfa4ed6100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81836105ff9190611840565b90505f818561060e9190611873565b90508060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b815260040161066b9190611707565b602060405180830381865afa158015610686573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106aa91906118c8565b10156106e2576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b815260040161073f9291906118f3565b602060405180830381865afa15801561075a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077e91906118c8565b10156107b6576040517f13be252b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160055f8981526020019081526020015f205f6101000a81548160ff02191690831515021790555061084e3360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610faf909392919063ffffffff16565b8060045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461089a919061191a565b925050819055505f600680549050905060066040518061010001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018a815260200189815260200188815260200187815260200186815260200184815260200142815250908060018154018082558091505060019003905f5260205f2090600802015f909190919091505f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070155505060075f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505586883373ffffffffffffffffffffffffffffffffffffffff167f3453470384d536351d7233b626948d035e0e011f2cce87d9f77d1f114b1cb7988989898842604051610a5f95949392919061194d565b60405180910390a4505050610a72611031565b5050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610aa961103a565b5f8203610ae2576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b47576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610b819190611707565b602060405180830381865afa158015610b9c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc091906118c8565b1015610bf8576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c2333838373ffffffffffffffffffffffffffffffffffffffff166110c19092919063ffffffff16565b813373ffffffffffffffffffffffffffffffffffffffff167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969560405160405180910390a35050565b610c7361103a565b610c7b611140565b565b5f600160149054906101000a900460ff16905090565b610c9b61103a565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d00576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f86e5a79b116b1b58296614b8323eb315c7f0d67c5786fe97e11afc17fcb5b61960405160405180910390a35050565b5f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3b906119f8565b60405180910390fd5b610e4c61103a565b610e546111a2565b565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eae61103a565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f1e575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610f159190611707565b60405180910390fd5b610f2781611204565b50565b60025f5403610f65576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f81905550565b610f76610c7d565b15610fad576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61102b848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401610fe493929190611a16565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506112c7565b50505050565b60015f81905550565b611042611362565b73ffffffffffffffffffffffffffffffffffffffff16611060610e7e565b73ffffffffffffffffffffffffffffffffffffffff16146110bf57611083611362565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016110b69190611707565b60405180910390fd5b565b61113b838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016110f4929190611a4b565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506112c7565b505050565b611148611369565b5f600160146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61118b611362565b6040516111989190611707565b60405180910390a1565b6111aa610f6e565b60018060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111ed611362565b6040516111fa9190611707565b60405180910390a1565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5f60205f8451602086015f885af1806112e6576040513d5f823e3d81fd5b3d92505f519150505f82146112ff57600181141561131a565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b1561135c57836040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016113539190611707565b60405180910390fd5b50505050565b5f33905090565b611371610c7d565b6113a7576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6040518061010001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61142982611400565b9050919050565b6114398161141f565b8114611443575f5ffd5b50565b5f8135905061145481611430565b92915050565b5f6020828403121561146f5761146e6113fc565b5b5f61147c84828501611446565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6114b78161141f565b82525050565b5f819050919050565b6114cf816114bd565b82525050565b5f819050919050565b6114e7816114d5565b82525050565b61010082015f8201516115025f8501826114ae565b50602082015161151560208501826114c6565b50604082015161152860408501826114de565b50606082015161153b60608501826114de565b50608082015161154e60808501826114de565b5060a082015161156160a08501826114de565b5060c082015161157460c08501826114de565b5060e082015161158760e08501826114de565b50505050565b5f61159883836114ed565b6101008301905092915050565b5f602082019050919050565b5f6115bb82611485565b6115c5818561148f565b93506115d08361149f565b805f5b838110156116005781516115e7888261158d565b97506115f2836115a5565b9250506001810190506115d3565b5085935050505092915050565b5f6020820190508181035f83015261162581846115b1565b905092915050565b611636816114bd565b8114611640575f5ffd5b50565b5f813590506116518161162d565b92915050565b611660816114d5565b811461166a575f5ffd5b50565b5f8135905061167b81611657565b92915050565b5f5f5f5f5f60a0868803121561169a576116996113fc565b5b5f6116a788828901611643565b95505060206116b88882890161166d565b94505060406116c98882890161166d565b93505060606116da8882890161166d565b92505060806116eb8882890161166d565b9150509295509295909350565b6117018161141f565b82525050565b5f60208201905061171a5f8301846116f8565b92915050565b5f5f60408385031215611736576117356113fc565b5b5f6117438582860161166d565b925050602061175485828601611446565b9150509250929050565b5f8115159050919050565b6117728161175e565b82525050565b5f60208201905061178b5f830184611769565b92915050565b61179a816114d5565b82525050565b5f6020820190506117b35f830184611791565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61184a826114d5565b9150611855836114d5565b925082820390508181111561186d5761186c611813565b5b92915050565b5f61187d826114d5565b9150611888836114d5565b9250828202611896816114d5565b915082820484148315176118ad576118ac611813565b5b5092915050565b5f815190506118c281611657565b92915050565b5f602082840312156118dd576118dc6113fc565b5b5f6118ea848285016118b4565b91505092915050565b5f6040820190506119065f8301856116f8565b61191360208301846116f8565b9392505050565b5f611924826114d5565b915061192f836114d5565b925082820190508082111561194757611946611813565b5b92915050565b5f60a0820190506119605f830188611791565b61196d6020830187611791565b61197a6040830186611791565b6119876060830185611791565b6119946080830184611791565b9695505050505050565b5f82825260208201905092915050565b7f52656e6f756e6365206f776e6572736869702069732064697361626c656400005f82015250565b5f6119e2601e8361199e565b91506119ed826119ae565b602082019050919050565b5f6020820190508181035f830152611a0f816119d6565b9050919050565b5f606082019050611a295f8301866116f8565b611a3660208301856116f8565b611a436040830184611791565b949350505050565b5f604082019050611a5e5f8301856116f8565b611a6b6020830184611791565b939250505056fea2646970667358221220edf70ad8d049b6cc96fcfae375c04a87c7bdb67764f7a051fc71f5186c41bbf964736f6c634300081e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000082aedd022e15170a245fa08cae77a77b8a730e24
-----Decoded View---------------
Arg [0] : _usdtToken (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [1] : _multisigWallet (address): 0x82AEdd022E15170a245fA08cAE77a77B8A730e24
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [1] : 00000000000000000000000082aedd022e15170a245fa08cae77a77b8a730e24
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.