Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 18989017 | 171 days ago | IN | Create: MintingMulticall | 0 ETH | 0.01354663 |
Loading...
Loading
Contract Name:
MintingMulticall
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.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; } function withdrawToOwner(uint balance) external onlyOwner { (bool success, ) = owner().call{value: balance}(''); if (!success) { revert WithdrawToOwnerUnsuccessful(); } } function safeAggregate3Value( Call3Value[] calldata calls ) public payable returns (Result[] memory returnData) { uint256 balanceBefore = address(this).balance; 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'); // refunds any value transferred if (address(this).balance > balanceBefore) { msg.sender.call{value: address(this).balance - balanceBefore }('0x'); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"WithdrawToOwnerUnsuccessful","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"allowFailure","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct MintingMulticall.Call3Value[]","name":"calls","type":"tuple[]"}],"name":"safeAggregate3Value","outputs":[{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct MintingMulticall.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"withdrawToOwner","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061002d61002261003260201b60201c565b61003a60201b60201c565b6100fe565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610e3a8061010d6000396000f3fe60806040526004361061004a5760003560e01c8063104d39321461004f5780636a5bbc1d1461007f578063715018a6146100a85780638da5cb5b146100bf578063f2fde38b146100ea575b600080fd5b61006960048036038101906100649190610700565b610113565b6040516100769190610900565b60405180910390f35b34801561008b57600080fd5b506100a660048036038101906100a19190610958565b6103b4565b005b3480156100b457600080fd5b506100bd61046a565b005b3480156100cb57600080fd5b506100d461047e565b6040516100e191906109c6565b60405180910390f35b3480156100f657600080fd5b50610111600480360381019061010c9190610a0d565b6104a7565b005b606060004790506000808585905090508067ffffffffffffffff81111561013d5761013c610a3a565b5b60405190808252806020026020018201604052801561017657816020015b610163610675565b81526020019060019003908161015b5790505b5093503660005b828110156102ea57600086828151811061019a57610199610a69565b5b602002602001015190508888838181106101b7576101b6610a69565b5b90506020028101906101c99190610aa7565b925060008360400135905080860195508360000160208101906101ec9190610a0d565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906102139190610acf565b604051610221929190610b71565b60006040518083038185875af1925050503d806000811461025e576040519150601f19603f3d011682016040523d82523d6000602084013e610263565b606091505b5083600001846020018290528215151515815250505081516020850135176102dd577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061017d565b5082341461032d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032490610be7565b60405180910390fd5b834711156103aa573373ffffffffffffffffffffffffffffffffffffffff1684476103589190610c36565b60405161036490610cb6565b60006040518083038185875af1925050503d80600081146103a1576040519150601f19603f3d011682016040523d82523d6000602084013e6103a6565b606091505b5050505b5050505092915050565b6103bc61052b565b60006103c661047e565b73ffffffffffffffffffffffffffffffffffffffff16826040516103e990610cf1565b60006040518083038185875af1925050503d8060008114610426576040519150601f19603f3d011682016040523d82523d6000602084013e61042b565b606091505b5050905080610466576040517f328be69200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b61047261052b565b61047c60006105a9565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6104af61052b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561051f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051690610d78565b60405180910390fd5b610528816105a9565b50565b61053361066d565b73ffffffffffffffffffffffffffffffffffffffff1661055161047e565b73ffffffffffffffffffffffffffffffffffffffff16146105a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059e90610de4565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6040518060400160405280600015158152602001606081525090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126106c0576106bf61069b565b5b8235905067ffffffffffffffff8111156106dd576106dc6106a0565b5b6020830191508360208202830111156106f9576106f86106a5565b5b9250929050565b6000806020838503121561071757610716610691565b5b600083013567ffffffffffffffff81111561073557610734610696565b5b610741858286016106aa565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b61078e81610779565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107ce5780820151818401526020810190506107b3565b838111156107dd576000848401525b50505050565b6000601f19601f8301169050919050565b60006107ff82610794565b610809818561079f565b93506108198185602086016107b0565b610822816107e3565b840191505092915050565b60006040830160008301516108456000860182610785565b506020830151848203602086015261085d82826107f4565b9150508091505092915050565b6000610876838361082d565b905092915050565b6000602082019050919050565b60006108968261074d565b6108a08185610758565b9350836020820285016108b285610769565b8060005b858110156108ee57848403895281516108cf858261086a565b94506108da8361087e565b925060208a019950506001810190506108b6565b50829750879550505050505092915050565b6000602082019050818103600083015261091a818461088b565b905092915050565b6000819050919050565b61093581610922565b811461094057600080fd5b50565b6000813590506109528161092c565b92915050565b60006020828403121561096e5761096d610691565b5b600061097c84828501610943565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109b082610985565b9050919050565b6109c0816109a5565b82525050565b60006020820190506109db60008301846109b7565b92915050565b6109ea816109a5565b81146109f557600080fd5b50565b600081359050610a07816109e1565b92915050565b600060208284031215610a2357610a22610691565b5b6000610a31848285016109f8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b600082356001608003833603038112610ac357610ac2610a98565b5b80830191505092915050565b60008083356001602003843603038112610aec57610aeb610a98565b5b80840192508235915067ffffffffffffffff821115610b0e57610b0d610a9d565b5b602083019250600182023603831315610b2a57610b29610aa2565b5b509250929050565b600081905092915050565b82818337600083830152505050565b6000610b588385610b32565b9350610b65838584610b3d565b82840190509392505050565b6000610b7e828486610b4c565b91508190509392505050565b600082825260208201905092915050565b7f4d696e74696e674d756c746963616c6c3a2076616c7565206d69736d61746368600082015250565b6000610bd1602083610b8a565b9150610bdc82610b9b565b602082019050919050565b60006020820190508181036000830152610c0081610bc4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610c4182610922565b9150610c4c83610922565b925082821015610c5f57610c5e610c07565b5b828203905092915050565b7f3078000000000000000000000000000000000000000000000000000000000000600082015250565b6000610ca0600283610b32565b9150610cab82610c6a565b600282019050919050565b6000610cc182610c93565b9150819050919050565b50565b6000610cdb600083610b32565b9150610ce682610ccb565b600082019050919050565b6000610cfc82610cce565b9150819050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000610d62602683610b8a565b9150610d6d82610d06565b604082019050919050565b60006020820190508181036000830152610d9181610d55565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000610dce602083610b8a565b9150610dd982610d98565b602082019050919050565b60006020820190508181036000830152610dfd81610dc1565b905091905056fea2646970667358221220d4f9acf2f11d665d5a78774099dcf66962c1b08dcfe784e20024e11475c7c60e64736f6c63430008090033
Deployed Bytecode
0x60806040526004361061004a5760003560e01c8063104d39321461004f5780636a5bbc1d1461007f578063715018a6146100a85780638da5cb5b146100bf578063f2fde38b146100ea575b600080fd5b61006960048036038101906100649190610700565b610113565b6040516100769190610900565b60405180910390f35b34801561008b57600080fd5b506100a660048036038101906100a19190610958565b6103b4565b005b3480156100b457600080fd5b506100bd61046a565b005b3480156100cb57600080fd5b506100d461047e565b6040516100e191906109c6565b60405180910390f35b3480156100f657600080fd5b50610111600480360381019061010c9190610a0d565b6104a7565b005b606060004790506000808585905090508067ffffffffffffffff81111561013d5761013c610a3a565b5b60405190808252806020026020018201604052801561017657816020015b610163610675565b81526020019060019003908161015b5790505b5093503660005b828110156102ea57600086828151811061019a57610199610a69565b5b602002602001015190508888838181106101b7576101b6610a69565b5b90506020028101906101c99190610aa7565b925060008360400135905080860195508360000160208101906101ec9190610a0d565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906102139190610acf565b604051610221929190610b71565b60006040518083038185875af1925050503d806000811461025e576040519150601f19603f3d011682016040523d82523d6000602084013e610263565b606091505b5083600001846020018290528215151515815250505081516020850135176102dd577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061017d565b5082341461032d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032490610be7565b60405180910390fd5b834711156103aa573373ffffffffffffffffffffffffffffffffffffffff1684476103589190610c36565b60405161036490610cb6565b60006040518083038185875af1925050503d80600081146103a1576040519150601f19603f3d011682016040523d82523d6000602084013e6103a6565b606091505b5050505b5050505092915050565b6103bc61052b565b60006103c661047e565b73ffffffffffffffffffffffffffffffffffffffff16826040516103e990610cf1565b60006040518083038185875af1925050503d8060008114610426576040519150601f19603f3d011682016040523d82523d6000602084013e61042b565b606091505b5050905080610466576040517f328be69200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b61047261052b565b61047c60006105a9565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6104af61052b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561051f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051690610d78565b60405180910390fd5b610528816105a9565b50565b61053361066d565b73ffffffffffffffffffffffffffffffffffffffff1661055161047e565b73ffffffffffffffffffffffffffffffffffffffff16146105a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059e90610de4565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6040518060400160405280600015158152602001606081525090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126106c0576106bf61069b565b5b8235905067ffffffffffffffff8111156106dd576106dc6106a0565b5b6020830191508360208202830111156106f9576106f86106a5565b5b9250929050565b6000806020838503121561071757610716610691565b5b600083013567ffffffffffffffff81111561073557610734610696565b5b610741858286016106aa565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b61078e81610779565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107ce5780820151818401526020810190506107b3565b838111156107dd576000848401525b50505050565b6000601f19601f8301169050919050565b60006107ff82610794565b610809818561079f565b93506108198185602086016107b0565b610822816107e3565b840191505092915050565b60006040830160008301516108456000860182610785565b506020830151848203602086015261085d82826107f4565b9150508091505092915050565b6000610876838361082d565b905092915050565b6000602082019050919050565b60006108968261074d565b6108a08185610758565b9350836020820285016108b285610769565b8060005b858110156108ee57848403895281516108cf858261086a565b94506108da8361087e565b925060208a019950506001810190506108b6565b50829750879550505050505092915050565b6000602082019050818103600083015261091a818461088b565b905092915050565b6000819050919050565b61093581610922565b811461094057600080fd5b50565b6000813590506109528161092c565b92915050565b60006020828403121561096e5761096d610691565b5b600061097c84828501610943565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109b082610985565b9050919050565b6109c0816109a5565b82525050565b60006020820190506109db60008301846109b7565b92915050565b6109ea816109a5565b81146109f557600080fd5b50565b600081359050610a07816109e1565b92915050565b600060208284031215610a2357610a22610691565b5b6000610a31848285016109f8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b600082356001608003833603038112610ac357610ac2610a98565b5b80830191505092915050565b60008083356001602003843603038112610aec57610aeb610a98565b5b80840192508235915067ffffffffffffffff821115610b0e57610b0d610a9d565b5b602083019250600182023603831315610b2a57610b29610aa2565b5b509250929050565b600081905092915050565b82818337600083830152505050565b6000610b588385610b32565b9350610b65838584610b3d565b82840190509392505050565b6000610b7e828486610b4c565b91508190509392505050565b600082825260208201905092915050565b7f4d696e74696e674d756c746963616c6c3a2076616c7565206d69736d61746368600082015250565b6000610bd1602083610b8a565b9150610bdc82610b9b565b602082019050919050565b60006020820190508181036000830152610c0081610bc4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610c4182610922565b9150610c4c83610922565b925082821015610c5f57610c5e610c07565b5b828203905092915050565b7f3078000000000000000000000000000000000000000000000000000000000000600082015250565b6000610ca0600283610b32565b9150610cab82610c6a565b600282019050919050565b6000610cc182610c93565b9150819050919050565b50565b6000610cdb600083610b32565b9150610ce682610ccb565b600082019050919050565b6000610cfc82610cce565b9150819050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000610d62602683610b8a565b9150610d6d82610d06565b604082019050919050565b60006020820190508181036000830152610d9181610d55565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000610dce602083610b8a565b9150610dd982610d98565b602082019050919050565b60006020820190508181036000830152610dfd81610dc1565b905091905056fea2646970667358221220d4f9acf2f11d665d5a78774099dcf66962c1b08dcfe784e20024e11475c7c60e64736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.