diff --git a/e2e/meta-tx-gateway/CHANGELOG.md b/e2e/meta-tx-gateway/CHANGELOG.md index f2a111e85..a698a1b0a 100644 --- a/e2e/meta-tx-gateway/CHANGELOG.md +++ b/e2e/meta-tx-gateway/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.7.9](https://github.com/bosonprotocol/core-components/compare/meta-tx-gateway@1.7.8...meta-tx-gateway@1.7.9) (2024-07-29) + +**Note:** Version bump only for package meta-tx-gateway + + + + + ## [1.7.8](https://github.com/bosonprotocol/core-components/compare/meta-tx-gateway@1.7.7...meta-tx-gateway@1.7.8) (2024-06-11) **Note:** Version bump only for package meta-tx-gateway diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index 589596414..b1155a903 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.9-alpha.20", + "version": "1.7.9", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20", + "@bosonprotocol/common": "^1.28.1", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/CHANGELOG.md b/e2e/opensea-api-mock/CHANGELOG.md index 355c4e476..3c57c060f 100644 --- a/e2e/opensea-api-mock/CHANGELOG.md +++ b/e2e/opensea-api-mock/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.4](https://github.com/bosonprotocol/core-components/compare/opensea-api-mock@1.0.3...opensea-api-mock@1.0.4) (2024-07-29) + +**Note:** Version bump only for package opensea-api-mock + + + + + ## [1.0.3](https://github.com/bosonprotocol/core-components/compare/opensea-api-mock@1.0.2...opensea-api-mock@1.0.3) (2024-06-11) **Note:** Version bump only for package opensea-api-mock diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index b44c0d5a6..f0abe6983 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.4-alpha.20", + "version": "1.0.4", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20", + "@bosonprotocol/common": "^1.28.1", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/e2e/tests/core-sdk.test.ts b/e2e/tests/core-sdk.test.ts index 34784d61d..a7d75e4c8 100644 --- a/e2e/tests/core-sdk.test.ts +++ b/e2e/tests/core-sdk.test.ts @@ -47,9 +47,8 @@ jest.setTimeout(60_000); describe("core-sdk", () => { describe("core user flows", () => { test("create seller and offer", async () => { - const { coreSDK, fundedWallet } = await initCoreSDKWithFundedWallet( - seedWallet - ); + const { coreSDK, fundedWallet } = + await initCoreSDKWithFundedWallet(seedWallet); const createdOffer = await createSellerAndOffer( coreSDK, @@ -69,9 +68,8 @@ describe("core-sdk", () => { }); test("create seller, then create offer", async () => { - const { coreSDK, fundedWallet } = await initCoreSDKWithFundedWallet( - seedWallet - ); + const { coreSDK, fundedWallet } = + await initCoreSDKWithFundedWallet(seedWallet); const seller = await createSeller(coreSDK, fundedWallet.address); expect(seller).toBeTruthy(); @@ -96,9 +94,8 @@ describe("core-sdk", () => { }); test("void offer", async () => { - const { coreSDK, fundedWallet } = await initCoreSDKWithFundedWallet( - seedWallet - ); + const { coreSDK, fundedWallet } = + await initCoreSDKWithFundedWallet(seedWallet); const createdOffer = await createSellerAndOffer( coreSDK, @@ -139,9 +136,8 @@ describe("core-sdk", () => { test("Create a group for multiple offers", async () => { const tokenID = Date.now().toString(); - const { sellerCoreSDK, sellerWallet } = await initSellerAndBuyerSDKs( - seedWallet - ); + const { sellerCoreSDK, sellerWallet } = + await initSellerAndBuyerSDKs(seedWallet); await ensureCreatedSeller(sellerWallet); // Create 3 offers @@ -190,9 +186,8 @@ describe("core-sdk", () => { test("createOfferWithCondition()", async () => { const tokenID = Date.now().toString(); - const { sellerCoreSDK, sellerWallet } = await initSellerAndBuyerSDKs( - seedWallet - ); + const { sellerCoreSDK, sellerWallet } = + await initSellerAndBuyerSDKs(seedWallet); await ensureCreatedSeller(sellerWallet); // Ensure the condition token is minted @@ -237,9 +232,8 @@ describe("core-sdk", () => { test("createSellerAndOfferWithCondition()", async () => { const tokenID = Date.now().toString(); - const { sellerCoreSDK, sellerWallet } = await initSellerAndBuyerSDKs( - seedWallet - ); + const { sellerCoreSDK, sellerWallet } = + await initSellerAndBuyerSDKs(seedWallet); // Ensure the condition token is minted await ensureMintedERC1155(sellerWallet, tokenID, "5"); @@ -1007,9 +1001,8 @@ describe("core-sdk", () => { await ensureMintedAndAllowedTokens([buyerWallet], offerPrice, false); // Check the allowance is not enough - const allowance = await buyerCoreSDK.getProtocolAllowance( - MOCK_ERC20_ADDRESS - ); + const allowance = + await buyerCoreSDK.getProtocolAllowance(MOCK_ERC20_ADDRESS); expect(BigNumber.from(allowance).lt(createdOffer.price)).toBe(true); const exchange = await commitToOffer({ @@ -1111,6 +1104,12 @@ describe("core-sdk", () => { expect(exchangeAfterComplete.state).toBe(ExchangeState.COMPLETED); expect(exchangeAfterComplete.completedDate).toBeTruthy(); + expect(exchangeAfterComplete.protocolFeeCollected).toBeTruthy(); + expect( + BigNumber.from(exchangeAfterComplete.protocolFeeCollected?.amount).eq( + createdOffer.protocolFee + ) + ).toBe(true); }); test("redeem + finalize batch", async () => { @@ -1148,8 +1147,20 @@ describe("core-sdk", () => { expect(exchangesAfterComplete[0].state).toBe(ExchangeState.COMPLETED); expect(exchangesAfterComplete[0].completedDate).toBeTruthy(); + expect(exchangesAfterComplete[0].protocolFeeCollected).toBeTruthy(); + expect( + BigNumber.from( + exchangesAfterComplete[0].protocolFeeCollected?.amount + ).eq(createdOffer.protocolFee) + ).toBe(true); expect(exchangesAfterComplete[1].state).toBe(ExchangeState.COMPLETED); expect(exchangesAfterComplete[1].completedDate).toBeTruthy(); + expect(exchangesAfterComplete[1].protocolFeeCollected).toBeTruthy(); + expect( + BigNumber.from( + exchangesAfterComplete[1].protocolFeeCollected?.amount + ).eq(createdOffer.protocolFee) + ).toBe(true); }); describe("disputes", () => { @@ -1336,9 +1347,8 @@ describe("core-sdk", () => { describe("getSellerByAddress()", () => { test("getSellerByAddress() retrieve the seller using the address", async () => { - const { coreSDK, fundedWallet } = await initCoreSDKWithFundedWallet( - seedWallet - ); + const { coreSDK, fundedWallet } = + await initCoreSDKWithFundedWallet(seedWallet); const seller = await createSeller(coreSDK, fundedWallet.address); expect(seller).toBeTruthy(); diff --git a/package-lock.json b/package-lock.json index c559ca6e5..bba4b40e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.9-alpha.20", + "version": "1.7.9", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20", + "@bosonprotocol/common": "^1.28.1", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.4-alpha.20", + "version": "1.0.4", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20", + "@bosonprotocol/common": "^1.28.1", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,10 +42883,10 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.28.1-alpha.20", + "version": "1.28.1", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/metadata": "^1.16.2-alpha.15", + "@bosonprotocol/metadata": "^1.16.2", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.40.5-alpha.20", + "version": "1.41.0-alpha.0", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20", + "@bosonprotocol/common": "^1.28.1", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.8-alpha.20", + "version": "1.6.8", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20" + "@bosonprotocol/common": "^1.28.1" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.5-alpha.20", + "version": "1.14.5", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20" + "@bosonprotocol/common": "^1.28.1" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,10 +43007,10 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.11.4-alpha.15", + "version": "1.11.4", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/metadata-storage": "^1.0.1-alpha.15", + "@bosonprotocol/metadata-storage": "^1.0.1", "ipfs-http-client": "^56.0.1", "multiformats": "^9.6.4", "uint8arrays": "^3.0.0" @@ -43026,10 +43026,10 @@ }, "packages/metadata": { "name": "@bosonprotocol/metadata", - "version": "1.16.2-alpha.15", + "version": "1.16.2", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/metadata-storage": "^1.0.1-alpha.15", + "@bosonprotocol/metadata-storage": "^1.0.1", "schema-to-yup": "^1.11.11" }, "devDependencies": { @@ -43043,18 +43043,18 @@ }, "packages/metadata-storage": { "name": "@bosonprotocol/metadata-storage", - "version": "1.0.1-alpha.15", + "version": "1.0.1", "license": "Apache-2.0" }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.33.0-alpha.21", + "version": "0.33.1-alpha.2", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.40.5-alpha.20", - "@bosonprotocol/ethers-sdk": "^1.14.5-alpha.20", - "@bosonprotocol/ipfs-storage": "^1.11.4-alpha.15", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.0", + "@bosonprotocol/ethers-sdk": "^1.14.5", + "@bosonprotocol/ipfs-storage": "^1.11.4", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.33.2", + "version": "1.34.0-alpha.0", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index dab31f968..4427a430c 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.28.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/common@1.28.0...@bosonprotocol/common@1.28.1) (2024-07-29) + +**Note:** Version bump only for package @bosonprotocol/common + + + + + # [1.28.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/common@1.27.3...@bosonprotocol/common@1.28.0) (2024-06-11) diff --git a/packages/common/package.json b/packages/common/package.json index 9e3e55b4b..8bb8afe05 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.28.1-alpha.20", + "version": "1.28.1", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -38,7 +38,7 @@ "typescript": "^5.1.6" }, "dependencies": { - "@bosonprotocol/metadata": "^1.16.2-alpha.15", + "@bosonprotocol/metadata": "^1.16.2", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/core-sdk/CHANGELOG.md b/packages/core-sdk/CHANGELOG.md index af22d4e2f..c71c7e6da 100644 --- a/packages/core-sdk/CHANGELOG.md +++ b/packages/core-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.5](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/core-sdk@1.40.4...@bosonprotocol/core-sdk@1.40.5) (2024-07-29) + +**Note:** Version bump only for package @bosonprotocol/core-sdk + + + + + ## [1.40.4](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/core-sdk@1.40.3...@bosonprotocol/core-sdk@1.40.4) (2024-06-11) **Note:** Version bump only for package @bosonprotocol/core-sdk diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 401fc2939..e5f970c5b 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.40.5-alpha.20", + "version": "1.41.0-alpha.0", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20", + "@bosonprotocol/common": "^1.28.1", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/core-sdk/src/exchanges/queries.graphql b/packages/core-sdk/src/exchanges/queries.graphql index d5137bff0..f04d4089d 100644 --- a/packages/core-sdk/src/exchanges/queries.graphql +++ b/packages/core-sdk/src/exchanges/queries.graphql @@ -51,4 +51,7 @@ fragment BaseExchangeFields on Exchange { seller { ...BaseSellerFields } + protocolFeeCollected { + amount + } } diff --git a/packages/core-sdk/src/subgraph.ts b/packages/core-sdk/src/subgraph.ts index 967d61b73..e58596ea9 100644 --- a/packages/core-sdk/src/subgraph.ts +++ b/packages/core-sdk/src/subgraph.ts @@ -2670,6 +2670,7 @@ export type Exchange = { finalizedDate?: Maybe; id: Scalars["ID"]["output"]; offer: Offer; + protocolFeeCollected?: Maybe; redeemedDate?: Maybe; revokedDate?: Maybe; seller: Seller; @@ -3094,6 +3095,7 @@ export type Exchange_Filter = { offer_starts_with?: InputMaybe; offer_starts_with_nocase?: InputMaybe; or?: InputMaybe>>; + protocolFeeCollected_?: InputMaybe; redeemedDate?: InputMaybe; redeemedDate_gt?: InputMaybe; redeemedDate_gte?: InputMaybe; @@ -3208,6 +3210,12 @@ export enum Exchange_OrderBy { OFFER__VOUCHERREDEEMABLEFROMDATE = "offer__voucherRedeemableFromDate", OFFER__VOUCHERREDEEMABLEUNTILDATE = "offer__voucherRedeemableUntilDate", OFFER__VOUCHERVALIDDURATION = "offer__voucherValidDuration", + PROTOCOLFEECOLLECTED = "protocolFeeCollected", + PROTOCOLFEECOLLECTED__AMOUNT = "protocolFeeCollected__amount", + PROTOCOLFEECOLLECTED__EXCHANGEID = "protocolFeeCollected__exchangeId", + PROTOCOLFEECOLLECTED__EXCHANGETOKEN = "protocolFeeCollected__exchangeToken", + PROTOCOLFEECOLLECTED__EXECUTEDBY = "protocolFeeCollected__executedBy", + PROTOCOLFEECOLLECTED__ID = "protocolFeeCollected__id", REDEEMEDDATE = "redeemedDate", REVOKEDDATE = "revokedDate", SELLER = "seller", @@ -10295,6 +10303,109 @@ export enum ProductV1Variation_OrderBy { TYPE = "type" } +export type ProtocolFeeCollected = { + __typename?: "ProtocolFeeCollected"; + amount: Scalars["BigInt"]["output"]; + exchange: Exchange; + exchangeId: Scalars["BigInt"]["output"]; + exchangeToken: Scalars["Bytes"]["output"]; + executedBy: Scalars["Bytes"]["output"]; + id: Scalars["ID"]["output"]; +}; + +export type ProtocolFeeCollected_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; + and?: InputMaybe>>; + exchange?: InputMaybe; + exchangeId?: InputMaybe; + exchangeId_gt?: InputMaybe; + exchangeId_gte?: InputMaybe; + exchangeId_in?: InputMaybe>; + exchangeId_lt?: InputMaybe; + exchangeId_lte?: InputMaybe; + exchangeId_not?: InputMaybe; + exchangeId_not_in?: InputMaybe>; + exchangeToken?: InputMaybe; + exchangeToken_contains?: InputMaybe; + exchangeToken_gt?: InputMaybe; + exchangeToken_gte?: InputMaybe; + exchangeToken_in?: InputMaybe>; + exchangeToken_lt?: InputMaybe; + exchangeToken_lte?: InputMaybe; + exchangeToken_not?: InputMaybe; + exchangeToken_not_contains?: InputMaybe; + exchangeToken_not_in?: InputMaybe>; + exchange_?: InputMaybe; + exchange_contains?: InputMaybe; + exchange_contains_nocase?: InputMaybe; + exchange_ends_with?: InputMaybe; + exchange_ends_with_nocase?: InputMaybe; + exchange_gt?: InputMaybe; + exchange_gte?: InputMaybe; + exchange_in?: InputMaybe>; + exchange_lt?: InputMaybe; + exchange_lte?: InputMaybe; + exchange_not?: InputMaybe; + exchange_not_contains?: InputMaybe; + exchange_not_contains_nocase?: InputMaybe; + exchange_not_ends_with?: InputMaybe; + exchange_not_ends_with_nocase?: InputMaybe; + exchange_not_in?: InputMaybe>; + exchange_not_starts_with?: InputMaybe; + exchange_not_starts_with_nocase?: InputMaybe; + exchange_starts_with?: InputMaybe; + exchange_starts_with_nocase?: InputMaybe; + executedBy?: InputMaybe; + executedBy_contains?: InputMaybe; + executedBy_gt?: InputMaybe; + executedBy_gte?: InputMaybe; + executedBy_in?: InputMaybe>; + executedBy_lt?: InputMaybe; + executedBy_lte?: InputMaybe; + executedBy_not?: InputMaybe; + executedBy_not_contains?: InputMaybe; + executedBy_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; +}; + +export enum ProtocolFeeCollected_OrderBy { + AMOUNT = "amount", + EXCHANGE = "exchange", + EXCHANGEID = "exchangeId", + EXCHANGETOKEN = "exchangeToken", + EXCHANGE__CANCELLEDDATE = "exchange__cancelledDate", + EXCHANGE__COMMITTEDDATE = "exchange__committedDate", + EXCHANGE__COMPLETEDDATE = "exchange__completedDate", + EXCHANGE__DISPUTED = "exchange__disputed", + EXCHANGE__DISPUTEDDATE = "exchange__disputedDate", + EXCHANGE__EXPIRED = "exchange__expired", + EXCHANGE__FINALIZEDDATE = "exchange__finalizedDate", + EXCHANGE__ID = "exchange__id", + EXCHANGE__REDEEMEDDATE = "exchange__redeemedDate", + EXCHANGE__REVOKEDDATE = "exchange__revokedDate", + EXCHANGE__STATE = "exchange__state", + EXCHANGE__VALIDUNTILDATE = "exchange__validUntilDate", + EXECUTEDBY = "executedBy", + ID = "id" +} + export type Query = { __typename?: "Query"; /** Access to subgraph metadata */ @@ -10390,6 +10501,8 @@ export type Query = { productV1Variants: Array; productV1Variation?: Maybe; productV1Variations: Array; + protocolFeeCollected?: Maybe; + protocolFeeCollecteds: Array; rangeEntities: Array; rangeEntity?: Maybe; royaltyInfo?: Maybe; @@ -11159,6 +11272,22 @@ export type QueryProductV1VariationsArgs = { where?: InputMaybe; }; +export type QueryProtocolFeeCollectedArgs = { + block?: InputMaybe; + id: Scalars["ID"]["input"]; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryProtocolFeeCollectedsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + export type QueryRangeEntitiesArgs = { block?: InputMaybe; first?: InputMaybe; @@ -13021,6 +13150,8 @@ export type Subscription = { productV1Variants: Array; productV1Variation?: Maybe; productV1Variations: Array; + protocolFeeCollected?: Maybe; + protocolFeeCollecteds: Array; rangeEntities: Array; rangeEntity?: Maybe; royaltyInfo?: Maybe; @@ -13790,6 +13921,22 @@ export type SubscriptionProductV1VariationsArgs = { where?: InputMaybe; }; +export type SubscriptionProtocolFeeCollectedArgs = { + block?: InputMaybe; + id: Scalars["ID"]["input"]; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionProtocolFeeCollectedsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + export type SubscriptionRangeEntitiesArgs = { block?: InputMaybe; first?: InputMaybe; @@ -15715,6 +15862,10 @@ export type GetSellerByIdQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; logs?: Array< | { @@ -17249,6 +17400,10 @@ export type GetSellersQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; logs?: Array< | { @@ -17558,6 +17713,10 @@ export type GetBuyerByIdQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; logs?: Array< | { @@ -17805,6 +17964,10 @@ export type GetBuyersQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; logs?: Array< | { @@ -24468,6 +24631,10 @@ export type SellerFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; logs?: Array< | { @@ -24903,6 +25070,10 @@ export type BuyerFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; logs?: Array< | { @@ -26473,6 +26644,10 @@ export type GetDisputeByIdQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }; seller: { __typename?: "Seller"; @@ -26712,6 +26887,10 @@ export type GetDisputesQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }; seller: { __typename?: "Seller"; @@ -26941,6 +27120,10 @@ export type DisputeFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }; seller: { __typename?: "Seller"; @@ -32131,6 +32314,10 @@ export type GetExchangeByIdQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; } | null; }; @@ -33441,6 +33628,10 @@ export type GetExchangesQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; }; @@ -34724,6 +34915,10 @@ export type ExchangeFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }; export type BaseExchangeFieldsFragment = { @@ -34841,6 +35036,10 @@ export type BaseExchangeFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }; export type GetFundsByIdQueryVariables = Exact<{ @@ -40361,6 +40560,10 @@ export type GetBundleMetadataEntityByIdQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -42247,6 +42450,10 @@ export type GetBundleMetadataEntitiesQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -44123,6 +44330,10 @@ export type BundleMetadataEntityFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -45986,6 +46197,10 @@ export type BaseBundleMetadataEntityFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -48104,6 +48319,10 @@ export type GetProductV1ProductsWithVariantsQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -49442,6 +49661,10 @@ export type GetProductV1ProductsWithVariantsQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -51523,6 +51746,10 @@ export type GetAllProductsWithNotVoidedVariantsQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -52861,6 +53088,10 @@ export type GetAllProductsWithNotVoidedVariantsQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -54956,6 +55187,10 @@ export type GetProductV1MetadataEntityByIdQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -56733,6 +56968,10 @@ export type GetProductV1MetadataEntitiesQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -58500,6 +58739,10 @@ export type ProductV1MetadataEntityFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -60254,6 +60497,10 @@ export type BaseProductV1MetadataEntityFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -62234,6 +62481,10 @@ export type BaseProductV1ProductWithVariantsFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -63572,6 +63823,10 @@ export type BaseProductV1ProductWithVariantsFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -65642,6 +65897,10 @@ export type BaseProductV1ProductWithNotVoidedVariantsFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -66980,6 +67239,10 @@ export type BaseProductV1ProductWithNotVoidedVariantsFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -69266,6 +69529,10 @@ export type GetOfferByIdQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -70570,6 +70837,10 @@ export type GetOffersQueryQuery = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -71966,6 +72237,10 @@ export type OfferFieldsFragment = { }> | null; } | null; }; + protocolFeeCollected?: { + __typename?: "ProtocolFeeCollected"; + amount: string; + } | null; }>; royaltyInfos: Array<{ __typename?: "RoyaltyInfo"; @@ -74998,6 +75273,9 @@ export const BaseExchangeFieldsFragmentDoc = gql` seller { ...BaseSellerFields } + protocolFeeCollected { + amount + } } ${BaseDisputeFieldsFragmentDoc} ${BaseBuyerFieldsFragmentDoc} diff --git a/packages/eth-connect-sdk/CHANGELOG.md b/packages/eth-connect-sdk/CHANGELOG.md index 3c2489e50..48e349d53 100644 --- a/packages/eth-connect-sdk/CHANGELOG.md +++ b/packages/eth-connect-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.6.8](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/eth-connect-sdk@1.6.7...@bosonprotocol/eth-connect-sdk@1.6.8) (2024-07-29) + +**Note:** Version bump only for package @bosonprotocol/eth-connect-sdk + + + + + ## [1.6.7](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/eth-connect-sdk@1.6.6...@bosonprotocol/eth-connect-sdk@1.6.7) (2024-06-11) **Note:** Version bump only for package @bosonprotocol/eth-connect-sdk diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index f01e16bd8..12f847579 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.8-alpha.20", + "version": "1.6.8", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20" + "@bosonprotocol/common": "^1.28.1" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/CHANGELOG.md b/packages/ethers-sdk/CHANGELOG.md index ed02c7651..0343c3695 100644 --- a/packages/ethers-sdk/CHANGELOG.md +++ b/packages/ethers-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.14.5](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/ethers-sdk@1.14.4...@bosonprotocol/ethers-sdk@1.14.5) (2024-07-29) + +**Note:** Version bump only for package @bosonprotocol/ethers-sdk + + + + + ## [1.14.4](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/ethers-sdk@1.14.3...@bosonprotocol/ethers-sdk@1.14.4) (2024-06-11) **Note:** Version bump only for package @bosonprotocol/ethers-sdk diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index c79100918..76dde4110 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.5-alpha.20", + "version": "1.14.5", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.1-alpha.20" + "@bosonprotocol/common": "^1.28.1" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/CHANGELOG.md b/packages/ipfs-storage/CHANGELOG.md index 1307093c9..88ec06461 100644 --- a/packages/ipfs-storage/CHANGELOG.md +++ b/packages/ipfs-storage/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.11.4](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/ipfs-storage@1.11.3...@bosonprotocol/ipfs-storage@1.11.4) (2024-07-29) + +**Note:** Version bump only for package @bosonprotocol/ipfs-storage + + + + + ## [1.11.3](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/ipfs-storage@1.11.2...@bosonprotocol/ipfs-storage@1.11.3) (2024-04-15) **Note:** Version bump only for package @bosonprotocol/ipfs-storage diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 329b4e073..660ac76fa 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.11.4-alpha.15", + "version": "1.11.4", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -39,7 +39,7 @@ "typescript": "^5.1.6" }, "dependencies": { - "@bosonprotocol/metadata-storage": "^1.0.1-alpha.15", + "@bosonprotocol/metadata-storage": "^1.0.1", "ipfs-http-client": "^56.0.1", "multiformats": "^9.6.4", "uint8arrays": "^3.0.0" diff --git a/packages/metadata-storage/CHANGELOG.md b/packages/metadata-storage/CHANGELOG.md new file mode 100644 index 000000000..380e96982 --- /dev/null +++ b/packages/metadata-storage/CHANGELOG.md @@ -0,0 +1,8 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## 1.0.1 (2024-07-29) + +**Note:** Version bump only for package @bosonprotocol/metadata-storage diff --git a/packages/metadata-storage/package.json b/packages/metadata-storage/package.json index 0c32732f6..6bc86534d 100644 --- a/packages/metadata-storage/package.json +++ b/packages/metadata-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/metadata-storage", - "version": "1.0.1-alpha.15", + "version": "1.0.1", "description": "defines the interfaces for metadata-storage implementation (eg. ipfs-storage)", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index b2cb039e4..4ee62e6ed 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.16.2](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/metadata@1.16.1...@bosonprotocol/metadata@1.16.2) (2024-07-29) + +**Note:** Version bump only for package @bosonprotocol/metadata + + + + + ## [1.16.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/metadata@1.16.0...@bosonprotocol/metadata@1.16.1) (2024-04-15) **Note:** Version bump only for package @bosonprotocol/metadata diff --git a/packages/metadata/package.json b/packages/metadata/package.json index b7d4bac00..15446145a 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/metadata", - "version": "1.16.2-alpha.15", + "version": "1.16.2", "description": "Offer metadata schemas, types and tools of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -39,7 +39,7 @@ "typescript": "^5.1.6" }, "dependencies": { - "@bosonprotocol/metadata-storage": "^1.0.1-alpha.15", + "@bosonprotocol/metadata-storage": "^1.0.1", "schema-to-yup": "^1.11.11" }, "overrides": { diff --git a/packages/react-kit/CHANGELOG.md b/packages/react-kit/CHANGELOG.md index 8dc130f4a..4ce05fc11 100644 --- a/packages/react-kit/CHANGELOG.md +++ b/packages/react-kit/CHANGELOG.md @@ -3,6 +3,37 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.33.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.32.0...@bosonprotocol/react-kit@0.33.0) (2024-07-29) + + +### Bug Fixes + +* add Local chain in chain info ([#777](https://github.com/bosonprotocol/core-components/issues/777)) ([8d3a446](https://github.com/bosonprotocol/core-components/commit/8d3a44679ee0ff83d626abba6971c3c4bbac324c)) +* country select issue ([#767](https://github.com/bosonprotocol/core-components/issues/767)) ([fb9c74f](https://github.com/bosonprotocol/core-components/commit/fb9c74f7a83b816d0d0a9e96472cc4bef52238d4)) +* grid and typography components ([#758](https://github.com/bosonprotocol/core-components/issues/758)) ([874192b](https://github.com/bosonprotocol/core-components/commit/874192bca265c21dbe12421c2f6d1c6f2ce41eee)) +* missing use of hideError prop in checkbox, not it's used ([#773](https://github.com/bosonprotocol/core-components/issues/773)) ([99cc9cf](https://github.com/bosonprotocol/core-components/commit/99cc9cf3429c16ca7e0df5e4c6170c744d6df999)) +* remove timeout video component ([#764](https://github.com/bosonprotocol/core-components/issues/764)) ([80f3761](https://github.com/bosonprotocol/core-components/commit/80f376111b4900907ec68bbe8abf2325f991b08f)) +* set touched and add border when error ([#768](https://github.com/bosonprotocol/core-components/issues/768)) ([cf066e0](https://github.com/bosonprotocol/core-components/commit/cf066e0530207a09995db548e40f7ba6f7c439de)) +* useProvider ([#756](https://github.com/bosonprotocol/core-components/issues/756)) ([fa6ad68](https://github.com/bosonprotocol/core-components/commit/fa6ad68614b6478227ef098586560f4e0a87d9ab)) +* video component ([#765](https://github.com/bosonprotocol/core-components/issues/765)) ([7c19ad8](https://github.com/bosonprotocol/core-components/commit/7c19ad8cdf3cd98ab5e75fb5d1d7cc1bba9c3440)) +* video error state ([#763](https://github.com/bosonprotocol/core-components/issues/763)) ([f123c52](https://github.com/bosonprotocol/core-components/commit/f123c52352a60b4f976d0e230a0aeabb4f6ccdb0)) + + +### Features + +* add border radius unit to upload component in react-kit ([#775](https://github.com/bosonprotocol/core-components/issues/775)) ([f54a140](https://github.com/bosonprotocol/core-components/commit/f54a140a9ef08be0a2447c8629e66414d3aa1380)) +* add cardCta component ([#761](https://github.com/bosonprotocol/core-components/issues/761)) ([8248515](https://github.com/bosonprotocol/core-components/commit/8248515dd1ff61283245f5d1175d775f709a8332)) +* add more styles to regular select and country select ([#769](https://github.com/bosonprotocol/core-components/issues/769)) ([1d29415](https://github.com/bosonprotocol/core-components/commit/1d2941564bf2d2e1f897404b3d2fd4e32eb9237d)) +* add props to various components and theme prop to upload ([#770](https://github.com/bosonprotocol/core-components/issues/770)) ([994fcd4](https://github.com/bosonprotocol/core-components/commit/994fcd4ec44e98de16bd2c3bdc84d4d4150e185a)) +* add some more stylying props to selects ([#771](https://github.com/bosonprotocol/core-components/issues/771)) ([3ea1c21](https://github.com/bosonprotocol/core-components/commit/3ea1c218d5de11c3da08a141f8745ef3b4593bf4)) +* export country select ([#755](https://github.com/bosonprotocol/core-components/issues/755)) ([afb0bba](https://github.com/bosonprotocol/core-components/commit/afb0bbab4587315b8b89908b57fe9f79c629136b)) +* make checkbox generic ([#772](https://github.com/bosonprotocol/core-components/issues/772)) ([a495789](https://github.com/bosonprotocol/core-components/commit/a495789989325100cc565d9dcae8127f1d420b04)) +* make select component generic via a theme prop ([#766](https://github.com/bosonprotocol/core-components/issues/766)) ([e334aed](https://github.com/bosonprotocol/core-components/commit/e334aed0b8332555b6bf8e081c3a49e973fe0c3d)) + + + + + # [0.32.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.31.1...@bosonprotocol/react-kit@0.32.0) (2024-06-11) diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 2a516e968..d8cb2697d 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.33.0-alpha.21", + "version": "0.33.1-alpha.2", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.40.5-alpha.20", - "@bosonprotocol/ethers-sdk": "^1.14.5-alpha.20", - "@bosonprotocol/ipfs-storage": "^1.11.4-alpha.15", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.0", + "@bosonprotocol/ethers-sdk": "^1.14.5", + "@bosonprotocol/ipfs-storage": "^1.11.4", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/react-kit/src/components/buttons/CommitButtonView.tsx b/packages/react-kit/src/components/buttons/CommitButtonView.tsx index 4b07c6bfd..974fe4560 100644 --- a/packages/react-kit/src/components/buttons/CommitButtonView.tsx +++ b/packages/react-kit/src/components/buttons/CommitButtonView.tsx @@ -56,6 +56,10 @@ const Wrapper = styled.div` ${StyledButton} { transition: background 150ms ease-in-out; + padding: 0.75rem 0.625rem; + svg { + max-width: 100%; + } } `; diff --git a/packages/react-kit/src/components/form/Select.tsx b/packages/react-kit/src/components/form/Select.tsx index 030fa6564..9f17f404f 100644 --- a/packages/react-kit/src/components/form/Select.tsx +++ b/packages/react-kit/src/components/form/Select.tsx @@ -101,7 +101,7 @@ const customStyles = ( } }); -export default function SelectComponent({ +export default function SelectComponent({ name, options, placeholder = "Choose...", @@ -111,8 +111,9 @@ export default function SelectComponent({ errorMessage, onChange, theme, + isMulti, ...props -}: SelectProps) { +}: SelectProps) { const [field, meta, helpers] = useField(name); const displayErrorMessage = meta.error && meta.touched && !errorMessage @@ -124,7 +125,9 @@ export default function SelectComponent({ const displayError = typeof displayErrorMessage === "string" && displayErrorMessage !== ""; - const handleChange = (option: SelectDataProps) => { + const handleChange = ( + option: Parameters>[0] + ) => { if (!meta.touched) { helpers.setTouched(true); } @@ -143,6 +146,7 @@ export default function SelectComponent({ styles={customStyles(displayErrorMessage, theme)} {...field} {...props} + isMulti={isMulti} placeholder={placeholder} options={options} value={field.value} @@ -151,7 +155,7 @@ export default function SelectComponent({ isSearchable={isSearchable} isClearable={isClearable} isDisabled={disabled} - isOptionDisabled={(option) => option.disabled} + isOptionDisabled={(option) => !!option.disabled} /> {" "} diff --git a/packages/react-kit/src/components/form/types.ts b/packages/react-kit/src/components/form/types.ts index 3fed19dd2..66bb0ae5e 100644 --- a/packages/react-kit/src/components/form/types.ts +++ b/packages/react-kit/src/components/form/types.ts @@ -1,5 +1,5 @@ import { ReactNode } from "react"; -import { CSSObjectWithLabel, SingleValue } from "react-select"; +import { CSSObjectWithLabel, MultiValue, SingleValue } from "react-select"; import { CSSProperties } from "styled-components"; import { ImageEditorModalProps } from "./Upload/ImageEditorModal/ImageEditorModal"; import type { @@ -86,14 +86,19 @@ export interface BaseSelectProps { onChange?: OnChange; } -export interface SelectProps extends BaseProps { - isMulti?: boolean; +export interface SelectProps + extends BaseProps { + isMulti?: M; disabled?: boolean; isClearable?: boolean; isSearchable?: boolean; options: Array | Readonly>; errorMessage?: string; - onChange?: (option: SelectDataProps) => void; + onChange?: ( + option: M extends true + ? MultiValue> + : SingleValue> + ) => void; label?: string; theme?: Partial<{ control: Partial & diff --git a/packages/react-kit/src/index.tsx b/packages/react-kit/src/index.tsx index 59d4a211e..9db4658b7 100644 --- a/packages/react-kit/src/index.tsx +++ b/packages/react-kit/src/index.tsx @@ -1,94 +1,95 @@ -export { AuthTokenType } from "@bosonprotocol/common"; -export * from "@bosonprotocol/core-sdk"; -export * from "@bosonprotocol/ethers-sdk"; -export * from "@bosonprotocol/ipfs-storage"; -export { - default as ThemedButton, - IButton, - bosonButtonThemes -} from "./components/ui/ThemedButton"; -export * from "./components/ui/zIndex"; -export * from "./components/ui/buttonSize"; -export * from "./components/scroll/ScrollToID"; -export * from "./components/scroll/ScrollToTop"; -export * from "./components/buttons/Button"; export * from "./components/buttons/BaseButton"; -export * from "./components/buttons/CommitButtonView"; export * from "./components/buttons/BurgerButton"; +export * from "./components/buttons/Button"; +export * from "./components/buttons/CommitButtonView"; export * from "./components/config/ConfigProvider"; +export * from "./components/cta/dispute/DecideDisputeButton"; +export * from "./components/cta/dispute/EscalateDisputeButton"; +export * from "./components/cta/dispute/ExpireDisputeButton"; +export * from "./components/cta/dispute/ExpireEscalationDisputeButton"; +export * from "./components/cta/dispute/ExtendDisputeTimeoutButton"; +export * from "./components/cta/dispute/RaiseDisputeButton"; +export * from "./components/cta/dispute/RefuseDisputeButton"; +export * from "./components/cta/dispute/ResolveDisputeButton"; +export * from "./components/cta/dispute/RetractDisputeButton"; export * from "./components/cta/exchange/BatchCompleteButton"; export * from "./components/cta/exchange/CancelButton"; export * from "./components/cta/exchange/CompleteButton"; export * from "./components/cta/exchange/ExpireButton"; export * from "./components/cta/exchange/RedeemButton"; export * from "./components/cta/exchange/RevokeButton"; -export * from "./components/cta/offer/CommitButton"; -export * from "./components/cta/offer/VoidButton"; -export * from "./components/cta/offer/BatchVoidButton"; -export * from "./components/cta/offer/CreateOfferButton"; export * from "./components/cta/funds/DepositFundsButton"; -export * from "./components/cta/funds/WithdrawFundsButton"; export * from "./components/cta/funds/WithdrawAllFundsButton"; +export * from "./components/cta/funds/WithdrawFundsButton"; +export * from "./components/cta/offer/BatchVoidButton"; +export * from "./components/cta/offer/CommitButton"; +export * from "./components/cta/offer/CreateOfferButton"; +export * from "./components/cta/offer/VoidButton"; export * from "./components/currencyDisplay/CurrencyDisplay"; +export * from "./components/error/ErrorMessage"; +export * from "./components/error/SimpleError"; export * from "./components/exchangeCard/ExchangeCard"; +export * from "./components/form"; export * from "./components/image/Image"; -export * from "./components/ui/IpfsImage"; -export { Video, VideoProps } from "./components/ui/Video"; -export * from "./components/ui/loading/Loading"; -export * from "./components/productCard/ProductCard"; -export * from "./components/productCard/const"; -export * from "./components/skeleton/ProductCardSkeleton"; -export * from "./components/skeleton/CollectionsCardSkeleton"; -export { LoadingBubble } from "./components/skeleton/common"; -export * from "./components/searchBar/SearchBar"; -export * from "./components/tooltip/Tooltip"; -export * from "./components/cta/dispute/RaiseDisputeButton"; -export * from "./components/cta/dispute/ResolveDisputeButton"; -export * from "./components/cta/dispute/RetractDisputeButton"; -export * from "./components/cta/dispute/ExtendDisputeTimeoutButton"; -export * from "./components/cta/dispute/ExpireDisputeButton"; -export * from "./components/cta/dispute/EscalateDisputeButton"; -export * from "./components/cta/dispute/RefuseDisputeButton"; -export * from "./components/cta/dispute/DecideDisputeButton"; -export * from "./components/cta/dispute/ExpireEscalationDisputeButton"; -export { default as ConnectButton } from "./components/wallet/ConnectButton"; -export * from "./components/widgets/index"; -export * as hooks from "./hooks"; -export * from "./theme"; +export * from "./components/ipfs/IpfsProvider"; export * from "./components/magicLink/Login"; export * from "./components/magicLink/MagicContext"; export * from "./components/magicLink/MagicProvider"; export * from "./components/magicLink/UserContext"; -export * from "./components/modal/components/common/OfferFullDescription/ExternalOfferFullDescription"; +export * from "./components/modal/components/Commit/DetailView/ExternalCommitDetailView"; export * from "./components/modal/components/common/detail/useGetOfferDetailData"; -export * from "./components/modal/components/PurchaseOverview/PurchaseOverview"; +export * from "./components/modal/components/common/OfferFullDescription/ExternalOfferFullDescription"; export * from "./components/modal/components/common/StepsOverview/PurchaseOverview"; -export * from "./components/modal/components/Commit/DetailView/ExternalCommitDetailView"; +export * from "./components/modal/components/PurchaseOverview/PurchaseOverview"; export * from "./components/modal/components/Redeem/DetailView/ExternalExchangeDetailView"; +export * from "./components/portal/Portal"; +export * from "./components/productCard/const"; +export * from "./components/productCard/ProductCard"; +export * from "./components/scroll/ScrollToID"; +export * from "./components/scroll/ScrollToTop"; +export * from "./components/searchBar/SearchBar"; +export * from "./components/skeleton/CollectionsCardSkeleton"; +export { LoadingBubble } from "./components/skeleton/common"; +export * from "./components/skeleton/ProductCardSkeleton"; +export * from "./components/step/MultiSteps"; +export * from "./components/tooltip/Tooltip"; +export * from "./components/ui/buttonSize"; +export * from "./components/ui/CardCTA"; export * from "./components/ui/Grid"; export * from "./components/ui/GridContainer"; -export * from "./components/ui/Typography"; +export * from "./components/ui/IpfsImage"; +export * from "./components/ui/loading/Loading"; export * from "./components/ui/MuteButton"; -export * from "./components/ui/CardCTA"; -export * from "./components/form"; -export * from "./lib/magicLink/logout"; +export { + bosonButtonThemes, + IButton, + default as ThemedButton +} from "./components/ui/ThemedButton"; +export * from "./components/ui/Typography"; +export { Video, VideoProps } from "./components/ui/Video"; +export * from "./components/ui/zIndex"; +export { default as ConnectButton } from "./components/wallet/ConnectButton"; +export * from "./components/wallet2/accountDrawer/index"; +export * from "./components/wallet2/selector/ChainSelector"; +export * from "./components/wallet2/web3Provider/index"; +export * from "./components/wallet2/web3Status/index"; +export * from "./components/widgets/index"; +export * as hooks from "./hooks"; +export * from "./lib/bundle/const"; +export * from "./lib/bundle/filter"; export * from "./lib/bytes/bytesToSize"; -export * from "./lib/magicLink/provider"; export * from "./lib/const/networks"; export * from "./lib/errors/transactions"; -export * from "./lib/offer/getIsOfferExpired"; -export * from "./lib/bundle/filter"; -export * from "./lib/bundle/const"; +export * from "./lib/ipfs/ipfs"; +export * from "./lib/magicLink/logout"; +export * from "./lib/magicLink/provider"; export * from "./lib/offer/filter"; -export * from "./components/wallet2/selector/ChainSelector"; -export * from "./components/wallet2/web3Status/index"; -export * from "./components/wallet2/web3Provider/index"; -export * from "./components/wallet2/accountDrawer/index"; -export * from "./components/portal/Portal"; -export * from "./components/error/ErrorMessage"; -export * from "./components/error/SimpleError"; -export * from "./components/step/MultiSteps"; -export * from "./components/ipfs/IpfsProvider"; -export * from "./types/helpers"; -export * from "./lib/url/url"; +export * from "./lib/offer/getIsOfferExpired"; export * from "./lib/promises/promises"; +export * from "./lib/url/url"; +export * from "./theme"; +export * from "./types/helpers"; +export { AuthTokenType } from "@bosonprotocol/common"; +export * from "@bosonprotocol/core-sdk"; +export * from "@bosonprotocol/ethers-sdk"; +export * from "@bosonprotocol/ipfs-storage"; diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 03e0e3499..6138fdb61 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.33.2", + "version": "1.34.0-alpha.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index f44defe2b..a76b46492 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -672,6 +672,7 @@ type Exchange @entity { disputedDate: BigInt expired: Boolean! dispute: Dispute + protocolFeeCollected: ProtocolFeeCollected @derivedFrom(field: "exchange") } """ @@ -940,6 +941,15 @@ type FundsEventLog implements EventLog @entity { funds: FundsEntity! } +type ProtocolFeeCollected @entity { + id: ID! + exchangeId: BigInt!, + exchange: Exchange!, + exchangeToken: Bytes!, + amount: BigInt!, + executedBy: Bytes! +} + type DisputeEventLog implements EventLog @entity { id: ID! hash: String! diff --git a/packages/subgraph/src/mappings/funds-handler.ts b/packages/subgraph/src/mappings/funds-handler.ts index 59359f26b..f27d83b76 100644 --- a/packages/subgraph/src/mappings/funds-handler.ts +++ b/packages/subgraph/src/mappings/funds-handler.ts @@ -1,11 +1,17 @@ +/* eslint-disable @typescript-eslint/ban-types */ import { log, Address, BigInt, Bytes } from "@graphprotocol/graph-ts"; import { FundsDeposited, FundsReleased, FundsWithdrawn, - FundsEncumbered + FundsEncumbered, + ProtocolFeeCollected as ProtocolFeeCollectedEvent } from "../../generated/BosonFundsHandler/IBosonFundsHandler"; -import { FundsEntity, Seller } from "../../generated/schema"; +import { + FundsEntity, + Seller, + ProtocolFeeCollected +} from "../../generated/schema"; import { saveExchangeToken } from "../entities/token"; import { saveFundsEventLog } from "../entities/event-log"; @@ -145,3 +151,24 @@ function handleIncreasingFundsEvent( function getFundsEntityId(accountId: BigInt, tokenAddress: Bytes): string { return `${accountId.toString()}-${tokenAddress.toHexString()}`; } + +export function handleProtocolFeeCollectedEvent( + event: ProtocolFeeCollectedEvent +): void { + const protocolFeeCollectedId = event.params.exchangeId.toString(); + let protocolFeeCollected = ProtocolFeeCollected.load(protocolFeeCollectedId); + if (protocolFeeCollected) { + // Warning + log.warning("protocolFeeCollected already exists with ID {}", [ + protocolFeeCollectedId + ]); + } else { + protocolFeeCollected = new ProtocolFeeCollected(protocolFeeCollectedId); + } + protocolFeeCollected.amount = event.params.amount; + protocolFeeCollected.exchange = event.params.exchangeId.toString(); + protocolFeeCollected.exchangeId = event.params.exchangeId; + protocolFeeCollected.exchangeToken = event.params.exchangeToken; + protocolFeeCollected.executedBy = event.params.executedBy; + protocolFeeCollected.save(); +} diff --git a/packages/subgraph/subgraph.template.yaml b/packages/subgraph/subgraph.template.yaml index 30c73a364..2ef807ca4 100644 --- a/packages/subgraph/subgraph.template.yaml +++ b/packages/subgraph/subgraph.template.yaml @@ -267,6 +267,8 @@ dataSources: handler: handleFundsEncumberedEvent - event: FundsWithdrawn(indexed uint256,indexed address,indexed address,uint256,address) handler: handleFundsWithdrawnEvent + - event: ProtocolFeeCollected(indexed uint256,indexed address,uint256,indexed address) + handler: handleProtocolFeeCollectedEvent file: ./src/mappings/funds-handler.ts - kind: ethereum/contract name: BosonDisputeHandler