Overview
APE Balance
0 APE
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Minimal Proxy Contract for 0xb7500ec60444cce01014a5d4ca500df8142e6433
Contract Name:
MinterAgent
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.18;import {IMinterAgent} from "../interfaces/IMinterAgent.sol";import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";/// @title MinterAgent/// @notice Mints tokens on behalf of an account. Meant to be cloned from the UniversalMinter span the life of a transaction, and be selfdestructedcontract MinterAgent is IMinterAgent, IERC1155Receiver, IERC721Receiver {address private owner;address private receiver;bytes4 constant ON_ERC1155_RECEIVED_HASH = IERC1155Receiver.onERC1155Received.selector;bytes4 constant ON_BATCH_ERC1155_RECEIVED_HASH = IERC1155Receiver.onERC1155BatchReceived.selector;bytes4 constant ON_ERC721_RECEIVED_HASH = IERC721Receiver.onERC721Received.selector;bytes constant emptyCalldata = "";/// @notice Initialize the agent with the receiver/// @param _owner - the owner of this contract, and the only one that can invoke forwardCall. Typically the UniversalMinter/// @param _receiver - will be forwarded all tokens mintedfunction initialize(address _owner, address _receiver) external {if (owner != address(0)) {revert ALREADY_INITIALIZED();
123456789101112131415161718// SPDX-License-Identifier: MITpragma solidity ^0.8.18;interface IMinterAgent {error ALREADY_INITIALIZED();error ONLY_OWNER();error ARRAY_LENGTH_MISMATCH();function initialize(address _owner, address _receiver) external;function forwardCall(address _target, bytes calldata _cd, uint256 _value) external payable returns (bool success, bytes memory data);function forwardCallBatch(address[] calldata _targets,bytes[] calldata _calldatas,uint256[] calldata _values) external payable returns (bool success, bytes memory data);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)pragma solidity ^0.8.0;import "../../utils/introspection/IERC165.sol";/*** @dev _Available since v3.1._*/interface IERC1155Receiver is IERC165 {/*** @dev Handles the receipt of a single ERC1155 token type. This function is* called at the end of a `safeTransferFrom` after the balance has been updated.** NOTE: To accept the transfer, this must return* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`* (i.e. 0xf23a6e61, or its own function selector).** @param operator The address which initiated the transfer (i.e. msg.sender)* @param from The address which previously owned the token* @param id The ID of the token being transferred* @param value The amount of tokens being transferred* @param data Additional data with no specified format* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)pragma solidity ^0.8.0;/*** @title ERC721 token receiver interface* @dev Interface for any contract that wants to support safeTransfers* from ERC721 asset contracts.*/interface IERC721Receiver {/*** @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}* by `operator` from `from`, this function is called.** It must return its Solidity selector to confirm the token transfer.* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.** The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.*/function onERC721Received(address operator,address from,uint256 tokenId,bytes calldata data) external returns (bytes4);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)pragma solidity ^0.8.0;import "../../utils/introspection/IERC165.sol";/*** @dev Required interface of an ERC721 compliant contract.*/interface IERC721 is IERC165 {/*** @dev Emitted when `tokenId` token is transferred from `from` to `to`.*/event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);/*** @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.*/event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);/*** @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.*/event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)pragma solidity ^0.8.0;import "../../utils/introspection/IERC165.sol";/*** @dev Required interface of an ERC1155 compliant contract, as defined in the* https://eips.ethereum.org/EIPS/eip-1155[EIP].** _Available since v3.1._*/interface IERC1155 is IERC165 {/*** @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.*/event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);/*** @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all* transfers.*/event TransferBatch(address indexed operator,address indexed from,
12345678910111213141516171819202122232425// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC165 standard, as defined in the* https://eips.ethereum.org/EIPS/eip-165[EIP].** 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[EIP 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);}
1234567891011121314151617181920212223242526{"remappings": ["@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","erc721a-upgradeable/=lib/ERC721A-Upgradeable/contracts/","forge-std/=lib/forge-std/src/","ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin/=lib/openzeppelin-contracts/contracts/"],"optimizer": {"enabled": true,"runs": 200},"metadata": {"useLiteralContent": false,"bytecodeHash": "ipfs","appendCBOR": true},"outputSelection": {"*": {"*": ["evm.bytecode",
[{"inputs":[],"name":"ALREADY_INITIALIZED","type":"error"},{"inputs":[],"name":"ARRAY_LENGTH_MISMATCH","type":"error"},{"inputs":[],"name":"ONLY_OWNER","type":"error"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"bytes","name":"_cd","type":"bytes"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"forwardCall","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_targets","type":"address[]"},{"internalType":"bytes[]","name":"_calldatas","type":"bytes[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"forwardCallBatch","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"stateMutability":"payable","type":"receive"}]
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.