Gelato-automations/deployments/mainnet/ConditionDebtBridgeIsAffordable.json

157 lines
58 KiB
JSON
Raw Permalink Normal View History

2020-11-16 16:55:04 +00:00
{
"address": "0x19202579F1Aed3Fa00807Ac89EbD92901021A15f",
2020-11-16 16:55:04 +00:00
"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": "0x2af52ccf7dcf3e2f59f788d9beeab569c9fea6eb33b440992ac31e4c5356643c",
2020-11-16 16:55:04 +00:00
"receipt": {
"to": null,
"from": "0x5B753BF02a42bC73B5846dfd16a8F2e082b99a6a",
"contractAddress": "0x19202579F1Aed3Fa00807Ac89EbD92901021A15f",
"transactionIndex": 127,
"gasUsed": "797549",
2020-11-16 16:55:04 +00:00
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x8153d07f3c6c291919b4b8c89c6a0c6da4d8aa6e7adbdf2e97b487717b028e75",
"transactionHash": "0x2af52ccf7dcf3e2f59f788d9beeab569c9fea6eb33b440992ac31e4c5356643c",
2020-11-16 16:55:04 +00:00
"logs": [],
"blockNumber": 11348200,
"cumulativeGasUsed": "9840264",
2020-11-16 16:55:04 +00:00
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "bf7cd3f181208953a3fd533c358cf962",
"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": "0x608060405234801561001057600080fd5b50610d79806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063a99891c514610046578063be9eea981461006f578063c39db98314610082575b600080fd5b610059610054366004610b52565b610095565b6040516100669190610c4f565b60405180910390f35b61005961007d366004610bcf565b6100cd565b610059610090366004610bcf565b610195565b60606000806100a78560048189610d1b565b8101906100b49190610bcf565b915091506100c282826100cd565b979650505050505050565b606060006100da846101ec565b9050600061011e6101196000610114736b175474e89094c44da98b954eedeac495271d0f61010f61010a8b61030d565b610572565b610586565b610692565b6106f2565b90508361012b8284610705565b1061016f576040518060400160405280601781526020017f446562744272696467654e6f744166666f726461626c650000000000000000008152509250505061018f565b604051806040016040528060028152602001614f4b60f01b815250925050505b92915050565b606063be9eea9860e01b83836040516024016101b2929190610d0d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905092915050565b600080735ef30b9986345249bc32d8928b7ee64de9435e3990506000816001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b15801561024157600080fd5b505afa158015610255573d6000803e3d6000fd5b505050506040513d602081101561026b57600080fd5b5051905060008061027c8487610736565b915091506000836001600160a01b0316632424be5c84846040518363ffffffff1660e01b815260040180838152602001826001600160a01b0316815260200192505050604080518083038186803b1580156102d657600080fd5b505afa1580156102ea573d6000803e3d6000fd5b505050506040513d604081101561030057600080fd5b5051979650505050505050565b6000735ef30b9986345249bc32d8928b7ee64de9435e3981806103308386610736565b915091506000836001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b15801561036f57600080fd5b505afa158015610383573d6000803e3d6000fd5b505050506040513d602081101561039957600080fd5b505160408051636cb1c69b60e11b81526004810186905290519192506000916001600160a01b0384169163d9638d369160248083019260a0929190829003018186803b1580156103e857600080fd5b505afa1580156103fc573d6000803e3d6000fd5b505050506040513d60a081101561041257600080fd5b5060200151604080516309092f9760e21b8152600481018790526001600160a01b038681166024830152825193945060009390861692632424be5c9260448082019391829003018186803b15801561046957600080fd5b505afa15801561047d573d6000803e3d6000fd5b505050506040513d604081101561049357600080fd5b5060209081015160408051633612d9a360e11b81526001600160a01b038881166004830152915192945060009391871692636c25b34692602480840193919291829003018186803b1580156104e757600080fd5b505afa1580156104fb573d6000803e3d6000fd5b505050506040513d602081101561051157600080fd5b50519050600061052a610524848661082b565b8361088e565b90506b033b2e3c9fd0803ce800000081049850806105548a6b033b2e3c9fd0803ce800000061082b565b1061055f5788610564565b886001015b9a9950505050505050505050565b600061018f82670df27a2cdf4480006108de565b6000610590610aad565b604051635a860c8760e01b815273a004a5afba04b74037e9e52ba1f7eb02b5e6150990635a860c87906105c7908790600401610c3b565b60806040518083038186803b1580156105df57600080fd5b505afa1580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106179190610af3565b9050828160000151111561062f57600091505061018f565b828160200151111561064557600191505061018f565b828160400151111561065b57600291505061018f565b828160600151111561067157600391505061018f565b60405162461bcd60e51b815260040161068990610cbf565b60405180910390fd5b600061069d82610906565b6106eb836106c2576106ad61092a565b83600481106106b857fe5b60200201516106e6565b6106e66106cd61092a565b84600481106106d857fe5b6020020151620249f0610964565b6109b3565b9392505050565b600061018f826107006109d5565b61082b565b60008161072761071d85670de0b6b3a764000061082b565b6002855b04610964565b8161072e57fe5b049392505050565b600080836001600160a01b0316632c2cb9fd846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561077d57600080fd5b505afa158015610791573d6000803e3d6000fd5b505050506040513d60208110156107a757600080fd5b505160408051632726b07360e01b81526004810186905290519193506001600160a01b03861691632726b073916024
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063a99891c514610046578063be9eea981461006f578063c39db98314610082575b600080fd5b610059610054366004610b52565b610095565b6040516100669190610c4f565b60405180910390f35b61005961007d366004610bcf565b6100cd565b610059610090366004610bcf565b610195565b60606000806100a78560048189610d1b565b8101906100b49190610bcf565b915091506100c282826100cd565b979650505050505050565b606060006100da846101ec565b9050600061011e6101196000610114736b175474e89094c44da98b954eedeac495271d0f61010f61010a8b61030d565b610572565b610586565b610692565b6106f2565b90508361012b8284610705565b1061016f576040518060400160405280601781526020017f446562744272696467654e6f744166666f726461626c650000000000000000008152509250505061018f565b604051806040016040528060028152602001614f4b60f01b815250925050505b92915050565b606063be9eea9860e01b83836040516024016101b2929190610d0d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905092915050565b600080735ef30b9986345249bc32d8928b7ee64de9435e3990506000816001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b15801561024157600080fd5b505afa158015610255573d6000803e3d6000fd5b505050506040513d602081101561026b57600080fd5b5051905060008061027c8487610736565b915091506000836001600160a01b0316632424be5c84846040518363ffffffff1660e01b815260040180838152602001826001600160a01b0316815260200192505050604080518083038186803b1580156102d657600080fd5b505afa1580156102ea573d6000803e3d6000fd5b505050506040513d604081101561030057600080fd5b5051979650505050505050565b6000735ef30b9986345249bc32d8928b7ee64de9435e3981806103308386610736565b915091506000836001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b15801561036f57600080fd5b505afa158015610383573d6000803e3d6000fd5b505050506040513d602081101561039957600080fd5b505160408051636cb1c69b60e11b81526004810186905290519192506000916001600160a01b0384169163d9638d369160248083019260a0929190829003018186803b1580156103e857600080fd5b505afa1580156103fc573d6000803e3d6000fd5b505050506040513d60a081101561041257600080fd5b5060200151604080516309092f9760e21b8152600481018790526001600160a01b038681166024830152825193945060009390861692632424be5c9260448082019391829003018186803b15801561046957600080fd5b505afa15801561047d573d6000803e3d6000fd5b505050506040513d604081101561049357600080fd5b5060209081015160408051633612d9a360e11b81526001600160a01b038881166004830152915192945060009391871692636c25b34692602480840193919291829003018186803b1580156104e757600080fd5b505afa1580156104fb573d6000803e3d6000fd5b505050506040513d602081101561051157600080fd5b50519050600061052a610524848661082b565b8361088e565b90506b033b2e3c9fd0803ce800000081049850806105548a6b033b2e3c9fd0803ce800000061082b565b1061055f5788610564565b886001015b9a9950505050505050505050565b600061018f82670df27a2cdf4480006108de565b6000610590610aad565b604051635a860c8760e01b815273a004a5afba04b74037e9e52ba1f7eb02b5e6150990635a860c87906105c7908790600401610c3b565b60806040518083038186803b1580156105df57600080fd5b505afa1580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106179190610af3565b9050828160000151111561062f57600091505061018f565b828160200151111561064557600191505061018f565b828160400151111561065b57600291505061018f565b828160600151111561067157600391505061018f565b60405162461bcd60e51b815260040161068990610cbf565b60405180910390fd5b600061069d82610906565b6106eb836106c2576106ad61092a565b83600481106106b857fe5b60200201516106e6565b6106e66106cd61092a565b84600481106106d857fe5b6020020151620249f0610964565b6109b3565b9392505050565b600061018f826107006109d5565b61082b565b60008161072761071d85670de0b6b3a764000061082b565b6002855b04610964565b8161072e57fe5b049392505050565b600080836001600160a01b0316632c2cb9fd846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561077d57600080fd5b505afa158015610791573d6000803e3d6000fd5b505050506040513d60208110156107a757600080fd5b505160408051632726b07360e01b81526004810186905290519193506001600160a01b03861691632726b07391602480820192602092909190829003018186803b1580156107f457600080
2020-11-16 16:55:04 +00:00
"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
}
}