chore: contracts deployed to mainnet

This commit is contained in:
gitpusha 2020-11-16 17:55:04 +01:00 committed by Twin Fish
parent 40de5ce04c
commit 5ef4195b6a
73 changed files with 2128 additions and 588 deletions

View File

@ -10,7 +10,7 @@
"no-empty-blocks": "error",
"no-unused-vars": "error",
"payable-fallback": "off",
"reason-string": ["off", {"maxLength": 32}],
"reason-string": ["off", { "maxLength": 32 }],
"constructor-syntax": "off",
"comprehensive-interface": "off",
"quotes": ["error", "double"],
@ -20,7 +20,7 @@
"func-name-mixedcase": "error",
"func-param-name-mixedcase": "error",
"modifier-name-mixedcase": "error",
"private-vars-leading-underscore": ["error", {"strict": false}],
"private-vars-leading-underscore": ["error", { "strict": false }],
"var-name-mixedcase": "error",
"imports-on-top": "error",
"ordering": "error",
@ -34,7 +34,7 @@
"check-send-result": "error",
"compiler-version": ["error", "0.7.4"],
"mark-callable-contracts": "off",
"func-visibility": ["error", {"ignoreConstructors": true}],
"func-visibility": ["error", { "ignoreConstructors": true }],
"multiple-sends": "error",
"no-complex-fallback": "error",
"no-inline-assembly": "off",

View File

@ -50,9 +50,8 @@ contract ConnectGelatoDataFullRefinanceMaker is ConnectorInterface {
using GelatoBytes for bytes;
// solhint-disable const-name-snakecase
string
public constant
override name = "ConnectGelatoDataFullRefinanceMaker-v1.0";
string public constant override name =
"ConnectGelatoDataFullRefinanceMaker-v1.0";
uint256 internal immutable _id;
address internal immutable _connectGelatoProviderPayment;
@ -83,12 +82,8 @@ contract ConnectGelatoDataFullRefinanceMaker is ConnectorInterface {
address _colToken,
string calldata _colType
) external payable {
(address[] memory targets, bytes[] memory datas) = _dataMakerToMaker(
_vaultAId,
_vaultBId,
_colToken,
_colType
);
(address[] memory targets, bytes[] memory datas) =
_dataMakerToMaker(_vaultAId, _vaultBId, _colToken, _colType);
_cast(targets, datas);
}
@ -101,26 +96,24 @@ contract ConnectGelatoDataFullRefinanceMaker is ConnectorInterface {
external
payable
{
(address[] memory targets, bytes[] memory datas) = _dataMakerToCompound(
_vaultId,
_colToken
);
(address[] memory targets, bytes[] memory datas) =
_dataMakerToCompound(_vaultId, _colToken);
_cast(targets, datas);
}
function _cast(address[] memory targets, bytes[] memory datas) internal {
// Instapool V2 / FlashLoan call
bytes memory castData = abi.encodeWithSelector(
AccountInterface.cast.selector,
targets,
datas,
msg.sender // msg.sender == GelatoCore
);
bytes memory castData =
abi.encodeWithSelector(
AccountInterface.cast.selector,
targets,
datas,
msg.sender // msg.sender == GelatoCore
);
(bool success, bytes memory returndata) = address(this).delegatecall(
castData
);
(bool success, bytes memory returndata) =
address(this).delegatecall(castData);
if (!success) {
returndata.revertWithError(
"ConnectGelatoDataFullRefinanceMaker._cast:"
@ -140,30 +133,30 @@ contract ConnectGelatoDataFullRefinanceMaker is ConnectorInterface {
targets[0] = INSTA_POOL_V2;
uint256 wDaiToBorrow = _getRealisedDebt(_getMakerVaultDebt(_vaultAId));
uint256 wColToWithdrawFromMaker = _getMakerVaultCollateralBalance(
_vaultAId
);
uint256 wColToWithdrawFromMaker =
_getMakerVaultCollateralBalance(_vaultAId);
uint256 route = _getFlashLoanRoute(DAI, wDaiToBorrow);
uint256 gasCost = _getGasCostMakerToMaker(_vaultBId == 0, route);
uint256 gasFeesPaidFromCol = _getGelatoProviderFees(gasCost);
(address[] memory _targets, bytes[] memory _datas) = _vaultBId == 0
? _spellsMakerToNewMakerVault(
_vaultAId,
_colToken,
_colType,
wDaiToBorrow,
wColToWithdrawFromMaker,
gasFeesPaidFromCol
)
: _spellsMakerToMaker(
_vaultAId,
_vaultBId,
_colToken,
wDaiToBorrow,
wColToWithdrawFromMaker,
gasFeesPaidFromCol
);
(address[] memory _targets, bytes[] memory _datas) =
_vaultBId == 0
? _spellsMakerToNewMakerVault(
_vaultAId,
_colToken,
_colType,
wDaiToBorrow,
wColToWithdrawFromMaker,
gasFeesPaidFromCol
)
: _spellsMakerToMaker(
_vaultAId,
_vaultBId,
_colToken,
wDaiToBorrow,
wColToWithdrawFromMaker,
gasFeesPaidFromCol
);
datas = new bytes[](1);
datas[0] = abi.encodeWithSelector(
@ -256,9 +249,8 @@ contract ConnectGelatoDataFullRefinanceMaker is ConnectorInterface {
targets[0] = INSTA_POOL_V2;
uint256 wDaiToBorrow = _getRealisedDebt(_getMakerVaultDebt(_vaultId));
uint256 wColToWithdrawFromMaker = _getMakerVaultCollateralBalance(
_vaultId
);
uint256 wColToWithdrawFromMaker =
_getMakerVaultCollateralBalance(_vaultId);
uint256 route = _getFlashLoanRoute(DAI, wDaiToBorrow);
uint256 gasCost = _getGasCostMakerToCompound(route);
uint256 gasFeesPaidFromCol = _getGelatoProviderFees(gasCost);

View File

@ -66,9 +66,8 @@ contract ConnectGelatoDataPartialRefinanceMaker is ConnectorInterface {
}
// solhint-disable const-name-snakecase
string
public constant
override name = "ConnectGelatoDataPartialRefinanceMaker-v1.0";
string public constant override name =
"ConnectGelatoDataPartialRefinanceMaker-v1.0";
uint256 internal immutable _id;
address internal immutable _connectGelatoProviderPayment;
@ -95,9 +94,8 @@ contract ConnectGelatoDataPartialRefinanceMaker is ConnectorInterface {
function getDataAndCastMakerToMaker(
PartialDebtBridgePayload calldata _payload
) external payable {
(address[] memory targets, bytes[] memory datas) = _dataMakerToMaker(
_payload
);
(address[] memory targets, bytes[] memory datas) =
_dataMakerToMaker(_payload);
_cast(targets, datas);
}
@ -108,25 +106,24 @@ contract ConnectGelatoDataPartialRefinanceMaker is ConnectorInterface {
function getDataAndCastMakerToCompound(
PartialDebtBridgePayload calldata _payload
) external payable {
(address[] memory targets, bytes[] memory datas) = _dataMakerToCompound(
_payload
);
(address[] memory targets, bytes[] memory datas) =
_dataMakerToCompound(_payload);
_cast(targets, datas);
}
function _cast(address[] memory targets, bytes[] memory datas) internal {
// Instapool V2 / FlashLoan call
bytes memory castData = abi.encodeWithSelector(
AccountInterface.cast.selector,
targets,
datas,
msg.sender // msg.sender == GelatoCore
);
bytes memory castData =
abi.encodeWithSelector(
AccountInterface.cast.selector,
targets,
datas,
msg.sender // msg.sender == GelatoCore
);
(bool success, bytes memory returndata) = address(this).delegatecall(
castData
);
(bool success, bytes memory returndata) =
address(this).delegatecall(castData);
if (!success)
returndata.revertWithError(
"ConnectGelatoDataPartialRefinanceMaker._cast:"
@ -147,13 +144,14 @@ contract ConnectGelatoDataPartialRefinanceMaker is ConnectorInterface {
uint256 wDaiDebtToMove,
uint256 wColToWithdrawFromMaker,
uint256 gasFeesPaidFromCol
) = computeDebtBridge(
_payload.vaultId,
_payload.wMinColRatioMaker,
_payload.wMinColRatioB,
_payload.priceOracle,
_payload.oraclePayload
);
) =
computeDebtBridge(
_payload.vaultId,
_payload.wMinColRatioMaker,
_payload.wMinColRatioB,
_payload.priceOracle,
_payload.oraclePayload
);
address[] memory _targets = new address[](7);
_targets[0] = CONNECT_MAKER; // payback
@ -215,13 +213,14 @@ contract ConnectGelatoDataPartialRefinanceMaker is ConnectorInterface {
uint256 wDaiDebtToMove,
uint256 wColToWithdrawFromMaker,
uint256 gasFeesPaidFromCol
) = computeDebtBridge(
_payload.vaultId,
_payload.wMinColRatioMaker,
_payload.wMinColRatioB,
_payload.priceOracle,
_payload.oraclePayload
);
) =
computeDebtBridge(
_payload.vaultId,
_payload.wMinColRatioMaker,
_payload.wMinColRatioB,
_payload.priceOracle,
_payload.oraclePayload
);
address[] memory _targets = new address[](6);
_targets[0] = CONNECT_MAKER; // payback
@ -301,9 +300,8 @@ contract ConnectGelatoDataPartialRefinanceMaker is ConnectorInterface {
// Stack too deep
{
(bool success, bytes memory returndata) = _priceOracle.staticcall(
_oraclePayload
);
(bool success, bytes memory returndata) =
_priceOracle.staticcall(_oraclePayload);
if (!success) {
GelatoBytes.revertWithError(
@ -319,10 +317,14 @@ contract ConnectGelatoDataPartialRefinanceMaker is ConnectorInterface {
// uint256 gasFeesPaidFromCol = _mul(GAS_COST, wmul(_getGelatoGasPrice(), latestPrice));
gasFeesPaidFromCol = _getGelatoProviderFees(GAS_COST);
uint256 wPricedCol = wmul(
sub(_getMakerVaultCollateralBalance(_vaultId), gasFeesPaidFromCol),
wColPrice
);
uint256 wPricedCol =
wmul(
sub(
_getMakerVaultCollateralBalance(_vaultId),
gasFeesPaidFromCol
),
wColPrice
);
uint256 wDaiDebtOnMaker = _getMakerVaultDebt(_vaultId);

View File

@ -29,9 +29,8 @@ contract ConnectGelatoProviderPayment is
// solhint-disable-next-line const-name-snakecase
string public constant override name = "ConnectGelatoProviderPayment-v1.0";
address
public constant
override GELATO_CORE = 0x1d681d76ce96E4d70a88A00EBbcfc1E47808d0b8;
address public constant override GELATO_CORE =
0x1d681d76ce96E4d70a88A00EBbcfc1E47808d0b8;
address public override gelatoProvider;
@ -90,8 +89,8 @@ contract ConnectGelatoProviderPayment is
uint256 _getId,
uint256 _setId
) external payable override {
address provider = IConnectGelatoProviderPayment(_this)
.gelatoProvider();
address provider =
IConnectGelatoProviderPayment(_this).gelatoProvider();
uint256 amt = _getUint(_getId, _amt);
_setUint(_setId, amt);
@ -100,7 +99,7 @@ contract ConnectGelatoProviderPayment is
// solhint-disable no-empty-blocks
try
IGelatoProviders(GELATO_CORE).provideFunds{value: amt}(provider)
{} catch Error(string memory error) {
{} catch Error(string memory error) {
error.revertWithInfo(
"ConnectGelatoProviderPayment.payProvider.provideFunds:"
);

View File

@ -49,10 +49,11 @@ contract ConditionCompareUintsFromTwoSources is GelatoConditionsStandard {
bytes memory _sourceAData,
bytes memory _sourceBData,
uint256 _minSpread
) = abi.decode(
_conditionData,
(address, address, bytes, bytes, uint256)
);
) =
abi.decode(
_conditionData,
(address, address, bytes, bytes, uint256)
);
return
compare(_sourceA, _sourceB, _sourceAData, _sourceBData, _minSpread);
}
@ -76,9 +77,8 @@ contract ConditionCompareUintsFromTwoSources is GelatoConditionsStandard {
uint256 _minSpread
) public view virtual returns (string memory) {
// Retrieve uint256 from sourceA
(bool success, bytes memory returndata) = _sourceA.staticcall(
_sourceAData
);
(bool success, bytes memory returndata) =
_sourceA.staticcall(_sourceAData);
if (!success) {
return
returndata.returnError(

View File

@ -50,10 +50,8 @@ contract ConditionDebtBridgeIsAffordable is GelatoConditionsStandard {
bytes calldata _conditionData,
uint256
) public view virtual override returns (string memory) {
(uint256 _vaultID, uint256 _ratioLimit) = abi.decode(
_conditionData,
(uint256, uint256)
);
(uint256 _vaultID, uint256 _ratioLimit) =
abi.decode(_conditionData, (uint256, uint256));
return isAffordable(_vaultID, _ratioLimit);
}
@ -70,18 +68,18 @@ contract ConditionDebtBridgeIsAffordable is GelatoConditionsStandard {
view
returns (string memory)
{
uint256 wColToWithdrawFromMaker = _getMakerVaultCollateralBalance(
_vaultId
);
uint256 gasFeesPaidFromCol = _getGelatoProviderFees(
_getGasCostMakerToMaker(
true,
_getFlashLoanRoute(
DAI,
_getRealisedDebt(_getMakerVaultDebt(_vaultId))
uint256 wColToWithdrawFromMaker =
_getMakerVaultCollateralBalance(_vaultId);
uint256 gasFeesPaidFromCol =
_getGelatoProviderFees(
_getGasCostMakerToMaker(
true,
_getFlashLoanRoute(
DAI,
_getRealisedDebt(_getMakerVaultDebt(_vaultId))
)
)
)
);
);
if (wdiv(gasFeesPaidFromCol, wColToWithdrawFromMaker) >= _ratioLimit)
return "DebtBridgeNotAffordable";
return OK;

View File

@ -65,9 +65,8 @@ contract ConditionMakerVaultUnsafe is GelatoConditionsStandard {
bytes memory _oraclePayload,
uint256 _minColRatio
) public view virtual returns (string memory) {
(bool success, bytes memory returndata) = _priceOracle.staticcall(
_oraclePayload
);
(bool success, bytes memory returndata) =
_priceOracle.staticcall(_oraclePayload);
if (!success) {
returndata.revertWithError(
@ -77,15 +76,12 @@ contract ConditionMakerVaultUnsafe is GelatoConditionsStandard {
uint256 colPriceInWad = abi.decode(returndata, (uint256));
IInstaMakerResolver.VaultData memory vault = IInstaMakerResolver(
0x0A7008B38E7015F8C36A49eEbc32513ECA8801E5
)
.getVaultById(_vaultId);
IInstaMakerResolver.VaultData memory vault =
IInstaMakerResolver(0x0A7008B38E7015F8C36A49eEbc32513ECA8801E5)
.getVaultById(_vaultId);
uint256 colRatio = wdiv(
wmul(vault.collateral, colPriceInWad),
vault.debt
);
uint256 colRatio =
wdiv(wmul(vault.collateral, colPriceInWad), vault.debt);
return colRatio < _minColRatio ? OK : "MakerVaultNotUnsafe";
}

View File

@ -59,9 +59,8 @@ contract PriceOracleResolver is Ownable {
address oracleAddr = oracle[_oracle];
if (oracleAddr == address(0))
revert("PriceOracleResolver.getPrice: no oracle");
(bool success, bytes memory returndata) = oracleAddr.staticcall(
oraclePayload[_oracle]
);
(bool success, bytes memory returndata) =
oracleAddr.staticcall(oraclePayload[_oracle]);
if (!success)
returndata.revertWithError("PriceOracleResolver.getPrice:");
return abi.decode(returndata, (uint256));

View File

@ -198,9 +198,8 @@ contract CompoundHelpers is Helpers {
* @dev enter compound market
*/
function enterMarket(address cToken) internal {
ComptrollerInterface troller = ComptrollerInterface(
getComptrollerAddress()
);
ComptrollerInterface troller =
ComptrollerInterface(getComptrollerAddress());
address[] memory markets = troller.getAssetsIn(address(this));
bool isEntered = false;
for (uint256 i = 0; i < markets.length; i++) {
@ -276,16 +275,10 @@ contract BasicResolver is CompoundHelpers {
setUint(setId, _amt);
emit LogDeposit(token, cToken, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogDeposit(address,address,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
token,
cToken,
_amt,
getId,
setId
);
bytes32 _eventCode =
keccak256("LogDeposit(address,address,uint256,uint256,uint256)");
bytes memory _eventParam =
abi.encode(token, cToken, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,
@ -313,18 +306,20 @@ contract BasicResolver is CompoundHelpers {
CTokenInterface cTokenContract = CTokenInterface(cToken);
if (_amt == uint256(-1)) {
TokenInterface tokenContract = TokenInterface(token);
uint256 initialBal = token == getAddressETH()
? address(this).balance
: tokenContract.balanceOf(address(this));
uint256 initialBal =
token == getAddressETH()
? address(this).balance
: tokenContract.balanceOf(address(this));
require(
cTokenContract.redeem(
cTokenContract.balanceOf(address(this))
) == 0,
"full-withdraw-failed"
);
uint256 finalBal = token == getAddressETH()
? address(this).balance
: tokenContract.balanceOf(address(this));
uint256 finalBal =
token == getAddressETH()
? address(this).balance
: tokenContract.balanceOf(address(this));
_amt = finalBal - initialBal;
} else {
require(
@ -335,16 +330,10 @@ contract BasicResolver is CompoundHelpers {
setUint(setId, _amt);
emit LogWithdraw(token, cToken, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogWithdraw(address,address,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
token,
cToken,
_amt,
getId,
setId
);
bytes32 _eventCode =
keccak256("LogWithdraw(address,address,uint256,uint256,uint256)");
bytes memory _eventParam =
abi.encode(token, cToken, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,
@ -374,16 +363,10 @@ contract BasicResolver is CompoundHelpers {
setUint(setId, _amt);
emit LogBorrow(token, cToken, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogBorrow(address,address,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
token,
cToken,
_amt,
getId,
setId
);
bytes32 _eventCode =
keccak256("LogBorrow(address,address,uint256,uint256,uint256)");
bytes memory _eventParam =
abi.encode(token, cToken, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,
@ -428,16 +411,10 @@ contract BasicResolver is CompoundHelpers {
setUint(setId, _amt);
emit LogPayback(token, cToken, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogPayback(address,address,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
token,
cToken,
_amt,
getId,
setId
);
bytes32 _eventCode =
keccak256("LogPayback(address,address,uint256,uint256,uint256)");
bytes memory _eventParam =
abi.encode(token, cToken, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,
@ -536,17 +513,12 @@ contract ExtraResolver is BasicResolver {
setUint(setId, _cAmt);
emit LogDepositCToken(token, cToken, _amt, _cAmt, getId, setId);
bytes32 _eventCode = keccak256(
"LogDepositCToken(address,address,uint256,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
token,
cToken,
_amt,
_cAmt,
getId,
setId
);
bytes32 _eventCode =
keccak256(
"LogDepositCToken(address,address,uint256,uint256,uint256,uint256)"
);
bytes memory _eventParam =
abi.encode(token, cToken, _amt, _cAmt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,
@ -579,16 +551,12 @@ contract ExtraResolver is BasicResolver {
setUint(setId, _amt);
emit LogWithdrawCToken(token, cToken, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogWithdrawCToken(address,address,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
token,
cToken,
_amt,
getId,
setId
);
bytes32 _eventCode =
keccak256(
"LogWithdrawCToken(address,address,uint256,uint256,uint256)"
);
bytes memory _eventParam =
abi.encode(token, cToken, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,
@ -616,16 +584,16 @@ contract ExtraResolver is BasicResolver {
uint256 setId
) external payable {
uint256 _amt = getUint(getId, amt);
address cTokenPay = InstaMapping(getMappingAddr()).cTokenMapping(
tokenToPay
);
address cTokenColl = InstaMapping(getMappingAddr()).cTokenMapping(
tokenInReturn
);
address cTokenPay =
InstaMapping(getMappingAddr()).cTokenMapping(tokenToPay);
address cTokenColl =
InstaMapping(getMappingAddr()).cTokenMapping(tokenInReturn);
CTokenInterface cTokenContract = CTokenInterface(cTokenPay);
(, , uint256 shortfal) = ComptrollerInterface(getComptrollerAddress())
.getAccountLiquidity(borrower);
(, , uint256 shortfal) =
ComptrollerInterface(getComptrollerAddress()).getAccountLiquidity(
borrower
);
require(shortfal != 0, "account-cannot-be-liquidated");
_amt = _amt == uint256(-1)
@ -659,17 +627,19 @@ contract ExtraResolver is BasicResolver {
getId,
setId
);
bytes32 _eventCode = keccak256(
"LogLiquidate(address,address,address,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
address(this),
tokenToPay,
tokenInReturn,
_amt,
getId,
setId
);
bytes32 _eventCode =
keccak256(
"LogLiquidate(address,address,address,uint256,uint256,uint256)"
);
bytes memory _eventParam =
abi.encode(
address(this),
tokenToPay,
tokenInReturn,
_amt,
getId,
setId
);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,

View File

@ -471,16 +471,10 @@ contract EventHelper is MakerHelpers {
uint256 setId
) internal {
emit LogDeposit(vault, ilk, tokenAmt, getId, setId);
bytes32 _eventCode = keccak256(
"LogDeposit(uint256,bytes32,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
vault,
ilk,
tokenAmt,
getId,
setId
);
bytes32 _eventCode =
keccak256("LogDeposit(uint256,bytes32,uint256,uint256,uint256)");
bytes memory _eventParam =
abi.encode(vault, ilk, tokenAmt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,
@ -498,16 +492,10 @@ contract EventHelper is MakerHelpers {
uint256 setId
) internal {
emit LogBorrow(vault, ilk, tokenAmt, getId, setId);
bytes32 _eventCode = keccak256(
"LogBorrow(uint256,bytes32,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(
vault,
ilk,
tokenAmt,
getId,
setId
);
bytes32 _eventCode =
keccak256("LogBorrow(uint256,bytes32,uint256,uint256,uint256)");
bytes memory _eventParam =
abi.encode(vault, ilk, tokenAmt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
_type,
@ -556,10 +544,8 @@ contract BasicResolver is EventHelper {
uint256 _vault = getVault(managerContract, vault);
(bytes32 ilk, address urn) = getVaultData(managerContract, _vault);
(uint256 ink, uint256 art) = VatLike(managerContract.vat()).urns(
ilk,
urn
);
(uint256 ink, uint256 art) =
VatLike(managerContract.vat()).urns(ilk, urn);
require(ink == 0 && art == 0, "vault-has-assets");
require(managerContract.owns(_vault) == address(this), "not-owner");
@ -673,9 +659,8 @@ contract BasicResolver is EventHelper {
setUint(setId, _amt);
emit LogWithdraw(_vault, ilk, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogWithdraw(uint256,bytes32,uint256,uint256,uint256)"
);
bytes32 _eventCode =
keccak256("LogWithdraw(uint256,bytes32,uint256,uint256,uint256)");
bytes memory _eventParam = abi.encode(_vault, ilk, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
@ -767,9 +752,8 @@ contract BasicResolver is EventHelper {
setUint(setId, _amt);
emit LogPayback(_vault, ilk, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogPayback(uint256,bytes32,uint256,uint256,uint256)"
);
bytes32 _eventCode =
keccak256("LogPayback(uint256,bytes32,uint256,uint256,uint256)");
bytes memory _eventParam = abi.encode(_vault, ilk, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
@ -837,9 +821,10 @@ contract BasicExtraResolver is BasicResolver {
setUint(setId, _amt);
emit LogWithdrawLiquidated(vault, ilk, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogWithdrawLiquidated(uint256,bytes32,uint256,uint256,uint256)"
);
bytes32 _eventCode =
keccak256(
"LogWithdrawLiquidated(uint256,bytes32,uint256,uint256,uint256)"
);
bytes memory _eventParam = abi.encode(vault, ilk, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
@ -884,10 +869,8 @@ contract BasicExtraResolver is BasicResolver {
uint256 _amtBorrow = getUint(getIdBorrow, borrowAmt);
makerData._vault = getVault(managerContract, vault);
(bytes32 ilk, address urn) = getVaultData(
managerContract,
makerData._vault
);
(bytes32 ilk, address urn) =
getVaultData(managerContract, makerData._vault);
makerData.colAddr = InstaMapping(getMappingAddr()).gemJoinMapping(ilk);
makerData.tokenJoinContract = TokenJoinInterface(makerData.colAddr);
@ -994,9 +977,8 @@ contract BasicExtraResolver is BasicResolver {
setUint(setId, _amt);
emit LogExitDai(_vault, ilk, _amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogExitDai(uint256,bytes32,uint256,uint256,uint256)"
);
bytes32 _eventCode =
keccak256("LogExitDai(uint256,bytes32,uint256,uint256,uint256)");
bytes memory _eventParam = abi.encode(_vault, ilk, _amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
@ -1047,9 +1029,8 @@ contract DsrResolver is BasicExtraResolver {
setUint(setId, _amt);
emit LogDepositDai(_amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogDepositDai(uint256,uint256,uint256)"
);
bytes32 _eventCode =
keccak256("LogDepositDai(uint256,uint256,uint256)");
bytes memory _eventParam = abi.encode(_amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(
@ -1102,9 +1083,8 @@ contract DsrResolver is BasicExtraResolver {
setUint(setId, _amt);
emit LogWithdrawDai(_amt, getId, setId);
bytes32 _eventCode = keccak256(
"LogWithdrawDai(uint256,uint256,uint256)"
);
bytes32 _eventCode =
keccak256("LogWithdrawDai(uint256,uint256,uint256)");
bytes memory _eventParam = abi.encode(_amt, getId, setId);
(uint256 _type, uint256 _id) = connectorID();
EventInterface(getEventAddr()).emitEvent(

View File

@ -42,8 +42,8 @@ contract Record {
event LogSwitchShield(bool _shield);
// InstaIndex Address.
address
public constant instaIndex = 0x0000000000000000000000000000000000000000;
address public constant instaIndex =
0x0000000000000000000000000000000000000000;
// The Account Module Version.
uint256 public constant version = 1;
// Auth Module(Address of Auth => bool).

View File

@ -30,8 +30,8 @@ contract Controllers is DSMath {
event LogRemoveController(address indexed addr);
// InstaIndex Address.
address
public constant instaIndex = 0x0000000000000000000000000000000000000000;
address public constant instaIndex =
0x0000000000000000000000000000000000000000;
// Enabled Chief(Address of Chief => bool).
mapping(address => bool) public chief;

View File

@ -21,8 +21,8 @@ contract DSMath {
contract Variables is DSMath {
// InstaIndex Address.
address
public constant instaIndex = 0x0000000000000000000000000000000000000000;
address public constant instaIndex =
0x0000000000000000000000000000000000000000;
// Smart Account Count.
uint64 public accounts;

View File

@ -61,10 +61,8 @@ function _getFlashLoanRoute(address _tokenA, uint256 _wTokenADebtToMove)
view
returns (uint256)
{
IInstaPoolResolver.RouteData memory rData = IInstaPoolResolver(
INSTA_POOL_RESOLVER
)
.getTokenLimit(_tokenA);
IInstaPoolResolver.RouteData memory rData =
IInstaPoolResolver(INSTA_POOL_RESOLVER).getTokenLimit(_tokenA);
if (rData.dydx > _wTokenADebtToMove) return 0;
if (rData.maker > _wTokenADebtToMove) return 1;

View File

@ -1,7 +1,7 @@
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
const InstaConnector = require("../../pre-compiles/InstaConnectors.json");
@ -10,12 +10,12 @@ module.exports = async (hre) => {
console.log(
"Deploying ConnectGelatoDataFullRefinanceMaker to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
const instaConnectors = await hre.ethers.getContractAt(
InstaConnector.abi,

View File

@ -1,7 +1,7 @@
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
const InstaConnector = require("../../pre-compiles/InstaConnectors.json");
@ -10,12 +10,12 @@ module.exports = async (hre) => {
console.log(
"Deploying ConnectGelatoDataPartialRefinanceMaker to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
const instaConnectors = await hre.ethers.getContractAt(
InstaConnector.abi,

View File

@ -1,7 +1,7 @@
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
const InstaConnector = require("../../pre-compiles/InstaConnectors.json");
@ -10,11 +10,11 @@ module.exports = async (hre) => {
console.log(
"Deploying ConnectGelatoProviderPayment to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer, gelatoProvider} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer, gelatoProvider } = await hre.getNamedAccounts();
const instaConnectors = await hre.ethers.getContractAt(
InstaConnector.abi,

View File

@ -1,16 +1,16 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log(
"Deploying ConditionCompareUintsFromTwoSources to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
// the following will only deploy "ConditionCompareUintsFromTwoSources"
// if the contract was never deployed or if the code changed since last deployment

View File

@ -1,16 +1,16 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log(
"Deploying ConditionDebtBridgeIsAffordable to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
// the following will only deploy "ConditionMakerVaultUnsafe"
// if the contract was never deployed or if the code changed since last deployment

View File

@ -1,16 +1,16 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log(
"Deploying ConditionMakerVaultUnsafe to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
// the following will only deploy "ConditionMakerVaultUnsafe"
// if the contract was never deployed or if the code changed since last deployment

View File

@ -1,16 +1,16 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log(
"Deploying FGelatoDebtBridgeMock to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
// the following will only deploy "FGelatoDebtBridgeMock"
// if the contract was never deployed or if the code changed since last deployment

View File

@ -1,16 +1,16 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log(
"Deploying FGelatoDebtBridgeMock to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
// the following will only deploy "FGelatoDebtBridgeMock"
// if the contract was never deployed or if the code changed since last deployment

View File

@ -1,14 +1,14 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log("Deploying MockCDAI to mainnet. Hit ctrl + c to abort");
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
const APY_2_PERCENT_IN_SECONDS = "1000000000627937192491029810";

View File

@ -1,14 +1,14 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log("Deploying MockDSR to mainnet. Hit ctrl + c to abort");
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
const APY_2_PERCENT_IN_SECONDS = "1000000000627937192491029810";

View File

@ -1,6 +1,6 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
module.exports = async (hre) => {
@ -8,12 +8,12 @@ module.exports = async (hre) => {
console.log(
"Deploying MockGelatoExecutor to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
const gelatoCore = await ethers.getContractAt(
GelatoCoreLib.GelatoCore.abi,
hre.network.config.GelatoCore

View File

@ -1,14 +1,14 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log("Deploying MakerResolver to mainnet. Hit ctrl + c to abort");
await sleep(10000);
await sleep(2000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
// the following will only deploy "MakerResolver"
// if the contract was never deployed or if the code changed since last deployment

View File

@ -1,16 +1,16 @@
const {sleep} = require("@gelatonetwork/core");
const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log(
"Deploying PriceOracleResolver to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
await sleep(5000);
}
const {deployments} = hre;
const {deploy} = deployments;
const {deployer} = await hre.getNamedAccounts();
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
// the following will only deploy "PriceOracleResolver"
// if the contract was never deployed or if the code changed since last deployment

View File

@ -0,0 +1 @@
1

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
// Buidler
const {task, types} = require("hardhat/config");
const { task, types } = require("hardhat/config");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-waffle");
require("hardhat-deploy");
@ -8,10 +8,12 @@ require("hardhat-gas-reporter");
// Libraries
const assert = require("assert");
const {utils} = require("ethers");
const { utils } = require("ethers");
const GelatoCoreLib = require("@gelatonetwork/core");
const mainnetDeployments = require("./hardhat/config/mainnet-deployments");
// Process Env Variables
require("dotenv").config();
// const INFURA_ID = process.env.INFURA_ID;
@ -22,8 +24,6 @@ assert.ok(ALCHEMY_ID, "no Alchemy ID in process.env");
const DEPLOYER = "0xe1F076849B781b1395Fd332dC1758Dbc129be6EC"; // Gelato-Luis
const DEPLOYER_PK_MAINNET = process.env.DEPLOYER_PK_MAINNET;
const INSTA_MASTER = "0xb1DC62EC38E6E3857a887210C38418E4A17Da5B2";
// ================================= CONFIG =========================================
module.exports = {
defaultNetwork: "hardhat",
@ -58,36 +58,16 @@ module.exports = {
blockNumber: 11189230,
},
// Custom
GelatoCore: "0x1d681d76ce96E4d70a88A00EBbcfc1E47808d0b8",
GelatoGasPriceOracle: "0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C",
InstaMaster: INSTA_MASTER,
InstaIndex: "0x2971AdFa57b20E5a416aE5a708A8655A9c74f723",
InstaList: "0x4c8a1BEb8a87765788946D6B19C6C6355194AbEb",
InstaConnectors: "0xD6A602C01a023B98Ecfb29Df02FBA380d3B21E0c",
InstaAccount: "0x939Daad09fC4A9B8f8A9352A485DAb2df4F4B3F8",
InstaMapping: "0xe81F70Cc7C0D46e12d70efc60607F16bbD617E88",
ConnectAuth: "0xd1aFf9f2aCf800C876c409100D6F39AEa93Fc3D9",
ConnectBasic: "0x6a31c5982C5Bc5533432913cf06a66b6D3333a95",
ConnectGelato: "0x37A7009d424951dd5D5F155fA588D9a03C455163",
ConnectMaker: "0xac02030d8a8F49eD04b2f52C394D3F901A10F8A9",
ConnectCompound: "0x07F81230d73a78f63F0c2A3403AD281b067d28F8",
ConnectInstaPool: "0xCeF5f3c402d4fef76A038e89a4357176963e1464",
MakerResolver: "0x0A7008B38E7015F8C36A49eEbc32513ECA8801E5",
CompoundResolver: "0x1f22D77365d8BFE3b901C33C83C01B584F946617",
InstaPoolResolver: "0xa004a5afBa04b74037E9E52bA1f7eb02b5E61509",
DAI: "0x6b175474e89094c44da98b954eedeac495271d0f",
DAI_UNISWAP: "0x2a1530C4C41db0B0b2bB646CB5Eb1A67b7158667",
CDAI: "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
CETH: "0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5",
DssCdpManager: "0x5ef30b9986345249bc32d8928B7ee64DE9435E39",
GetCdps: "0x36a724Bd100c39f0Ea4D3A20F7097eE01A8Ff573",
ProviderModuleDsa: "0x0C25452d20cdFeEd2983fa9b9b9Cf4E81D6f2fE2",
...mainnetDeployments,
},
mainnet: {
accounts: DEPLOYER_PK_MAINNET ? [DEPLOYER_PK_MAINNET] : [],
chainId: 1,
url: `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_ID}`,
gasPrice: parseInt(utils.parseUnits("10", "gwei")),
gasPrice: parseInt(utils.parseUnits("90", "gwei")),
timeout: 150000,
// Custom
...mainnetDeployments,
},
},
solidity: {
@ -95,36 +75,16 @@ module.exports = {
{
version: "0.6.10",
settings: {
optimizer: {enabled: process.env.DEBUG ? false : true},
optimizer: { enabled: process.env.DEBUG ? false : true },
},
},
{
version: "0.7.4",
settings: {
optimizer: {enabled: process.env.DEBUG ? false : true},
optimizer: { enabled: process.env.DEBUG ? false : true },
},
},
],
// overrides: {
// "contracts/vendor/DependenciesSix.sol": {
// version: "0.6.10",
// settings: {
// optimizer: {enabled: process.env.DEBUG ? false : true},
// },
// },
// "@gelatonetwork/core/contracts/gelato_core/GelatoCore.sol": {
// version: "0.6.10",
// settings: {
// optimizer: {enabled: process.env.DEBUG ? false : true},
// },
// },
// "@gelatonetwork/core/contracts/external/Ownable.sol": {
// version: "0.6.10",
// settings: {
// optimizer: {enabled: process.env.DEBUG ? false : true},
// },
// },
// },
},
};

View File

@ -0,0 +1,28 @@
const INSTA_MASTER = "0xb1DC62EC38E6E3857a887210C38418E4A17Da5B2";
module.exports = {
GelatoCore: "0x1d681d76ce96E4d70a88A00EBbcfc1E47808d0b8",
GelatoGasPriceOracle: "0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C",
InstaMaster: INSTA_MASTER,
InstaIndex: "0x2971AdFa57b20E5a416aE5a708A8655A9c74f723",
InstaList: "0x4c8a1BEb8a87765788946D6B19C6C6355194AbEb",
InstaConnectors: "0xD6A602C01a023B98Ecfb29Df02FBA380d3B21E0c",
InstaAccount: "0x939Daad09fC4A9B8f8A9352A485DAb2df4F4B3F8",
InstaMapping: "0xe81F70Cc7C0D46e12d70efc60607F16bbD617E88",
ConnectAuth: "0xd1aFf9f2aCf800C876c409100D6F39AEa93Fc3D9",
ConnectBasic: "0x6a31c5982C5Bc5533432913cf06a66b6D3333a95",
ConnectGelato: "0x37A7009d424951dd5D5F155fA588D9a03C455163",
ConnectMaker: "0xac02030d8a8F49eD04b2f52C394D3F901A10F8A9",
ConnectCompound: "0x07F81230d73a78f63F0c2A3403AD281b067d28F8",
ConnectInstaPool: "0xCeF5f3c402d4fef76A038e89a4357176963e1464",
MakerResolver: "0x0A7008B38E7015F8C36A49eEbc32513ECA8801E5",
CompoundResolver: "0x1f22D77365d8BFE3b901C33C83C01B584F946617",
InstaPoolResolver: "0xa004a5afBa04b74037E9E52bA1f7eb02b5E61509",
DAI: "0x6b175474e89094c44da98b954eedeac495271d0f",
DAI_UNISWAP: "0x2a1530C4C41db0B0b2bB646CB5Eb1A67b7158667",
CDAI: "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
CETH: "0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5",
DssCdpManager: "0x5ef30b9986345249bc32d8928B7ee64DE9435E39",
GetCdps: "0x36a724Bd100c39f0Ea4D3A20F7097eE01A8Ff573",
ProviderModuleDsa: "0x0C25452d20cdFeEd2983fa9b9b9Cf4E81D6f2fE2",
};

View File

@ -8,6 +8,7 @@
"scripts": {
"rebase": "HUSKY_SKIP_HOOKS=1 git rebase",
"compile": "npx hardhat compile",
"deploy:mainnet": "npx hardhat deploy --network mainnet",
"format": "prettier --write .",
"lint": "eslint --cache . && yarn lint:sol",
"lint:sol": "solhint 'contracts/**/*.sol'",
@ -26,14 +27,14 @@
"eslint-config-prettier": "6.15.0",
"ethereum-waffle": "3.2.0",
"ethers": "5.0.19",
"hardhat": "2.0.2",
"hardhat": "2.0.3",
"hardhat-deploy": "0.7.0-beta.28",
"hardhat-deploy-ethers": "0.3.0-beta.5",
"hardhat-gas-reporter": "1.0.1",
"husky": ">=4",
"lint-staged": "10.5.1",
"prettier": "2.1.2",
"prettier-plugin-solidity": "1.0.0-alpha.59",
"prettier-plugin-solidity": "1.0.0-alpha.60",
"solhint": "3.3.2",
"solhint-plugin-prettier": "0.0.5"
},

View File

@ -4,18 +4,18 @@
"inputs": [
{
"components": [
{"internalType": "uint256", "name": "id", "type": "uint256"},
{"internalType": "address", "name": "userProxy", "type": "address"},
{ "internalType": "uint256", "name": "id", "type": "uint256" },
{ "internalType": "address", "name": "userProxy", "type": "address" },
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "address", "name": "module", "type": "address"}
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "address", "name": "module", "type": "address" }
],
"internalType": "struct Provider",
"name": "provider",
"type": "tuple"
},
{"internalType": "uint256", "name": "index", "type": "uint256"},
{ "internalType": "uint256", "name": "index", "type": "uint256" },
{
"components": [
{
@ -25,7 +25,7 @@
"name": "inst",
"type": "address"
},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -38,7 +38,7 @@
"name": "addr",
"type": "address"
},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -84,7 +84,7 @@
"name": "expiryDate",
"type": "uint256"
},
{"internalType": "uint256", "name": "cycleId", "type": "uint256"},
{ "internalType": "uint256", "name": "cycleId", "type": "uint256" },
{
"internalType": "uint256",
"name": "submissionsLeft",
@ -130,8 +130,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -142,8 +142,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -200,8 +200,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -212,8 +212,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -263,8 +263,8 @@
"inputs": [
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "address", "name": "module", "type": "address"}
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "address", "name": "module", "type": "address" }
],
"indexed": true,
"internalType": "struct Provider",
@ -275,8 +275,8 @@
"components": [
{
"components": [
{"internalType": "address", "name": "inst", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "address", "name": "inst", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -284,8 +284,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -296,8 +296,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -346,8 +346,8 @@
"inputs": [
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "address", "name": "module", "type": "address"}
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "address", "name": "module", "type": "address" }
],
"indexed": true,
"internalType": "struct Provider",
@ -358,8 +358,8 @@
"components": [
{
"components": [
{"internalType": "address", "name": "inst", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "address", "name": "inst", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -367,8 +367,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -379,8 +379,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -429,8 +429,8 @@
"inputs": [
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "address", "name": "module", "type": "address"}
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "address", "name": "module", "type": "address" }
],
"indexed": true,
"internalType": "struct Provider",
@ -441,8 +441,8 @@
"components": [
{
"components": [
{"internalType": "address", "name": "inst", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "address", "name": "inst", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -450,8 +450,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -462,8 +462,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -511,8 +511,8 @@
"inputs": [],
"name": "connectorID",
"outputs": [
{"internalType": "uint256", "name": "_type", "type": "uint256"},
{"internalType": "uint256", "name": "_id", "type": "uint256"}
{ "internalType": "uint256", "name": "_type", "type": "uint256" },
{ "internalType": "uint256", "name": "_id", "type": "uint256" }
],
"stateMutability": "pure",
"type": "function"
@ -521,18 +521,18 @@
"inputs": [
{
"components": [
{"internalType": "uint256", "name": "id", "type": "uint256"},
{"internalType": "address", "name": "userProxy", "type": "address"},
{ "internalType": "uint256", "name": "id", "type": "uint256" },
{ "internalType": "address", "name": "userProxy", "type": "address" },
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "address", "name": "module", "type": "address"}
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "address", "name": "module", "type": "address" }
],
"internalType": "struct Provider",
"name": "provider",
"type": "tuple"
},
{"internalType": "uint256", "name": "index", "type": "uint256"},
{ "internalType": "uint256", "name": "index", "type": "uint256" },
{
"components": [
{
@ -542,7 +542,7 @@
"name": "inst",
"type": "address"
},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -555,7 +555,7 @@
"name": "addr",
"type": "address"
},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -601,7 +601,7 @@
"name": "expiryDate",
"type": "uint256"
},
{"internalType": "uint256", "name": "cycleId", "type": "uint256"},
{ "internalType": "uint256", "name": "cycleId", "type": "uint256" },
{
"internalType": "uint256",
"name": "submissionsLeft",
@ -620,7 +620,7 @@
},
{
"inputs": [
{"internalType": "address", "name": "_executor", "type": "address"},
{ "internalType": "address", "name": "_executor", "type": "address" },
{
"components": [
{
@ -630,8 +630,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -642,8 +642,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -659,10 +659,10 @@
"name": "_taskSpecs",
"type": "tuple[]"
},
{"internalType": "address[]", "name": "_modules", "type": "address[]"},
{"internalType": "uint256", "name": "_ethToDeposit", "type": "uint256"},
{"internalType": "uint256", "name": "_getId", "type": "uint256"},
{"internalType": "uint256", "name": "_setId", "type": "uint256"}
{ "internalType": "address[]", "name": "_modules", "type": "address[]" },
{ "internalType": "uint256", "name": "_ethToDeposit", "type": "uint256" },
{ "internalType": "uint256", "name": "_getId", "type": "uint256" },
{ "internalType": "uint256", "name": "_setId", "type": "uint256" }
],
"name": "multiProvide",
"outputs": [],
@ -685,8 +685,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -697,8 +697,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -714,9 +714,9 @@
"name": "_taskSpecs",
"type": "tuple[]"
},
{"internalType": "address[]", "name": "_modules", "type": "address[]"},
{"internalType": "uint256", "name": "_getId", "type": "uint256"},
{"internalType": "uint256", "name": "_setId", "type": "uint256"}
{ "internalType": "address[]", "name": "_modules", "type": "address[]" },
{ "internalType": "uint256", "name": "_getId", "type": "uint256" },
{ "internalType": "uint256", "name": "_setId", "type": "uint256" }
],
"name": "multiUnprovide",
"outputs": [],
@ -726,7 +726,7 @@
{
"inputs": [],
"name": "name",
"outputs": [{"internalType": "string", "name": "", "type": "string"}],
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
"stateMutability": "view",
"type": "function"
},
@ -734,8 +734,8 @@
"inputs": [
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "address", "name": "module", "type": "address"}
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "address", "name": "module", "type": "address" }
],
"internalType": "struct Provider",
"name": "_provider",
@ -745,8 +745,8 @@
"components": [
{
"components": [
{"internalType": "address", "name": "inst", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "address", "name": "inst", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -754,8 +754,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -766,8 +766,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -788,7 +788,7 @@
"name": "_task",
"type": "tuple"
},
{"internalType": "uint256", "name": "_expiryDate", "type": "uint256"}
{ "internalType": "uint256", "name": "_expiryDate", "type": "uint256" }
],
"name": "submitTask",
"outputs": [],
@ -799,8 +799,8 @@
"inputs": [
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "address", "name": "module", "type": "address"}
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "address", "name": "module", "type": "address" }
],
"internalType": "struct Provider",
"name": "_provider",
@ -810,8 +810,8 @@
"components": [
{
"components": [
{"internalType": "address", "name": "inst", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "address", "name": "inst", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -819,8 +819,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -831,8 +831,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -853,7 +853,7 @@
"name": "_tasks",
"type": "tuple[]"
},
{"internalType": "uint256", "name": "_expiryDate", "type": "uint256"},
{ "internalType": "uint256", "name": "_expiryDate", "type": "uint256" },
{
"internalType": "uint256",
"name": "_sumOfRequestedTaskSubmits",
@ -869,8 +869,8 @@
"inputs": [
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "address", "name": "module", "type": "address"}
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "address", "name": "module", "type": "address" }
],
"internalType": "struct Provider",
"name": "_provider",
@ -880,8 +880,8 @@
"components": [
{
"components": [
{"internalType": "address", "name": "inst", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "address", "name": "inst", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -889,8 +889,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -901,8 +901,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -923,8 +923,8 @@
"name": "_tasks",
"type": "tuple[]"
},
{"internalType": "uint256", "name": "_expiryDate", "type": "uint256"},
{"internalType": "uint256", "name": "_cycles", "type": "uint256"}
{ "internalType": "uint256", "name": "_expiryDate", "type": "uint256" },
{ "internalType": "uint256", "name": "_cycles", "type": "uint256" }
],
"name": "submitTaskCycle",
"outputs": [],

View File

@ -1,7 +1,7 @@
{
"contractName": "ConnectAuth",
"abi": [
{"inputs": [], "stateMutability": "nonpayable", "type": "constructor"},
{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
{
"anonymous": false,
"inputs": [
@ -30,7 +30,7 @@
},
{
"inputs": [
{"internalType": "address[]", "name": "cTkn", "type": "address[]"}
{ "internalType": "address[]", "name": "cTkn", "type": "address[]" }
],
"name": "addCtknMapping",
"outputs": [],
@ -39,7 +39,7 @@
},
{
"inputs": [
{"internalType": "address[]", "name": "gemJoins", "type": "address[]"}
{ "internalType": "address[]", "name": "gemJoins", "type": "address[]" }
],
"name": "addGemJoinMapping",
"outputs": [],
@ -47,44 +47,44 @@
"type": "function"
},
{
"inputs": [{"internalType": "address", "name": "", "type": "address"}],
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
"name": "cTokenMapping",
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "connectors",
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}],
"inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"name": "gemJoinMapping",
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "instaIndex",
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [{"internalType": "string", "name": "", "type": "string"}],
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
}

View File

@ -6,16 +6,16 @@
"name": "_index",
"type": "address"
},
{"internalType": "address", "name": "_gelatoCore", "type": "address"}
{ "internalType": "address", "name": "_gelatoCore", "type": "address" }
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{"internalType": "uint256", "name": "", "type": "uint256"},
{"internalType": "address", "name": "", "type": "address"},
{"internalType": "address", "name": "", "type": "address"},
{ "internalType": "uint256", "name": "", "type": "uint256" },
{ "internalType": "address", "name": "", "type": "address" },
{ "internalType": "address", "name": "", "type": "address" },
{
"components": [
{
@ -25,7 +25,7 @@
"name": "inst",
"type": "address"
},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -33,8 +33,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -45,8 +45,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -67,18 +67,18 @@
"name": "_task",
"type": "tuple"
},
{"internalType": "uint256", "name": "", "type": "uint256"}
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"name": "execPayload",
"outputs": [
{"internalType": "bytes", "name": "payload", "type": "bytes"},
{"internalType": "bool", "name": "", "type": "bool"}
{ "internalType": "bytes", "name": "payload", "type": "bytes" },
{ "internalType": "bool", "name": "", "type": "bool" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{"internalType": "bytes", "name": "", "type": "bytes"}],
"inputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
"name": "execRevertCheck",
"outputs": [],
"stateMutability": "pure",
@ -87,7 +87,7 @@
{
"inputs": [],
"name": "gelatoCore",
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
@ -106,8 +106,8 @@
},
{
"inputs": [
{"internalType": "address", "name": "_userProxy", "type": "address"},
{"internalType": "address", "name": "", "type": "address"},
{ "internalType": "address", "name": "_userProxy", "type": "address" },
{ "internalType": "address", "name": "", "type": "address" },
{
"components": [
{
@ -117,7 +117,7 @@
"name": "inst",
"type": "address"
},
{"internalType": "bytes", "name": "data", "type": "bytes"}
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Condition[]",
"name": "conditions",
@ -125,8 +125,8 @@
},
{
"components": [
{"internalType": "address", "name": "addr", "type": "address"},
{"internalType": "bytes", "name": "data", "type": "bytes"},
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{
"internalType": "enum Operation",
"name": "operation",
@ -137,8 +137,8 @@
"name": "dataFlow",
"type": "uint8"
},
{"internalType": "uint256", "name": "value", "type": "uint256"},
{"internalType": "bool", "name": "termsOkCheck", "type": "bool"}
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "bool", "name": "termsOkCheck", "type": "bool" }
],
"internalType": "struct Action[]",
"name": "actions",
@ -161,7 +161,7 @@
}
],
"name": "isProvided",
"outputs": [{"internalType": "string", "name": "", "type": "string"}],
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
"stateMutability": "view",
"type": "function"
}

View File

@ -1,8 +1,8 @@
// running `npx hardhat test` automatically makes use of hardhat-waffle plugin
// => only dependency we need is "chai"
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
//const { sleep } = GelatoCoreLib;
@ -194,7 +194,7 @@ describe("DSA setup with Gelato Tests", function () {
);
// We withdraw to otherWallet to ignore gasUsed during test
const {1: otherWallet} = await ethers.getSigners();
const { 1: otherWallet } = await ethers.getSigners();
// Instantiate Gelato ConnectBasic.withdraw Task
const withdrawFromDSATask = new GelatoCoreLib.Task({

View File

@ -1,8 +1,8 @@
// running `npx hardhat test` automatically makes use of hardhat-waffle plugin
// => only dependency we need is "chai"
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
//const { sleep } = GelatoCoreLib;

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
const setupFullRefinanceMakerToMaker = require("./helpers/setupFullRefinanceMakerToMaker");

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
const setupFullRefinanceMakerToMakerWithVaultBCreation = require("./helpers/setupFullRefinanceMakerToMakerWithVaultBCreation");

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
const setupFullRefinanceMakerToMakerWithVaultBCreationMock = require("./helpers/setupFullRefinanceMakerToMakerWithVaultBCreationMock");

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
async function addETHBGemJoinMapping(userWallet, instaMapping, instaMaster) {
await userWallet.sendTransaction({

View File

@ -1,4 +1,4 @@
const {expect} = require("chai");
const { expect } = require("chai");
async function addProviderModuleDSA(
gelatoProviderWallet,

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
const InstaAccount = require("../../../pre-compiles/InstaAccount.json");

View File

@ -1,4 +1,4 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const ConnectMaker = require("../../../pre-compiles/ConnectMaker.json");

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
async function enableGelatoConnectorsForFromMaker(
userWallet,

View File

@ -1,5 +1,5 @@
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
const ETH = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
const GAS_LIMIT = "5000000";

View File

@ -1,5 +1,5 @@
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
const InstaIndex = require("../../../pre-compiles/InstaIndex.json");

View File

@ -1,5 +1,5 @@
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
async function getMockGelato() {
return await ethers.getContract("MockGelatoExecutor");

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {ethers} = hre;
const { ethers } = hre;
async function getWallets() {
let userWallet;

View File

@ -1,4 +1,4 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const ConnectMaker = require("../../../pre-compiles/ConnectMaker.json");

View File

@ -1,4 +1,4 @@
const {expect} = require("chai");
const { expect } = require("chai");
async function provideFunds(
gelatoProviderWallet,

View File

@ -1,4 +1,4 @@
const {expect} = require("chai");
const { expect } = require("chai");
async function providerAssignsExecutor(
gelatoProviderWallet,

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
// Instadapp UI should do the same implementation for submitting debt bridge task

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
// Instadapp UI should do the same implementation for submitting debt bridge task

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {ethers, deployments} = hre;
const { ethers, deployments } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
// Instadapp UI should do the same implementation for submitting debt bridge task

View File

@ -1,4 +1,4 @@
const {expect} = require("chai");
const { expect } = require("chai");
async function stakeExecutor(gelatoExecutorWallet, gelatoCore) {
//#region Executor Stake on Gelato

View File

@ -1,4 +1,4 @@
const {expect} = require("chai");
const { expect } = require("chai");
async function stakeExecutor(
gelatoExecutorWallet,

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
// #region Contracts ABI

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {ethers, deployments} = hre;
const { ethers, deployments } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const WAD = ethers.utils.parseUnits("1", 18);

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const ORACLE_MAKER_ETH_USD = "ETH/USD-Maker-v1";
const ORACLE_MAKER_ETH_USD_ADDR = "0x729D19f657BD0614b4985Cf1D82531c67569197B";

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
// #region Contracts ABI

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const InstaPoolResolver = require("../../artifacts/contracts/interfaces/InstaDapp/resolvers/IInstaPoolResolver.sol/IInstaPoolResolver.json");
const DAI = hre.network.config.DAI;

View File

@ -1,6 +1,6 @@
const {expect} = require("chai");
const { expect } = require("chai");
const hre = require("hardhat");
const {deployments, ethers} = hre;
const { deployments, ethers } = hre;
const GelatoCoreLib = require("@gelatonetwork/core");
// #region Contracts ABI and Constants

View File

@ -709,10 +709,12 @@
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.8.2.tgz#a6a5e93ac8dca6884a99a532f133beba59b87b69"
integrity sha512-8LySx3qrNXPgB5JiULfG10O3V7QTxI/TLzSw5hFQhXWSkVxZBAv4rZQ0sYgLEbc8g3L2lmnujj1hKul38Eu5NQ==
"@solidity-parser/parser@^0.8.1":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.8.1.tgz#1b606578af86b9ad10755409804a6ba83f9ce8a4"
integrity sha512-DF7H6T8I4lo2IZOE2NZwt3631T8j1gjpQLjmvY2xBNK50c4ltslR4XPKwT6RkeSd4+xCAK0GHC/k7sbRDBE4Yw==
"@solidity-parser/parser@^0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.9.0.tgz#1f9aedd25bf87983a02d95458c673c017a8857af"
integrity sha512-u1WzZgzOBFsGAcUhyj8DN/kop1SvrsaRT2ZVvDpVYnFI86YwbLrXCTGxefJzYGnA5Vajbbhi4aRtlxxFh69dfA==
dependencies:
antlr4 "^4.8.0"
"@szmarczak/http-timer@^1.1.2":
version "1.1.2"
@ -1028,6 +1030,11 @@ antlr4@4.7.1:
resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773"
integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==
antlr4@^4.8.0:
version "4.8.0"
resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.8.0.tgz#f938ec171be7fc2855cd3a533e87647185b32b6a"
integrity sha512-en/MxQ4OkPgGJQ3wD/muzj1uDnFSzdFIhc2+c6bHZokWkuBb6RRvFjpWhPxWLbgQvaEzldJZ0GSQpfSAaE3hqg==
anymatch@~3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
@ -4485,10 +4492,10 @@ hardhat-gas-reporter@1.0.1:
dependencies:
eth-gas-reporter "^0.2.19"
hardhat@2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.0.2.tgz#30c3c5a49f950aad2e39c479208b4132052dc735"
integrity sha512-P8SMYsWeC0OakmHUAgL9STalidQ1bAHFHFroPyvnfljei7EPHaIQpS6QursoZ+KVNkPTnKC+9m1Lky8nnKIjuw==
hardhat@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.0.3.tgz#35e07060d9854d4182f201aeaa1c05316bd7e4d3"
integrity sha512-mDygAl+1qd5KBdXQBfc3R5XmC/rVdYYbEuOTSQY3rlncVu9gfockZVDsHtAMPw/FiBIRMApLcOceK7D1XQmHRw==
dependencies:
"@nomiclabs/ethereumjs-vm" "^4.1.1"
"@sentry/node" "^5.18.1"
@ -6765,12 +6772,12 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
prettier-plugin-solidity@1.0.0-alpha.59:
version "1.0.0-alpha.59"
resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.59.tgz#b0cf82fb068537d152d0bc417588d08e952a56c6"
integrity sha512-6cE0SWaiYCBoJY4clCfsbWlEEOU4K42Ny6Tg4Jwprgts/q+AVfYnPQ5coRs7zIjYzc4RVspifYPeh+oAg8RpLw==
prettier-plugin-solidity@1.0.0-alpha.60:
version "1.0.0-alpha.60"
resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.60.tgz#310a3af7e47d24fa1ef9e174523ff1f7b4d56c42"
integrity sha512-Dd6T0dVfw0kJrlEnLDFFE3mKRSP7zpT6zcIWvnSW+z4NBl+gmwJ7UJRZHD0CNDD6N48c+zb28xs3oF0ylDaYyg==
dependencies:
"@solidity-parser/parser" "^0.8.1"
"@solidity-parser/parser" "^0.9.0"
dir-to-object "^2.0.0"
emoji-regex "^9.0.0"
escape-string-regexp "^4.0.0"