mirror of
https://github.com/Instadapp/Gelato-automations.git
synced 2024-07-29 22:28:07 +00:00
157 lines
51 KiB
JSON
157 lines
51 KiB
JSON
|
{
|
||
|
"address": "0x9530ed1B1936677189561420EA8F80E1dd42b4F8",
|
||
|
"abi": [
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "_vaultId",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "_ratioLimit",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "getConditionData",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "bytes",
|
||
|
"name": "",
|
||
|
"type": "bytes"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "pure",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "_vaultId",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "_ratioLimit",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "isAffordable",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "",
|
||
|
"type": "string"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"inputs": [
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "",
|
||
|
"type": "uint256"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "bytes",
|
||
|
"name": "_conditionData",
|
||
|
"type": "bytes"
|
||
|
},
|
||
|
{
|
||
|
"internalType": "uint256",
|
||
|
"name": "",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "ok",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"internalType": "string",
|
||
|
"name": "",
|
||
|
"type": "string"
|
||
|
}
|
||
|
],
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
}
|
||
|
],
|
||
|
"transactionHash": "0xc1df126d030c89f9d44185765e83301a249e2c0226e9b26be72896697ba8ca54",
|
||
|
"receipt": {
|
||
|
"to": null,
|
||
|
"from": "0xe1F076849B781b1395Fd332dC1758Dbc129be6EC",
|
||
|
"contractAddress": "0x9530ed1B1936677189561420EA8F80E1dd42b4F8",
|
||
|
"transactionIndex": 99,
|
||
|
"gasUsed": "748172",
|
||
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||
|
"blockHash": "0x34ce9ff4e7e5e1ab99667b03e0e24cbac1370a377a16e5934184c71dfd272dab",
|
||
|
"transactionHash": "0xc1df126d030c89f9d44185765e83301a249e2c0226e9b26be72896697ba8ca54",
|
||
|
"logs": [],
|
||
|
"blockNumber": 11270005,
|
||
|
"cumulativeGasUsed": "8009358",
|
||
|
"status": 1,
|
||
|
"byzantium": true
|
||
|
},
|
||
|
"args": [],
|
||
|
"solcInputHash": "89383a6e8e4256890d851f32690baa57",
|
||
|
"metadata": "{\"compiler\":{\"version\":\"0.7.4+commit.3f05b770\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vaultId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ratioLimit\",\"type\":\"uint256\"}],\"name\":\"getConditionData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vaultId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ratioLimit\",\"type\":\"uint256\"}],\"name\":\"isAffordable\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_conditionData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"ok\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Gelato Team\",\"kind\":\"dev\",\"methods\":{\"getConditionData(uint256,uint256)\":{\"details\":\"Use the return for your Task's Condition.data field off-chain.WARNING _ratioLimit should be in wad standard.\",\"returns\":{\"_0\":\"The encoded payload for your Task's Condition.data field.\"}},\"isAffordable(uint256,uint256)\":{\"details\":\"Check if the debt refinancing action is affordable.WARNING _ratioLimit should be in wad standard.\",\"params\":{\"_ratioLimit\":\"the maximum limit define by the user up on which the debt is too expensive for him\",\"_vaultId\":\"The id of the Maker vault\"},\"returns\":{\"_0\":\"OK if the Debt Bridge is affordable, otherwise some error message.\"}},\"ok(uint256,bytes,uint256)\":{\"details\":\"A standard interface for GelatoCore to read Conditions\",\"params\":{\"_conditionData\":\"The data you get from `getConditionData()`\"},\"returns\":{\"_0\":\"OK if the Condition is there, else some error message.\"}}},\"title\":\"ConditionDebtBridgeIsAffordable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getConditionData(uint256,uint256)\":{\"notice\":\"Convenience function for off-chain _conditionData encoding\"},\"isAffordable(uint256,uint256)\":{\"notice\":\"Specific implementation of this Condition's ok function\"},\"ok(uint256,bytes,uint256)\":{\"notice\":\"Standard GelatoCore system function\"}},\"notice\":\"Condition checking if Debt Refinance is affordable.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts/gelato/conditions/ConditionDebtBridgeIsAffordable.sol\":\"ConditionDebtBridgeIsAffordable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gelatonetwork/core/contracts/conditions/GelatoConditionsStandard.sol\":{\"content\":\"// \\\"SPDX-License-Identifier: UNLICENSED\\\"\\npragma solidity >=0.6.10;\\n\\nimport \\\"./IGelatoCondition.sol\\\";\\n\\nabstract contract GelatoConditionsStandard is IGelatoCondition {\\n string internal constant OK = \\\"OK\\\";\\n}\\n\",\"keccak256\":\"0xa3d9ee5c4398914bbc0fe75fe54e57b73b8a4367caf9a40d9e5fd1ba9d4adb89\",\"license\":\"UNLICENSED\"},\"@gelatonetwork/core/contracts/conditions/IGelatoCondition.sol\":{\"content\":\"// \\\"SPDX-License-Identifier: UNLICENSED\\\"\\npragma solidity >=0.6.10;\\npragma experimental ABIEncoderV2;\\n\\n/// @title IGelatoCondition - solidity interface of GelatoConditionsStandard\\n/// @notice all the APIs of GelatoConditionsStandard\\n/// @dev all the APIs are implemented inside GelatoConditionsStandard\\ninterface IGelatoCondition {\\n\\n /// @notice GelatoCore calls this to verify securely the specified Condition securely\\n /// @dev Be careful only to encode a Task's condition.data as is and not with the\\n /// \\\"ok\\\" selector or _taskReceiptId, since those two things are handled b
|
||
|
"bytecode": "0x608060405234801561001057600080fd5b50610c94806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063a99891c514610046578063be9eea981461006f578063c39db98314610082575b600080fd5b610059610054366004610a95565b610095565b6040516100669190610b92565b60405180910390f35b61005961007d366004610b12565b6100bf565b610059610090366004610b12565b610187565b60606000806100a685870187610b12565b915091506100b482826100bf565b979650505050505050565b606060006100cc846101b3565b9050600061011061010b6001610106736b175474e89094c44da98b954eedeac495271d0f6101016100fc8b6102d4565b610539565b61054d565b610659565b6106af565b90508361011d82846106c2565b10610161576040518060400160405280601781526020017f446562744272696467654e6f744166666f726461626c6500000000000000000081525092505050610181565b604051806040016040528060028152602001614f4b60f01b815250925050505b92915050565b6060828260405160200161019c929190610c50565b604051602081830303815290604052905092915050565b600080735ef30b9986345249bc32d8928b7ee64de9435e3990506000816001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b15801561020857600080fd5b505afa15801561021c573d6000803e3d6000fd5b505050506040513d602081101561023257600080fd5b5051905060008061024384876106f3565b915091506000836001600160a01b0316632424be5c84846040518363ffffffff1660e01b815260040180838152602001826001600160a01b0316815260200192505050604080518083038186803b15801561029d57600080fd5b505afa1580156102b1573d6000803e3d6000fd5b505050506040513d60408110156102c757600080fd5b5051979650505050505050565b6000735ef30b9986345249bc32d8928b7ee64de9435e3981806102f783866106f3565b915091506000836001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b15801561033657600080fd5b505afa15801561034a573d6000803e3d6000fd5b505050506040513d602081101561036057600080fd5b505160408051636cb1c69b60e11b81526004810186905290519192506000916001600160a01b0384169163d9638d369160248083019260a0929190829003018186803b1580156103af57600080fd5b505afa1580156103c3573d6000803e3d6000fd5b505050506040513d60a08110156103d957600080fd5b5060200151604080516309092f9760e21b8152600481018790526001600160a01b038681166024830152825193945060009390861692632424be5c9260448082019391829003018186803b15801561043057600080fd5b505afa158015610444573d6000803e3d6000fd5b505050506040513d604081101561045a57600080fd5b5060209081015160408051633612d9a360e11b81526001600160a01b038881166004830152915192945060009391871692636c25b34692602480840193919291829003018186803b1580156104ae57600080fd5b505afa1580156104c2573d6000803e3d6000fd5b505050506040513d60208110156104d857600080fd5b5051905060006104f16104eb84866107e8565b8361084b565b90506b033b2e3c9fd0803ce8000000810498508061051b8a6b033b2e3c9fd0803ce80000006107e8565b10610526578861052b565b886001015b9a9950505050505050505050565b600061018182670df27a2cdf44800061089b565b60006105576109f0565b604051635a860c8760e01b815273a004a5afba04b74037e9e52ba1f7eb02b5e6150990635a860c879061058e908790600401610b7e565b60806040518083038186803b1580156105a657600080fd5b505afa1580156105ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105de9190610a36565b905082816000015111156105f6576000915050610181565b828160200151111561060c576001915050610181565b8281604001511115610622576002915050610181565b8281606001511115610638576003915050610181565b60405162461bcd60e51b815260040161065090610c02565b60405180910390fd5b6000610664826108c3565b82610686576106716108e7565b826004811061067c57fe5b60200201516106a8565b6106a86106916108e7565b836004811061069c57fe5b60200201516000610921565b9392505050565b6000610181826106bd610970565b6107e8565b6000816106e46106da85670de0b6b3a76400006107e8565b6002855b04610921565b816106eb57fe5b049392505050565b600080836001600160a01b0316632c2cb9fd846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561073a57600080fd5b505afa15801561074e573d6000803e3d6000fd5b505050506040513d602081101561076457600080fd5b505160408051632726b07360e01b81526004810186905290519193506001600160a01b03861691632726b07391602480820192602092909190829003018186803b1580156107b157600080fd5b505afa1580156107c5573d6000803e3d6000fd5b505050506040513d60208110156107db57
|
||
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063a99891c514610046578063be9eea981461006f578063c39db98314610082575b600080fd5b610059610054366004610a95565b610095565b6040516100669190610b92565b60405180910390f35b61005961007d366004610b12565b6100bf565b610059610090366004610b12565b610187565b60606000806100a685870187610b12565b915091506100b482826100bf565b979650505050505050565b606060006100cc846101b3565b9050600061011061010b6001610106736b175474e89094c44da98b954eedeac495271d0f6101016100fc8b6102d4565b610539565b61054d565b610659565b6106af565b90508361011d82846106c2565b10610161576040518060400160405280601781526020017f446562744272696467654e6f744166666f726461626c6500000000000000000081525092505050610181565b604051806040016040528060028152602001614f4b60f01b815250925050505b92915050565b6060828260405160200161019c929190610c50565b604051602081830303815290604052905092915050565b600080735ef30b9986345249bc32d8928b7ee64de9435e3990506000816001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b15801561020857600080fd5b505afa15801561021c573d6000803e3d6000fd5b505050506040513d602081101561023257600080fd5b5051905060008061024384876106f3565b915091506000836001600160a01b0316632424be5c84846040518363ffffffff1660e01b815260040180838152602001826001600160a01b0316815260200192505050604080518083038186803b15801561029d57600080fd5b505afa1580156102b1573d6000803e3d6000fd5b505050506040513d60408110156102c757600080fd5b5051979650505050505050565b6000735ef30b9986345249bc32d8928b7ee64de9435e3981806102f783866106f3565b915091506000836001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b15801561033657600080fd5b505afa15801561034a573d6000803e3d6000fd5b505050506040513d602081101561036057600080fd5b505160408051636cb1c69b60e11b81526004810186905290519192506000916001600160a01b0384169163d9638d369160248083019260a0929190829003018186803b1580156103af57600080fd5b505afa1580156103c3573d6000803e3d6000fd5b505050506040513d60a08110156103d957600080fd5b5060200151604080516309092f9760e21b8152600481018790526001600160a01b038681166024830152825193945060009390861692632424be5c9260448082019391829003018186803b15801561043057600080fd5b505afa158015610444573d6000803e3d6000fd5b505050506040513d604081101561045a57600080fd5b5060209081015160408051633612d9a360e11b81526001600160a01b038881166004830152915192945060009391871692636c25b34692602480840193919291829003018186803b1580156104ae57600080fd5b505afa1580156104c2573d6000803e3d6000fd5b505050506040513d60208110156104d857600080fd5b5051905060006104f16104eb84866107e8565b8361084b565b90506b033b2e3c9fd0803ce8000000810498508061051b8a6b033b2e3c9fd0803ce80000006107e8565b10610526578861052b565b886001015b9a9950505050505050505050565b600061018182670df27a2cdf44800061089b565b60006105576109f0565b604051635a860c8760e01b815273a004a5afba04b74037e9e52ba1f7eb02b5e6150990635a860c879061058e908790600401610b7e565b60806040518083038186803b1580156105a657600080fd5b505afa1580156105ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105de9190610a36565b905082816000015111156105f6576000915050610181565b828160200151111561060c576001915050610181565b8281604001511115610622576002915050610181565b8281606001511115610638576003915050610181565b60405162461bcd60e51b815260040161065090610c02565b60405180910390fd5b6000610664826108c3565b82610686576106716108e7565b826004811061067c57fe5b60200201516106a8565b6106a86106916108e7565b836004811061069c57fe5b60200201516000610921565b9392505050565b6000610181826106bd610970565b6107e8565b6000816106e46106da85670de0b6b3a76400006107e8565b6002855b04610921565b816106eb57fe5b049392505050565b600080836001600160a01b0316632c2cb9fd846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561073a57600080fd5b505afa15801561074e573d6000803e3d6000fd5b505050506040513d602081101561076457600080fd5b505160408051632726b07360e01b81526004810186905290519193506001600160a01b03861691632726b07391602480820192602092909190829003018186803b1580156107b157600080fd5b505afa1580156107c5573d6000803e3d6000fd5b505050506040513d60208110156107db57600080fd5b5051919491935090915050565b60008115806108035750
|
||
|
"devdoc": {
|
||
|
"author": "Gelato Team",
|
||
|
"kind": "dev",
|
||
|
"methods": {
|
||
|
"getConditionData(uint256,uint256)": {
|
||
|
"details": "Use the return for your Task's Condition.data field off-chain.WARNING _ratioLimit should be in wad standard.",
|
||
|
"returns": {
|
||
|
"_0": "The encoded payload for your Task's Condition.data field."
|
||
|
}
|
||
|
},
|
||
|
"isAffordable(uint256,uint256)": {
|
||
|
"details": "Check if the debt refinancing action is affordable.WARNING _ratioLimit should be in wad standard.",
|
||
|
"params": {
|
||
|
"_ratioLimit": "the maximum limit define by the user up on which the debt is too expensive for him",
|
||
|
"_vaultId": "The id of the Maker vault"
|
||
|
},
|
||
|
"returns": {
|
||
|
"_0": "OK if the Debt Bridge is affordable, otherwise some error message."
|
||
|
}
|
||
|
},
|
||
|
"ok(uint256,bytes,uint256)": {
|
||
|
"details": "A standard interface for GelatoCore to read Conditions",
|
||
|
"params": {
|
||
|
"_conditionData": "The data you get from `getConditionData()`"
|
||
|
},
|
||
|
"returns": {
|
||
|
"_0": "OK if the Condition is there, else some error message."
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"title": "ConditionDebtBridgeIsAffordable",
|
||
|
"version": 1
|
||
|
},
|
||
|
"userdoc": {
|
||
|
"kind": "user",
|
||
|
"methods": {
|
||
|
"getConditionData(uint256,uint256)": {
|
||
|
"notice": "Convenience function for off-chain _conditionData encoding"
|
||
|
},
|
||
|
"isAffordable(uint256,uint256)": {
|
||
|
"notice": "Specific implementation of this Condition's ok function"
|
||
|
},
|
||
|
"ok(uint256,bytes,uint256)": {
|
||
|
"notice": "Standard GelatoCore system function"
|
||
|
}
|
||
|
},
|
||
|
"notice": "Condition checking if Debt Refinance is affordable.",
|
||
|
"version": 1
|
||
|
},
|
||
|
"storageLayout": {
|
||
|
"storage": [],
|
||
|
"types": null
|
||
|
}
|
||
|
}
|