Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1dcf2b7

Browse files
Update docs
1 parent 751ec11 commit 1dcf2b7

File tree

6 files changed

+185
-191
lines changed

6 files changed

+185
-191
lines changed

docs/contracts/ERC1155DelayedReveal.md

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ displayed_sidebar: contracts
77

88
# ERC1155DelayedReveal
99

10-
BASE: ERC1155Base EXTENSION: LazyMint, DelayedReveal The `ERC1155DelayedReveal` contract uses the `ERC1155Base` contract, along with the `LazyMint` and `DelayedReveal` extension. 'Lazy minting' means defining the metadata of NFTs without minting it to an address. Regular 'minting' of NFTs means actually assigning an owner to an NFT. As a contract admin, this lets you prepare the metadata for NFTs that will be minted by an external party, without paying the gas cost for actually minting the NFTs. 'Delayed reveal' is a mechanism by which you can distribute NFTs to your audience and reveal the metadata of the distributed NFTs, after the fact. You can read more about how the `DelayedReveal` extension works, here: https://blog.thirdweb.com/delayed-reveal-nfts
10+
BASE: ERC1155LazyMint EXTENSION: DelayedReveal The `ERC1155DelayedReveal` contract uses the `DelayedReveal` extension. 'Lazy minting' means defining the metadata of NFTs without minting it to an address. Regular 'minting' of NFTs means actually assigning an owner to an NFT. As a contract admin, this lets you prepare the metadata for NFTs that will be minted by an external party, without paying the gas cost for actually minting the NFTs. 'Delayed reveal' is a mechanism by which you can distribute NFTs to your audience and reveal the metadata of the distributed NFTs, after the fact. You can read more about how the `DelayedReveal` extension works, here: https://blog.thirdweb.com/delayed-reveal-nfts
1111

1212
## Methods
1313

@@ -51,25 +51,6 @@ function balanceOfBatch(address[] accounts, uint256[] ids) external view returns
5151
| ---- | --------- | ----------- |
5252
| \_0 | uint256[] | undefined |
5353

54-
### batchMintTo
55-
56-
```solidity
57-
function batchMintTo(address _to, uint256[] _tokenIds, uint256[] _amounts, string) external nonpayable
58-
```
59-
60-
Lets an authorized address mint multiple lazy minted NFTs at once to a recipient.
61-
62-
_The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs._
63-
64-
#### Parameters
65-
66-
| Name | Type | Description |
67-
| ---------- | --------- | --------------------------------- |
68-
| \_to | address | The recipient of the NFT to mint. |
69-
| \_tokenIds | uint256[] | The tokenIds of the NFTs to mint. |
70-
| \_amounts | uint256[] | The amounts of each NFT to mint. |
71-
| \_3 | string | undefined |
72-
7354
### burn
7455

7556
```solidity
@@ -102,6 +83,24 @@ Lets an owner or approved operator burn NFTs of the given tokenIds.
10283
| \_tokenIds | uint256[] | The tokenIds of the NFTs to burn. |
10384
| \_amounts | uint256[] | The amounts of the NFTs to burn. |
10485

86+
### claim
87+
88+
```solidity
89+
function claim(address _receiver, uint256 _tokenId, uint256 _quantity) external payable
90+
```
91+
92+
Lets an address claim multiple lazy minted NFTs at once to a recipient. Contract creators should override this function to create custom logic for claiming, for e.g. price collection, allowlist, max quantity, etc.
93+
94+
_The logic in the `verifyClaim` function determines whether the caller is authorized to mint NFTs._
95+
96+
#### Parameters
97+
98+
| Name | Type | Description |
99+
| ---------- | ------- | ------------------------------------------- |
100+
| \_receiver | address | The recipient of the tokens to mint. |
101+
| \_tokenId | uint256 | The tokenId of the lazy minted NFT to mint. |
102+
| \_quantity | uint256 | The number of tokens to mint. |
103+
105104
### contractURI
106105

107106
```solidity
@@ -321,25 +320,6 @@ Lets an authorized address lazy mint a given amount of NFTs.
321320
| ------- | ------- | ----------------------------------------------------------------------- |
322321
| batchId | uint256 | A unique integer identifier for the batch of NFTs lazy minted together. |
323322

324-
### mintTo
325-
326-
```solidity
327-
function mintTo(address _to, uint256 _tokenId, string, uint256 _amount) external nonpayable
328-
```
329-
330-
Lets an authorized address mint lazy minted NFTs to a recipient.
331-
332-
_- The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs._
333-
334-
#### Parameters
335-
336-
| Name | Type | Description |
337-
| --------- | ------- | ------------------------------------------- |
338-
| \_to | address | The recipient of the NFTs to mint. |
339-
| \_tokenId | uint256 | The tokenId of the lazy minted NFT to mint. |
340-
| \_2 | string | undefined |
341-
| \_amount | uint256 | The amount of the same NFT to mint. |
342-
343323
### multicall
344324

345325
```solidity
@@ -631,6 +611,24 @@ _See `BatchMintMetadata` for handling of metadata in this contract._
631611
| ---- | ------ | ----------- |
632612
| \_0 | string | undefined |
633613

614+
### verifyClaim
615+
616+
```solidity
617+
function verifyClaim(address _claimer, uint256 _tokenId, uint256 _quantity) external view
618+
```
619+
620+
Override this function to add logic for claim verification, based on conditions such as allowlist, price, max quantity etc.
621+
622+
_Checks a request to claim NFTs against a custom condition._
623+
624+
#### Parameters
625+
626+
| Name | Type | Description |
627+
| ---------- | ------- | ------------------------------------------- |
628+
| \_claimer | address | Caller of the claim function. |
629+
| \_tokenId | uint256 | The tokenId of the lazy minted NFT to mint. |
630+
| \_quantity | uint256 | The number of NFTs being claimed. |
631+
634632
## Events
635633

636634
### ApprovalForAll

docs/contracts/ERC1155LazyMint.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ displayed_sidebar: contracts
77

88
# ERC1155LazyMint
99

10-
BASE: ERC1155Base EXTENSION: LazyMint The `ERC1155LazyMint` contract uses the `ERC1155Base` contract, along with the `LazyMint` extension. 'Lazy minting' means defining the metadata of NFTs without minting it to an address. Regular 'minting' of NFTs means actually assigning an owner to an NFT. As a contract admin, this lets you prepare the metadata for NFTs that will be minted by an external party, without paying the gas cost for actually minting the NFTs.
10+
BASE: ERC1155Base EXTENSION: LazyMint The `ERC1155LazyMint` smart contract implements the ERC1155 NFT standard. It includes the following additions to standard ERC1155 logic: - Lazy minting - Ability to mint NFTs via the provided `mintTo` and `batchMintTo` functions. - Contract metadata for royalty support on platforms such as OpenSea that use off-chain information to distribute roaylties. - Ownership of the contract, with the ability to restrict certain functions to only be called by the contract's owner. - Multicall capability to perform multiple actions atomically - EIP 2981 compliance for royalty support on NFT marketplaces. The `ERC1155LazyMint` contract uses the `LazyMint` extension. 'Lazy minting' means defining the metadata of NFTs without minting it to an address. Regular 'minting' of NFTs means actually assigning an owner to an NFT. As a contract admin, this lets you prepare the metadata for NFTs that will be minted by an external party, without paying the gas cost for actually minting the NFTs.
1111

1212
## Methods
1313

@@ -51,25 +51,6 @@ function balanceOfBatch(address[] accounts, uint256[] ids) external view returns
5151
| ---- | --------- | ----------- |
5252
| \_0 | uint256[] | undefined |
5353

54-
### batchMintTo
55-
56-
```solidity
57-
function batchMintTo(address _to, uint256[] _tokenIds, uint256[] _amounts, string) external nonpayable
58-
```
59-
60-
Lets an authorized address mint multiple lazy minted NFTs at once to a recipient.
61-
62-
_The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs._
63-
64-
#### Parameters
65-
66-
| Name | Type | Description |
67-
| ---------- | --------- | --------------------------------- |
68-
| \_to | address | The recipient of the NFT to mint. |
69-
| \_tokenIds | uint256[] | The tokenIds of the NFTs to mint. |
70-
| \_amounts | uint256[] | The amounts of each NFT to mint. |
71-
| \_3 | string | undefined |
72-
7354
### burn
7455

7556
```solidity
@@ -102,6 +83,24 @@ Lets an owner or approved operator burn NFTs of the given tokenIds.
10283
| \_tokenIds | uint256[] | The tokenIds of the NFTs to burn. |
10384
| \_amounts | uint256[] | The amounts of the NFTs to burn. |
10485

86+
### claim
87+
88+
```solidity
89+
function claim(address _receiver, uint256 _tokenId, uint256 _quantity) external payable
90+
```
91+
92+
Lets an address claim multiple lazy minted NFTs at once to a recipient. Contract creators should override this function to create custom logic for claiming, for e.g. price collection, allowlist, max quantity, etc.
93+
94+
_The logic in the `verifyClaim` function determines whether the caller is authorized to mint NFTs._
95+
96+
#### Parameters
97+
98+
| Name | Type | Description |
99+
| ---------- | ------- | ------------------------------------------- |
100+
| \_receiver | address | The recipient of the tokens to mint. |
101+
| \_tokenId | uint256 | The tokenId of the lazy minted NFT to mint. |
102+
| \_quantity | uint256 | The number of tokens to mint. |
103+
105104
### contractURI
106105

107106
```solidity
@@ -235,25 +234,6 @@ Lets an authorized address lazy mint a given amount of NFTs.
235234
| ------- | ------- | ----------------------------------------------------------------------- |
236235
| batchId | uint256 | A unique integer identifier for the batch of NFTs lazy minted together. |
237236

238-
### mintTo
239-
240-
```solidity
241-
function mintTo(address _to, uint256 _tokenId, string, uint256 _amount) external nonpayable
242-
```
243-
244-
Lets an authorized address mint lazy minted NFTs to a recipient.
245-
246-
_- The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs._
247-
248-
#### Parameters
249-
250-
| Name | Type | Description |
251-
| --------- | ------- | ------------------------------------------- |
252-
| \_to | address | The recipient of the NFTs to mint. |
253-
| \_tokenId | uint256 | The tokenId of the lazy minted NFT to mint. |
254-
| \_2 | string | undefined |
255-
| \_amount | uint256 | The amount of the same NFT to mint. |
256-
257237
### multicall
258238

259239
```solidity
@@ -490,6 +470,8 @@ function totalSupply(uint256) external view returns (uint256)
490470

491471
Returns the total supply of NFTs of a given tokenId
492472

473+
_Mapping from tokenId => total circulating supply of NFTs of that tokenId._
474+
493475
#### Parameters
494476

495477
| Name | Type | Description |
@@ -522,6 +504,24 @@ Returns the metadata URI for the given tokenId.
522504
| ---- | ------ | ----------- |
523505
| \_0 | string | undefined |
524506

507+
### verifyClaim
508+
509+
```solidity
510+
function verifyClaim(address _claimer, uint256 _tokenId, uint256 _quantity) external view
511+
```
512+
513+
Override this function to add logic for claim verification, based on conditions such as allowlist, price, max quantity etc.
514+
515+
_Checks a request to claim NFTs against a custom condition._
516+
517+
#### Parameters
518+
519+
| Name | Type | Description |
520+
| ---------- | ------- | ------------------------------------------- |
521+
| \_claimer | address | Caller of the claim function. |
522+
| \_tokenId | uint256 | The tokenId of the lazy minted NFT to mint. |
523+
| \_quantity | uint256 | The number of NFTs being claimed. |
524+
525525
## Events
526526

527527
### ApprovalForAll

docs/contracts/ERC721DelayedReveal.md

Lines changed: 47 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ displayed_sidebar: contracts
77

88
# ERC721DelayedReveal
99

10-
BASE: ERC721Base EXTENSION: LazyMint, DelayedReveal The `ERC721DelayedReveal` contract uses the `ERC721Base` contract, along with the `LazyMint` and `DelayedReveal` extension. 'Lazy minting' means defining the metadata of NFTs without minting it to an address. Regular 'minting' of NFTs means actually assigning an owner to an NFT. As a contract admin, this lets you prepare the metadata for NFTs that will be minted by an external party, without paying the gas cost for actually minting the NFTs. 'Delayed reveal' is a mechanism by which you can distribute NFTs to your audience and reveal the metadata of the distributed NFTs, after the fact. You can read more about how the `DelayedReveal` extension works, here: https://blog.thirdweb.com/delayed-reveal-nfts
10+
BASE: ERC721LazyMint EXTENSION: DelayedReveal The `ERC721DelayedReveal` contract uses the `ERC721LazyMint` contract, along with `DelayedReveal` extension. 'Lazy minting' means defining the metadata of NFTs without minting it to an address. Regular 'minting' of NFTs means actually assigning an owner to an NFT. As a contract admin, this lets you prepare the metadata for NFTs that will be minted by an external party, without paying the gas cost for actually minting the NFTs. 'Delayed reveal' is a mechanism by which you can distribute NFTs to your audience and reveal the metadata of the distributed NFTs, after the fact. You can read more about how the `DelayedReveal` extension works, here: https://blog.thirdweb.com/delayed-reveal-nfts
1111

1212
## Methods
1313

@@ -46,40 +46,38 @@ _See {IERC721-balanceOf}._
4646
| ---- | ------- | ----------- |
4747
| \_0 | uint256 | undefined |
4848

49-
### batchMintTo
49+
### burn
5050

5151
```solidity
52-
function batchMintTo(address _to, uint256 _quantity, string, bytes _data) external nonpayable
52+
function burn(uint256 _tokenId) external nonpayable
5353
```
5454

55-
Lets an authorized address mint multiple lazy minted NFTs at once to a recipient.
55+
Lets an owner or approved operator burn the NFT of the given tokenId.
5656

57-
_The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs._
57+
_ERC721A's `_burn(uint256,bool)` internally checks for token approvals._
5858

5959
#### Parameters
6060

61-
| Name | Type | Description |
62-
| ---------- | ------- | ------------------------------------------------------------ |
63-
| \_to | address | The recipient of the NFT to mint. |
64-
| \_quantity | uint256 | The number of NFTs to mint. |
65-
| \_2 | string | undefined |
66-
| \_data | bytes | Additional data to pass along during the minting of the NFT. |
61+
| Name | Type | Description |
62+
| --------- | ------- | ------------------------------- |
63+
| \_tokenId | uint256 | The tokenId of the NFT to burn. |
6764

68-
### burn
65+
### claim
6966

7067
```solidity
71-
function burn(uint256 _tokenId) external nonpayable
68+
function claim(address _receiver, uint256 _quantity) external payable
7269
```
7370

74-
Lets an owner or approved operator burn the NFT of the given tokenId.
71+
Lets an address claim multiple lazy minted NFTs at once to a recipient. Contract creators should override this function to create custom logic for claiming, for e.g. price collection, allowlist, max quantity, etc.
7572

76-
_ERC721A's `_burn(uint256,bool)` internally checks for token approvals._
73+
_The logic in the `verifyClaim` function determines whether the caller is authorized to mint NFTs._
7774

7875
#### Parameters
7976

80-
| Name | Type | Description |
81-
| --------- | ------- | ------------------------------- |
82-
| \_tokenId | uint256 | The tokenId of the NFT to burn. |
77+
| Name | Type | Description |
78+
| ---------- | ------- | --------------------------------- |
79+
| \_receiver | address | The recipient of the NFT to mint. |
80+
| \_quantity | uint256 | The number of NFTs to mint. |
8381

8482
### contractURI
8583

@@ -276,27 +274,6 @@ _See {IERC721-isApprovedForAll}._
276274
| ---- | ---- | ----------- |
277275
| \_0 | bool | undefined |
278276

279-
### isApprovedOrOwner
280-
281-
```solidity
282-
function isApprovedOrOwner(address _operator, uint256 _tokenId) external view returns (bool isApprovedOrOwnerOf)
283-
```
284-
285-
Returns whether a given address is the owner, or approved to transfer an NFT.
286-
287-
#### Parameters
288-
289-
| Name | Type | Description |
290-
| ---------- | ------- | ----------- |
291-
| \_operator | address | undefined |
292-
| \_tokenId | uint256 | undefined |
293-
294-
#### Returns
295-
296-
| Name | Type | Description |
297-
| ------------------- | ---- | ----------- |
298-
| isApprovedOrOwnerOf | bool | undefined |
299-
300277
### isEncryptedBatch
301278

302279
```solidity
@@ -341,23 +318,6 @@ Lets an authorized address lazy mint a given amount of NFTs.
341318
| ------- | ------- | ----------------------------------------------------------------------- |
342319
| batchId | uint256 | A unique integer identifier for the batch of NFTs lazy minted together. |
343320

344-
### mintTo
345-
346-
```solidity
347-
function mintTo(address _to, string) external nonpayable
348-
```
349-
350-
Lets an authorized address mint a lazy minted NFT to a recipient.
351-
352-
_The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs._
353-
354-
#### Parameters
355-
356-
| Name | Type | Description |
357-
| ---- | ------- | --------------------------------- |
358-
| \_to | address | The recipient of the NFT to mint. |
359-
| \_1 | string | undefined |
360-
361321
### multicall
362322

363323
```solidity
@@ -394,6 +354,20 @@ _See {IERC721Metadata-name}._
394354
| ---- | ------ | ----------- |
395355
| \_0 | string | undefined |
396356

357+
### nextTokenIdToClaim
358+
359+
```solidity
360+
function nextTokenIdToClaim() external view returns (uint256)
361+
```
362+
363+
The tokenId assigned to the next new NFT to be claimed.
364+
365+
#### Returns
366+
367+
| Name | Type | Description |
368+
| ---- | ------- | ----------- |
369+
| \_0 | uint256 | undefined |
370+
397371
### nextTokenIdToMint
398372

399373
```solidity
@@ -686,6 +660,23 @@ _See {IERC721-transferFrom}._
686660
| to | address | undefined |
687661
| tokenId | uint256 | undefined |
688662

663+
### verifyClaim
664+
665+
```solidity
666+
function verifyClaim(address _claimer, uint256 _quantity) external view
667+
```
668+
669+
Override this function to add logic for claim verification, based on conditions such as allowlist, price, max quantity etc.
670+
671+
_Checks a request to claim NFTs against a custom condition._
672+
673+
#### Parameters
674+
675+
| Name | Type | Description |
676+
| ---------- | ------- | --------------------------------- |
677+
| \_claimer | address | Caller of the claim function. |
678+
| \_quantity | uint256 | The number of NFTs being claimed. |
679+
689680
## Events
690681

691682
### Approval

0 commit comments

Comments
 (0)