Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 29 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Multisend ERC20 | 20366436 | 7 days ago | IN | 0 ETH | 0.00023602 | ||||
Multisend ERC20 | 20168675 | 35 days ago | IN | 0 ETH | 0.00074597 | ||||
Multisend ERC20 | 19872895 | 76 days ago | IN | 0 ETH | 0.00047982 | ||||
Multisend ERC20 | 19657903 | 106 days ago | IN | 0 ETH | 0.0017076 | ||||
Multisend ERC20 | 19523005 | 125 days ago | IN | 0 ETH | 0.00646563 | ||||
Multisend ERC20 | 19438014 | 137 days ago | IN | 0 ETH | 0.01027737 | ||||
Multisend ERC20 | 19430179 | 138 days ago | IN | 0 ETH | 0.00677498 | ||||
Multisend ERC20 | 19430157 | 138 days ago | IN | 0 ETH | 0.00615826 | ||||
Multisend ERC20 | 19408517 | 141 days ago | IN | 0 ETH | 0.00580902 | ||||
Multisend ERC20 | 19380456 | 145 days ago | IN | 0 ETH | 0.00453455 | ||||
Multisend ERC20 | 19360485 | 148 days ago | IN | 0 ETH | 0.00680053 | ||||
Multisend ERC20 | 19358648 | 148 days ago | IN | 0 ETH | 0.0073091 | ||||
Multisend ERC20 | 19329830 | 152 days ago | IN | 0 ETH | 0.00951548 | ||||
Multisend ERC20 | 19322671 | 153 days ago | IN | 0 ETH | 0.0047612 | ||||
Multisend ERC20 | 19322664 | 153 days ago | IN | 0 ETH | 0.00454635 | ||||
Multisend ERC20 | 19309050 | 155 days ago | IN | 0 ETH | 0.00460791 | ||||
Multisend ERC20 | 19260200 | 162 days ago | IN | 0 ETH | 0.00132397 | ||||
Multisend ERC20 | 19231908 | 166 days ago | IN | 0 ETH | 0.01940611 | ||||
Multisend ERC20 | 19039104 | 193 days ago | IN | 0 ETH | 0.0261477 | ||||
Multisend ERC20 | 19024893 | 195 days ago | IN | 0 ETH | 0.01174264 | ||||
Multisend ERC20 | 19010316 | 197 days ago | IN | 0 ETH | 0.01916222 | ||||
Multisend ERC20 | 19009467 | 197 days ago | IN | 0 ETH | 0.00413532 | ||||
Multisend | 18932367 | 208 days ago | IN | 0.01575 ETH | 0.00219916 | ||||
Multisend ERC20 | 18789070 | 228 days ago | IN | 0 ETH | 0.01910279 | ||||
Multisend ERC20 | 18789053 | 228 days ago | IN | 0 ETH | 0.02074833 |
Loading...
Loading
Contract Name:
Multisender
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; /** * @dev Send ERC20/ERC721 to multiple account at once * * Features: * - No transaction fees * - Protection against gas griefing * - User-friendly error messages: Lists each address if transfer fails * - Audited using the reputable tool(=`slither`) * */ contract Multisender { using Strings for uint256; using Strings for address; // Fixed gas consumption when `transfer` is called uint256 public constant TRANSFER_GAS = 2300; // Default gas consumption when utilizing Openzeppelin mesured by `GasMeter.sol` uint256 public constant BASE_ERC20_TRANSFER_GAS = 28384; uint256 public constant BASE_ERC721_TRANSFER_GAS = 37573; // The multiplier to calculate max consumable gas uint256 public constant MAX_GAS_MULTIPLIER = 3; error FailedInnerCall(); error MesuredGas(uint256 sum, uint256 avarage); /** * @dev Transfer native token to multiple receipients * Revert if the transferring operation consume larger gas then standard * The native opcode `transfer` consume 2300 gas, but the actual gas consumption * become larger than it when the receipient is a contract. * Ref: https://consensys.io/diligence/blog/2019/09/stop-using-soliditys-transfer-now/ * * @param tos list of receipient addresses * @param amounts list of amounts * @param baseGas_ the basic gas consumption of transferring operation */ function multisend( address[] calldata tos, uint256[] calldata amounts, uint256 baseGas_ ) public payable { require(tos.length == amounts.length, "tos and amounts must have the same length"); uint256 baseGas = baseGas_ != 0 ? baseGas_ : TRANSFER_GAS; string memory failedList = ""; uint256 sum = 0; for (uint256 i = 0; i < tos.length; i++) { sum += amounts[i]; if (!_transfer(tos[i], amounts[i], baseGas)) { failedList = string.concat(failedList, tos[i].toHexString(), ","); } } require(sum == msg.value, "sum of amounts must be equal to msg.value"); _assertFailedList(failedList); } /** * @dev Transfer erc20 to multiple receipients * Revert if the transferring operation consume `MAX_GAS_MULTIPLIER` times larger gas then standard * * @param token address of token * @param tos list of receipient addresses * @param amounts list of amounts * @param baseGas_ the basic gas consumption of transferring operation */ function multisendERC20( address token, address[] calldata tos, uint256[] calldata amounts, uint256 baseGas_ ) public { require(token != address(0), "token address cannot be 0"); require(tos.length == amounts.length, "tos and amounts must have the same length"); uint256 baseGas = baseGas_ != 0 ? baseGas_ : BASE_ERC20_TRANSFER_GAS; string memory failedList = ""; for (uint256 i = 0; i < tos.length; i++) { if ( !_transferGeneric( token, baseGas, "transferFrom(address,address,uint256)", abi.encode(msg.sender, tos[i], amounts[i]) ) ) { failedList = string.concat(failedList, tos[i].toHexString(), ","); } } _assertFailedList(failedList); } /** * @dev Transfer erc721 to multiple receipients * Revert if the transferring operation consume `MAX_GAS_MULTIPLIER` times larger gas then standard * * @param token address of token * @param tos list of receipient addresses * @param tokenIds list of tokenIds * @param data list of data * @param baseGas_ the basic gas consumption of transferring operation */ function multisendERC721( address token, address[] calldata tos, uint256[] calldata tokenIds, bytes[] calldata data, uint256 baseGas_ ) public { require(token != address(0), "token address cannot be 0"); require(tos.length == tokenIds.length, "tos and tokenIds must have the same length"); require(tos.length == data.length, "tos and data must have the same length"); uint256 baseGas = baseGas_ != 0 ? baseGas_ : BASE_ERC721_TRANSFER_GAS; string memory failedList = ""; for (uint256 i = 0; i < tos.length; i++) { if ( !_transferGeneric( token, baseGas, "safeTransferFrom(address,address,uint256,bytes)", abi.encode(msg.sender, tos[i], tokenIds[i], data[i]) ) ) { failedList = string.concat(failedList, tos[i].toHexString(), ","); } } _assertFailedList(failedList); } function mesureAverageGas( address token, address[] calldata tos, uint256[] calldata tokenIds, bytes[] calldata data ) public payable returns (uint256) { uint256 sum = 0; for (uint256 i = 0; i < tos.length; i++) { uint256 startGas = gasleft(); _transferGenericWithErrMesage( token, "safeTransferFrom(address,address,uint256,bytes)", abi.encode(msg.sender, tos[i], tokenIds[i], data[i]) ); uint256 endGas = gasleft(); sum += startGas - endGas; } revert MesuredGas(sum, sum / tos.length); } // function _validateLeftgas(uint256 i, uint256 total, uint256 requiredGas) internal view { // if (gasleft() < requiredGas) { // revert( // string.concat( // "will run out of gas at index ", // (i + 1).toString(), // " in ", // total.toString(), // ", left: ", // gasleft().toString(), // " required: ", // requiredGas.toString() // ) // ); // } // } function _assertFailedList(string memory failedList) internal pure { uint256 length = bytes(failedList).length; if (length > 0) { revert( string.concat( "failed to transfer to ", // NOTE: 43 length = address + "," (length / 43).toString(), " addresses: ", failedList ) ); } } function _transfer(address to, uint256 amount, uint256 baseGas) internal returns (bool) { // NOTE: call transferFrom with gas limit to avoid gas greefing // slither-disable-next-line arbitrary-send-eth (bool success, ) = to.call{gas: baseGas, value: amount}(""); return success; } function _transferGeneric( address target, uint256 baseGas, string memory functionSignature, bytes memory args ) internal returns (bool) { // NOTE: call with gas limit to avoid gas greefing // slither-disable-next-line low-level-calls (bool success, bytes memory data) = target.call{gas: baseGas * MAX_GAS_MULTIPLIER}( abi.encodePacked(bytes4(keccak256(bytes(functionSignature))), args) ); // If the function returns a boolean, decode it. Otherwise, just return the success flag. if (data.length == 32) { return success && abi.decode(data, (bool)); } return success; } function _transferGenericWithErrMesage( address target, string memory functionSignature, bytes memory args ) internal { // NOTE: call with gas limit to avoid gas greefing // slither-disable-next-line low-level-calls (bool success, bytes memory data) = target.call( abi.encodePacked(bytes4(keccak256(bytes(functionSignature))), args) ); if (success) return; if (data.length > 0) { assembly { let returndata_size := mload(data) revert(add(32, data), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"sum","type":"uint256"},{"internalType":"uint256","name":"avarage","type":"uint256"}],"name":"MesuredGas","type":"error"},{"inputs":[],"name":"BASE_ERC20_TRANSFER_GAS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_ERC721_TRANSFER_GAS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_GAS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_GAS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"tos","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"mesureAverageGas","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tos","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256","name":"baseGas_","type":"uint256"}],"name":"multisend","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"tos","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256","name":"baseGas_","type":"uint256"}],"name":"multisendERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"tos","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"uint256","name":"baseGas_","type":"uint256"}],"name":"multisendERC721","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061153b806100206000396000f3fe60806040526004361061007b5760003560e01c8063cc75ee351161004e578063cc75ee35146100f0578063ce82a93014610105578063d9bd4c681461011b578063f68634c21461013b57600080fd5b80633afa972f146100805780636b4e5dbf146100a55780639c0899eb146100ba578063b1e242e8146100d0575b600080fd5b61009361008e366004610f1b565b610151565b60405190815260200160405180910390f35b6100b86100b3366004610fc6565b610289565b005b3480156100c657600080fd5b50610093616ee081565b3480156100dc57600080fd5b506100b86100eb36600461103a565b610486565b3480156100fc57600080fd5b50610093600381565b34801561011157600080fd5b506100936108fc81565b34801561012757600080fd5b506100b86101363660046110c3565b610662565b34801561014757600080fd5b506100936192c581565b600080805b8781101561023d5760005a905061020d8b6040518060600160405280602f81526020016114d7602f9139338d8d8781811061019357610193611175565b90506020020160208101906101a8919061118b565b8c8c888181106101ba576101ba611175565b905060200201358b8b898181106101d3576101d3611175565b90506020028101906101e591906111a6565b6040516020016101f99594939291906111ed565b6040516020818303038152906040526108cf565b60005a905061021c8183611257565b610226908561126a565b9350505080806102359061127d565b915050610156565b50806102498882611296565b6040517f7de483e0000000000000000000000000000000000000000000000000000000008152600481019290925260248201526044015b60405180910390fd5b8382146102ea5760405162461bcd60e51b815260206004820152602960248201527f746f7320616e6420616d6f756e7473206d7573742068617665207468652073616044820152680daca40d8cadccee8d60bb1b6064820152608401610280565b6000816000036102fc576108fc6102fe565b815b6040805160208101909152600080825291925090805b878110156103fd5786868281811061032e5761032e611175565b9050602002013582610340919061126a565b915061038b89898381811061035757610357611175565b905060200201602081019061036c919061118b565b88888481811061037e5761037e611175565b90506020020135866109a6565b6103eb57826103c88a8a848181106103a5576103a5611175565b90506020020160208101906103ba919061118b565b6001600160a01b0316610a07565b6040516020016103d99291906112dc565b60405160208183030381529060405292505b806103f58161127d565b915050610314565b503481146104735760405162461bcd60e51b815260206004820152602960248201527f73756d206f6620616d6f756e7473206d75737420626520657175616c20746f2060448201527f6d73672e76616c756500000000000000000000000000000000000000000000006064820152608401610280565b61047c82610a23565b5050505050505050565b6001600160a01b0386166104dc5760405162461bcd60e51b815260206004820152601960248201527f746f6b656e20616464726573732063616e6e6f742062652030000000000000006044820152606401610280565b83821461053d5760405162461bcd60e51b815260206004820152602960248201527f746f7320616e6420616d6f756e7473206d7573742068617665207468652073616044820152680daca40d8cadccee8d60bb1b6064820152608401610280565b60008160000361054f57616ee0610551565b815b60408051602081019091526000808252919250905b868110156106585761060989846040518060600160405280602581526020016114b260259139338c8c8781811061059f5761059f611175565b90506020020160208101906105b4919061118b565b8b8b888181106105c6576105c6611175565b604080516001600160a01b03968716602080830191909152959096169086015290920201356060830152506080015b604051602081830303815290604052610a7a565b61064657816106238989848181106103a5576103a5611175565b6040516020016106349291906112dc565b60405160208183030381529060405291505b806106508161127d565b915050610566565b5061047c81610a23565b6001600160a01b0388166106b85760405162461bcd60e51b815260206004820152601960248201527f746f6b656e20616464726573732063616e6e6f742062652030000000000000006044820152606401610280565b85841461072d5760405162461bcd60e51b815260206004820152602a60248201527f746f7320616e6420746f6b656e496473206d757374206861766520746865207360448201527f616d65206c656e677468000000000000000000000000000000000000000000006064820152608401610280565b8582146107a25760405162461bcd60e51b815260206004820152602660248201527f746f7320616e642064617461206d7573742068617665207468652073616d652060448201527f6c656e67746800000000000000000000000000000000000000000000000000006064820152608401610280565b6000816000036107b4576192c56107b6565b815b60408051602081019091526000808252919250905b888110156108b95761086a8b846040518060600160405280602f81526020016114d7602f9139338e8e8781811061080457610804611175565b9050602002016020810190610819919061118b565b8d8d8881811061082b5761082b611175565b905060200201358c8c8981811061084457610844611175565b905060200281019061085691906111a6565b6040516020016105f59594939291906111ed565b6108a757816108848b8b848181106103a5576103a5611175565b6040516020016108959291906112dc565b60405160208183030381529060405291505b806108b18161127d565b9150506107cb565b506108c381610a23565b50505050505050505050565b600080846001600160a01b03168480519060200120846040516020016108f6929190611333565b60408051601f19818403018152908290526109109161137b565b6000604051808303816000865af19150503d806000811461094d576040519150601f19603f3d011682016040523d82523d6000602084013e610952565b606091505b50915091508115610964575050505050565b8051156109745780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080846001600160a01b03168385604051600060405180830381858888f193505050503d80600081146109f6576040519150601f19603f3d011682016040523d82523d6000602084013e6109fb565b606091505b50909695505050505050565b6060610a1d6001600160a01b0383166014610b49565b92915050565b80518015610a7657610a3e610a39602b83611296565b610d31565b82604051602001610a50929190611397565b60408051601f198184030181529082905262461bcd60e51b825261028091600401611418565b5050565b600080806001600160a01b038716610a9360038861144b565b868051906020012086604051602001610aad929190611333565b60408051601f1981840301815290829052610ac79161137b565b60006040518083038160008787f1925050503d8060008114610b05576040519150601f19603f3d011682016040523d82523d6000602084013e610b0a565b606091505b50915091508051602003610b3d57818015610b34575080806020019051810190610b349190611462565b92505050610b41565b5090505b949350505050565b60606000610b5883600261144b565b610b6390600261126a565b67ffffffffffffffff811115610b7b57610b7b611484565b6040519080825280601f01601f191660200182016040528015610ba5576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610bdc57610bdc611175565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610c2757610c27611175565b60200101906001600160f81b031916908160001a9053506000610c4b84600261144b565b610c5690600161126a565b90505b6001811115610cdb577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610c9757610c97611175565b1a60f81b828281518110610cad57610cad611175565b60200101906001600160f81b031916908160001a90535060049490941c93610cd48161149a565b9050610c59565b508315610d2a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610280565b9392505050565b60606000610d3e83610dd1565b600101905060008167ffffffffffffffff811115610d5e57610d5e611484565b6040519080825280601f01601f191660200182016040528015610d88576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084610d9257509392505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610e1a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310610e46576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610e6457662386f26fc10000830492506010015b6305f5e1008310610e7c576305f5e100830492506008015b6127108310610e9057612710830492506004015b60648310610ea2576064830492506002015b600a8310610a1d5760010192915050565b80356001600160a01b0381168114610eca57600080fd5b919050565b60008083601f840112610ee157600080fd5b50813567ffffffffffffffff811115610ef957600080fd5b6020830191508360208260051b8501011115610f1457600080fd5b9250929050565b60008060008060008060006080888a031215610f3657600080fd5b610f3f88610eb3565b9650602088013567ffffffffffffffff80821115610f5c57600080fd5b610f688b838c01610ecf565b909850965060408a0135915080821115610f8157600080fd5b610f8d8b838c01610ecf565b909650945060608a0135915080821115610fa657600080fd5b50610fb38a828b01610ecf565b989b979a50959850939692959293505050565b600080600080600060608688031215610fde57600080fd5b853567ffffffffffffffff80821115610ff657600080fd5b61100289838a01610ecf565b9097509550602088013591508082111561101b57600080fd5b5061102888828901610ecf565b96999598509660400135949350505050565b6000806000806000806080878903121561105357600080fd5b61105c87610eb3565b9550602087013567ffffffffffffffff8082111561107957600080fd5b6110858a838b01610ecf565b9097509550604089013591508082111561109e57600080fd5b506110ab89828a01610ecf565b979a9699509497949695606090950135949350505050565b60008060008060008060008060a0898b0312156110df57600080fd5b6110e889610eb3565b9750602089013567ffffffffffffffff8082111561110557600080fd5b6111118c838d01610ecf565b909950975060408b013591508082111561112a57600080fd5b6111368c838d01610ecf565b909750955060608b013591508082111561114f57600080fd5b5061115c8b828c01610ecf565b999c989b50969995989497949560800135949350505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561119d57600080fd5b610d2a82610eb3565b6000808335601e198436030181126111bd57600080fd5b83018035915067ffffffffffffffff8211156111d857600080fd5b602001915036819003821315610f1457600080fd5b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a1d57610a1d611241565b80820180821115610a1d57610a1d611241565b60006001820161128f5761128f611241565b5060010190565b6000826112b357634e487b7160e01b600052601260045260246000fd5b500490565b60005b838110156112d35781810151838201526020016112bb565b50506000910152565b600083516112ee8184602088016112b8565b8351908301906113028183602088016112b8565b7f2c000000000000000000000000000000000000000000000000000000000000009101908152600101949350505050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526000825161136d8160048501602087016112b8565b919091016004019392505050565b6000825161138d8184602087016112b8565b9190910192915050565b7f6661696c656420746f207472616e7366657220746f20000000000000000000008152600083516113cf8160168501602088016112b8565b7f206164647265737365733a200000000000000000000000000000000000000000601691840191820152835161140c8160228401602088016112b8565b01602201949350505050565b60208152600082518060208401526114378160408501602087016112b8565b601f01601f19169190910160400192915050565b8082028115828204841417610a1d57610a1d611241565b60006020828403121561147457600080fd5b81518015158114610d2a57600080fd5b634e487b7160e01b600052604160045260246000fd5b6000816114a9576114a9611241565b50600019019056fe7472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629736166655472616e7366657246726f6d28616464726573732c616464726573732c75696e743235362c627974657329a264697066735822122012157de436cbfb4a52dc99db8851472e0015d51b8feef26d0ff12ec5c97db8d564736f6c63430008130033
Deployed Bytecode
0x60806040526004361061007b5760003560e01c8063cc75ee351161004e578063cc75ee35146100f0578063ce82a93014610105578063d9bd4c681461011b578063f68634c21461013b57600080fd5b80633afa972f146100805780636b4e5dbf146100a55780639c0899eb146100ba578063b1e242e8146100d0575b600080fd5b61009361008e366004610f1b565b610151565b60405190815260200160405180910390f35b6100b86100b3366004610fc6565b610289565b005b3480156100c657600080fd5b50610093616ee081565b3480156100dc57600080fd5b506100b86100eb36600461103a565b610486565b3480156100fc57600080fd5b50610093600381565b34801561011157600080fd5b506100936108fc81565b34801561012757600080fd5b506100b86101363660046110c3565b610662565b34801561014757600080fd5b506100936192c581565b600080805b8781101561023d5760005a905061020d8b6040518060600160405280602f81526020016114d7602f9139338d8d8781811061019357610193611175565b90506020020160208101906101a8919061118b565b8c8c888181106101ba576101ba611175565b905060200201358b8b898181106101d3576101d3611175565b90506020028101906101e591906111a6565b6040516020016101f99594939291906111ed565b6040516020818303038152906040526108cf565b60005a905061021c8183611257565b610226908561126a565b9350505080806102359061127d565b915050610156565b50806102498882611296565b6040517f7de483e0000000000000000000000000000000000000000000000000000000008152600481019290925260248201526044015b60405180910390fd5b8382146102ea5760405162461bcd60e51b815260206004820152602960248201527f746f7320616e6420616d6f756e7473206d7573742068617665207468652073616044820152680daca40d8cadccee8d60bb1b6064820152608401610280565b6000816000036102fc576108fc6102fe565b815b6040805160208101909152600080825291925090805b878110156103fd5786868281811061032e5761032e611175565b9050602002013582610340919061126a565b915061038b89898381811061035757610357611175565b905060200201602081019061036c919061118b565b88888481811061037e5761037e611175565b90506020020135866109a6565b6103eb57826103c88a8a848181106103a5576103a5611175565b90506020020160208101906103ba919061118b565b6001600160a01b0316610a07565b6040516020016103d99291906112dc565b60405160208183030381529060405292505b806103f58161127d565b915050610314565b503481146104735760405162461bcd60e51b815260206004820152602960248201527f73756d206f6620616d6f756e7473206d75737420626520657175616c20746f2060448201527f6d73672e76616c756500000000000000000000000000000000000000000000006064820152608401610280565b61047c82610a23565b5050505050505050565b6001600160a01b0386166104dc5760405162461bcd60e51b815260206004820152601960248201527f746f6b656e20616464726573732063616e6e6f742062652030000000000000006044820152606401610280565b83821461053d5760405162461bcd60e51b815260206004820152602960248201527f746f7320616e6420616d6f756e7473206d7573742068617665207468652073616044820152680daca40d8cadccee8d60bb1b6064820152608401610280565b60008160000361054f57616ee0610551565b815b60408051602081019091526000808252919250905b868110156106585761060989846040518060600160405280602581526020016114b260259139338c8c8781811061059f5761059f611175565b90506020020160208101906105b4919061118b565b8b8b888181106105c6576105c6611175565b604080516001600160a01b03968716602080830191909152959096169086015290920201356060830152506080015b604051602081830303815290604052610a7a565b61064657816106238989848181106103a5576103a5611175565b6040516020016106349291906112dc565b60405160208183030381529060405291505b806106508161127d565b915050610566565b5061047c81610a23565b6001600160a01b0388166106b85760405162461bcd60e51b815260206004820152601960248201527f746f6b656e20616464726573732063616e6e6f742062652030000000000000006044820152606401610280565b85841461072d5760405162461bcd60e51b815260206004820152602a60248201527f746f7320616e6420746f6b656e496473206d757374206861766520746865207360448201527f616d65206c656e677468000000000000000000000000000000000000000000006064820152608401610280565b8582146107a25760405162461bcd60e51b815260206004820152602660248201527f746f7320616e642064617461206d7573742068617665207468652073616d652060448201527f6c656e67746800000000000000000000000000000000000000000000000000006064820152608401610280565b6000816000036107b4576192c56107b6565b815b60408051602081019091526000808252919250905b888110156108b95761086a8b846040518060600160405280602f81526020016114d7602f9139338e8e8781811061080457610804611175565b9050602002016020810190610819919061118b565b8d8d8881811061082b5761082b611175565b905060200201358c8c8981811061084457610844611175565b905060200281019061085691906111a6565b6040516020016105f59594939291906111ed565b6108a757816108848b8b848181106103a5576103a5611175565b6040516020016108959291906112dc565b60405160208183030381529060405291505b806108b18161127d565b9150506107cb565b506108c381610a23565b50505050505050505050565b600080846001600160a01b03168480519060200120846040516020016108f6929190611333565b60408051601f19818403018152908290526109109161137b565b6000604051808303816000865af19150503d806000811461094d576040519150601f19603f3d011682016040523d82523d6000602084013e610952565b606091505b50915091508115610964575050505050565b8051156109745780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080846001600160a01b03168385604051600060405180830381858888f193505050503d80600081146109f6576040519150601f19603f3d011682016040523d82523d6000602084013e6109fb565b606091505b50909695505050505050565b6060610a1d6001600160a01b0383166014610b49565b92915050565b80518015610a7657610a3e610a39602b83611296565b610d31565b82604051602001610a50929190611397565b60408051601f198184030181529082905262461bcd60e51b825261028091600401611418565b5050565b600080806001600160a01b038716610a9360038861144b565b868051906020012086604051602001610aad929190611333565b60408051601f1981840301815290829052610ac79161137b565b60006040518083038160008787f1925050503d8060008114610b05576040519150601f19603f3d011682016040523d82523d6000602084013e610b0a565b606091505b50915091508051602003610b3d57818015610b34575080806020019051810190610b349190611462565b92505050610b41565b5090505b949350505050565b60606000610b5883600261144b565b610b6390600261126a565b67ffffffffffffffff811115610b7b57610b7b611484565b6040519080825280601f01601f191660200182016040528015610ba5576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610bdc57610bdc611175565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610c2757610c27611175565b60200101906001600160f81b031916908160001a9053506000610c4b84600261144b565b610c5690600161126a565b90505b6001811115610cdb577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610c9757610c97611175565b1a60f81b828281518110610cad57610cad611175565b60200101906001600160f81b031916908160001a90535060049490941c93610cd48161149a565b9050610c59565b508315610d2a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610280565b9392505050565b60606000610d3e83610dd1565b600101905060008167ffffffffffffffff811115610d5e57610d5e611484565b6040519080825280601f01601f191660200182016040528015610d88576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084610d9257509392505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610e1a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310610e46576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610e6457662386f26fc10000830492506010015b6305f5e1008310610e7c576305f5e100830492506008015b6127108310610e9057612710830492506004015b60648310610ea2576064830492506002015b600a8310610a1d5760010192915050565b80356001600160a01b0381168114610eca57600080fd5b919050565b60008083601f840112610ee157600080fd5b50813567ffffffffffffffff811115610ef957600080fd5b6020830191508360208260051b8501011115610f1457600080fd5b9250929050565b60008060008060008060006080888a031215610f3657600080fd5b610f3f88610eb3565b9650602088013567ffffffffffffffff80821115610f5c57600080fd5b610f688b838c01610ecf565b909850965060408a0135915080821115610f8157600080fd5b610f8d8b838c01610ecf565b909650945060608a0135915080821115610fa657600080fd5b50610fb38a828b01610ecf565b989b979a50959850939692959293505050565b600080600080600060608688031215610fde57600080fd5b853567ffffffffffffffff80821115610ff657600080fd5b61100289838a01610ecf565b9097509550602088013591508082111561101b57600080fd5b5061102888828901610ecf565b96999598509660400135949350505050565b6000806000806000806080878903121561105357600080fd5b61105c87610eb3565b9550602087013567ffffffffffffffff8082111561107957600080fd5b6110858a838b01610ecf565b9097509550604089013591508082111561109e57600080fd5b506110ab89828a01610ecf565b979a9699509497949695606090950135949350505050565b60008060008060008060008060a0898b0312156110df57600080fd5b6110e889610eb3565b9750602089013567ffffffffffffffff8082111561110557600080fd5b6111118c838d01610ecf565b909950975060408b013591508082111561112a57600080fd5b6111368c838d01610ecf565b909750955060608b013591508082111561114f57600080fd5b5061115c8b828c01610ecf565b999c989b50969995989497949560800135949350505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561119d57600080fd5b610d2a82610eb3565b6000808335601e198436030181126111bd57600080fd5b83018035915067ffffffffffffffff8211156111d857600080fd5b602001915036819003821315610f1457600080fd5b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a1d57610a1d611241565b80820180821115610a1d57610a1d611241565b60006001820161128f5761128f611241565b5060010190565b6000826112b357634e487b7160e01b600052601260045260246000fd5b500490565b60005b838110156112d35781810151838201526020016112bb565b50506000910152565b600083516112ee8184602088016112b8565b8351908301906113028183602088016112b8565b7f2c000000000000000000000000000000000000000000000000000000000000009101908152600101949350505050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526000825161136d8160048501602087016112b8565b919091016004019392505050565b6000825161138d8184602087016112b8565b9190910192915050565b7f6661696c656420746f207472616e7366657220746f20000000000000000000008152600083516113cf8160168501602088016112b8565b7f206164647265737365733a200000000000000000000000000000000000000000601691840191820152835161140c8160228401602088016112b8565b01602201949350505050565b60208152600082518060208401526114378160408501602087016112b8565b601f01601f19169190910160400192915050565b8082028115828204841417610a1d57610a1d611241565b60006020828403121561147457600080fd5b81518015158114610d2a57600080fd5b634e487b7160e01b600052604160045260246000fd5b6000816114a9576114a9611241565b50600019019056fe7472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629736166655472616e7366657246726f6d28616464726573732c616464726573732c75696e743235362c627974657329a264697066735822122012157de436cbfb4a52dc99db8851472e0015d51b8feef26d0ff12ec5c97db8d564736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.