mirror of
https://github.com/Instadapp/dsa-resolvers-deprecated.git
synced 2024-07-29 22:38:16 +00:00
master can update factory address
This commit is contained in:
parent
7407a6d47d
commit
ff8370b44b
|
@ -97,6 +97,10 @@ interface StakingInterface {
|
||||||
function rewardPerToken() external view returns (uint256);
|
function rewardPerToken() external view returns (uint256);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface IndexInterface {
|
||||||
|
function master() external view returns (address);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
contract DSMath {
|
contract DSMath {
|
||||||
|
|
||||||
|
@ -126,8 +130,14 @@ contract DSMath {
|
||||||
|
|
||||||
contract Helpers is DSMath {
|
contract Helpers is DSMath {
|
||||||
|
|
||||||
StakingFactoryInterface public constant getStakingFactory = StakingFactoryInterface(0xf39eC5a471edF20Ecc7db1c2c34B4C73ab4B2C19);
|
StakingFactoryInterface public getStakingFactory = StakingFactoryInterface(0xf39eC5a471edF20Ecc7db1c2c34B4C73ab4B2C19);
|
||||||
GUniResolver public constant gelatoRouter = GUniResolver(0xC8b92036cf2bfc5aD2116c9b9Fb3cee2d3b3dc89);
|
GUniResolver public constant gelatoRouter = GUniResolver(0x3B01f3534c9505fE8e7cf42794a545A0d2ede976);
|
||||||
|
|
||||||
|
function updateFactory(address _stakingFactory) public {
|
||||||
|
require(msg.sender == IndexInterface(0x2971AdFa57b20E5a416aE5a708A8655A9c74f723).master(), "not-master");
|
||||||
|
require(address(getStakingFactory) != _stakingFactory, "already-enabled");
|
||||||
|
getStakingFactory = StakingFactoryInterface(_stakingFactory);
|
||||||
|
}
|
||||||
|
|
||||||
struct UserData {
|
struct UserData {
|
||||||
address pool; // address of pool contract
|
address pool; // address of pool contract
|
||||||
|
|
Loading…
Reference in New Issue
Block a user