2023-10-21 23:11:35 +03:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
pragma solidity ^0.6.12;
|
|
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
|
|
|
|
import { IRelayerRegistryProxy } from "./interfaces/RelayerRegistryProxy.sol";
|
2023-10-23 16:48:36 +03:00
|
|
|
import { IRelayerRegistry } from "./interfaces/RelayerRegistry.sol";
|
|
|
|
import { ENSNamehash } from "./libraries/EnsNamehash.sol";
|
|
|
|
import { EnsResolve } from "torn-token/contracts/ENS.sol";
|
|
|
|
|
|
|
|
contract Proposal is EnsResolve {
|
|
|
|
using ENSNamehash for bytes;
|
2023-10-21 23:11:35 +03:00
|
|
|
|
|
|
|
address immutable newRelayerRegistry;
|
2023-10-23 16:48:36 +03:00
|
|
|
address constant relayerRegistryProxyAddr = 0x58E8dCC13BE9780fC42E8723D8EaD4CF46943dF2;
|
2023-10-21 23:11:35 +03:00
|
|
|
|
|
|
|
constructor(address _newRelayerRegistry) public {
|
|
|
|
newRelayerRegistry = _newRelayerRegistry;
|
|
|
|
}
|
|
|
|
|
|
|
|
function executeProposal() public {
|
2023-10-23 16:48:36 +03:00
|
|
|
IRelayerRegistryProxy relayerRegistryProxy = IRelayerRegistryProxy(relayerRegistryProxyAddr);
|
2023-10-21 23:11:35 +03:00
|
|
|
relayerRegistryProxy.upgradeTo(newRelayerRegistry);
|
2023-10-23 16:48:36 +03:00
|
|
|
|
|
|
|
string[5] memory cheatingRelayers = [
|
|
|
|
"available-reliable-relayer.eth",
|
|
|
|
"0xtornadocash.eth",
|
|
|
|
"0xtorn365.eth",
|
|
|
|
"tornrelayers.eth",
|
|
|
|
"moon-relayer.eth"
|
|
|
|
];
|
|
|
|
for (uint i = 0; i < cheatingRelayers.length; i++) {
|
|
|
|
address cheatingRelayer = resolve(bytes(cheatingRelayers[i]).namehash());
|
|
|
|
IRelayerRegistry(relayerRegistryProxyAddr).unregisterRelayer(cheatingRelayer);
|
|
|
|
}
|
2023-10-21 23:11:35 +03:00
|
|
|
}
|
2023-10-23 16:48:36 +03:00
|
|
|
}
|