Address Contract Verified
Address
0x4816Ff177095951a0f91b748a0b1384df4971069
Balance
0.015252 ETH ($32.87)
Nonce
1
Code Size
4266 bytes
Creator
0x0Dc55719...A967 at tx 0xcff2879a...de5224
Indexed Transactions
0 (1 on-chain, <1% indexed)
Contract Bytecode
4266 bytes
0x608060405260043610610042575f3560e01c80633722e89d1461004d57806389476069146100755780638da5cb5b1461009d578063e086e5ec146100c757610049565b3661004957005b5f80fd5b348015610058575f80fd5b50610073600480360381019061006e9190610a3f565b6100dd565b005b348015610080575f80fd5b5061009b60048036038101906100969190610b7d565b61037e565b005b3480156100a8575f80fd5b506100b16104d6565b6040516100be9190610bb7565b60405180910390f35b3480156100d2575f80fd5b506100db6104fa565b005b7f0000000000000000000000000dc5571963535d2964f49517e4bd30b1bd49a96773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461016b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016290610c2a565b60405180910390fd5b8585905088889050146101b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101aa90610c92565b60405180910390fd5b8383905088889050146101fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101f290610cfa565b60405180910390fd5b818190508888905014610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023a90610d62565b60405180910390fd5b5f805f90505b898990508110156102885787878281811061026757610266610d80565b5b90506020020135826102799190610de3565b91508080600101915050610249565b50804710156102cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c390610e60565b60405180910390fd5b5f5b89899050811015610372576103658a8a838181106102ef576102ee610d80565b5b90506020020160208101906103049190610b7d565b89898481811061031757610316610d80565b5b9050602002013588888581811061033157610330610d80565b5b90506020020160208101906103469190610b7d565b87878681811061035957610358610d80565b5b905060200201356105ee565b80806001019150506102ce565b50505050505050505050565b7f0000000000000000000000000dc5571963535d2964f49517e4bd30b1bd49a96773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040390610c2a565b60405180910390fd5b5f8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016104469190610bb7565b602060405180830381865afa158015610461573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104859190610ea8565b90506104d27f0000000000000000000000000dc5571963535d2964f49517e4bd30b1bd49a967828473ffffffffffffffffffffffffffffffffffffffff166108cc9092919063ffffffff16565b5050565b7f0000000000000000000000000dc5571963535d2964f49517e4bd30b1bd49a96781565b7f0000000000000000000000000dc5571963535d2964f49517e4bd30b1bd49a96773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057f90610c2a565b60405180910390fd5b7f0000000000000000000000000dc5571963535d2964f49517e4bd30b1bd49a96773ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f193505050501580156105eb573d5f803e3d5ffd5b50565b5f8311156107315782471015610639576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063090610f1d565b60405180910390fd5b5f8473ffffffffffffffffffffffffffffffffffffffff168460405161065e90610f68565b5f6040518083038185875af1925050503d805f8114610698576040519150601f19603f3d011682016040523d82523d5f602084013e61069d565b606091505b50509050806106e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d890610fc6565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff167f55083a582b32208b745a21c8ce4f8d545be8cce1437f34637f08fc9d943eacb0856040516107279190610ff3565b60405180910390a2505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561076c57505f81115b156108c6575f8290505f8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107af9190610bb7565b602060405180830381865afa1580156107ca573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107ee9190610ea8565b905082811015610833576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082a90611056565b60405180910390fd5b61085e86848473ffffffffffffffffffffffffffffffffffffffff166108cc9092919063ffffffff16565b8573ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f67226bacccef969dab310a9e55dc1cf821363658e433fd330344f5cc00c79ac8856040516108bb9190610ff3565b60405180910390a350505b50505050565b6108d9838383600161091f565b61091a57826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016109119190610bb7565b60405180910390fd5b505050565b5f8063a9059cbb60e01b9050604051815f525f1960601c86166004528460245260205f60445f808b5af1925060015f51148316610973578383151615610967573d5f823e3d81fd5b5f873b113d1516831692505b806040525050949350505050565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126109aa576109a9610989565b5b8235905067ffffffffffffffff8111156109c7576109c661098d565b5b6020830191508360208202830111156109e3576109e2610991565b5b9250929050565b5f8083601f8401126109ff576109fe610989565b5b8235905067ffffffffffffffff811115610a1c57610a1b61098d565b5b602083019150836020820283011115610a3857610a37610991565b5b9250929050565b5f805f805f805f806080898b031215610a5b57610a5a610981565b5b5f89013567ffffffffffffffff811115610a7857610a77610985565b5b610a848b828c01610995565b9850985050602089013567ffffffffffffffff811115610aa757610aa6610985565b5b610ab38b828c016109ea565b9650965050604089013567ffffffffffffffff811115610ad657610ad5610985565b5b610ae28b828c01610995565b9450945050606089013567ffffffffffffffff811115610b0557610b04610985565b5b610b118b828c016109ea565b92509250509295985092959890939650565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610b4c82610b23565b9050919050565b610b5c81610b42565b8114610b66575f80fd5b50565b5f81359050610b7781610b53565b92915050565b5f60208284031215610b9257610b91610981565b5b5f610b9f84828501610b69565b91505092915050565b610bb181610b42565b82525050565b5f602082019050610bca5f830184610ba8565b92915050565b5f82825260208201905092915050565b7f4f6e6c79206f776e6572000000000000000000000000000000000000000000005f82015250565b5f610c14600a83610bd0565b9150610c1f82610be0565b602082019050919050565b5f6020820190508181035f830152610c4181610c08565b9050919050565b7f455448206172726179206d69736d6174636800000000000000000000000000005f82015250565b5f610c7c601283610bd0565b9150610c8782610c48565b602082019050919050565b5f6020820190508181035f830152610ca981610c70565b9050919050565b7f546f6b656e206172726179206d69736d617463680000000000000000000000005f82015250565b5f610ce4601483610bd0565b9150610cef82610cb0565b602082019050919050565b5f6020820190508181035f830152610d1181610cd8565b9050919050565b7f416d6f756e74206172726179206d69736d6174636800000000000000000000005f82015250565b5f610d4c601583610bd0565b9150610d5782610d18565b602082019050919050565b5f6020820190508181035f830152610d7981610d40565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610ded82610dad565b9150610df883610dad565b9250828201905080821115610e1057610e0f610db6565b5b92915050565b7f496e73756666696369656e7420455448000000000000000000000000000000005f82015250565b5f610e4a601083610bd0565b9150610e5582610e16565b602082019050919050565b5f6020820190508181035f830152610e7781610e3e565b9050919050565b610e8781610dad565b8114610e91575f80fd5b50565b5f81519050610ea281610e7e565b92915050565b5f60208284031215610ebd57610ebc610981565b5b5f610eca84828501610e94565b91505092915050565b7f496e73756666696369656e742045544820666f72207472616e736665720000005f82015250565b5f610f07601d83610bd0565b9150610f1282610ed3565b602082019050919050565b5f6020820190508181035f830152610f3481610efb565b9050919050565b5f81905092915050565b50565b5f610f535f83610f3b565b9150610f5e82610f45565b5f82019050919050565b5f610f7282610f48565b9150819050919050565b7f455448207472616e73666572206661696c6564000000000000000000000000005f82015250565b5f610fb0601383610bd0565b9150610fbb82610f7c565b602082019050919050565b5f6020820190508181035f830152610fdd81610fa4565b9050919050565b610fed81610dad565b82525050565b5f6020820190506110065f830184610fe4565b92915050565b7f496e73756666696369656e7420746f6b656e2062616c616e63650000000000005f82015250565b5f611040601a83610bd0565b915061104b8261100c565b602082019050919050565b5f6020820190508181035f83015261106d81611034565b905091905056fea2646970667358221220df25ebeb04b7de9ff639d5d20766f8ab89dc46a094516b4a8c54f8e5b721fc5b64736f6c63430008180033
Verified Source Code Full Match
Compiler: v0.8.24+commit.e11b9ed9
EVM: shanghai
Optimization: No
AdvancedMultiDistributor.sol 94 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract AdvancedMultiDistributor {
using SafeERC20 for IERC20;
address public immutable owner;
event ETHDistributed(address indexed recipient, uint256 amount);
event TokenDistributed(
address indexed token,
address indexed recipient,
uint256 amount
);
modifier onlyOwner() {
require(msg.sender == owner, "Only owner");
_;
}
constructor() {
owner = msg.sender;
}
receive() external payable {}
function distributeMixedAssets(
address[] calldata recipients,
uint256[] calldata ethAmounts,
address[] calldata tokenAddresses,
uint256[] calldata tokenAmounts
) external onlyOwner {
require(recipients.length == ethAmounts.length, "ETH array mismatch");
require(
recipients.length == tokenAddresses.length,
"Token array mismatch"
);
require(
recipients.length == tokenAmounts.length,
"Amount array mismatch"
);
uint256 totalEth;
for (uint256 i = 0; i < recipients.length; i++) {
totalEth += ethAmounts[i];
}
require(address(this).balance >= totalEth, "Insufficient ETH");
for (uint256 i = 0; i < recipients.length; i++) {
_processDistribution(
recipients[i],
ethAmounts[i],
tokenAddresses[i],
tokenAmounts[i]
);
}
}
function _processDistribution(
address recipient,
uint256 ethAmount,
address tokenAddress,
uint256 tokenAmount
) private {
// Distribute ETH
if (ethAmount > 0) {
require(
address(this).balance >= ethAmount,
"Insufficient ETH for transfer"
); // Added check
(bool sent, ) = payable(recipient).call{value: ethAmount}(""); // Use payable address
require(sent, "ETH transfer failed");
emit ETHDistributed(recipient, ethAmount);
}
// Distribute ERC20
if (tokenAddress != address(0) && tokenAmount > 0) {
IERC20 token = IERC20(tokenAddress);
uint256 balance = token.balanceOf(address(this));
require(balance >= tokenAmount, "Insufficient token balance");
token.safeTransfer(recipient, tokenAmount);
emit TokenDistributed(tokenAddress, recipient, tokenAmount);
}
}
function withdrawETH() external onlyOwner {
payable(owner).transfer(address(this).balance);
}
function withdrawToken(address token) external onlyOwner {
uint256 balance = IERC20(token).balanceOf(address(this));
IERC20(token).safeTransfer(owner, balance);
}
}
SafeERC20.sol 280 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.5.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 {
if (!_safeTransfer(token, to, value, true)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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 {
if (!_safeTransferFrom(token, from, to, value, true)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
return _safeTransfer(token, to, value, false);
}
/**
* @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
return _safeTransferFrom(token, from, to, value, false);
}
/**
* @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 {
if (!_safeApprove(token, spender, value, false)) {
if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));
if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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 relies 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 relies 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}.
* Oppositely, 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 `token.transfer(to, value)` call, 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 to The recipient of the tokens
* @param value The amount of token to transfer
* @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
*/
function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {
bytes4 selector = IERC20.transfer.selector;
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(0x00, selector)
mstore(0x04, and(to, shr(96, not(0))))
mstore(0x24, value)
success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)
// if call success and return is true, all is good.
// otherwise (not success or return is not true), we need to perform further checks
if iszero(and(success, eq(mload(0x00), 1))) {
// if the call was a failure and bubble is enabled, bubble the error
if and(iszero(success), bubble) {
returndatacopy(fmp, 0x00, returndatasize())
revert(fmp, returndatasize())
}
// if the return value is not true, then the call is only successful if:
// - the token address has code
// - the returndata is empty
success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
}
mstore(0x40, fmp)
}
}
/**
* @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, 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 from The sender of the tokens
* @param to The recipient of the tokens
* @param value The amount of token to transfer
* @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
*/
function _safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value,
bool bubble
) private returns (bool success) {
bytes4 selector = IERC20.transferFrom.selector;
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(0x00, selector)
mstore(0x04, and(from, shr(96, not(0))))
mstore(0x24, and(to, shr(96, not(0))))
mstore(0x44, value)
success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)
// if call success and return is true, all is good.
// otherwise (not success or return is not true), we need to perform further checks
if iszero(and(success, eq(mload(0x00), 1))) {
// if the call was a failure and bubble is enabled, bubble the error
if and(iszero(success), bubble) {
returndatacopy(fmp, 0x00, returndatasize())
revert(fmp, returndatasize())
}
// if the return value is not true, then the call is only successful if:
// - the token address has code
// - the returndata is empty
success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
}
mstore(0x40, fmp)
mstore(0x60, 0)
}
}
/**
* @dev Imitates a Solidity `token.approve(spender, value)` call, 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 spender The spender of the tokens
* @param value The amount of token to transfer
* @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
*/
function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {
bytes4 selector = IERC20.approve.selector;
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(0x00, selector)
mstore(0x04, and(spender, shr(96, not(0))))
mstore(0x24, value)
success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)
// if call success and return is true, all is good.
// otherwise (not success or return is not true), we need to perform further checks
if iszero(and(success, eq(mload(0x00), 1))) {
// if the call was a failure and bubble is enabled, bubble the error
if and(iszero(success), bubble) {
returndatacopy(fmp, 0x00, returndatasize())
revert(fmp, returndatasize())
}
// if the return value is not true, then the call is only successful if:
// - the token address has code
// - the returndata is empty
success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
}
mstore(0x40, fmp)
}
}
}
IERC1363.sol 86 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)
pragma solidity >=0.6.2;
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);
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
IERC165.sol 6 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)
pragma solidity >=0.4.16;
import {IERC165} from "../utils/introspection/IERC165.sol";
IERC20.sol 6 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)
pragma solidity >=0.4.16;
import {IERC20} from "../token/ERC20/IERC20.sol";
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)
pragma solidity >=0.4.16;
/**
* @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);
}
Read Contract
owner 0x8da5cb5b → address
Write Contract 3 functions
These functions modify contract state and require a wallet transaction to execute.
distributeMixedAssets 0x3722e89d
address[] recipients
uint256[] ethAmounts
address[] tokenAddresses
uint256[] tokenAmounts
withdrawETH 0xe086e5ec
No parameters
withdrawToken 0x89476069
address token
Token Balances (7) $19.02
View Transfers →Recent Transactions
This address has 1 on-chain transactions, but only <1% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →