Source Code
Overview
BNB Balance
BNB Value
$0.00Cross-Chain Transactions
Loading...
Loading
Contract Name:
WithdrawVault
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 20 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity =0.8.28;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
contract WithdrawVault is Pausable, AccessControl {
using SafeERC20 for IERC20;
mapping(address => bool) public supportedTokens;
address[] private supportedTokensArray;
address public vault;
address ceffu;
// Role
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant VAULT_ROLE = keccak256("VAULT_ROLE");
bytes32 private constant BOT_ROLE = keccak256("BOT_ROLE");
event CeffuReceive(address indexed token, address indexed to, uint256 indexed amount);
constructor(address[] memory tokens, address admin, address bot, address _ceffu) {
require(admin != address(0), "Admin address cannot be zero");
require(_ceffu != address(0), "Ceffu address cannot be zero");
ceffu = _ceffu;
uint length = tokens.length;
for (uint i = 0; i < length; i++) {
require(tokens[i] != address(0));
supportedTokens[tokens[i]] = true;
supportedTokensArray.push(tokens[i]);
}
// Grant admin roles
_grantRole(DEFAULT_ADMIN_ROLE, admin);
_grantRole(PAUSER_ROLE, admin);
_grantRole(BOT_ROLE, bot);
}
function transfer(address token, address recipient, uint256 amount) external whenNotPaused onlyRole(VAULT_ROLE) {
require(supportedTokens[token], "Token not supported");
require(recipient != address(0), "Recipient cannot be zero address");
require(amount > 0, "Amount must be greater than zero");
require(IERC20(token).balanceOf(address(this)) >= amount, "Insufficient balance");
IERC20(token).safeTransfer(recipient, amount);
}
/**
* @dev Pauses the contract, disabling `transfer` functionality.
* Can only be called by an account with the PAUSER_ROLE.
*/
function pause() external onlyRole(PAUSER_ROLE) {
_pause();
}
/**
* @dev Unpauses the contract, enabling `transfer` functionality.
* Can only be called by an account with the PAUSER_ROLE.
*/
function unpause() external onlyRole(PAUSER_ROLE) {
_unpause();
}
function addSupportedToken(address token) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(token != address(0), "Token address cannot be zero");
require(!supportedTokens[token], "Token already supported");
supportedTokens[token] = true;
supportedTokensArray.push(token);
}
function setVault(address _vault) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(_vault != address(0), "Vault address cannot be zero");
address oldVault = vault;
_revokeRole(VAULT_ROLE, oldVault);
_grantRole(VAULT_ROLE, _vault);
vault = _vault;
}
function changeAdmin(address _admin) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(_admin != address(0), "Admin address cannot be zero");
_revokeRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(DEFAULT_ADMIN_ROLE, _admin);
}
function getSupportedTokens() external view returns (address[] memory) {
return supportedTokensArray;
}
function getBalance(address token) external view returns (uint256) {
return IERC20(token).balanceOf(address(this));
}
function emergencyWithdraw(address token, address recipient, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
// sweep the tokens which are sent to this contract accidentally
require(token != address(0) && recipient != address(0), "Invalid address");
IERC20(token).safeTransfer(recipient, amount);
}
function transferToCeffu(
address _token,
uint256 _amount
) external onlyRole(BOT_ROLE) {
require(_amount > 0, "must > 0");
require(_amount <= IERC20(_token).balanceOf(address(this)), "Not enough balance");
require(supportedTokens[_token], "Token not supported");
IERC20(_token).safeTransfer(ceffu, _amount);
emit CeffuReceive(_token, ceffu, _amount);
}
receive() external payable {
revert("This contract does not accept native currency");
}
}// 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.1.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.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.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 Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
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/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) (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.1.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert Errors.FailedCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly ("memory-safe") {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert Errors.FailedCall();
}
}
}// 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) (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.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.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.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.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}// 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);
}{
"remappings": [
"forge-std/=lib/forge-std/src/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 20
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": true,
"libraries": {
"src/utils.sol": {
"Utils": "0x76119278b2593972857A2B3852b22117307be842"
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"bot","type":"address"},{"internalType":"address","name":"_ceffu","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","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":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CeffuReceive","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"addSupportedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSupportedTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferToCeffu","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6080604052346102135761183680380380610019816102ba565b9283398101906080818303126102135780516001600160401b0381116102135781019180601f84011215610213578251926001600160401b0384116101fd578360051b9060208061006b8185016102ba565b80978152019282010192831161021357602001905b8282106102a257505050610096602082016102df565b916100af60606100a8604085016102df565b93016102df565b6000805460ff191690556001600160a01b0384161561025d576001600160a01b0316801561021857600580546001600160a01b03191691909117905580519060005b828110610125576101158461010f8761010981610307565b50610383565b5061041b565b5060405161130290816104b48239f35b6001600160a01b0361013782846102f3565b511615610213576001600160a01b0361015082846102f3565b51166000908152600260205260409020805460ff191660011790556001600160a01b0361017d82846102f3565b51169060035491680100000000000000008310156101fd5760018301806003558310156101e75760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90920180546001600160a01b0319169092179091556001016100f1565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b60405162461bcd60e51b815260206004820152601c60248201527f436566667520616464726573732063616e6e6f74206265207a65726f000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527f41646d696e20616464726573732063616e6e6f74206265207a65726f000000006044820152606490fd5b602080916102af846102df565b815201910190610080565b6040519190601f01601f191682016001600160401b038111838210176101fd57604052565b51906001600160a01b038216820361021357565b80518210156101e75760209160051b010190565b6001600160a01b03811660009081526000805160206117d6833981519152602052604090205460ff1661037d576001600160a01b031660008181526000805160206117d683398151915260205260408120805460ff191660011790553391906000805160206117b68339815191528180a4600190565b50600090565b6001600160a01b0381166000908152600080516020611816833981519152602052604090205460ff1661037d576001600160a01b0316600081815260008051602061181683398151915260205260408120805460ff191660011790553391907f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a906000805160206117b68339815191529080a4600190565b6001600160a01b03811660009081526000805160206117f6833981519152602052604090205460ff1661037d576001600160a01b031660008181526000805160206117f683398151915260205260408120805460ff191660011790553391907f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b906000805160206117b68339815191529080a460019056fe6080806040526004361015610076575b50361561001b57600080fd5b60405162461bcd60e51b815260206004820152602d60248201527f5468697320636f6e747261637420646f6573206e6f7420616363657074206e6160448201526c746976652063757272656e637960981b6064820152608490fd5b60003560e01c90816301ffc9a714610c7257508063248a9ca314610c4c5780632f2ff15d14610c1b57806336568abe14610bd55780633f4ba83a14610b6c57806346891db7146109975780635c975abb146109745780636817031b146108c757806368c4ac26146108885780636d69fcaf146107225780638456cb59146106c85780638f2839701461064157806391d14854146105f457806398c4f1ac146105cb578063a217fddf146105af578063beabacc8146103df578063d3c7c2c71461032f578063d547741f146102f9578063e63ab1e9146102be578063e63ea4081461023a578063f8b2cb4f146101a35763fbfa77cf14610175573861000f565b3461019e57600036600319011261019e576004546040516001600160a01b039091168152602090f35b600080fd5b3461019e57602036600319011261019e57602460206001600160a01b036101c8610cdb565b16604051928380926370a0823160e01b82523060048301525afa801561022e576000906101fb575b602090604051908152f35b506020813d602011610226575b8161021560209383610d3f565b8101031261019e57602090516101f0565b3d9150610208565b6040513d6000823e3d90fd5b3461019e5761024836610cf1565b9091610252610e15565b6001600160a01b031691821515806102ac575b15610275576102739261117e565b005b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606490fd5b506001600160a01b0381161515610265565b3461019e57600036600319011261019e5760206040517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b3461019e57604036600319011261019e57610273600435610318610cc5565b9061032a61032582610d2b565b610e56565b61110a565b3461019e57600036600319011261019e5760405180602060035492838152018092600360005260206000209060005b8181106103c05750505081610374910382610d3f565b6040519182916020830190602084525180915260408301919060005b81811061039e575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610390565b82546001600160a01b031684526020909301926001928301920161035e565b3461019e576103ed36610cf1565b90916103f761120f565b33600090815260008051602061126d833981519152602052604090205460ff16156105885760018060a01b03169182600052600260205261043f60ff60406000205416610d61565b6001600160a01b03811615610544578115610500576040516370a0823160e01b8152306004820152602081602481875afa801561022e5783916000916104cb575b501061048f576102739261117e565b60405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606490fd5b9150506020813d6020116104f8575b816104e760209383610d3f565b8101031261019e5782905185610480565b3d91506104da565b606460405162461bcd60e51b815260206004820152602060248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f6044820152fd5b606460405162461bcd60e51b815260206004820152602060248201527f526563697069656e742063616e6e6f74206265207a65726f20616464726573736044820152fd5b63e2517d3f60e01b6000523360045260008051602061128d83398151915260245260446000fd5b3461019e57600036600319011261019e57602060405160008152f35b3461019e57600036600319011261019e57602060405160008051602061128d8339815191528152f35b3461019e57604036600319011261019e5761060d610cc5565b600435600052600160205260406000209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b3461019e57602036600319011261019e5761065a610cdb565b610662610e15565b6001600160a01b03811615610684576102739061067e33611096565b50610f1f565b60405162461bcd60e51b815260206004820152601c60248201527b41646d696e20616464726573732063616e6e6f74206265207a65726f60201b6044820152606490fd5b3461019e57600036600319011261019e576106e1610da3565b6106e961120f565b600160ff1960005416176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461019e57602036600319011261019e5761073b610cdb565b610743610e15565b6001600160a01b031680156108445780600052600260205260ff60406000205416610805576000818152600260205260409020805460ff19166001179055600354600160401b8110156107ef5760018101806003558110156107d95760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319169091179055005b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b8152602060048201526017602482015276151bdad95b88185b1c9958591e481cdd5c1c1bdc9d1959604a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527b546f6b656e20616464726573732063616e6e6f74206265207a65726f60201b6044820152606490fd5b3461019e57602036600319011261019e576001600160a01b036108a9610cdb565b166000526002602052602060ff604060002054166040519015158152f35b3461019e57602036600319011261019e576108e0610cdb565b6108e8610e15565b6001600160a01b038116908115610930576004546109199190610913906001600160a01b0316611012565b50610e93565b50600480546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152601c60248201527b5661756c7420616464726573732063616e6e6f74206265207a65726f60201b6044820152606490fd5b3461019e57600036600319011261019e57602060ff600054166040519015158152f35b3461019e57604036600319011261019e576109b0610cdb565b3360009081527f23b5fec2089556a6c5b151e34068bfe081a4d2aa094faa466b56d44dbb75c7386020526040902054602435919060ff1615610b33578115610b03576040516370a0823160e01b81523060048201526001600160a01b039190911690602081602481855afa90811561022e57600091610ad1575b508211610a9757806000526002602052610a4b60ff60406000205416610d61565b600554610a639083906001600160a01b03168361117e565b6005546001600160a01b0316907f4df7f50f630ac07eef038205b5b9c0c910ce8498aa925abbfcb0e1e674058aa9600080a4005b60405162461bcd60e51b81526020600482015260126024820152714e6f7420656e6f7567682062616c616e636560701b6044820152606490fd5b90506020813d602011610afb575b81610aec60209383610d3f565b8101031261019e575183610a2a565b3d9150610adf565b60405162461bcd60e51b815260206004820152600860248201526706d757374203e20360c41b6044820152606490fd5b63e2517d3f60e01b600052336004527f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b60245260446000fd5b3461019e57600036600319011261019e57610b85610da3565b60005460ff811615610bc45760ff19166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b60005260046000fd5b3461019e57604036600319011261019e57610bee610cc5565b336001600160a01b03821603610c0a576102739060043561110a565b63334bd91960e11b60005260046000fd5b3461019e57604036600319011261019e57610273600435610c3a610cc5565b90610c4761032582610d2b565b610f95565b3461019e57602036600319011261019e576020610c6a600435610d2b565b604051908152f35b3461019e57602036600319011261019e576004359063ffffffff60e01b821680920361019e57602091637965db0b60e01b8114908115610cb4575b5015158152f35b6301ffc9a760e01b14905083610cad565b602435906001600160a01b038216820361019e57565b600435906001600160a01b038216820361019e57565b606090600319011261019e576004356001600160a01b038116810361019e57906024356001600160a01b038116810361019e579060443590565b600052600160205260016040600020015490565b90601f8019910116810190811067ffffffffffffffff8211176107ef57604052565b15610d6857565b60405162461bcd60e51b8152602060048201526013602482015272151bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606490fd5b3360009081527fb9cbbae02fe941283ec0eefd7b121e3bc7f89fae077b27bdd75a7fd4cf1543a8602052604090205460ff1615610ddc57565b63e2517d3f60e01b600052336004527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60245260446000fd5b33600090815260008051602061124d833981519152602052604090205460ff1615610e3c57565b63e2517d3f60e01b60005233600452600060245260446000fd5b600081815260016020908152604080832033845290915290205460ff1615610e7b5750565b63e2517d3f60e01b6000523360045260245260446000fd5b6001600160a01b038116600090815260008051602061126d833981519152602052604090205460ff16610f19576001600160a01b0316600081815260008051602061126d83398151915260205260408120805460ff1916600117905533919060008051602061128d8339815191529060008051602061122d8339815191529080a4600190565b50600090565b6001600160a01b038116600090815260008051602061124d833981519152602052604090205460ff16610f19576001600160a01b0316600081815260008051602061124d83398151915260205260408120805460ff1916600117905533919060008051602061122d8339815191528180a4600190565b60008181526001602090815260408083206001600160a01b038616845290915290205460ff1661100b5760008181526001602081815260408084206001600160a01b0396909616808552959091528220805460ff191690911790553392919060008051602061122d8339815191529080a4600190565b5050600090565b6001600160a01b038116600090815260008051602061126d833981519152602052604090205460ff1615610f19576001600160a01b0316600081815260008051602061126d83398151915260205260408120805460ff1916905533919060008051602061128d833981519152906000805160206112ad8339815191529080a4600190565b6001600160a01b038116600090815260008051602061124d833981519152602052604090205460ff1615610f19576001600160a01b0316600081815260008051602061124d83398151915260205260408120805460ff191690553391906000805160206112ad8339815191528180a4600190565b60008181526001602090815260408083206001600160a01b038616845290915290205460ff161561100b5760008181526001602090815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291906000805160206112ad8339815191529080a4600190565b60405163a9059cbb60e01b60208281019182526001600160a01b03909416602483015260448083019590955293815290926000916111bd606482610d3f565b519082855af11561022e576000513d61120657506001600160a01b0381163b155b6111e55750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b600114156111de565b60ff6000541661121b57565b63d93c066560e01b60005260046000fdfe2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0da6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4981ca3e78767fe7984cabec333f0414457dbe87b59d50ac066de98618b846bf8131e0210044b4f6757ce6aa31f9c6e8d4896d24a755014887391a926c5224d959f6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171ba2646970667358221220c425179e519cd11f1612b57d82e453984d4d054baa36e583c9bb83a31e3c8b8b64736f6c634300081c00332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0da6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4923b5fec2089556a6c5b151e34068bfe081a4d2aa094faa466b56d44dbb75c738b9cbbae02fe941283ec0eefd7b121e3bc7f89fae077b27bdd75a7fd4cf1543a800000000000000000000000000000000000000000000000000000000000000800000000000000000000000006f82b43b85e38402099063eb3935cf2f1c48d5ed000000000000000000000000934c775d3004689ea5738fe80f34378f589f190d000000000000000000000000d038213a84a86348d000929c115528ae9ddc1158000000000000000000000000000000000000000000000000000000000000000200000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d
Deployed Bytecode
0x6080806040526004361015610076575b50361561001b57600080fd5b60405162461bcd60e51b815260206004820152602d60248201527f5468697320636f6e747261637420646f6573206e6f7420616363657074206e6160448201526c746976652063757272656e637960981b6064820152608490fd5b60003560e01c90816301ffc9a714610c7257508063248a9ca314610c4c5780632f2ff15d14610c1b57806336568abe14610bd55780633f4ba83a14610b6c57806346891db7146109975780635c975abb146109745780636817031b146108c757806368c4ac26146108885780636d69fcaf146107225780638456cb59146106c85780638f2839701461064157806391d14854146105f457806398c4f1ac146105cb578063a217fddf146105af578063beabacc8146103df578063d3c7c2c71461032f578063d547741f146102f9578063e63ab1e9146102be578063e63ea4081461023a578063f8b2cb4f146101a35763fbfa77cf14610175573861000f565b3461019e57600036600319011261019e576004546040516001600160a01b039091168152602090f35b600080fd5b3461019e57602036600319011261019e57602460206001600160a01b036101c8610cdb565b16604051928380926370a0823160e01b82523060048301525afa801561022e576000906101fb575b602090604051908152f35b506020813d602011610226575b8161021560209383610d3f565b8101031261019e57602090516101f0565b3d9150610208565b6040513d6000823e3d90fd5b3461019e5761024836610cf1565b9091610252610e15565b6001600160a01b031691821515806102ac575b15610275576102739261117e565b005b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606490fd5b506001600160a01b0381161515610265565b3461019e57600036600319011261019e5760206040517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b3461019e57604036600319011261019e57610273600435610318610cc5565b9061032a61032582610d2b565b610e56565b61110a565b3461019e57600036600319011261019e5760405180602060035492838152018092600360005260206000209060005b8181106103c05750505081610374910382610d3f565b6040519182916020830190602084525180915260408301919060005b81811061039e575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610390565b82546001600160a01b031684526020909301926001928301920161035e565b3461019e576103ed36610cf1565b90916103f761120f565b33600090815260008051602061126d833981519152602052604090205460ff16156105885760018060a01b03169182600052600260205261043f60ff60406000205416610d61565b6001600160a01b03811615610544578115610500576040516370a0823160e01b8152306004820152602081602481875afa801561022e5783916000916104cb575b501061048f576102739261117e565b60405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606490fd5b9150506020813d6020116104f8575b816104e760209383610d3f565b8101031261019e5782905185610480565b3d91506104da565b606460405162461bcd60e51b815260206004820152602060248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f6044820152fd5b606460405162461bcd60e51b815260206004820152602060248201527f526563697069656e742063616e6e6f74206265207a65726f20616464726573736044820152fd5b63e2517d3f60e01b6000523360045260008051602061128d83398151915260245260446000fd5b3461019e57600036600319011261019e57602060405160008152f35b3461019e57600036600319011261019e57602060405160008051602061128d8339815191528152f35b3461019e57604036600319011261019e5761060d610cc5565b600435600052600160205260406000209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b3461019e57602036600319011261019e5761065a610cdb565b610662610e15565b6001600160a01b03811615610684576102739061067e33611096565b50610f1f565b60405162461bcd60e51b815260206004820152601c60248201527b41646d696e20616464726573732063616e6e6f74206265207a65726f60201b6044820152606490fd5b3461019e57600036600319011261019e576106e1610da3565b6106e961120f565b600160ff1960005416176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461019e57602036600319011261019e5761073b610cdb565b610743610e15565b6001600160a01b031680156108445780600052600260205260ff60406000205416610805576000818152600260205260409020805460ff19166001179055600354600160401b8110156107ef5760018101806003558110156107d95760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319169091179055005b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b8152602060048201526017602482015276151bdad95b88185b1c9958591e481cdd5c1c1bdc9d1959604a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527b546f6b656e20616464726573732063616e6e6f74206265207a65726f60201b6044820152606490fd5b3461019e57602036600319011261019e576001600160a01b036108a9610cdb565b166000526002602052602060ff604060002054166040519015158152f35b3461019e57602036600319011261019e576108e0610cdb565b6108e8610e15565b6001600160a01b038116908115610930576004546109199190610913906001600160a01b0316611012565b50610e93565b50600480546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152601c60248201527b5661756c7420616464726573732063616e6e6f74206265207a65726f60201b6044820152606490fd5b3461019e57600036600319011261019e57602060ff600054166040519015158152f35b3461019e57604036600319011261019e576109b0610cdb565b3360009081527f23b5fec2089556a6c5b151e34068bfe081a4d2aa094faa466b56d44dbb75c7386020526040902054602435919060ff1615610b33578115610b03576040516370a0823160e01b81523060048201526001600160a01b039190911690602081602481855afa90811561022e57600091610ad1575b508211610a9757806000526002602052610a4b60ff60406000205416610d61565b600554610a639083906001600160a01b03168361117e565b6005546001600160a01b0316907f4df7f50f630ac07eef038205b5b9c0c910ce8498aa925abbfcb0e1e674058aa9600080a4005b60405162461bcd60e51b81526020600482015260126024820152714e6f7420656e6f7567682062616c616e636560701b6044820152606490fd5b90506020813d602011610afb575b81610aec60209383610d3f565b8101031261019e575183610a2a565b3d9150610adf565b60405162461bcd60e51b815260206004820152600860248201526706d757374203e20360c41b6044820152606490fd5b63e2517d3f60e01b600052336004527f6d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9b60245260446000fd5b3461019e57600036600319011261019e57610b85610da3565b60005460ff811615610bc45760ff19166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b60005260046000fd5b3461019e57604036600319011261019e57610bee610cc5565b336001600160a01b03821603610c0a576102739060043561110a565b63334bd91960e11b60005260046000fd5b3461019e57604036600319011261019e57610273600435610c3a610cc5565b90610c4761032582610d2b565b610f95565b3461019e57602036600319011261019e576020610c6a600435610d2b565b604051908152f35b3461019e57602036600319011261019e576004359063ffffffff60e01b821680920361019e57602091637965db0b60e01b8114908115610cb4575b5015158152f35b6301ffc9a760e01b14905083610cad565b602435906001600160a01b038216820361019e57565b600435906001600160a01b038216820361019e57565b606090600319011261019e576004356001600160a01b038116810361019e57906024356001600160a01b038116810361019e579060443590565b600052600160205260016040600020015490565b90601f8019910116810190811067ffffffffffffffff8211176107ef57604052565b15610d6857565b60405162461bcd60e51b8152602060048201526013602482015272151bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606490fd5b3360009081527fb9cbbae02fe941283ec0eefd7b121e3bc7f89fae077b27bdd75a7fd4cf1543a8602052604090205460ff1615610ddc57565b63e2517d3f60e01b600052336004527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60245260446000fd5b33600090815260008051602061124d833981519152602052604090205460ff1615610e3c57565b63e2517d3f60e01b60005233600452600060245260446000fd5b600081815260016020908152604080832033845290915290205460ff1615610e7b5750565b63e2517d3f60e01b6000523360045260245260446000fd5b6001600160a01b038116600090815260008051602061126d833981519152602052604090205460ff16610f19576001600160a01b0316600081815260008051602061126d83398151915260205260408120805460ff1916600117905533919060008051602061128d8339815191529060008051602061122d8339815191529080a4600190565b50600090565b6001600160a01b038116600090815260008051602061124d833981519152602052604090205460ff16610f19576001600160a01b0316600081815260008051602061124d83398151915260205260408120805460ff1916600117905533919060008051602061122d8339815191528180a4600190565b60008181526001602090815260408083206001600160a01b038616845290915290205460ff1661100b5760008181526001602081815260408084206001600160a01b0396909616808552959091528220805460ff191690911790553392919060008051602061122d8339815191529080a4600190565b5050600090565b6001600160a01b038116600090815260008051602061126d833981519152602052604090205460ff1615610f19576001600160a01b0316600081815260008051602061126d83398151915260205260408120805460ff1916905533919060008051602061128d833981519152906000805160206112ad8339815191529080a4600190565b6001600160a01b038116600090815260008051602061124d833981519152602052604090205460ff1615610f19576001600160a01b0316600081815260008051602061124d83398151915260205260408120805460ff191690553391906000805160206112ad8339815191528180a4600190565b60008181526001602090815260408083206001600160a01b038616845290915290205460ff161561100b5760008181526001602090815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291906000805160206112ad8339815191529080a4600190565b60405163a9059cbb60e01b60208281019182526001600160a01b03909416602483015260448083019590955293815290926000916111bd606482610d3f565b519082855af11561022e576000513d61120657506001600160a01b0381163b155b6111e55750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b600114156111de565b60ff6000541661121b57565b63d93c066560e01b60005260046000fdfe2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0da6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4981ca3e78767fe7984cabec333f0414457dbe87b59d50ac066de98618b846bf8131e0210044b4f6757ce6aa31f9c6e8d4896d24a755014887391a926c5224d959f6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171ba2646970667358221220c425179e519cd11f1612b57d82e453984d4d054baa36e583c9bb83a31e3c8b8b64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000800000000000000000000000006f82b43b85e38402099063eb3935cf2f1c48d5ed000000000000000000000000934c775d3004689ea5738fe80f34378f589f190d000000000000000000000000d038213a84a86348d000929c115528ae9ddc1158000000000000000000000000000000000000000000000000000000000000000200000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d
-----Decoded View---------------
Arg [0] : tokens (address[]): 0x55d398326f99059fF775485246999027B3197955,0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d
Arg [1] : admin (address): 0x6F82B43B85e38402099063Eb3935cF2F1C48D5eD
Arg [2] : bot (address): 0x934C775d3004689EA5738FE80F34378f589F190D
Arg [3] : _ceffu (address): 0xD038213A84a86348d000929C115528AE9DdC1158
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 0000000000000000000000006f82b43b85e38402099063eb3935cf2f1c48d5ed
Arg [2] : 000000000000000000000000934c775d3004689ea5738fe80f34378f589f190d
Arg [3] : 000000000000000000000000d038213a84a86348d000929c115528ae9ddc1158
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [5] : 00000000000000000000000055d398326f99059ff775485246999027b3197955
Arg [6] : 0000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in BNB
Multichain Portfolio | 32 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.