Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions contracts/drop/DropERC1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,12 @@ contract DropERC1155 is
emit PrimarySaleRecipientUpdated(_saleRecipient);
}

/// @dev Lets a contract admin set the recipient for all primary sales.
function setSaleRecipientForToken(uint256 _tokenId, address _saleRecipient) external onlyRole(DEFAULT_ADMIN_ROLE) {
saleRecipient[_tokenId] = _saleRecipient;
emit SaleRecipientForTokenUpdated(_tokenId, _saleRecipient);
}

/// @dev Lets a contract admin update the default royalty recipient and bps.
function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps)
external
Expand Down
9 changes: 9 additions & 0 deletions contracts/drop/DropERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,16 @@ contract DropERC20 is
}

CurrencyTransferLib.transferCurrency(_currency, _msgSender(), platformFeeRecipient, platformFees);
<<<<<<< HEAD
CurrencyTransferLib.transferCurrency(_currency, _msgSender(), primarySaleRecipient, totalPrice - platformFees);
=======
CurrencyTransferLib.transferCurrency(
_currency,
_msgSender(),
primarySaleRecipient,
totalPrice - platformFees
);
>>>>>>> b00169bb4f25ccd10ebe36429d714cc5f919af63
}

/// @dev Transfers the tokens being claimed.
Expand Down
9 changes: 9 additions & 0 deletions contracts/drop/DropERC721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,16 @@ contract DropERC721 is
}

CurrencyTransferLib.transferCurrency(_currency, _msgSender(), platformFeeRecipient, platformFees);
<<<<<<< HEAD
CurrencyTransferLib.transferCurrency(_currency, _msgSender(), primarySaleRecipient, totalPrice - platformFees);
=======
CurrencyTransferLib.transferCurrency(
_currency,
_msgSender(),
primarySaleRecipient,
totalPrice - platformFees
);
>>>>>>> b00169bb4f25ccd10ebe36429d714cc5f919af63
}

/// @dev Transfers the NFTs being claimed.
Expand Down
3 changes: 3 additions & 0 deletions contracts/interfaces/drop/IDropERC1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ interface IDropERC1155 is IERC1155Upgradeable, IDropClaimCondition {
/// @dev Emitted when the max wallet claim count for a given tokenId is updated.
event MaxWalletClaimCountUpdated(uint256 tokenId, uint256 count);

/// @dev Emitted when the sale recipient for a particular tokenId is updated.
event SaleRecipientForTokenUpdated(uint256 indexed tokenId, address saleRecipient);

/**
* @notice Lets an account with `MINTER_ROLE` lazy mint 'n' NFTs.
* The URIs for each token is the provided `_baseURIForTokens` + `{tokenId}`.
Expand Down
34 changes: 34 additions & 0 deletions docs/DropERC1155.md
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,23 @@ function setRoyaltyInfoForToken(uint256 _tokenId, address _recipient, uint256 _b
| _recipient | address | undefined
| _bps | uint256 | undefined

### setSaleRecipientForToken

```solidity
function setSaleRecipientForToken(uint256 _tokenId, address _saleRecipient) external nonpayable
```



*Lets a contract admin set the recipient for all primary sales.*

#### Parameters

| Name | Type | Description |
|---|---|---|
| _tokenId | uint256 | undefined
| _saleRecipient | address | undefined

### setWalletClaimCount

```solidity
Expand Down Expand Up @@ -1337,6 +1354,23 @@ event RoyaltyForToken(uint256 indexed tokenId, address royaltyRecipient, uint256
| royaltyRecipient | address | undefined |
| royaltyBps | uint256 | undefined |

### SaleRecipientForTokenUpdated

```solidity
event SaleRecipientForTokenUpdated(uint256 indexed tokenId, address saleRecipient)
```





#### Parameters

| Name | Type | Description |
|---|---|---|
| tokenId `indexed` | uint256 | undefined |
| saleRecipient | address | undefined |

### TokensClaimed

```solidity
Expand Down
17 changes: 17 additions & 0 deletions docs/IDropERC1155.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,23 @@ event MaxWalletClaimCountUpdated(uint256 tokenId, uint256 count)
| tokenId | uint256 | undefined |
| count | uint256 | undefined |

### SaleRecipientForTokenUpdated

```solidity
event SaleRecipientForTokenUpdated(uint256 indexed tokenId, address saleRecipient)
```



*Emitted when the sale recipient for a particular tokenId is updated.*

#### Parameters

| Name | Type | Description |
|---|---|---|
| tokenId `indexed` | uint256 | undefined |
| saleRecipient | address | undefined |

### TokensClaimed

```solidity
Expand Down
1 change: 1 addition & 0 deletions src/test/drop/DropERC721.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "../utils/BaseTest.sol";
contract SubExploitContract is ERC721Holder, ERC1155Holder {
DropERC721 internal drop;
address payable internal master;
// using Strings for uint256;

// using Strings for uint256;

Expand Down