Skip to content

Commit

Permalink
feat: add BUNDLE metadata to allow Phygitals offers (#644)
Browse files Browse the repository at this point in the history
* add types of metadata and some unit tests

* feat: complete new metadata types and unit tests

* implement function createVariantProductItem() to create variant items for same product

* fix test

* refector createVariantProductMetadata() using createVariantProductItem()

* fix e2e tests

* add first e2e test for bundle

* fix e2e test

* feat: add BUNDLE in subgraph

* speed up codegen/lintprettier for subgraph core-sdk package

* add metadataUri in subgraph schema at item level

* implement getBundleMetadataEntities() and ensure getProductWithVariants() consider BUNDLE offers

* code styling

* factorise code between productv1 and bundle e2e tests

* add bundleUuid in bundle metadata

* pr remarks

* fix lint

* fix subgraph test

* fix subgraph test

* fix and complete e2e tests

* PR review remarks

* add missing fields on nftItem metadata

* create an Unknown type item in bundle, do deal with unsupported item metadata types
  • Loading branch information
levalleux-ludo authored Jan 29, 2024
1 parent 0d00914 commit 3a77f41
Show file tree
Hide file tree
Showing 70 changed files with 29,768 additions and 4,093 deletions.
12 changes: 10 additions & 2 deletions contracts/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ const ACCOUNT_21 = {
"0xb360ff0a027b6c9599627235899e58b0809cc29b33b22cc5bdc615ce98f1340d"
};

const ACCOUNT_22 = {
address: "0x731d1d7Dd47602A6e929621f59bbBEb25DC61AA4",
privateKey:
"0xb37ac6d3448fa7feb090f8550036180a409e79df3cc74ac4378c7d4e8ef87414"
};

const ACCOUNTS = [
ACCOUNT_1,
ACCOUNT_2,
Expand All @@ -144,7 +150,8 @@ const ACCOUNTS = [
ACCOUNT_18,
ACCOUNT_19,
ACCOUNT_20,
ACCOUNT_21
ACCOUNT_21,
ACCOUNT_22
];

module.exports = {
Expand All @@ -169,5 +176,6 @@ module.exports = {
ACCOUNT_18,
ACCOUNT_19,
ACCOUNT_20,
ACCOUNT_21
ACCOUNT_21,
ACCOUNT_22
};
2 changes: 1 addition & 1 deletion e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:

hardhat-node:
build: ../contracts
image: hardhat-node:8319ec72c2335a49b74aeefd232ea9f0a6dfd368_6
image: hardhat-node:8319ec72c2335a49b74aeefd232ea9f0a6dfd368_7
ports:
- "8545:8545"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/accounts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
sellerMetadata,
getSellerMetadataUri
} from "./utils";
import { AuthTokenType } from "@bosonprotocol/common";
import { AuthTokenType } from "../../packages/common";

jest.setTimeout(60_000);

Expand Down
Loading

0 comments on commit 3a77f41

Please sign in to comment.