Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ScreamingHawk committed Nov 26, 2024
1 parent 4d6bee2 commit 8ed3009
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Any platform is free to integrate with the Sequence Market contract to provide a

Note: The Sequence Market is designed to support standard ERC-1155, ERC-721 and ERC-20 implementations. Tokens with non-standard implementations (e.g. tokens that take fees on transfer) may not be compatible with the Sequence Market contract. Use of a token in the Sequence Market does not imply endorsement of the token by the Sequence Market.

### Sequence Market Batch Payable

The Sequence Market Batch Payable contract extends the Sequence Market contract to enable batch fills of orders with native currency.

Using the Sequence Market Batch Payable contract should be preferred over the standard Sequence Market for all use cases.

#### Flow

1. The order creator approves the Sequence Market contract to transfer of ERC-1155 or ERC-721 tokens for a listing, or ERC-20 tokens for an offer.
Expand Down
4 changes: 2 additions & 2 deletions contracts/SequenceMarket.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function acceptRequest(
address recipient,
uint256[] calldata additionalFees,
address[] calldata additionalFeeRecipients
) external payable nonReentrant;
) external payable virtual nonReentrant;
```
**Parameters**

Expand Down Expand Up @@ -190,7 +190,7 @@ function _acceptRequest(
address recipient,
uint256[] calldata additionalFees,
address[] calldata additionalFeeRecipients
) internal;
) internal virtual;
```
**Parameters**

Expand Down
1 change: 0 additions & 1 deletion contracts/interfaces/ISequenceMarket.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# ISequenceMarket


## Structs
### RequestParams
Request parameters.
Expand Down
32 changes: 32 additions & 0 deletions contracts/interfaces/ISequenceMarketBatchPayable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ISequenceMarketBatchPayable

Inherits [ISequenceMarket](./ISequenceMarket.md).

## Functions
### acceptRequestBatchPayable

Accepts requests.

*Additional fees are applied to each request.*


```solidity
function acceptRequestBatchPayable(
uint256[] calldata requestIds,
uint256[] calldata quantities,
address[] calldata recipients,
uint256[] calldata additionalFees,
address[] calldata additionalFeeRecipients
) external payable;
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`requestIds`|`uint256[]`|The IDs of the requests.|
|`quantities`|`uint256[]`|The quantities of tokens to accept.|
|`recipients`|`address[]`|The recipients of the accepted tokens.|
|`additionalFees`|`uint256[]`|The additional fees to pay.|
|`additionalFeeRecipients`|`address[]`|The addresses to send the additional fees to.|


10 changes: 9 additions & 1 deletion generateDocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ sed -i '2,5d' contracts/SequenceMarket.md

# Create interface docs
cp docs/src/contracts/interfaces/ISequenceMarket.sol/interface.ISequenceMarket*.md contracts/interfaces
sed -i '2,6d' contracts/interfaces/interface.ISequenceMarket.md
sed -i '2,7d' contracts/interfaces/interface.ISequenceMarket.md
sed -i '1,6d' contracts/interfaces/interface.ISequenceMarketFunctions.md
sed -i '1,3d' contracts/interfaces/interface.ISequenceMarketStorage.md contracts/interfaces/interface.ISequenceMarketSignals.md
cat contracts/interfaces/interface.ISequenceMarket.md contracts/interfaces/interface.ISequenceMarketStorage.md contracts/interfaces/interface.ISequenceMarketFunctions.md contracts/interfaces/interface.ISequenceMarketSignals.md > contracts/interfaces/ISequenceMarket.md

cp docs/src/contracts/interfaces/ISequenceMarketBatchPayable.sol/interface.ISequenceMarketBatchPayable*.md contracts/interfaces
sed -i '2,7d' contracts/interfaces/interface.ISequenceMarketBatchPayable.md
sed -i '1,4d' contracts/interfaces/interface.ISequenceMarketBatchPayableFunctions.md
cat contracts/interfaces/interface.ISequenceMarketBatchPayable.md > contracts/interfaces/ISequenceMarketBatchPayable.md
echo -e "\nInherits [ISequenceMarket](./ISequenceMarket.md).\n" >> contracts/interfaces/ISequenceMarketBatchPayable.md
cat contracts/interfaces/interface.ISequenceMarketBatchPayableFunctions.md >> contracts/interfaces/ISequenceMarketBatchPayable.md

rm contracts/interfaces/interface.ISequenceMarket*.md

# Add reference to interface docs in contract doc
Expand Down

0 comments on commit 8ed3009

Please sign in to comment.