Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 129 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Close Order | 24529280 | 5 days ago | IN | 0 ETH | 0.00000335 | ||||
| Close Order | 24529049 | 5 days ago | IN | 0 ETH | 0.00000373 | ||||
| Create Order | 24528946 | 5 days ago | IN | 0 ETH | 0.00023093 | ||||
| Create Order | 24528944 | 5 days ago | IN | 0 ETH | 0.00020922 | ||||
| Create Order | 24528941 | 5 days ago | IN | 0 ETH | 0.00018792 | ||||
| Create Order | 24528938 | 5 days ago | IN | 0 ETH | 0.00016587 | ||||
| Create Order | 24528934 | 5 days ago | IN | 0 ETH | 0.00012875 | ||||
| Create Order | 24528761 | 5 days ago | IN | 0 ETH | 0.00027517 | ||||
| Create Order | 24528757 | 5 days ago | IN | 0 ETH | 0.00025398 | ||||
| Create Order | 24528753 | 5 days ago | IN | 0 ETH | 0.00023201 | ||||
| Create Order | 24528748 | 5 days ago | IN | 0 ETH | 0.00021028 | ||||
| Create Order | 24528745 | 5 days ago | IN | 0 ETH | 0.00017189 | ||||
| Close Order | 24500729 | 9 days ago | IN | 0 ETH | 0.00000254 | ||||
| Create Order | 24500708 | 9 days ago | IN | 0 ETH | 0.00020451 | ||||
| Close Order | 24500672 | 9 days ago | IN | 0 ETH | 0.00000273 | ||||
| Create Order | 24500631 | 9 days ago | IN | 0 ETH | 0.00017197 | ||||
| Close Order | 24500009 | 9 days ago | IN | 0 ETH | 0.00000668 | ||||
| Create Order | 24499879 | 9 days ago | IN | 0 ETH | 0.00020629 | ||||
| Close Order | 24499863 | 9 days ago | IN | 0 ETH | 0.00000511 | ||||
| Create Order | 24499842 | 9 days ago | IN | 0 ETH | 0.00017428 | ||||
| Close Order | 24499297 | 9 days ago | IN | 0 ETH | 0.00001134 | ||||
| Close Order | 24499260 | 9 days ago | IN | 0 ETH | 0.00001091 | ||||
| Close Order | 24499246 | 9 days ago | IN | 0 ETH | 0.0000123 | ||||
| Create Order | 24499231 | 9 days ago | IN | 0 ETH | 0.00018003 | ||||
| Create Order | 24499225 | 9 days ago | IN | 0 ETH | 0.00021659 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
AlfredPaymentManager
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
// Importamos la librería de OpenZeppelin para manejar roles
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
using SafeERC20 for IERC20;
// import "hardhat/console.sol";
import {VaultAlfredPayment} from "./SafeVault.sol";
contract AlfredPaymentManager is Ownable {
// Definimos un rol específico para los usuarios que pueden agregar contratos
// Array público que almacenará las direcciones de contratos
address[] public contracts;
// Mapping público que mantendrá el status de las direcciones de contratos (VaultAddress => ERC20Address => time)
mapping(address => mapping(address => uint256)) public contractTimeBlock;
// Tiempo de bloqueo para cada Vault al crear una orden
uint256 timestampVaultBlock;
// Evento para notificar cuando se agrega una nueva dirección
event ContractAdded(address indexed contractAddress);
event ClosedOrder(
address indexed _token,
address indexed _from,
address indexed _to
);
event CreatedOrder(address indexed _token, address indexed _vault);
// Constructor para inicializar el contrato USDC y el rol de admin
constructor() Ownable(msg.sender) {
timestampVaultBlock = 30 minutes;
}
// Función para agregar una dirección de contrato al array
// Solo los usuarios con el rol ADD_CONTRACT_ROLE pueden ejecutar esta función
function addContract(address _contractAddress) public onlyOwner {
require(
_contractAddress != address(0),
"La direccion no puede ser la direccion cero."
);
contracts.push(_contractAddress);
emit ContractAdded(_contractAddress);
}
function createOrder(address _token) external onlyOwner returns (address) {
address _vaultReceiver = getAvailableAddress(_token);
contractTimeBlock[_vaultReceiver][_token] =
block.timestamp +
timestampVaultBlock;
emit CreatedOrder(_token, _vaultReceiver);
return _vaultReceiver;
}
function closeOrder(
address _token,
address payable _from,
address _to
) external onlyOwner {
require(
_to != address(0) && _from != address(0),
"La direccion no puede ser la direccion cero."
);
uint256 currentBalance = IERC20(_token).balanceOf(_from);
IERC20(_token).safeTransferFrom(_from, _to, currentBalance);
contractTimeBlock[_from][_token] = 0;
emit ClosedOrder(_token, _from, _to);
}
// Función externa para obtener la dirección con el menor saldo de USDC
function getAvailableAddress(address _token) public view returns (address) {
require(contracts.length > 0, "No hay contratos en el array.");
// Recorremos el array de contratos
for (uint256 i = 0; i < contracts.length; i++) {
address currentContract = contracts[i];
uint256 currentBalance = IERC20(_token).balanceOf(currentContract);
// Verificamos si el balance actual es menor que el balance mínimo registrado
if (
currentBalance == 0 &&
block.timestamp >= contractTimeBlock[currentContract][_token]
) {
return currentContract;
}
}
return address(0);
}
// Función para obtener la cantidad de contratos en el array
function getContractsCount() public view returns (uint256) {
return contracts.length;
}
// Función para obtener una dirección de contrato específica por su índice
function getContract(uint256 index) public view returns (address) {
require(index < contracts.length, "Indice fuera de rango.");
return contracts[index];
}
// Función para cambiar el valor de un contrato si es necesario (solo admin)
function setContractTimeBlock(
address _contractAddress,
address _token,
uint256 value
) public onlyOwner {
contractTimeBlock[_contractAddress][_token] = value;
}
// Función para cambiar el tiempo de time Vault (solo admin)
function setTimeVaultBlock(uint128 _time) public onlyOwner {
timestampVaultBlock = _time;
}
// Función para cambiar la dirección de USDC si es necesario (solo admin)
function eraseVaultsArray() public onlyOwner {
contracts = new address[](0);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
mapping(bytes32 role => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
return _roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
if (!hasRole(role, account)) {
_roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
if (hasRole(role, account)) {
_roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC-165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
* Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}// 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) (interfaces/IERC1363.sol)
pragma solidity ^0.8.20;
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.0.0) (interfaces/IERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../utils/introspection/IERC165.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../token/ERC20/IERC20.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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.2.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 Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
using SafeERC20 for IERC20;
contract VaultAlfredPayment is AccessControl {
// Constructor
constructor() {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
}
// Withdraw ERC20 tokens
function increaseAllowance(
address token,
address to,
uint256 amount
) external onlyRole(DEFAULT_ADMIN_ROLE) {
IERC20 usdtToken = IERC20(token);
usdtToken.safeIncreaseAllowance(to, amount);
}
}{
"metadata": {
"bytecodeHash": "none",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"}],"name":"ClosedOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"}],"name":"ContractAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"address","name":"_vault","type":"address"}],"name":"CreatedOrder","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"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"}],"name":"addContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address payable","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"closeOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"contractTimeBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"contracts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"createOrder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eraseVaultsArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getAvailableAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractsCount","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setContractTimeBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_time","type":"uint128"}],"name":"setTimeVaultBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100408161004c565b5061070860035561009c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610acb806100ab6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638689bfc41161008c57806399269b7b1161006657806399269b7b146101cf578063adf24eb6146101e2578063ea3774e3146101f5578063f2fde38b1461020857600080fd5b80638689bfc4146101a35780638da5cb5b146101b65780639683584f146101c757600080fd5b80636ebc8c86116100c85780636ebc8c861461016d578063715018a6146101805780637410a8241461018857806382629d3a1461019b57600080fd5b8063290f477d146100ef578063474da79a1461012d5780635f539d6914610158575b600080fd5b61011a6100fd3660046108f1565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61014061013b36600461092a565b61021b565b6040516001600160a01b039091168152602001610124565b61016b610166366004610943565b610245565b005b61014061017b36600461092a565b6102f3565b61016b61036e565b61016b610196366004610967565b610382565b61016b6104a5565b61016b6101b13660046109b2565b6104cd565b6000546001600160a01b0316610140565b60015461011a565b6101406101dd366004610943565b6104e3565b61016b6101f03660046109db565b610626565b610140610203366004610943565b61065a565b61016b610216366004610943565b6106d9565b6001818154811061022b57600080fd5b6000918252602090912001546001600160a01b0316905081565b61024d610714565b6001600160a01b03811661027c5760405162461bcd60e51b815260040161027390610a1c565b60405180910390fd5b60018054808201825560009182527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b03841690811790915560405190917f89c66952b48f3e96bf1d8ba1b63189520fd988a6979b8b740bd5c5d8dc53e20591a250565b60015460009082106103405760405162461bcd60e51b815260206004820152601660248201527524b73234b1b290333ab2b930903232903930b733b79760511b6044820152606401610273565b6001828154811061035357610353610a68565b6000918252602090912001546001600160a01b031692915050565b610376610714565b6103806000610741565b565b61038a610714565b6001600160a01b038116158015906103aa57506001600160a01b03821615155b6103c65760405162461bcd60e51b815260040161027390610a1c565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908516906370a0823190602401602060405180830381865afa158015610410573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104349190610a7e565b905061044b6001600160a01b038516848484610791565b6001600160a01b0380841660008181526002602090815260408083208986168085529252808320839055519386169390917f7d346ccbc714ea32a522bfe5f4773dcdf5123584d2627fbc1742828663b81c7a91a450505050565b6104ad610714565b60408051600081526020810191829052516104ca91600191610862565b50565b6104d5610714565b6001600160801b0316600355565b6001546000906105355760405162461bcd60e51b815260206004820152601d60248201527f4e6f2068617920636f6e747261746f7320656e20656c2061727261792e0000006044820152606401610273565b60005b60015481101561061d5760006001828154811061055757610557610a68565b60009182526020822001546040516370a0823160e01b81526001600160a01b03918216600482018190529350908616906370a0823190602401602060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d19190610a7e565b90508015801561060657506001600160a01b038083166000908152600260209081526040808320938916835292905220544210155b1561061357509392505050565b5050600101610538565b50600092915050565b61062e610714565b6001600160a01b0392831660009081526002602090815260408083209490951682529290925291902055565b6000610664610714565b600061066f836104e3565b90506003544261067f9190610a97565b6001600160a01b0380831660008181526002602090815260408083209489168084529490915280822094909455925190927f6d7d8faf94e5d080bb88c6bda069625da34ce65cada8ca6b9a63b53f8330425391a392915050565b6106e1610714565b6001600160a01b03811661070b57604051631e4fbdf760e01b815260006004820152602401610273565b6104ca81610741565b6000546001600160a01b031633146103805760405163118cdaa760e01b8152336004820152602401610273565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526107eb9085906107f1565b50505050565b600080602060008451602086016000885af180610814576040513d6000823e3d81fd5b50506000513d9150811561082c578060011415610839565b6001600160a01b0384163b155b156107eb57604051635274afe760e01b81526001600160a01b0385166004820152602401610273565b8280548282559060005260206000209081019282156108b7579160200282015b828111156108b757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610882565b506108c39291506108c7565b5090565b5b808211156108c357600081556001016108c8565b6001600160a01b03811681146104ca57600080fd5b6000806040838503121561090457600080fd5b823561090f816108dc565b9150602083013561091f816108dc565b809150509250929050565b60006020828403121561093c57600080fd5b5035919050565b60006020828403121561095557600080fd5b8135610960816108dc565b9392505050565b60008060006060848603121561097c57600080fd5b8335610987816108dc565b92506020840135610997816108dc565b915060408401356109a7816108dc565b809150509250925092565b6000602082840312156109c457600080fd5b81356001600160801b038116811461096057600080fd5b6000806000606084860312156109f057600080fd5b83356109fb816108dc565b92506020840135610a0b816108dc565b929592945050506040919091013590565b6020808252602c908201527f4c6120646972656363696f6e206e6f20707565646520736572206c612064697260408201526b32b1b1b4b7b71031b2b9379760a11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610a9057600080fd5b5051919050565b80820180821115610ab857634e487b7160e01b600052601160045260246000fd5b9291505056fea164736f6c6343000816000a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638689bfc41161008c57806399269b7b1161006657806399269b7b146101cf578063adf24eb6146101e2578063ea3774e3146101f5578063f2fde38b1461020857600080fd5b80638689bfc4146101a35780638da5cb5b146101b65780639683584f146101c757600080fd5b80636ebc8c86116100c85780636ebc8c861461016d578063715018a6146101805780637410a8241461018857806382629d3a1461019b57600080fd5b8063290f477d146100ef578063474da79a1461012d5780635f539d6914610158575b600080fd5b61011a6100fd3660046108f1565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61014061013b36600461092a565b61021b565b6040516001600160a01b039091168152602001610124565b61016b610166366004610943565b610245565b005b61014061017b36600461092a565b6102f3565b61016b61036e565b61016b610196366004610967565b610382565b61016b6104a5565b61016b6101b13660046109b2565b6104cd565b6000546001600160a01b0316610140565b60015461011a565b6101406101dd366004610943565b6104e3565b61016b6101f03660046109db565b610626565b610140610203366004610943565b61065a565b61016b610216366004610943565b6106d9565b6001818154811061022b57600080fd5b6000918252602090912001546001600160a01b0316905081565b61024d610714565b6001600160a01b03811661027c5760405162461bcd60e51b815260040161027390610a1c565b60405180910390fd5b60018054808201825560009182527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b03841690811790915560405190917f89c66952b48f3e96bf1d8ba1b63189520fd988a6979b8b740bd5c5d8dc53e20591a250565b60015460009082106103405760405162461bcd60e51b815260206004820152601660248201527524b73234b1b290333ab2b930903232903930b733b79760511b6044820152606401610273565b6001828154811061035357610353610a68565b6000918252602090912001546001600160a01b031692915050565b610376610714565b6103806000610741565b565b61038a610714565b6001600160a01b038116158015906103aa57506001600160a01b03821615155b6103c65760405162461bcd60e51b815260040161027390610a1c565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908516906370a0823190602401602060405180830381865afa158015610410573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104349190610a7e565b905061044b6001600160a01b038516848484610791565b6001600160a01b0380841660008181526002602090815260408083208986168085529252808320839055519386169390917f7d346ccbc714ea32a522bfe5f4773dcdf5123584d2627fbc1742828663b81c7a91a450505050565b6104ad610714565b60408051600081526020810191829052516104ca91600191610862565b50565b6104d5610714565b6001600160801b0316600355565b6001546000906105355760405162461bcd60e51b815260206004820152601d60248201527f4e6f2068617920636f6e747261746f7320656e20656c2061727261792e0000006044820152606401610273565b60005b60015481101561061d5760006001828154811061055757610557610a68565b60009182526020822001546040516370a0823160e01b81526001600160a01b03918216600482018190529350908616906370a0823190602401602060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d19190610a7e565b90508015801561060657506001600160a01b038083166000908152600260209081526040808320938916835292905220544210155b1561061357509392505050565b5050600101610538565b50600092915050565b61062e610714565b6001600160a01b0392831660009081526002602090815260408083209490951682529290925291902055565b6000610664610714565b600061066f836104e3565b90506003544261067f9190610a97565b6001600160a01b0380831660008181526002602090815260408083209489168084529490915280822094909455925190927f6d7d8faf94e5d080bb88c6bda069625da34ce65cada8ca6b9a63b53f8330425391a392915050565b6106e1610714565b6001600160a01b03811661070b57604051631e4fbdf760e01b815260006004820152602401610273565b6104ca81610741565b6000546001600160a01b031633146103805760405163118cdaa760e01b8152336004820152602401610273565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526107eb9085906107f1565b50505050565b600080602060008451602086016000885af180610814576040513d6000823e3d81fd5b50506000513d9150811561082c578060011415610839565b6001600160a01b0384163b155b156107eb57604051635274afe760e01b81526001600160a01b0385166004820152602401610273565b8280548282559060005260206000209081019282156108b7579160200282015b828111156108b757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610882565b506108c39291506108c7565b5090565b5b808211156108c357600081556001016108c8565b6001600160a01b03811681146104ca57600080fd5b6000806040838503121561090457600080fd5b823561090f816108dc565b9150602083013561091f816108dc565b809150509250929050565b60006020828403121561093c57600080fd5b5035919050565b60006020828403121561095557600080fd5b8135610960816108dc565b9392505050565b60008060006060848603121561097c57600080fd5b8335610987816108dc565b92506020840135610997816108dc565b915060408401356109a7816108dc565b809150509250925092565b6000602082840312156109c457600080fd5b81356001600160801b038116811461096057600080fd5b6000806000606084860312156109f057600080fd5b83356109fb816108dc565b92506020840135610a0b816108dc565b929592945050506040919091013590565b6020808252602c908201527f4c6120646972656363696f6e206e6f20707565646520736572206c612064697260408201526b32b1b1b4b7b71031b2b9379760a11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610a9057600080fd5b5051919050565b80820180821115610ab857634e487b7160e01b600052601160045260246000fd5b9291505056fea164736f6c6343000816000a
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.