Skip to content

Commit

Permalink
feat: upgrade protocol 2.4.0 + royalties management (#674)
Browse files Browse the repository at this point in the history
* chore: upgrade protocol version

* repair subgraph

* update typechain on ethers-sdk

* adapt to createOffer new ABI

* fix lint

* fix subgraph unit tests

* fix some e2e:test

* fix some e2e tests

* fix collection e2e test

* add e2e:test for createPremintedOfferWithCondition()

* chore: add missing tests for changed method

* ensure default values for createOffer new arguments

* PR review remarks

* remove royaltyPercentage parameter from createNewCollection()

* feat: add royaltyRecipients management at seller level

* fix linter

* fix core-sdk test + implement removeRoyaltyRecipients()

* upgrade to latest protocol version after fiwing AccountHandlerABI (bosonprotocol/boson-protocol-contracts#916)

* upgrade graph-ts dep version

* create subgraph tests for group handlers

* clear previous offers from condition when a group is updated

* clean RoyaltyRecipients for seller when removed on-chain

* fix e2e test issue

* release constraints on derivedFrom array attributes (seller.royaltyRecipients and conditionEntity.offers)

* try fixing subgraph tests

* fix subgraph unit test

* change CI workflow OS version

* chore: upgrade to @graphprotocol latest versions

* some fixes

* regenerate GraphQL types and adapt to enum changes

* fix e2e test

* disable e2e concurrency (to check)

* ensure waitForGraphNodeIndexing() can't block forever

* fix subgraph failure on UnknownItemMetadataEntity

* restore previous test config, as it takes too long otherwise

* fix random issue on royalties test

* add unit tests for eth-connect-sdk

* fix lint

* add some missing subgraph tests

* add unit tests for ethers-sdk package

* add some unit tests for subgraph exchange events handler

* fix lint

* handle GroupUpdated event in the subgraph

* try fixing e2e test

* last minute changes

* manage royalty recipients when creating an offer

* fix build issue

* fix subgraph test

* handle OfferRoyaltyInfoUpdatedEvent in subgraph

* implement coreSDK updateOfferRoyaltyRecipients() updateOfferRoyaltyRecipientsBatch()

* upgrade to the latest protocol commit

* fix subgraph test

* force e2e test to rerun without cache (for complete coverage report)

* add missing metadataUri in SellerStruct

* set default RoyaltyInfo for an Offer as empty list, instead of Treasury/0

* rebuild npm package-lock.json

* clean code
  • Loading branch information
levalleux-ludo authored Mar 15, 2024
1 parent fc972d2 commit 00fe7b5
Show file tree
Hide file tree
Showing 96 changed files with 30,433 additions and 6,909 deletions.
12 changes: 10 additions & 2 deletions contracts/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ const ACCOUNT_22 = {
"0xb37ac6d3448fa7feb090f8550036180a409e79df3cc74ac4378c7d4e8ef87414"
};

const ACCOUNT_23 = {
address: "0x985D008b3236DEa71223acA9dD3829862E3F9516",
privateKey:
"0x8430df726da16759cedbc56bfebf7b6e951e3e3e9b1a7f291749a2e211955981"
};

const ACCOUNTS = [
ACCOUNT_1,
ACCOUNT_2,
Expand All @@ -151,7 +157,8 @@ const ACCOUNTS = [
ACCOUNT_19,
ACCOUNT_20,
ACCOUNT_21,
ACCOUNT_22
ACCOUNT_22,
ACCOUNT_23
];

module.exports = {
Expand All @@ -177,5 +184,6 @@ module.exports = {
ACCOUNT_19,
ACCOUNT_20,
ACCOUNT_21,
ACCOUNT_22
ACCOUNT_22,
ACCOUNT_23
};
30 changes: 27 additions & 3 deletions contracts/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,38 @@ module.exports = {
solidity: {
compilers: [
{
version: "0.8.21",
version: "0.5.17" // Mock weth contract
},
{
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 200,
runs: 50, // temporary until we upgrade compiler version
details: {
yul: true
}
},
outputSelection: {
"*": {
"*": ["evm.bytecode.object", "evm.deployedBytecode*"],
}
}
},
viaIR: true
},
{
version: "0.8.22",
settings: {
viaIR: false,
optimizer: {
enabled: true,
runs: 200,
details: {
yul: true
}
},
evmVersion: "london" // for ethereum mainnet, use shanghai, for polygon, use london
}
},
{
Expand Down Expand Up @@ -163,7 +186,8 @@ module.exports = {
"IBosonVoucher",
"MockNativeMetaTransaction",
"IBosonGroupHandler",
"MockForwarder"
"MockForwarder",
"IBosonConfigHandler"
]
}
};
Loading

0 comments on commit 00fe7b5

Please sign in to comment.