Skip to content

Commit

Permalink
Merge pull request #1196 from thesandboxgame/merge/latest
Browse files Browse the repository at this point in the history
Merge/latest
  • Loading branch information
atkinsonholly authored Oct 4, 2023
2 parents 557eab0 + cafdd02 commit 48025e0
Show file tree
Hide file tree
Showing 67 changed files with 51,469 additions and 824 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package-lock.json
.env
yarn.error.log
yarn-error.log
Expand Down
1 change: 1 addition & 0 deletions packages/asset/.solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}
],
"compiler-version": ["error", "^0.8.0"],
"custom-errors": "off",
"func-visibility": ["error", {"ignoreConstructors": true}]
}
}
3 changes: 1 addition & 2 deletions packages/asset/contracts/Asset.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import {
MultiRoyaltyDistributor
} from "@sandbox-smart-contracts/dependency-royalty-management/contracts/MultiRoyaltyDistributor.sol";
import {
OperatorFiltererUpgradeable,
IOperatorFilterRegistry
OperatorFiltererUpgradeable
} from "@sandbox-smart-contracts/dependency-operator-filter/contracts/OperatorFiltererUpgradeable.sol";
import {TokenIdUtils} from "./libraries/TokenIdUtils.sol";
import {IAsset} from "./interfaces/IAsset.sol";
Expand Down
6 changes: 3 additions & 3 deletions packages/asset/contracts/AssetCreate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ contract AssetCreate is
"AssetCreate: Invalid signature"
);

require(tiers.length == amounts.length, "AssetCreate: Arrays must be same length");
require(amounts.length == metadataHashes.length, "AssetCreate: Arrays must be same length");
require(metadataHashes.length == revealed.length, "AssetCreate: Arrays must be same length");
require(tiers.length == amounts.length, "AssetCreate: 1-Array lengths");
require(amounts.length == metadataHashes.length, "AssetCreate: 2-Array lengths");
require(metadataHashes.length == revealed.length, "AssetCreate: 3-Array lengths");

uint256[] memory tokenIds = new uint256[](tiers.length);
uint256[] memory tiersToBurn = new uint256[](tiers.length);
Expand Down
2 changes: 1 addition & 1 deletion packages/asset/contracts/AuthSuperValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ contract AuthSuperValidator is AccessControl {
/// @param role Role to renounce
/// @param account Account to renounce the role for
function renounceRole(bytes32 role, address account) public override {
require(role != DEFAULT_ADMIN_ROLE, "AuthSuperValidator: cant renounce admin role");
require(role != DEFAULT_ADMIN_ROLE, "AuthSuperValidator: Admin needed");
super.renounceRole(role, account);
}
}
3 changes: 1 addition & 2 deletions packages/asset/contracts/Catalyst.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import {
} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {
OperatorFiltererUpgradeable,
IOperatorFilterRegistry
OperatorFiltererUpgradeable
} from "@sandbox-smart-contracts/dependency-operator-filter/contracts/OperatorFiltererUpgradeable.sol";
import {
RoyaltyDistributor
Expand Down
5 changes: 4 additions & 1 deletion packages/asset/contracts/mock/MockCatalyst.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

pragma solidity 0.8.18;

import {Catalyst, IOperatorFilterRegistry} from "../Catalyst.sol";
import {Catalyst} from "../Catalyst.sol";
import {
IOperatorFilterRegistry
} from "@sandbox-smart-contracts/dependency-operator-filter/contracts/OperatorFiltererUpgradeable.sol";

contract MockCatalyst is Catalyst {
/// @notice sets registry and subscribe to subscription
Expand Down
2 changes: 1 addition & 1 deletion packages/asset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"operator-filter-registry": "^1.4.2",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "1.0.0-beta.11",
"solhint": "^3.4.1",
"solhint": "^3.6.2",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.8.2",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/asset/test/AssetCreate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ describe('AssetCreate (/packages/asset/contracts/AssetCreate.sol)', function ()
[true, true],
[...metadataHashes, additionalMetadataHash]
)
).to.be.revertedWith('AssetCreate: Arrays must be same length');
).to.be.revertedWith('AssetCreate: 2-Array lengths');
});
it('should revert if amounts mismatch signed values', async function () {
const {
Expand Down
2 changes: 1 addition & 1 deletion packages/asset/test/AuthSuperValidator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('AuthSuperValidator, (/packages/asset/contracts/AuthSuperValidator.sol)
DEFAULT_ADMIN_ROLE,
authValidatorAdmin.address
)
).to.be.revertedWith('AuthSuperValidator: cant renounce admin role');
).to.be.revertedWith('AuthSuperValidator: Admin needed');
});
it('should allow admin to set signer for a given contract address', async function () {
const {MockContract, AuthValidatorContractAsAdmin, backendSigner} =
Expand Down
11 changes: 11 additions & 0 deletions packages/core/data/landSales/LandPreSale_27/bundles.mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"170": [],
"171": [],
"172": [],
"173": [],
"174": [],
"175": [],
"176": [],
"177": [],
"178": []
}
11 changes: 11 additions & 0 deletions packages/core/data/landSales/LandPreSale_27/bundles.testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"170": [],
"171": [],
"172": [],
"173": [],
"174": [],
"175": [],
"176": [],
"177": [],
"178": []
}
Loading

1 comment on commit 48025e0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

96.15%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/asset/contracts
   Asset.sol94.53%89.58%96.43%98.08%115, 206, 308, 308–309, 75
   AssetCreate.sol94.51%83.33%100%100%138, 140, 173, 293, 72
   AssetReveal.sol94.35%86.21%96.55%98.89%143, 147, 181, 376, 416, 424, 441, 75, 98
   AuthSuperValidator.sol90%83.33%100%88.89%51–52
   Catalyst.sol95%91.94%95.45%98.21%124, 126, 139, 151, 223, 79
packages/asset/contracts/interfaces
   IAsset.sol100%100%100%100%
   IAssetCreate.sol100%100%100%100%
   IAssetReveal.sol100%100%100%100%
   ICatalyst.sol100%100%100%100%
   ITokenUtils.sol100%100%100%100%
packages/asset/contracts/libraries
   TokenIdUtils.sol100%100%100%100%
packages/dependency-metatx/contracts
   ERC2771Handler.sol100%100%100%100%
   ERC2771HandlerAbstract.sol100%100%100%100%
   ERC2771HandlerUpgradeable.sol95.45%83.33%100%100%45
packages/dependency-metatx/contracts/test
   ERC2771HandlerTest.sol100%100%100%100%
   ERC2771HandlerUpgradeableTest.sol100%100%100%100%
   MockTrustedForwarder.sol0%0%0%0%15, 18–19, 19, 19–20
packages/dependency-operator-filter/contracts
   OperatorFiltererUpgradeable.sol82.35%85%71.43%83.33%17, 51–52, 61–62, 71, 87
   OperatorFilterSubscription.sol60%50%100%50%19–20
packages/dependency-operator-filter/contracts/interfaces
   IOperatorFilterRegistry.sol100%100%100%100%
packages/dependency-royalty-management/contracts
   MultiRoyaltyDistributor.sol84.06%65%90%92.31%104, 144, 25, 41, 41, 41, 41, 60–61, 97
   RoyaltyDistributor.sol78.95%50%80%90%20, 50, 56
   RoyaltyManager.sol96.39%87.50%100%100%104, 47, 98
   RoyaltySplitter.sol92.08%75%92.31%97.06%116, 156, 184, 217, 64, 71, 82
packages/dependency-royalty-management/contracts/interfaces
   IERC20Approve.sol100%100%100%100%
   IMultiRoyaltyDistributor.sol100%100%100%100%
   IMultiRoyaltyRecipients.sol100%100%100%100%
   IRoyaltyManager.sol100%100%100%100%
   IRoyaltyUGC.sol100%100%100%100%

Please sign in to comment.