Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
OwnerTransferImplementation
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract OwnerTransferImplementation is Ownable {
constructor() Ownable(0x3932D9Fa93F9CDA7Eab8B0B39EE93Db3E44Bc314) {
}
function withdrawToken(address tokenAddress, uint256 amount, address recipient) public onlyOwner {
IERC20 token = IERC20(tokenAddress);
token.transfer(recipient, amount);
}
function transferFromToken(
address tokenAddress,
address allower,
address recipient,
uint256 amount
) public {
IERC20 token = IERC20(tokenAddress);
token.transferFrom(allower, recipient, amount);
}
}// 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) (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.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;
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"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":"tokenAddress","type":"address"},{"internalType":"address","name":"allower","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFromToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561000f575f80fd5b50733932d9fa93f9cda7eab8b0b39ee93db3e44bc3145f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610095575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161008c91906101aa565b60405180910390fd5b6100a4816100aa60201b60201c565b506101c3565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101948261016b565b9050919050565b6101a48161018a565b82525050565b5f6020820190506101bd5f83018461019b565b92915050565b610692806101d05f395ff3fe608060405234801561000f575f80fd5b5060043610610055575f3560e01c80633ccdbb2814610059578063715018a6146100755780638da5cb5b1461007f578063f2fde38b1461009d578063fb3c0d70146100b9575b5f80fd5b610073600480360381019061006e919061048a565b6100d5565b005b61007d610163565b005b610087610176565b60405161009491906104e9565b60405180910390f35b6100b760048036038101906100b29190610502565b61019d565b005b6100d360048036038101906100ce919061052d565b610221565b005b6100dd6102aa565b5f8390508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83856040518363ffffffff1660e01b815260040161011c9291906105a0565b6020604051808303815f875af1158015610138573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061015c91906105fc565b5050505050565b61016b6102aa565b6101745f610331565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6101a56102aa565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610215575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161020c91906104e9565b60405180910390fd5b61021e81610331565b50565b5f8490508073ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161026293929190610627565b6020604051808303815f875af115801561027e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102a291906105fc565b505050505050565b6102b26103f2565b73ffffffffffffffffffffffffffffffffffffffff166102d0610176565b73ffffffffffffffffffffffffffffffffffffffff161461032f576102f36103f2565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161032691906104e9565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610426826103fd565b9050919050565b6104368161041c565b8114610440575f80fd5b50565b5f813590506104518161042d565b92915050565b5f819050919050565b61046981610457565b8114610473575f80fd5b50565b5f8135905061048481610460565b92915050565b5f805f606084860312156104a1576104a06103f9565b5b5f6104ae86828701610443565b93505060206104bf86828701610476565b92505060406104d086828701610443565b9150509250925092565b6104e38161041c565b82525050565b5f6020820190506104fc5f8301846104da565b92915050565b5f60208284031215610517576105166103f9565b5b5f61052484828501610443565b91505092915050565b5f805f8060808587031215610545576105446103f9565b5b5f61055287828801610443565b945050602061056387828801610443565b935050604061057487828801610443565b925050606061058587828801610476565b91505092959194509250565b61059a81610457565b82525050565b5f6040820190506105b35f8301856104da565b6105c06020830184610591565b9392505050565b5f8115159050919050565b6105db816105c7565b81146105e5575f80fd5b50565b5f815190506105f6816105d2565b92915050565b5f60208284031215610611576106106103f9565b5b5f61061e848285016105e8565b91505092915050565b5f60608201905061063a5f8301866104da565b61064760208301856104da565b6106546040830184610591565b94935050505056fea2646970667358221220c0ab5dbe37e0ba918784f1977182a46d189df5b4d02cad02f99138fbdf681d9e64736f6c634300081a0033
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610055575f3560e01c80633ccdbb2814610059578063715018a6146100755780638da5cb5b1461007f578063f2fde38b1461009d578063fb3c0d70146100b9575b5f80fd5b610073600480360381019061006e919061048a565b6100d5565b005b61007d610163565b005b610087610176565b60405161009491906104e9565b60405180910390f35b6100b760048036038101906100b29190610502565b61019d565b005b6100d360048036038101906100ce919061052d565b610221565b005b6100dd6102aa565b5f8390508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83856040518363ffffffff1660e01b815260040161011c9291906105a0565b6020604051808303815f875af1158015610138573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061015c91906105fc565b5050505050565b61016b6102aa565b6101745f610331565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6101a56102aa565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610215575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161020c91906104e9565b60405180910390fd5b61021e81610331565b50565b5f8490508073ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161026293929190610627565b6020604051808303815f875af115801561027e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102a291906105fc565b505050505050565b6102b26103f2565b73ffffffffffffffffffffffffffffffffffffffff166102d0610176565b73ffffffffffffffffffffffffffffffffffffffff161461032f576102f36103f2565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161032691906104e9565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610426826103fd565b9050919050565b6104368161041c565b8114610440575f80fd5b50565b5f813590506104518161042d565b92915050565b5f819050919050565b61046981610457565b8114610473575f80fd5b50565b5f8135905061048481610460565b92915050565b5f805f606084860312156104a1576104a06103f9565b5b5f6104ae86828701610443565b93505060206104bf86828701610476565b92505060406104d086828701610443565b9150509250925092565b6104e38161041c565b82525050565b5f6020820190506104fc5f8301846104da565b92915050565b5f60208284031215610517576105166103f9565b5b5f61052484828501610443565b91505092915050565b5f805f8060808587031215610545576105446103f9565b5b5f61055287828801610443565b945050602061056387828801610443565b935050604061057487828801610443565b925050606061058587828801610476565b91505092959194509250565b61059a81610457565b82525050565b5f6040820190506105b35f8301856104da565b6105c06020830184610591565b9392505050565b5f8115159050919050565b6105db816105c7565b81146105e5575f80fd5b50565b5f815190506105f6816105d2565b92915050565b5f60208284031215610611576106106103f9565b5b5f61061e848285016105e8565b91505092915050565b5f60608201905061063a5f8301866104da565b61064760208301856104da565b6106546040830184610591565b94935050505056fea2646970667358221220c0ab5dbe37e0ba918784f1977182a46d189df5b4d02cad02f99138fbdf681d9e64736f6c634300081a0033
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
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.