编译器
0.8.19+commit.7dd6d404
文件 1 的 30:AccessControl.sol
文件 2 的 30:AccessControlEnumerable.sol
文件 3 的 30:AccessControlPausable.sol
文件 5 的 30:BaseSellable.sol
文件 6 的 30:BaseTokenURI.sol
文件 9 的 30:DefaultOperatorFilterer.sol
文件 14 的 30:ERC721ACommon.sol
文件 15 的 30:EnumerableSet.sol
文件 16 的 30:IAccessControl.sol
文件 17 的 30:IAccessControlEnumerable.sol
文件 21 的 30:IOperatorFilterRegistry.sol
文件 23 的 30:LaPotiereJalouse.sol
pragma solidity ^0.8.19;
import {Address} from "openzeppelin-contracts/utils/Address.sol";
import {BaseSellable, ERC721ACommon, SellableERC721ACommon} from "proof/sellers/sellable/SellableERC721ACommon.sol";
import {AccessControlEnumerable, BaseTokenURI} from "ethier/erc721/BaseTokenURI.sol";
import {OperatorFilterOS} from "ethier/erc721/OperatorFilterOS.sol";
import {ERC721A} from "ERC721A/ERC721A.sol";
contract LaPotiereJalouse is SellableERC721ACommon, BaseTokenURI, OperatorFilterOS {
using Address for address payable;
error InsufficientSupply(uint256 requested, uint256 remaining);
uint256 public constant MAX_SUPPLY = 75;
bytes32 public constant WITHDRAWAL_ROLE = keccak256("WITHDRAWAL_ROLE");
struct CtorArgs {
address admin;
address steerer;
string name;
string symbol;
address payable royaltyReceiver;
uint96 royaltyBasisPoints;
string baseTokenURI;
}
constructor(CtorArgs memory args)
ERC721ACommon(args.admin, args.steerer, args.name, args.symbol, args.royaltyReceiver, args.royaltyBasisPoints)
BaseTokenURI(args.baseTokenURI)
{
_setRoleAdmin(WITHDRAWAL_ROLE, DEFAULT_ADMIN_ROLE);
}
function _beforeTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity)
internal
virtual
override
{
if (from == address(0)) {
uint256 remain = MAX_SUPPLY - totalSupply();
if (remain < quantity) {
revert InsufficientSupply(quantity, remain);
}
}
super._beforeTokenTransfers(from, to, startTokenId, quantity);
}
function withdraw(address payable to) external onlyRole(WITHDRAWAL_ROLE) {
to.sendValue(address(this).balance);
}
function close() external onlyRole(DEFAULT_STEERING_ROLE) {
_revokeAllSellers();
}
function _baseURI() internal view override(ERC721A, BaseTokenURI) returns (string memory) {
return BaseTokenURI._baseURI();
}
function approve(address operator, uint256 tokenId) public payable virtual override(ERC721A, OperatorFilterOS) {
OperatorFilterOS.approve(operator, tokenId);
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721A, OperatorFilterOS) {
OperatorFilterOS.setApprovalForAll(operator, approved);
}
function transferFrom(address from, address to, uint256 tokenId)
public
payable
virtual
override(ERC721A, OperatorFilterOS)
{
OperatorFilterOS.transferFrom(from, to, tokenId);
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
virtual
override(ERC721A, OperatorFilterOS)
{
OperatorFilterOS.safeTransferFrom(from, to, tokenId);
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override(ERC721A, OperatorFilterOS)
{
OperatorFilterOS.safeTransferFrom(from, to, tokenId, data);
}
function supportsInterface(bytes4 interfaceId)
public
view
override(AccessControlEnumerable, ERC721ACommon, SellableERC721ACommon)
returns (bool)
{
return SellableERC721ACommon.supportsInterface(interfaceId)
|| AccessControlEnumerable.supportsInterface(interfaceId);
}
}
文件 25 的 30:OperatorFilterOS.sol
文件 26 的 30:OperatorFilterer.sol
文件 28 的 30:ReentrancyGuard.sol
文件 29 的 30:SellableERC721ACommon.sol
{
"compilationTarget": {
"src/LaPotiereJalouse.sol": "LaPotiereJalouse"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"appendCBOR": false,
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 9999
},
"remappings": [
":@divergencetech/ethier/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/ethier_0-55-0/",
":@openzeppelin/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/openzeppelin-contracts_4-8-1/",
":ERC721A/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/ERC721A_4-2-3/contracts/",
":ERC721A_root/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/ERC721A_4-2-3/",
":delegation-registry/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/delegation-registry_2d1a158b/src/",
":delegation-registry_root/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/delegation-registry_2d1a158b/",
":ds-test/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/ds-test_013e6c64/src/",
":erc721a/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/ERC721A_4-2-3/",
":ethier/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/ethier_0-55-0/contracts/",
":ethier_root/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/ethier_0-55-0/",
":forge-std/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/forge-std_1-5-6/src/",
":forge-std_root/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/forge-std_1-5-6/",
":openzeppelin-contracts/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/openzeppelin-contracts_4-8-1/contracts/",
":openzeppelin-contracts/contracts/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/openzeppelin-contracts_4-8-1/contracts/",
":openzeppelin-contracts_root/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/openzeppelin-contracts_4-8-1/",
":operator-filter-registry/src/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/operator-filter-registry_1-4-1/src/",
":operator-filter-registry_root/=/home/arran/.cache/bazel/_bazel_arran/1dfc65062d6989adcea32ee6b024093a/external/operator-filter-registry_1-4-1/",
":proof/constants/=/home/arran/proofxyz/proof/contracts/constants/src/",
":proof/sellers/=/home/arran/proofxyz/proof/contracts/sellers/src/"
]
}
[{"inputs":[{"components":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"steerer","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address payable","name":"royaltyReceiver","type":"address"},{"internalType":"uint96","name":"royaltyBasisPoints","type":"uint96"},{"internalType":"string","name":"baseTokenURI","type":"string"}],"internalType":"struct LaPotiereJalouse.CtorArgs","name":"args","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"remaining","type":"uint256"}],"name":"InsufficientSupply","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"AUTHORISED_SELLER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_STEERING_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWAL_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"cdata","type":"bytes"}],"name":"callOperatorFilterRegistry","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"close","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emitMetadataUpdateForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"num","type":"uint64"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"handleSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockSellers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseTokenURI_","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"basisPoints","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]