diff --git a/contracts/contracts/connectors/ConnectGelatoDataForFullRefinance.sol b/contracts/contracts/connectors/ConnectGelatoDataForFullRefinance.sol index b3c59ea..293d909 100644 --- a/contracts/contracts/connectors/ConnectGelatoDataForFullRefinance.sol +++ b/contracts/contracts/connectors/ConnectGelatoDataForFullRefinance.sol @@ -68,7 +68,7 @@ contract ConnectGelatoDataForFullRefinance is ConnectorInterface { function getDataAndCastForFromMakerToMaker( uint256 _vaultId, address _token, - string memory _colType, + string calldata _colType, address _provider ) public payable { ( @@ -188,7 +188,7 @@ contract ConnectGelatoDataForFullRefinance is ConnectorInterface { function _execPayloadForFullRefinanceFromMakerToMaker( uint256 _vaultId, address _token, - string memory _colType, + string calldata _colType, address _provider ) internal view returns (address[] memory targets, bytes[] memory datas) { targets = new address[](1); diff --git a/contracts/contracts/connectors/ConnectGelatoDataForPartialRefinance.sol b/contracts/contracts/connectors/ConnectGelatoDataForPartialRefinance.sol index 4e55fd5..800d599 100644 --- a/contracts/contracts/connectors/ConnectGelatoDataForPartialRefinance.sol +++ b/contracts/contracts/connectors/ConnectGelatoDataForPartialRefinance.sol @@ -81,7 +81,7 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface { function getDataAndCastForFromMakerToMaker( PartialDebtBridgePayload calldata _payload, - string memory _colType + string calldata _colType ) public payable { ( address[] memory targets, @@ -145,7 +145,7 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface { uint256 wDaiDebtToMove, uint256 wColToWithdrawFromMaker, uint256 gasFeesPaidFromCol - ) = _computeDebtBridge( + ) = computeDebtBridge( _payload.vaultId, _payload.wMinColRatioMaker, _payload.wMinColRatioB, @@ -216,7 +216,7 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface { /// @return datas : calldata for flashloan function _execPayloadForPartialRefinanceFromMakerToMaker( PartialDebtBridgePayload calldata _payload, - string memory _colType + string calldata _colType ) internal view returns (address[] memory targets, bytes[] memory datas) { targets = new address[](1); targets[0] = INSTA_POOL_V2; @@ -225,7 +225,7 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface { uint256 wDaiDebtToMove, uint256 wColToWithdrawFromMaker, uint256 gasFeesPaidFromCol - ) = _computeDebtBridge( + ) = computeDebtBridge( _payload.vaultId, _payload.wMinColRatioMaker, _payload.wMinColRatioB, @@ -296,14 +296,14 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface { /// @return wColToWithdrawFromMaker (wad) to: withdraw from Maker and deposit on B. /// @return gasFeesPaidFromCol Gelato automation-gas-fees paid from user's collateral // solhint-disable function-max-lines - function _computeDebtBridge( + function computeDebtBridge( uint256 _vaultId, uint256 _wMinColRatioMaker, uint256 _wMinColRatioB, address _priceOracle, bytes calldata _oraclePayload ) - internal + public view returns ( uint256 wDaiDebtToMove, diff --git a/test/helpers/Full-Refinance-Maker-To-Compound.helper.js b/test/helpers/Full-Refinance-Maker-To-Compound.helper.js index 0dd57a1..486dbe6 100644 --- a/test/helpers/Full-Refinance-Maker-To-Compound.helper.js +++ b/test/helpers/Full-Refinance-Maker-To-Compound.helper.js @@ -15,7 +15,7 @@ const getABI = require("./setups/ABI.helper"); const getAllContracts = require("./setups/Contracts-For-Full-Refinancing-Maker-To-Compound.helper"); const enableGelatoConnectorsForFromMaker = require("./setups/Enabling-New-Connectors-For-Full-Refinance.helper"); -const ConnectGelatoDataForFullRefinance = require("../../artifacts/contracts/contracts/connectors/ConnectGelatoDataForFullRefinance.sol/ConnectGelatoDataForFullRefinance.json") +const ConnectGelatoDataForFullRefinanceABI = require("../../artifacts/contracts/contracts/connectors/ConnectGelatoDataForFullRefinance.sol/ConnectGelatoDataForFullRefinance.json") .abi; async function makerToCompoundSetup() { @@ -101,7 +101,7 @@ async function providerWhiteListTaskForMakerToCompound( const debtBridgeCalculationForFullRefinance = new GelatoCoreLib.Action({ addr: contracts.connectGelatoData.address, data: await hre.run("abi-encode-withselector", { - abi: ConnectGelatoDataForFullRefinance, + abi: ConnectGelatoDataForFullRefinanceABI, functionname: "getDataAndCastForFromMakerToCompound", inputs: [vaultId, constants.ETH, wallets.providerAddress], }), diff --git a/test/helpers/Full-Refinance-Maker-To-Maker.helper.js b/test/helpers/Full-Refinance-Maker-To-Maker.helper.js index 5234c4c..427632e 100644 --- a/test/helpers/Full-Refinance-Maker-To-Maker.helper.js +++ b/test/helpers/Full-Refinance-Maker-To-Maker.helper.js @@ -16,7 +16,7 @@ const getABI = require("./setups/ABI.helper"); const getAllContracts = require("./setups/Contracts-For-Full-Refinancing-Maker-To-Maker.helper"); const enableGelatoConnectorsForFromMaker = require("./setups/Enabling-New-Connectors-For-Full-Refinance.helper"); -const ConnectGelatoDataForFullRefinance = require("../../artifacts/contracts/contracts/connectors/ConnectGelatoDataForFullRefinance.sol/ConnectGelatoDataForFullRefinance.json") +const ConnectGelatoDataForFullRefinanceABI = require("../../artifacts/contracts/contracts/connectors/ConnectGelatoDataForFullRefinance.sol/ConnectGelatoDataForFullRefinance.json") .abi; async function makerETHAToMakerETHBSetup() { @@ -107,7 +107,7 @@ async function providerWhiteListTaskForMakerETHAToMakerETHB( const debtBridgeCalculationForFullRefinance = new GelatoCoreLib.Action({ addr: contracts.connectGelatoData.address, data: await hre.run("abi-encode-withselector", { - abi: ConnectGelatoDataForFullRefinance, + abi: ConnectGelatoDataForFullRefinanceABI, functionname: "getDataAndCastForFromMakerToMaker", inputs: [vaultId, constants.ETH, "ETH-B", wallets.providerAddress], }),