diff --git a/contracts/Proposal.sol b/contracts/Proposal.sol index 3d43509..b63462f 100644 --- a/contracts/Proposal.sol +++ b/contracts/Proposal.sol @@ -21,13 +21,12 @@ interface TornadoTrees is ITornadoTrees { function setTornadoProxyContract(address _tornadoProxy) external; } -// TODO should we add SWAP and CLAIM operations here as well? contract Proposal { TornadoProxy public constant tornadoProxyV2 = TornadoProxy(0x722122dF12D4e14e13Ac3b6895a86e84145b6967); TornadoTrees public constant tornadoTrees = TornadoTrees(0x527653eA119F3E6a1F5BD18fbF4714081D7B31ce); IProposal4 public constant proposal4 = IProposal4(0x4B6C07B8940a7602fE4332AFa915b366e56eAce5); address public constant governance = 0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce; - uint256 public constant txFee = 0.01 ether; + uint256 public constant txFee = 0.1 ether; uint256 public constant minStake = 500 ether; event DeploymentOf(string name, address addr); @@ -47,8 +46,11 @@ contract Proposal { } // deploying Relayer registry upgradable proxy and its implementation - RelayerRegistry registry = new RelayerRegistry(); - TransparentUpgradeableProxy registryProxy = new TransparentUpgradeableProxy(address(registry), governance, ""); + RelayerRegistry registryImpl = new RelayerRegistry(); + emit DeploymentOf("Relayer Registry implementation", address(registryImpl)); + + TransparentUpgradeableProxy registryProxy = new TransparentUpgradeableProxy(address(registryImpl), governance, ""); + emit DeploymentOf("Relayer Registry proxy", address(registryProxy)); // deploying the new tornadoProxy TornadoProxyV3 tornadoProxyV3 = new TornadoProxyV3( @@ -57,9 +59,10 @@ contract Proposal { instances, address(registryProxy) ); + emit DeploymentOf("Tornado Proxy V3", address(tornadoProxyV3)); // initializing Relayer registry - registry = RelayerRegistry(address(registryProxy)); + RelayerRegistry registry = RelayerRegistry(address(registryProxy)); registry.initialize(address(tornadoProxyV3), txFee, minStake); // registering the new tornadoProxy contract in tornadoTrees diff --git a/contracts/RelayerRegistry.sol b/contracts/RelayerRegistry.sol index ca71f98..e92cc5c 100644 --- a/contracts/RelayerRegistry.sol +++ b/contracts/RelayerRegistry.sol @@ -27,6 +27,7 @@ contract RelayerRegistry is Ownable, Initializable { event Kick(address indexed relayer, bool confiscation); event NewMinStake(uint256 stake); event NewTxFee(uint256 fee); + event NewWithdrawalProxy(address proxy); event Transaction(address indexed _relayer, uint _fee); @@ -87,6 +88,11 @@ contract RelayerRegistry is Ownable, Initializable { emit NewMinStake(_stake); } + function setWithdrawalProxy(address _proxy) external onlyOwner { + withdrawalProxy = _proxy; + emit NewWithdrawalProxy(_proxy); + } + function kick(address _relayer, bool confiscateStake) external onlyOwner { Relayer storage relayer = relayers[_relayer]; TORN.transfer(confiscateStake ? msg.sender : _relayer, relayer.balance);