Skip to content

Commit

Permalink
added immutable drops
Browse files Browse the repository at this point in the history
  • Loading branch information
cblanquera committed Aug 4, 2021
1 parent 64c20ad commit f95e8c0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 14 additions & 2 deletions contracts/token/ERC721/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Mints `tokenId`, classifies it as `classId` and transfers to `recipient`.

- **classId** - arbitrary class ID
- **tokenId** - arbitrary token ID *(Should be unique)*
- **recipient** - Wallet address to remove from the fee table
- **recipient** - Wallet address to send the token to

```js
await nft.mint(100, 200 '0xabc123') // 1000 is 10.00%
Expand Down Expand Up @@ -201,6 +201,18 @@ await nft.unpause()
Only the token owner can do the following actions. These are not included in the
project's API and should be implemented on the client side.

#### Burn

Burns a token.

`burn(uint256 tokenId)`

- **tokenId** - ex. 1

```js
await nft.burn(1)
```

##### List

Lists `tokenId` on the order book for `amount` in wei.
Expand Down Expand Up @@ -348,7 +360,7 @@ Returns the current supply size of `classId`
`classSupply(uint256 classId)`

```js
await nft.classFilled(100) //--> 1000
await nft.classSupply(100) //--> 1000
```

##### Get the Fee of a Person
Expand Down
4 changes: 4 additions & 0 deletions contracts/token/ERC721/abstractions/ERC721MultiClassDrop.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ abstract contract ERC721MultiClassDrop is IERC721MultiClassDrop {
* @dev Defines a redeemable class
*/
function _drop(uint256 classId, bytes32 merkleroot) internal virtual {
require(
_root[classId] == 0,
"ERC721MultiClassDrop: Class has already been dropped"
);
//save the merkle root
_root[classId] = merkleroot;
}
Expand Down

0 comments on commit f95e8c0

Please sign in to comment.