Address Contract Verified
Address
0x4a82Dccd69C7Cf1C427dbA62E145937bAfD91f19
Balance
0 ETH
Nonce
1
Code Size
3032 bytes
Creator
0xba5Ed099...a5Ed at tx 0xe8b9de6a...cf7eea
Indexed Transactions
0
Contract Bytecode
3032 bytes
0x6080604052600436106100435760003560e01c8063104d39321461004f578063715018a61461007f5780638da5cb5b14610096578063f2fde38b146100c15761004a565b3661004a57005b600080fd5b61006960048036038101906100649190610660565b6100ea565b6040516100769190610857565b60405180910390f35b34801561008b57600080fd5b506100946103bf565b005b3480156100a257600080fd5b506100ab6103d3565b6040516100b891906108ba565b60405180910390f35b3480156100cd57600080fd5b506100e860048036038101906100e39190610901565b6103fc565b005b60606000808484905090508067ffffffffffffffff81111561010f5761010e61092e565b5b60405190808252806020026020018201604052801561014857816020015b6101356105d5565b81526020019060019003908161012d5790505b5092503660005b828110156102bc57600085828151811061016c5761016b61095d565b5b602002602001015190508787838181106101895761018861095d565b5b905060200281019061019b919061099b565b925060008360400135905080860195508360000160208101906101be9190610901565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906101e591906109c3565b6040516101f3929190610a65565b60006040518083038185875af1925050503d8060008114610230576040519150601f19603f3d011682016040523d82523d6000602084013e610235565b606091505b5083600001846020018290528215151515815250505081516020850135176102af577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061014f565b508234146102ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f690610adb565b60405180910390fd5b60004711156103b65760003373ffffffffffffffffffffffffffffffffffffffff164760405161032e90610b21565b60006040518083038185875af1925050503d806000811461036b576040519150601f19603f3d011682016040523d82523d6000602084013e610370565b606091505b50509050806103b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ab90610b82565b60405180910390fd5b505b50505092915050565b6103c7610482565b6103d16000610509565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610404610482565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036104765760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161046d91906108ba565b60405180910390fd5b61047f81610509565b50565b61048a6105cd565b73ffffffffffffffffffffffffffffffffffffffff166104a86103d3565b73ffffffffffffffffffffffffffffffffffffffff1614610507576104cb6105cd565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016104fe91906108ba565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6040518060400160405280600015158152602001606081525090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126106205761061f6105fb565b5b8235905067ffffffffffffffff81111561063d5761063c610600565b5b60208301915083602082028301111561065957610658610605565b5b9250929050565b60008060208385031215610677576106766105f1565b5b600083013567ffffffffffffffff811115610695576106946105f6565b5b6106a18582860161060a565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b6106ee816106d9565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561072e578082015181840152602081019050610713565b60008484015250505050565b6000601f19601f8301169050919050565b6000610756826106f4565b61076081856106ff565b9350610770818560208601610710565b6107798161073a565b840191505092915050565b600060408301600083015161079c60008601826106e5565b50602083015184820360208601526107b4828261074b565b9150508091505092915050565b60006107cd8383610784565b905092915050565b6000602082019050919050565b60006107ed826106ad565b6107f781856106b8565b935083602082028501610809856106c9565b8060005b85811015610845578484038952815161082685826107c1565b9450610831836107d5565b925060208a0199505060018101905061080d565b50829750879550505050505092915050565b6000602082019050818103600083015261087181846107e2565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108a482610879565b9050919050565b6108b481610899565b82525050565b60006020820190506108cf60008301846108ab565b92915050565b6108de81610899565b81146108e957600080fd5b50565b6000813590506108fb816108d5565b92915050565b600060208284031215610917576109166105f1565b5b6000610925848285016108ec565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b6000823560016080038336030381126109b7576109b661098c565b5b80830191505092915050565b600080833560016020038436030381126109e0576109df61098c565b5b80840192508235915067ffffffffffffffff821115610a0257610a01610991565b5b602083019250600182023603831315610a1e57610a1d610996565b5b509250929050565b600081905092915050565b82818337600083830152505050565b6000610a4c8385610a26565b9350610a59838584610a31565b82840190509392505050565b6000610a72828486610a40565b91508190509392505050565b600082825260208201905092915050565b7f4d696e74696e674d756c746963616c6c3a2076616c7565206d69736d61746368600082015250565b6000610ac5602083610a7e565b9150610ad082610a8f565b602082019050919050565b60006020820190508181036000830152610af481610ab8565b9050919050565b50565b6000610b0b600083610a26565b9150610b1682610afb565b600082019050919050565b6000610b2c82610afe565b9150819050919050565b7f4d696e74696e674d756c746963616c6c3a20726566756e64206661696c656400600082015250565b6000610b6c601f83610a7e565b9150610b7782610b36565b602082019050919050565b60006020820190508181036000830152610b9b81610b5f565b905091905056fea26469706673582212208d1e4a0d771f0ff92d3a6de50b3d80dbe11ca86dda7f25eecc02b37a6a0c6b4c64736f6c63430008150033
Verified Source Code Full Match
Compiler: v0.8.21+commit.d9974bed
EVM: paris
Optimization: No
MintingMulticall.sol 93 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
pragma experimental ABIEncoderV2;
import '@openzeppelin/contracts/access/Ownable.sol';
error WithdrawToOwnerUnsuccessful();
/// @title MintingMulticall
/// @notice Aggregate results from multiple function calls derived from MultiCall3
contract MintingMulticall is Ownable {
// events mostly for typechain abi generation
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
struct Call3Value {
address target;
bool allowFailure;
uint256 value;
bytes callData;
}
struct Result {
bool success;
bytes returnData;
}
constructor() Ownable(msg.sender) {}
function safeAggregate3Value(
Call3Value[] calldata calls
) public payable returns (Result[] memory returnData) {
uint256 valAccumulator;
uint256 length = calls.length;
returnData = new Result[](length);
Call3Value calldata calli;
for (uint256 i = 0; i < length; ) {
Result memory result = returnData[i];
calli = calls[i];
uint256 val = calli.value;
// Humanity will be a Type V Kardashev Civilization before this overflows - andreas
// ~ 10^25 Wei in existence << ~ 10^76 size uint fits in a uint256
unchecked {
valAccumulator += val;
}
(result.success, result.returnData) = calli.target.call{value: val}(
calli.callData
);
assembly {
// Revert if the call fails and failure is not allowed
// `allowFailure := calldataload(add(calli, 0x20))` and `success := mload(result)`
if iszero(or(calldataload(add(calli, 0x20)), mload(result))) {
// set "Error(string)" signature: bytes32(bytes4(keccak256("Error(string)")))
mstore(
0x00,
0x08c379a000000000000000000000000000000000000000000000000000000000
)
// set data offset
mstore(
0x04,
0x0000000000000000000000000000000000000000000000000000000000000020
)
// set length of revert string
mstore(
0x24,
0x0000000000000000000000000000000000000000000000000000000000000017
)
// set revert string: bytes32(abi.encodePacked("MintingMulticall: call failed"))
mstore(
0x44,
0x4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000
)
revert(0x00, 0x84)
}
}
unchecked {
++i;
}
}
// Finally, make sure the msg.value = SUM(call[0...i].value)
require(msg.value == valAccumulator, 'MintingMulticall: value mismatch');
if (address(this).balance > 0) {
(bool success, ) = msg.sender.call{value: address(this).balance}('');
require(success, 'MintingMulticall: refund failed');
}
}
receive() external payable {}
}
Context.sol 28 lines
// 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;
}
}
Ownable.sol 100 lines
// 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);
}
}
Read Contract
owner 0x8da5cb5b → address
Write Contract 3 functions
These functions modify contract state and require a wallet transaction to execute.
renounceOwnership 0x715018a6
No parameters
safeAggregate3Value 0xe0a2908c
tuple[] calls
returns: tuple[]
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address