mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-04 06:13:09 +00:00
change constructor param to config
Changes the Marketplace constructor parameter `configuration` to `config` to prevent overshadowing the `configuration()` method.
This commit is contained in:
parent
51bae145fc
commit
875e4d53ec
@ -95,28 +95,24 @@ contract Marketplace is SlotReservations, Proofs, StateRetrieval, Endian {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
MarketplaceConfig memory configuration,
|
MarketplaceConfig memory config,
|
||||||
IERC20 token_,
|
IERC20 token_,
|
||||||
IGroth16Verifier verifier
|
IGroth16Verifier verifier
|
||||||
)
|
) SlotReservations(config.reservations) Proofs(config.proofs, verifier) {
|
||||||
SlotReservations(configuration.reservations)
|
|
||||||
Proofs(configuration.proofs, verifier)
|
|
||||||
{
|
|
||||||
_token = token_;
|
_token = token_;
|
||||||
|
|
||||||
if (configuration.collateral.repairRewardPercentage > 100)
|
if (config.collateral.repairRewardPercentage > 100)
|
||||||
revert Marketplace_RepairRewardPercentageTooHigh();
|
revert Marketplace_RepairRewardPercentageTooHigh();
|
||||||
if (configuration.collateral.slashPercentage > 100)
|
if (config.collateral.slashPercentage > 100)
|
||||||
revert Marketplace_SlashPercentageTooHigh();
|
revert Marketplace_SlashPercentageTooHigh();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
configuration.collateral.maxNumberOfSlashes *
|
config.collateral.maxNumberOfSlashes * config.collateral.slashPercentage >
|
||||||
configuration.collateral.slashPercentage >
|
|
||||||
100
|
100
|
||||||
) {
|
) {
|
||||||
revert Marketplace_MaximumSlashingTooHigh();
|
revert Marketplace_MaximumSlashingTooHigh();
|
||||||
}
|
}
|
||||||
_config = configuration;
|
_config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function configuration() public view returns (MarketplaceConfig memory) {
|
function configuration() public view returns (MarketplaceConfig memory) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user