change constructor param to config

Changes the Marketplace constructor parameter `configuration` to `config` to prevent overshadowing the `configuration()` method.
This commit is contained in:
Eric 2024-11-26 13:49:45 +11:00
parent c970c632b8
commit 5e334eee4e
No known key found for this signature in database

View File

@ -62,30 +62,30 @@ contract Marketplace is SlotReservations, Proofs, StateRetrieval, Endian {
}
constructor(
MarketplaceConfig memory configuration,
MarketplaceConfig memory config,
IERC20 token_,
IGroth16Verifier verifier
)
SlotReservations(configuration.reservations)
Proofs(configuration.proofs, verifier)
SlotReservations(config.reservations)
Proofs(config.proofs, verifier)
{
_token = token_;
require(
configuration.collateral.repairRewardPercentage <= 100,
config.collateral.repairRewardPercentage <= 100,
"Must be less than 100"
);
require(
configuration.collateral.slashPercentage <= 100,
config.collateral.slashPercentage <= 100,
"Must be less than 100"
);
require(
configuration.collateral.maxNumberOfSlashes *
configuration.collateral.slashPercentage <=
config.collateral.maxNumberOfSlashes *
config.collateral.slashPercentage <=
100,
"Maximum slashing exceeds 100%"
);
_config = configuration;
_config = config;
}
function configuration() public view returns (MarketplaceConfig memory) {