mirror of
https://github.com/status-im/dagger-contracts.git
synced 2025-01-27 14:56:07 +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
c970c632b8
commit
5e334eee4e
@ -62,30 +62,30 @@ contract Marketplace is SlotReservations, Proofs, StateRetrieval, Endian {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
MarketplaceConfig memory configuration,
|
MarketplaceConfig memory config,
|
||||||
IERC20 token_,
|
IERC20 token_,
|
||||||
IGroth16Verifier verifier
|
IGroth16Verifier verifier
|
||||||
)
|
)
|
||||||
SlotReservations(configuration.reservations)
|
SlotReservations(config.reservations)
|
||||||
Proofs(configuration.proofs, verifier)
|
Proofs(config.proofs, verifier)
|
||||||
{
|
{
|
||||||
_token = token_;
|
_token = token_;
|
||||||
|
|
||||||
require(
|
require(
|
||||||
configuration.collateral.repairRewardPercentage <= 100,
|
config.collateral.repairRewardPercentage <= 100,
|
||||||
"Must be less than 100"
|
"Must be less than 100"
|
||||||
);
|
);
|
||||||
require(
|
require(
|
||||||
configuration.collateral.slashPercentage <= 100,
|
config.collateral.slashPercentage <= 100,
|
||||||
"Must be less than 100"
|
"Must be less than 100"
|
||||||
);
|
);
|
||||||
require(
|
require(
|
||||||
configuration.collateral.maxNumberOfSlashes *
|
config.collateral.maxNumberOfSlashes *
|
||||||
configuration.collateral.slashPercentage <=
|
config.collateral.slashPercentage <=
|
||||||
100,
|
100,
|
||||||
"Maximum slashing exceeds 100%"
|
"Maximum slashing exceeds 100%"
|
||||||
);
|
);
|
||||||
_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