-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1573 from thesandboxgame/fix/marketplace-bundle
Fix MarketPlace contract and tests
- Loading branch information
Showing
28 changed files
with
370 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/deploy/deploy/500_marketplace/505_upgrade_royalties_registry.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {DeployFunction} from 'hardhat-deploy/types'; | ||
import {HardhatRuntimeEnvironment} from 'hardhat/types'; | ||
import {DEPLOY_TAGS} from '../../hardhat.config'; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const {deployments, getNamedAccounts} = hre; | ||
const {deploy, catchUnknownSigner} = deployments; | ||
const {deployer, upgradeAdmin} = await getNamedAccounts(); | ||
await catchUnknownSigner( | ||
deploy('RoyaltiesRegistry', { | ||
from: deployer, | ||
contract: | ||
'@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry', | ||
proxy: { | ||
owner: upgradeAdmin, | ||
proxyContract: 'OpenZeppelinTransparentProxy', | ||
upgradeIndex: 1, | ||
}, | ||
log: true, | ||
}) | ||
); | ||
}; | ||
|
||
export default func; | ||
func.tags = [ | ||
'RoyaltiesRegistry', | ||
'RoyaltiesRegistry', | ||
'RoyaltiesRegistryV2_deploy', | ||
DEPLOY_TAGS.L1, | ||
DEPLOY_TAGS.L1_PROD, | ||
DEPLOY_TAGS.L1_TEST, | ||
DEPLOY_TAGS.L2, | ||
DEPLOY_TAGS.L2_PROD, | ||
DEPLOY_TAGS.L2_TEST, | ||
]; | ||
func.dependencies = ['RoyaltiesRegistry_deploy']; |
36 changes: 36 additions & 0 deletions
36
packages/deploy/deploy/500_marketplace/506_upgrade_order_validator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {DeployFunction} from 'hardhat-deploy/types'; | ||
import {HardhatRuntimeEnvironment} from 'hardhat/types'; | ||
import {DEPLOY_TAGS} from '../../hardhat.config'; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const {deployments, getNamedAccounts} = hre; | ||
const {deploy, catchUnknownSigner} = deployments; | ||
const {deployer, upgradeAdmin} = await getNamedAccounts(); | ||
await catchUnknownSigner( | ||
deploy('OrderValidator', { | ||
from: deployer, | ||
contract: | ||
'@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator', | ||
proxy: { | ||
owner: upgradeAdmin, | ||
proxyContract: 'OpenZeppelinTransparentProxy', | ||
upgradeIndex: 1, | ||
}, | ||
log: true, | ||
}) | ||
); | ||
}; | ||
|
||
export default func; | ||
func.tags = [ | ||
'OrderValidator', | ||
'OrderValidator', | ||
'OrderValidatorV2_deploy', | ||
DEPLOY_TAGS.L1, | ||
DEPLOY_TAGS.L1_PROD, | ||
DEPLOY_TAGS.L1_TEST, | ||
DEPLOY_TAGS.L2, | ||
DEPLOY_TAGS.L2_PROD, | ||
DEPLOY_TAGS.L2_TEST, | ||
]; | ||
func.dependencies = ['OrderValidator_deploy']; |
35 changes: 35 additions & 0 deletions
35
packages/deploy/deploy/500_marketplace/507_upgrade_exchange.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import {DeployFunction} from 'hardhat-deploy/types'; | ||
import {HardhatRuntimeEnvironment} from 'hardhat/types'; | ||
import {DEPLOY_TAGS} from '../../hardhat.config'; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const {deployments, getNamedAccounts} = hre; | ||
const {deploy, catchUnknownSigner} = deployments; | ||
const {deployer, upgradeAdmin} = await getNamedAccounts(); | ||
await catchUnknownSigner( | ||
deploy('Exchange', { | ||
from: deployer, | ||
contract: `@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange`, | ||
proxy: { | ||
owner: upgradeAdmin, | ||
proxyContract: 'OpenZeppelinTransparentProxy', | ||
upgradeIndex: 1, | ||
}, | ||
log: true, | ||
}) | ||
); | ||
}; | ||
|
||
export default func; | ||
func.tags = [ | ||
'Exchange', | ||
'Exchange', | ||
'ExchangeV2_deploy', | ||
DEPLOY_TAGS.L1, | ||
DEPLOY_TAGS.L1_PROD, | ||
DEPLOY_TAGS.L1_TEST, | ||
DEPLOY_TAGS.L2, | ||
DEPLOY_TAGS.L2_PROD, | ||
DEPLOY_TAGS.L2_TEST, | ||
]; | ||
func.dependencies = ['Exchange_deploy']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,17 @@ const importedPackages = { | |
], | ||
'@sandbox-smart-contracts/giveaway': 'contracts/SignedMultiGiveaway.sol', | ||
'@sandbox-smart-contracts/faucets': 'contracts/FaucetsERC1155.sol', | ||
'@sandbox-smart-contracts/[email protected]': [ | ||
'contracts/RoyaltiesRegistry.sol', | ||
'contracts/OrderValidator.sol', | ||
'contracts/Exchange.sol', | ||
'contracts/TransferManager.sol', | ||
], | ||
'@sandbox-smart-contracts/marketplace': [ | ||
'contracts/RoyaltiesRegistry.sol', | ||
'contracts/OrderValidator.sol', | ||
'contracts/Exchange.sol', | ||
'contracts/TransferManager.sol', | ||
], | ||
'@sandbox-smart-contracts/dependency-operator-filter': [ | ||
'contracts/OperatorFilterSubscription.sol', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,8 @@ | |
"@sandbox-smart-contracts/faucets": "0.0.1", | ||
"@sandbox-smart-contracts/giveaway": "0.0.3", | ||
"@sandbox-smart-contracts/land": "1.0.0-rc.1", | ||
"@sandbox-smart-contracts/marketplace": "1.0.1", | ||
"@sandbox-smart-contracts/marketplace": "1.0.2", | ||
"@sandbox-smart-contracts/[email protected]": "npm:@sandbox-smart-contracts/[email protected]", | ||
"@sandbox-smart-contracts/oft-sand": "0.0.1" | ||
}, | ||
"files": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
|
||
pragma solidity 0.8.23; | ||
|
||
import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; | ||
import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; | ||
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | ||
import {AccessControlEnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol"; | ||
import {AccessControlEnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; | ||
import {ContextUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; | ||
import {ERC2771HandlerUpgradeable} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol"; | ||
import {IOrderValidator} from "./interfaces/IOrderValidator.sol"; | ||
|
@@ -14,6 +14,7 @@ import {ExchangeCore} from "./ExchangeCore.sol"; | |
|
||
/// @author The Sandbox | ||
/// @title Exchange contract with meta transactions | ||
/// @custom:security-contact [email protected] | ||
/// @notice Used to exchange assets, that is, tokens. | ||
/// @dev Main functions are in ExchangeCore | ||
/// @dev TransferManager is used to execute token transfers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.