AllowlistGate
0xb3b0aBfeb588ab905f984a20e05784be8a35eF4f · view on evm.now · Ethereum mainnet
One ownerless singleton gate serving every collection: a Merkle root per
collection, set by that collection's owner. A
FixedPriceSale with this gate set
asks check before each mint. Leaves follow the OpenZeppelin standard Merkle
tree over abi.encode(address), so a list built with
@openzeppelin/merkle-tree (StandardMerkleTree.of(addresses.map(a => [a]), ["address"])) verifies as is.
An allowlist phase then a public phase is setGate to this contract plus
setRoot, and later setGate(0) on the sale. Deployed at
0xb3b0aBfeb588ab905f984a20e05784be8a35eF4f.
Write functions
setRoot
function setRoot(address collection, bytes32 root_) externalAccess: owner-only (the collection's owner, borrowed; NotAuthorized)
Sets the root for collection. 0 clears it, which makes every check fail.
Emits RootSet.
Read functions
check
function check(address collection, address to, uint256, bytes data) external view returns (bool)True when data is an abi-encoded bytes32[] proof that to is in the
collection's list. Empty data or an unset root returns false instead of
reverting. quantity is ignored.
root
function root(address) external view returns (bytes32)The root for a collection, or zero.
Events
RootSet
event RootSet(address indexed collection, bytes32 root)A collection's root changed.
Errors
NotAuthorized()
setRoot from someone other than the collection's owner, including after a
renounce.