Skip to content

Commit

Permalink
(bugfix): update wagmi version (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jipperism authored Dec 14, 2023
1 parent 9478e99 commit 19efa92
Show file tree
Hide file tree
Showing 79 changed files with 6,536 additions and 4,085 deletions.
37 changes: 20 additions & 17 deletions defender/src/scripts/fix-allowlist-duplicates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,27 @@ query ClaimTokensByClaim($claimId: String!, $orderDirection: OrderDirection, $fi
`;

const fetchClaimTokenForClaimId = async (claimId: string) => {
return fetch(
"https://api.thegraph.com/subgraphs/name/hypercerts-admin/hypercerts-optimism-mainnet",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
variables: {
claimId,
first: 1000,
return (
fetch(
"https://api.thegraph.com/subgraphs/name/hypercerts-admin/hypercerts-optimism-mainnet",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
query,
}),
},
)
.then((res) => res.json())
.then((res) => res.data?.claimTokens);
body: JSON.stringify({
variables: {
claimId,
first: 1000,
},
query,
}),
},
)
.then((res) => res.json())
// @ts-ignore
.then((res) => res.data?.claimTokens)
);
};

const main = async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# BatchOrderTypehashRegistry

_LooksRare protocol team (👀,💎)_
*LooksRare protocol team (👀,💎)*

> BatchOrderTypehashRegistry
The contract generates the batch order hash that is used to compute the digest for signature verification.



## Methods

### hashBatchOrder
Expand All @@ -16,19 +18,24 @@ function hashBatchOrder(bytes32 root, uint256 proofLength) external pure returns

This function returns the hash of the concatenation of batch order type hash and merkle root.



#### Parameters

| Name | Type | Description |
| ----------- | ------- | ------------------- |
| root | bytes32 | Merkle root |
| Name | Type | Description |
|---|---|---|
| root | bytes32 | Merkle root |
| proofLength | uint256 | Merkle proof length |

#### Returns

| Name | Type | Description |
| -------------- | ------- | -------------------- |
| Name | Type | Description |
|---|---|---|
| batchOrderHash | bytes32 | The batch order hash |




## Errors

### MerkleProofTooLarge
Expand All @@ -39,8 +46,12 @@ error MerkleProofTooLarge(uint256 length)

It is returned if the length of the merkle proof provided is greater than tolerated.



#### Parameters

| Name | Type | Description |
| ------ | ------- | ------------ |
| Name | Type | Description |
|---|---|---|
| length | uint256 | Proof length |


Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# CreatorFeeManagerWithRebates

_LooksRare protocol team (👀,💎)_
*LooksRare protocol team (👀,💎)*

> CreatorFeeManagerWithRebates
This contract returns the creator fee address and the creator rebate amount.



## Methods

### STANDARD_ROYALTY_FEE_BP
Expand All @@ -16,11 +18,14 @@ function STANDARD_ROYALTY_FEE_BP() external view returns (uint256)

Standard royalty fee (in basis point).




#### Returns

| Name | Type | Description |
| ---- | ------- | ----------- |
| \_0 | uint256 | undefined |
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |

### royaltyFeeRegistry

Expand All @@ -30,11 +35,14 @@ function royaltyFeeRegistry() external view returns (contract IRoyaltyFeeRegistr

Royalty fee registry interface.




#### Returns

| Name | Type | Description |
| ---- | ---------------------------- | ----------- |
| \_0 | contract IRoyaltyFeeRegistry | undefined |
| Name | Type | Description |
|---|---|---|
| _0 | contract IRoyaltyFeeRegistry | undefined |

### viewCreatorFeeInfo

Expand All @@ -44,21 +52,26 @@ function viewCreatorFeeInfo(address collection, uint256 price, uint256[] itemIds

This function returns the creator address and calculates the creator fee amount.



#### Parameters

| Name | Type | Description |
| ---------- | --------- | ------------------ |
| collection | address | Collection address |
| price | uint256 | Transaction price |
| itemIds | uint256[] | Array of item ids |
| Name | Type | Description |
|---|---|---|
| collection | address | Collection address |
| price | uint256 | Transaction price |
| itemIds | uint256[] | Array of item ids |

#### Returns

| Name | Type | Description |
| ---------------- | ------- | ------------------ |
| creator | address | Creator address |
| Name | Type | Description |
|---|---|---|
| creator | address | Creator address |
| creatorFeeAmount | uint256 | Creator fee amount |




## Errors

### BundleEIP2981NotAllowed
Expand All @@ -69,8 +82,12 @@ error BundleEIP2981NotAllowed(address collection)

It is returned if the bundle contains multiple itemIds with different creator fee structure.



#### Parameters

| Name | Type | Description |
| ---------- | ------- | ----------- |
| collection | address | undefined |
| Name | Type | Description |
|---|---|---|
| collection | address | undefined |


Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# CreatorFeeManagerWithRoyalties

_LooksRare protocol team (👀,💎)_
*LooksRare protocol team (👀,💎)*

> CreatorFeeManagerWithRoyalties
This contract returns the creator fee address and the creator fee amount.



## Methods

### royaltyFeeRegistry
Expand All @@ -16,11 +18,14 @@ function royaltyFeeRegistry() external view returns (contract IRoyaltyFeeRegistr

Royalty fee registry interface.




#### Returns

| Name | Type | Description |
| ---- | ---------------------------- | ----------- |
| \_0 | contract IRoyaltyFeeRegistry | undefined |
| Name | Type | Description |
|---|---|---|
| _0 | contract IRoyaltyFeeRegistry | undefined |

### viewCreatorFeeInfo

Expand All @@ -30,23 +35,26 @@ function viewCreatorFeeInfo(address collection, uint256 price, uint256[] itemIds

This function returns the creator address and calculates the creator fee amount.

_There are two on-chain sources for the royalty fee to distribute. 1. RoyaltyFeeRegistry: It is an on-chain registry where creator fee is defined for all items of a collection. 2. ERC2981: The NFT Royalty Standard where royalty fee is defined at a itemId level in a collection. The on-chain logic looks up the registry first. If it does not find anything, it checks if a collection is ERC2981. If so, it fetches the proper royalty information for the itemId. For a bundle that contains multiple itemIds (for a collection using ERC2981), if the royalty fee/recipient differ among the itemIds part of the bundle, the trade reverts. This contract DOES NOT enforce any restriction for extremely high creator fee, nor verifies the creator fee fetched is inferior to the total price. If any contract relies on it to build an on-chain royalty logic, it should implement protection against: (1) high royalties (2) potential unexpected royalty changes that can occur after the creation of the order._
*There are two on-chain sources for the royalty fee to distribute. 1. RoyaltyFeeRegistry: It is an on-chain registry where creator fee is defined for all items of a collection. 2. ERC2981: The NFT Royalty Standard where royalty fee is defined at a itemId level in a collection. The on-chain logic looks up the registry first. If it does not find anything, it checks if a collection is ERC2981. If so, it fetches the proper royalty information for the itemId. For a bundle that contains multiple itemIds (for a collection using ERC2981), if the royalty fee/recipient differ among the itemIds part of the bundle, the trade reverts. This contract DOES NOT enforce any restriction for extremely high creator fee, nor verifies the creator fee fetched is inferior to the total price. If any contract relies on it to build an on-chain royalty logic, it should implement protection against: (1) high royalties (2) potential unexpected royalty changes that can occur after the creation of the order.*

#### Parameters

| Name | Type | Description |
| ---------- | --------- | ------------------ |
| collection | address | Collection address |
| price | uint256 | Transaction price |
| itemIds | uint256[] | Array of item ids |
| Name | Type | Description |
|---|---|---|
| collection | address | Collection address |
| price | uint256 | Transaction price |
| itemIds | uint256[] | Array of item ids |

#### Returns

| Name | Type | Description |
| ---------------- | ------- | ------------------ |
| creator | address | Creator address |
| Name | Type | Description |
|---|---|---|
| creator | address | Creator address |
| creatorFeeAmount | uint256 | Creator fee amount |




## Errors

### BundleEIP2981NotAllowed
Expand All @@ -57,8 +65,12 @@ error BundleEIP2981NotAllowed(address collection)

It is returned if the bundle contains multiple itemIds with different creator fee structure.



#### Parameters

| Name | Type | Description |
| ---------- | ------- | ----------- |
| collection | address | undefined |
| Name | Type | Description |
|---|---|---|
| collection | address | undefined |


Loading

0 comments on commit 19efa92

Please sign in to comment.