ERC1155SeaDropConfigurer
0x864baa13e01d8f9e26549dc91b458cd15e34eb7c
Verification
Verified
v0.8.19+commit.7dd6d404
Type
Contract
24,200 bytes
ABI entries
68
3 read · 10 write
License
none
Contract information
- Address
- 0x864baa13e01d8f9e26549dc91b458cd15e34eb7c
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.19+commit.7dd6d404
- Optimization
- Enabled
- Creator
- 0x00b19A5200…002f218400
- Creation tx
- 0xc83f179d08…d6b1593f63
Token
Not a token
This contract does not expose ERC-20 metadata.
Read contract (3)
DELEGATION_REGISTRY() → address
getSeaportMetadata() → string, tuple[]
previewOrder(address, address, tuple[], tuple[], bytes) → tuple[], tuple[]
Events (10)
AllowListUpdatedAllowedFeeRecipientUpdatedAllowedSeaportUpdatedCreatorPayoutsUpdatedDropURIUpdatedPayerUpdatedPublicDropUpdatedSeaDropMintSeaDropTokenDeployedSignerUpdated
ABI
[
{
"inputs": [],
"name": "AllowedSeaportCannotBeZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "CreatorPayoutAddressCannotBeZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "CreatorPayoutBasisPointsCannotBeZero",
"type": "error"
},
{
"inputs": [],
"name": "CreatorPayoutsNotSet",
"type": "error"
},
{
"inputs": [],
"name": "DuplicateFeeRecipient",
"type": "error"
},
{
"inputs": [],
"name": "DuplicatePayer",
"type": "error"
},
{
"inputs": [],
"name": "DuplicateSigner",
"type": "error"
},
{
"inputs": [],
"name": "FeeRecipientCannotBeZeroAddress",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "got",
"type": "address"
}
],
"name": "FeeRecipientNotAllowed",
"type": "error"
},
{
"inputs": [],
"name": "FeeRecipientNotPresent",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "caller",
"type": "address"
}
],
"name": "InvalidCallerOnlyAllowedSeaport",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "totalReceivedBasisPoints",
"type": "uint256"
}
],
"name": "InvalidCreatorPayoutBasisPoints",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "totalReceivedBasisPoints",
"type": "uint256"
}
],
"name": "InvalidCreatorPayoutTotalBasisPoints",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "InvalidExtraDataEncoding",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "feeBps",
"type": "uint256"
}
],
"name": "InvalidFeeBps",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "fromTokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "toTokenId",
"type": "uint256"
}
],
"name": "InvalidFromAndToTokenId",
"type": "error"
},
{
"inputs": [],
"name": "InvalidProof",
"type": "error"
},
{
"inputs": [],
"name": "InvalidSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTime",
"type": "uint256"
}
],
"name": "InvalidStartAndEndTime",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "substandard",
"type": "uint8"
}
],
"name": "InvalidSubstandard",
"type": "error"
},
{
"inputs": [],
"name": "MaxSupplyMismatch",
"type": "error"
},
{
"inputs": [],
"name": "MintAmountsMismatch",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "allowed",
"type": "uint256"
}
],
"name": "MintQuantityExceedsMaxMintedPerWallet",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "allowed",
"type": "uint256"
}
],
"name": "MintQuantityExceedsMaxMintedPerWalletForTokenId",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxSupply",
"type": "uint256"
}
],
"name": "MintQuantityExceedsMaxSupply",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxTokenSupplyForStage",
"type": "uint256"
}
],
"name": "MintQuantityExceedsMaxTokenSupplyForStage",
"type": "error"
},
{
"inputs": [],
"name": "MustSpecifyERC1155ConsiderationItemForSeaDropMint",
"type": "error"
},
{
"inputs": [],
"name": "NoBalanceToWithdraw",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "currentTimestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startTimestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTimestamp",
"type": "uint256"
}
],
"name": "NotActive",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "OfferContainsDuplicateTokenId",
"type": "error"
},
{
"inputs": [],
"name": "OnlyDelegateCalled",
"type": "error"
},
{
"inputs": [],
"name": "PayerCannotBeZeroAddress",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "got",
"type": "address"
}
],
"name": "PayerNotAllowed",
"type": "error"
},
{
"inputs": [],
"name": "PayerNotPresent",
"type": "error"
},
{
"inputs": [],
"name": "PublicDropStageNotPresent",
"type": "error"
},
{
"inputs": [],
"name": "PublicDropsMismatch",
"type": "error"
},
{
"inputs": [],
"name": "SignatureAlreadyUsed",
"type": "error"
},
{
"inputs": [],
"name": "SignedMintsMustRestrictFeeRecipients",
"type": "error"
},
{
"inputs": [],
"name": "SignerCannotBeZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "SignerNotPresent",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startTokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTokenId",
"type": "uint256"
}
],
"name": "TokenIdNotWithinDropStageRange",
"type": "error"
},
{
"inputs": [],
"name": "Unauthorized",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "UnsupportedExtraDataVersion",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "selector",
"type": "bytes4"
}
],
"name": "UnsupportedFunctionSelector",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "previousMerkleRoot",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newMerkleRoot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "string[]",
"name": "publicKeyURI",
"type": "string[]"
},
{
"indexed": false,
"internalType": "string",
"name": "allowListURI",
"type": "string"
}
],
"name": "AllowListUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "feeRecipient",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "AllowedFeeRecipientUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address[]",
"name": "allowedSeaport",
"type": "address[]"
}
],
"name": "AllowedSeaportUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "payoutAddress",
"type": "address"
},
{
"internalType": "uint16",
"name": "basisPoints",
"type": "uint16"
}
],
"indexed": false,
"internalType": "struct CreatorPayout[]",
"name": "creatorPayouts",
"type": "tuple[]"
}
],
"name": "CreatorPayoutsUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "newDropURI",
"type": "string"
}
],
"name": "DropURIUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "payer",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "PayerUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "uint80",
"name": "startPrice",
"type": "uint80"
},
{
"internalType": "uint80",
"name": "endPrice",
"type": "uint80"
},
{
"internalType": "uint40",
"name": "startTime",
"type": "uint40"
},
{
"internalType": "uint40",
"name": "endTime",
"type": "uint40"
},
{
"internalType": "bool",
"name": "restrictFeeRecipients",
"type": "bool"
},
{
"internalType": "address",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "uint24",
"name": "fromTokenId",
"type": "uint24"
},
{
"internalType": "uint24",
"name": "toTokenId",
"type": "uint24"
},
{
"internalType": "uint16",
"name": "maxTotalMintableByWallet",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "maxTotalMintableByWalletPerToken",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "feeBps",
"type": "uint16"
}
],
"indexed": false,
"internalType": "struct PublicDrop",
"name": "publicDrop",
"type": "tuple"
},
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "PublicDropUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "payer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "dropStageIndex",
"type": "uint256"
}
],
"name": "SeaDropMint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "enum SeaDropErrorsAndEvents.SEADROP_TOKEN_TYPE",
"name": "tokenType",
"type": "uint8"
}
],
"name": "SeaDropTokenDeployed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "signer",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "SignerUpdated",
"type": "event"
},
{
"stateMutability": "nonpayable",
"type": "fallback"
},
{
"inputs": [],
"name": "DELEGATION_REGISTRY",
"outputs": [
{
"internalType": "contract IDelegationRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "fulfiller",
"type": "address"
},
{
"components": [
{
"internalType": "enum ItemType",
"name": "itemType",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "identifier",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct SpentItem[]",
"name": "minimumReceived",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "enum ItemType",
"name": "itemType",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "identifier",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct SpentItem[]",
"name": "",
"type": "tuple[]"
},
{
"internalType": "bytes",
"name": "context",
"type": "bytes"
}
],
"name": "generateOrder",
"outputs": [
{
"components": [
{
"internalType": "enum ItemType",
"name": "itemType",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "identifier",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct SpentItem[]",
"name": "offer",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "enum ItemType",
"name": "itemType",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "identifier",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address payable",
"name": "recipient",
"type": "address"
}
],
"internalType": "struct ReceivedItem[]",
"name": "consideration",
"type": "tuple[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getSeaportMetadata",
"outputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "metadata",
"type": "bytes"
}
],
"internalType": "struct Schema[]",
"name": "schemas",
"type": "tuple[]"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"components": [
{
"internalType": "uint256[]",
"name": "maxSupplyTokenIds",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "maxSupplyAmounts",
"type": "uint256[]"
},
{
"internalType": "string",
"name": "baseURI",
"type": "string"
},
{
"internalType": "string",
"name": "contractURI",
"type": "string"
},
{
"components": [
{
"internalType": "uint80",
"name": "startPrice",
"type": "uint80"
},
{
"internalType": "uint80",
"name": "endPrice",
"type": "uint80"
},
{
"internalType": "uint40",
"name": "startTime",
"type": "uint40"
},
{
"internalType": "uint40",
"name": "endTime",
"type": "uint40"
},
{
"internalType": "bool",
"name": "restrictFeeRecipients",
"type": "bool"
},
{
"internalType": "address",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "uint24",
"name": "fromTokenId",
"type": "uint24"
},
{
"internalType": "uint24",
"name": "toTokenId",
"type": "uint24"
},
{
"internalType": "uint16",
"name": "maxTotalMintableByWallet",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "maxTotalMintableByWalletPerToken",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "feeBps",
"type": "uint16"
}
],
"internalType": "struct PublicDrop[]",
"name": "publicDrops",
"type": "tuple[]"
},
{
"internalType": "uint256[]",
"name": "publicDropsIndexes",
"type": "uint256[]"
},
{
"internalType": "string",
"name": "dropURI",
"type": "string"
},
{
"components": [
{
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
},
{
"internalType": "string[]",
"name": "publicKeyURIs",
"type": "string[]"
},
{
"internalType": "string",
"name": "allowListURI",
"type": "string"
}
],
"internalType": "struct AllowListData",
"name": "allowListData",
"type": "tuple"
},
{
"components": [
{
"internalType": "address",
"name": "payoutAddress",
"type": "address"
},
{
"internalType": "uint16",
"name": "basisPoints",
"type": "uint16"
}
],
"internalType": "struct CreatorPayout[]",
"name": "creatorPayouts",
"type": "tuple[]"
},
{
"internalType": "bytes32",
"name": "provenanceHash",
"type": "bytes32"
},
{
"internalType": "address[]",
"name": "allowedFeeRecipients",
"type": "address[]"
},
{
"internalType": "address[]",
"name": "disallowedFeeRecipients",
"type": "address[]"
},
{
"internalType": "address[]",
"name": "allowedPayers",
"type": "address[]"
},
{
"internalType": "address[]",
"name": "disallowedPayers",
"type": "address[]"
},
{
"internalType": "address[]",
"name": "allowedSigners",
"type": "address[]"
},
{
"internalType": "address[]",
"name": "disallowedSigners",
"type": "address[]"
},
{
"internalType": "address",
"name": "royaltyReceiver",
"type": "address"
},
{
"internalType": "uint96",
"name": "royaltyBps",
"type": "uint96"
},
{
"internalType": "address",
"name": "mintRecipient",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "mintTokenIds",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "mintAmounts",
"type": "uint256[]"
}
],
"internalType": "struct MultiConfigureStruct",
"name": "config",
"type": "tuple"
}
],
"name": "multiConfigure",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "fulfiller",
"type": "address"
},
{
"components": [
{
"internalType": "enum ItemType",
"name": "itemType",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "identifier",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct SpentItem[]",
"name": "minimumReceived",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "enum ItemType",
"name": "itemType",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "identifier",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct SpentItem[]",
"name": "",
"type": "tuple[]"
},
{
"internalType": "bytes",
"name": "context",
"type": "bytes"
}
],
"name": "previewOrder",
"outputs": [
{
"components": [
{
"internalType": "enum ItemType",
"name": "itemType",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "identifier",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct SpentItem[]",
"name": "offer",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "enum ItemType",
"name": "itemType",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "identifier",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address payable",
"name": "recipient",
"type": "address"
}
],
"internalType": "struct ReceivedItem[]",
"name": "consideration",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
},
{
"internalType": "string[]",
"name": "publicKeyURIs",
"type": "string[]"
},
{
"internalType": "string",
"name": "allowListURI",
"type": "string"
}
],
"internalType": "struct AllowListData",
"name": "allowListData",
"type": "tuple"
}
],
"name": "updateAllowList",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "feeRecipient",
"type": "address"
},
{
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "updateAllowedFeeRecipient",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "allowedSeaport",
"type": "address[]"
}
],
"name": "updateAllowedSeaport",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "payoutAddress",
"type": "address"
},
{
"internalType": "uint16",
"name": "basisPoints",
"type": "uint16"
}
],
"internalType": "struct CreatorPayout[]",
"name": "creatorPayouts",
"type": "tuple[]"
}
],
"name": "updateCreatorPayouts",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "dropURI",
"type": "string"
}
],
"name": "updateDropURI",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "payer",
"type": "address"
},
{
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "updatePayer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint80",
"name": "startPrice",
"type": "uint80"
},
{
"internalType": "uint80",
"name": "endPrice",
"type": "uint80"
},
{
"internalType": "uint40",
"name": "startTime",
"type": "uint40"
},
{
"internalType": "uint40",
"name": "endTime",
"type": "uint40"
},
{
"internalType": "bool",
"name": "restrictFeeRecipients",
"type": "bool"
},
{
"internalType": "address",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "uint24",
"name": "fromTokenId",
"type": "uint24"
},
{
"internalType": "uint24",
"name": "toTokenId",
"type": "uint24"
},
{
"internalType": "uint16",
"name": "maxTotalMintableByWallet",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "maxTotalMintableByWalletPerToken",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "feeBps",
"type": "uint16"
}
],
"internalType": "struct PublicDrop",
"name": "publicDrop",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "updatePublicDrop",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "signer",
"type": "address"
},
{
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "updateSigner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import {
ERC1155SeaDropContractOffererImplementation
} from "./ERC1155SeaDropContractOffererImplementation.sol";
import { PublicDrop, MultiConfigureStruct } from "./ERC1155SeaDropStructs.sol";
import { AllowListData, CreatorPayout } from "./SeaDropStructs.sol";
import {
IERC1155ContractMetadata
} from "../interfaces/IERC1155ContractMetadata.sol";
import { IERC1155SeaDrop } from "../interfaces/IERC1155SeaDrop.sol";
import { IERC173 } from "../interfaces/IERC173.sol";
/**
* @title ERC1155SeaDropConfigurer
* @author James Wenzel (emo.eth)
* @author Ryan Ghods (ralxz.eth)
* @author Stephan Min (stephanm.eth)
* @author Michael Cohen (notmichael.eth)
* @notice A helper contract to configure parameters for ERC1155SeaDrop.
*/
contract ERC1155SeaDropConfigurer is
ERC1155SeaDropContractOffererImplementation
{
/**
* @notice Revert with an error if the sender is not the owner
* of the token contract.
*/
error Unauthorized();
/**
* @dev Reverts if the sender is not the owner of the token.
*
* This is used as a function instead of a modifier
* to save contract space when used multiple times.
*/
function _onlyOwner(address token) internal view {
if (msg.sender != IERC173(token).owner()) {
revert Unauthorized();
}
}
/**
* @notice Configure multiple properties at a time.
*
* Only the owner of the token can use this function.
*
* Note: The individual configure methods should be used
* to unset or reset any properties to zero, as this method
* will ignore zero-value properties in the config struct.
*
* @param token The ERC1155SeaDrop contract address.
* @param config The configuration struct.
*/
function multiConfigure(
address token,
MultiConfigureStruct calldata config
) external {
// Ensure the sender is the owner of the token.
_onlyOwner(token);
if (config.maxSupplyTokenIds.length != 0) {
if (
config.maxSupplyTokenIds.length !=
config.maxSupplyAmounts.length
) {
revert MaxSupplyMismatch();
}
for (uint256 i = 0; i < config.maxSupplyTokenIds.length; ) {
IERC1155ContractMetadata(token).setMaxSupply(
config.maxSupplyTokenIds[i],
config.maxSupplyAmounts[i]
);
unchecked {
++i;
}
}
}
if (bytes(config.baseURI).length != 0) {
IERC1155ContractMetadata(token).setBaseURI(config.baseURI);
}
if (bytes(config.contractURI).length != 0) {
IERC1155ContractMetadata(token).setContractURI(config.contractURI);
}
if (config.provenanceHash != bytes32(0)) {
IERC1155ContractMetadata(token).setProvenanceHash(
config.provenanceHash
);
}
if (
_cast(config.royaltyReceiver != address(0)) &
_cast(config.royaltyBps != 0) ==
1
) {
IERC1155ContractMetadata(token).setDefaultRoyalty(
config.royaltyReceiver,
config.royaltyBps
);
}
if (config.publicDrops.length != 0) {
if (config.publicDrops.length != config.publicDropsIndexes.length) {
revert PublicDropsMismatch();
}
for (uint256 i = 0; i < config.publicDrops.length; ) {
IERC1155SeaDrop(address(token)).updatePublicDrop(
config.publicDrops[i],
config.publicDropsIndexes[i]
);
unchecked {
++i;
}
}
}
if (bytes(config.dropURI).length != 0) {
IERC1155SeaDrop(address(token)).updateDropURI(config.dropURI);
}
if (config.allowListData.merkleRoot != bytes32(0)) {
IERC1155SeaDrop(address(token)).updateAllowList(
config.allowListData
);
}
if (config.creatorPayouts.length != 0) {
IERC1155SeaDrop(address(token)).updateCreatorPayouts(
config.creatorPayouts
);
}
if (config.allowedFeeRecipients.length != 0) {
for (uint256 i = 0; i < config.allowedFeeRecipients.length; ) {
IERC1155SeaDrop(address(token)).updateAllowedFeeRecipient(
config.allowedFeeRecipients[i],
true
);
unchecked {
++i;
}
}
}
if (config.disallowedFeeRecipients.length != 0) {
for (uint256 i = 0; i < config.disallowedFeeRecipients.length; ) {
IERC1155SeaDrop(address(token)).updateAllowedFeeRecipient(
config.disallowedFeeRecipients[i],
false
);
unchecked {
++i;
}
}
}
if (config.allowedPayers.length != 0) {
for (uint256 i = 0; i < config.allowedPayers.length; ) {
IERC1155SeaDrop(address(token)).updatePayer(
config.allowedPayers[i],
true
);
unchecked {
++i;
}
}
}
if (config.disallowedPayers.length != 0) {
for (uint256 i = 0; i < config.disallowedPayers.length; ) {
IERC1155SeaDrop(address(token)).updatePayer(
config.disallowedPayers[i],
false
);
unchecked {
++i;
}
}
}
if (config.allowedSigners.length != 0) {
for (uint256 i = 0; i < config.allowedSigners.length; ) {
IERC1155SeaDrop(address(token)).updateSigner(
config.allowedSigners[i],
true
);
unchecked {
++i;
}
}
}
if (config.disallowedSigners.length != 0) {
for (uint256 i = 0; i < config.disallowedSigners.length; ) {
IERC1155SeaDrop(address(token)).updateSigner(
config.disallowedSigners[i],
false
);
unchecked {
++i;
}
}
}
if (config.mintTokenIds.length != 0) {
if (config.mintTokenIds.length != config.mintAmounts.length) {
revert MintAmountsMismatch();
}
IERC1155SeaDrop(token).multiConfigureMint(
config.mintRecipient,
config.mintTokenIds,
config.mintAmounts
);
}
}
}
Chain explorer4164msChain node84ms