From 1b26dc032794d581aaf306b0489751e0155afaf2 Mon Sep 17 00:00:00 2001 From: pradyuman-verma Date: Fri, 22 Jul 2022 18:08:53 +0530 Subject: [PATCH] fixes Signed-off-by: pradyuman-verma --- .../{insta-automation => aave/automation-v3}/events.sol | 0 .../automation-v3}/interfaces.sol | 0 .../{insta-automation => aave/automation-v3}/main.sol | 9 +++++++-- 3 files changed, 7 insertions(+), 2 deletions(-) rename contracts/polygon/connectors/{insta-automation => aave/automation-v3}/events.sol (100%) rename contracts/polygon/connectors/{insta-automation => aave/automation-v3}/interfaces.sol (100%) rename contracts/polygon/connectors/{insta-automation => aave/automation-v3}/main.sol (87%) diff --git a/contracts/polygon/connectors/insta-automation/events.sol b/contracts/polygon/connectors/aave/automation-v3/events.sol similarity index 100% rename from contracts/polygon/connectors/insta-automation/events.sol rename to contracts/polygon/connectors/aave/automation-v3/events.sol diff --git a/contracts/polygon/connectors/insta-automation/interfaces.sol b/contracts/polygon/connectors/aave/automation-v3/interfaces.sol similarity index 100% rename from contracts/polygon/connectors/insta-automation/interfaces.sol rename to contracts/polygon/connectors/aave/automation-v3/interfaces.sol diff --git a/contracts/polygon/connectors/insta-automation/main.sol b/contracts/polygon/connectors/aave/automation-v3/main.sol similarity index 87% rename from contracts/polygon/connectors/insta-automation/main.sol rename to contracts/polygon/connectors/aave/automation-v3/main.sol index 9cf049e0..43f98323 100644 --- a/contracts/polygon/connectors/insta-automation/main.sol +++ b/contracts/polygon/connectors/aave/automation-v3/main.sol @@ -12,7 +12,7 @@ import "./interfaces.sol"; abstract contract Resolver is Events { InstaAaveAutomation internal immutable automation = - InstaAaveAutomation(0x4dDc35489042db14434E19cE205963aa72Ecd722); + InstaAaveAutomation(0x7eE533CB0642f18191D2927bdA735c3830B355BB); function submitAutomationRequest( uint256 safeHealthFactor, @@ -50,7 +50,12 @@ abstract contract Resolver is Events { payable returns (string memory _eventName, bytes memory _eventParam) { - automation.updateAutomation(safeHealthFactor, thresholdHealthFactor); + automation.cancelAutomationRequest(); + + automation.submitAutomationRequest( + safeHealthFactor, + thresholdHealthFactor + ); (_eventName, _eventParam) = ( "LogUpdateAutomation(uint256,uint256)",