From c61336d75b59346b2f248c8db40cc71818935daa Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 10 Nov 2021 13:28:26 -0600 Subject: [PATCH] update events --- contracts/Controller.sol | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/contracts/Controller.sol b/contracts/Controller.sol index 5d54459..fa34b69 100755 --- a/contracts/Controller.sol +++ b/contracts/Controller.sol @@ -14,10 +14,7 @@ import "./Getters.sol"; */ contract Controller is TellorStaking, Transition, Getters { // Events - event NewControllerContract(address _newController); - event NewGovernanceContract(address _newGovernance); - event NewOracleContract(address _newOracle); - event NewTreasuryContract(address _newTreasury); + event NewContractAddress(address _newContract, string _contractName); // Functions /** @@ -47,7 +44,7 @@ contract Controller is TellorStaking, Transition, Getters { assembly { sstore(_EIP_SLOT, _newController) } - emit NewControllerContract(_newController); + emit NewContractAddress(_newController, "Controller"); } /** @@ -62,7 +59,7 @@ contract Controller is TellorStaking, Transition, Getters { ); require(_isValid(_newGovernance)); addresses[_GOVERNANCE_CONTRACT] = _newGovernance; - emit NewGovernanceContract(_newGovernance); + emit NewContractAddress(_newGovernance, "Governance"); } /** @@ -77,7 +74,7 @@ contract Controller is TellorStaking, Transition, Getters { ); require(_isValid(_newOracle)); addresses[_ORACLE_CONTRACT] = _newOracle; - emit NewOracleContract(_newOracle); + emit NewContractAddress(_newOracle, "Oracle"); } /** @@ -92,7 +89,7 @@ contract Controller is TellorStaking, Transition, Getters { ); require(_isValid(_newTreasury)); addresses[_TREASURY_CONTRACT] = _newTreasury; - emit NewTreasuryContract(_newTreasury); + emit NewContractAddress(_newTreasury, "Treasury"); } /**