Verified contractExactMIT
TransferContract
Address0x0bfaef0d429fdc2fc720427517b6a3149ef98cbf
- Balance
0 ETH
- Transactions
2
- Compiler
solc 0.8.19
- Same code
3 more contracts
Details
- Compiler
- solc 0.8.19+commit.7dd6d404
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 17,067,763
- Creation transaction
- 0x61d722de15…4aefaea34c
Contract.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
interface IERC20 {
function decimals() external view returns (uint8);
function transfer(address recipient, uint256 amount) external returns (bool);
}
abstract contract Ownable {
address internal owner;
constructor(address _owner) {
owner = _owner;
}
modifier onlyOwner() {
require(isOwner(msg.sender) , "!Owner"); _;
}
function isOwner(address account) private view returns (bool) {
return account == owner;
}
function renounceOwnership() public onlyOwner {
owner = address(0);
emit OwnershipTransferred(address(0));
}
event OwnershipTransferred(address owner);
}
contract TransferContract is Ownable(msg.sender) {
constructor() {}
function transfer(IERC20 token, address[] calldata addresses, uint256[] calldata amounts) external onlyOwner {
uint256 decimalScalingFactor = 10**token.decimals();
uint256 amount;
address aiaddress;
for(uint i = 0;i<addresses.length;i++){
amount = amounts[i]*decimalScalingFactor;
aiaddress = addresses[i];
token.transfer(aiaddress, amount);
}
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.