Address Contract Verified
Address
0xe997C4f922aC202a341DEB2DF93A13633a40CE36
Balance
0 ETH
Nonce
1
Code Size
3460 bytes
Creator
0x8DA89f81...11f0 at tx 0xc1437276...9a3780
Indexed Transactions
0 (1 on-chain, 1.5% indexed)
Contract Bytecode
3460 bytes
0x608060405234801561000f575f80fd5b506004361061007b575f3560e01c80636553d3d5116100595780636553d3d5146100e75780638da5cb5b14610118578063c54e44eb14610136578063d3933ada146101545761007b565b806349f0250f1461007f5780634be55d1f146100af5780634dd3e1ba146100cb575b5f80fd5b610099600480360381019061009491906108f1565b61015e565b6040516100a69190610934565b60405180910390f35b6100c960048036038101906100c491906108f1565b6101df565b005b6100e560048036038101906100e09190610977565b61040f565b005b61010160048036038101906100fc91906108f1565b6105ec565b60405161010f9291906109b5565b60405180910390f35b61012061060c565b60405161012d91906109eb565b60405180910390f35b61013e61062f565b60405161014b9190610a5f565b60405180910390f35b61015c610653565b005b5f8060015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060400160405290815f8201548152602001600182015481525050905080602001514211156101d2575f9150506101da565b805f01519150505b919050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461026c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026390610ad2565b60405180910390fd5b7f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036102fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f190610b3a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161036f91906109eb565b602060405180830381865afa15801561038a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ae9190610b6c565b6040518363ffffffff1660e01b81526004016103cb929190610b97565b6020604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040b9190610bf3565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461049c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161049390610ad2565b60405180910390fd5b817f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016104f691906109eb565b602060405180830381865afa158015610511573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105359190610b6c565b1015610576576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056d90610c68565b60405180910390fd5b604051806040016040528083815260200182426105939190610cb3565b81525060015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f0155602082015181600101559050505050565b6001602052805f5260405f205f91509050805f0154908060010154905082565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d790610ad2565b60405180910390fd5b5f60015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060400160405290815f820154815260200160018201548152505090508060200151421015610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077c90610d30565b60405180910390fd5b60015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8082015f9055600182015f905550507f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff16835f01516040518363ffffffff1660e01b815260040161084f929190610b97565b6020604051808303815f875af115801561086b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061088f9190610bf3565b5050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6108c082610897565b9050919050565b6108d0816108b6565b81146108da575f80fd5b50565b5f813590506108eb816108c7565b92915050565b5f6020828403121561090657610905610893565b5b5f610913848285016108dd565b91505092915050565b5f819050919050565b61092e8161091c565b82525050565b5f6020820190506109475f830184610925565b92915050565b6109568161091c565b8114610960575f80fd5b50565b5f813590506109718161094d565b92915050565b5f806040838503121561098d5761098c610893565b5b5f61099a85828601610963565b92505060206109ab85828601610963565b9150509250929050565b5f6040820190506109c85f830185610925565b6109d56020830184610925565b9392505050565b6109e5816108b6565b82525050565b5f6020820190506109fe5f8301846109dc565b92915050565b5f819050919050565b5f610a27610a22610a1d84610897565b610a04565b610897565b9050919050565b5f610a3882610a0d565b9050919050565b5f610a4982610a2e565b9050919050565b610a5981610a3f565b82525050565b5f602082019050610a725f830184610a50565b92915050565b5f82825260208201905092915050565b7f556e617574686f72697a656420616363657373000000000000000000000000005f82015250565b5f610abc601383610a78565b9150610ac782610a88565b602082019050919050565b5f6020820190508181035f830152610ae981610ab0565b9050919050565b7f43616e6e6f74207265636f7665722062617365206173736574000000000000005f82015250565b5f610b24601983610a78565b9150610b2f82610af0565b602082019050919050565b5f6020820190508181035f830152610b5181610b18565b9050919050565b5f81519050610b668161094d565b92915050565b5f60208284031215610b8157610b80610893565b5b5f610b8e84828501610b58565b91505092915050565b5f604082019050610baa5f8301856109dc565b610bb76020830184610925565b9392505050565b5f8115159050919050565b610bd281610bbe565b8114610bdc575f80fd5b50565b5f81519050610bed81610bc9565b92915050565b5f60208284031215610c0857610c07610893565b5b5f610c1584828501610bdf565b91505092915050565b7f496e73756666696369656e7420636f6e74726163742062616c616e63650000005f82015250565b5f610c52601d83610a78565b9150610c5d82610c1e565b602082019050919050565b5f6020820190508181035f830152610c7f81610c46565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610cbd8261091c565b9150610cc88361091c565b9250828201905080821115610ce057610cdf610c86565b5b92915050565b7f52657365727665206e6f74207965742072656c65617361626c650000000000005f82015250565b5f610d1a601a83610a78565b9150610d2582610ce6565b602082019050919050565b5f6020820190508181035f830152610d4781610d0e565b905091905056fea26469706673582212203eaa697ed616ae51b4ebbdcbc7996fbe8f2cb3cf0da0c698baccdc3deee436c464736f6c63430008140033
Verified Source Code Full Match
Compiler: v0.8.20+commit.a1b79de6
EVM: shanghai
Optimization: No
AssetReserveVault.sol 57 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract AssetReserveVault {
IERC20 public immutable USDT;
address public owner;
struct TemporaryReserve {
uint256 amount;
uint256 releaseTime;
}
mapping(address => TemporaryReserve) public temporaryReserves;
modifier onlyOwner() {
require(msg.sender == owner, "Unauthorized access");
_;
}
constructor(address usdtAddress) {
USDT = IERC20(usdtAddress);
owner = msg.sender;
}
function createTemporaryReserve(
uint256 reserveAmount,
uint256 durationSeconds
) external onlyOwner {
require(USDT.balanceOf(address(this)) >= reserveAmount, "Insufficient contract balance");
temporaryReserves[msg.sender] = TemporaryReserve({
amount: reserveAmount,
releaseTime: block.timestamp + durationSeconds
});
}
function releaseReserve() external onlyOwner {
TemporaryReserve memory reserve = temporaryReserves[msg.sender];
require(block.timestamp >= reserve.releaseTime, "Reserve not yet releasable");
delete temporaryReserves[msg.sender];
USDT.transfer(owner, reserve.amount);
}
function getAvailableReserve(address user) public view returns (uint256) {
TemporaryReserve memory reserve = temporaryReserves[user];
if (block.timestamp > reserve.releaseTime) return 0;
return reserve.amount;
}
function recoverStuckTokens(address tokenAddress) external onlyOwner {
require(tokenAddress != address(USDT), "Cannot recover base asset");
IERC20(tokenAddress).transfer(owner, IERC20(tokenAddress).balanceOf(address(this)));
}
}
IERC20.sol 79 lines
// 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);
}
Read Contract
USDT 0xc54e44eb → address
getAvailableReserve 0x49f0250f → uint256
owner 0x8da5cb5b → address
temporaryReserves 0x6553d3d5 → uint256, uint256
Write Contract 3 functions
These functions modify contract state and require a wallet transaction to execute.
createTemporaryReserve 0x4dd3e1ba
uint256 reserveAmount
uint256 durationSeconds
recoverStuckTokens 0x4be55d1f
address tokenAddress
releaseReserve 0xd3933ada
No parameters
Token Balances (1) $11.00
View Transfers →| Token | Balance | Price | Value |
|---|---|---|---|
| USDT | 11 | $1.0000 | $11.00 |
Recent Transactions
This address has 1 on-chain transactions, but only 1.5% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →