Gelato-automations/pre-compiles/InstaCompoundResolver.json

261 lines
19 KiB
JSON
Raw Normal View History

2020-10-19 23:16:23 +00:00
{
"contractName": "InstaCompoundResolver",
"abi": [
{
"inputs": [],
"name": "getCETHAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getCompReadAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getCompToken",
"outputs": [
{
"internalType": "contract TokenInterface",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address[]",
"name": "cAddress",
"type": "address[]"
}
],
"name": "getCompoundData",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "tokenPriceInEth",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenPriceInUsd",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exchangeRateStored",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balanceOfUser",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowBalanceStoredUser",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "supplyRatePerBlock",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowRatePerBlock",
"type": "uint256"
}
],
"internalType": "struct Helpers.CompData[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getComptroller",
"outputs": [
{
"internalType": "contract ComptrollerLensInterface",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getOracleAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address[]",
"name": "cAddress",
"type": "address[]"
}
],
"name": "getPosition",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "tokenPriceInEth",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenPriceInUsd",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exchangeRateStored",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balanceOfUser",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowBalanceStoredUser",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "supplyRatePerBlock",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowRatePerBlock",
"type": "uint256"
}
],
"internalType": "struct Helpers.CompData[]",
"name": "",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "votes",
"type": "uint256"
},
{
"internalType": "address",
"name": "delegate",
"type": "address"
},
{
"internalType": "uint256",
"name": "allocated",
"type": "uint256"
}
],
"internalType": "struct CompReadInterface.CompBalanceMetadataExt",
"name": "",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract CTokenInterface",
"name": "cToken",
"type": "address"
}
],
"name": "getPriceInEth",
"outputs": [
{
"internalType": "uint256",
"name": "priceInETH",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "priceInUSD",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b50610cb5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806370a58ec61161006657806370a58ec61461011857806379feab871461012d578063b18b78dd14610135578063c9ce5d861461013d578063e5cc7da41461014557610093565b806303d2862b1461009857806306fdde03146100c157806334ff2eeb146100d65780635ba81c87146100f7575b600080fd5b6100ab6100a6366004610958565b61014d565b6040516100b89190610b19565b60405180910390f35b6100c961047e565b6040516100b89190610b98565b6100e96100e4366004610a0a565b6104b0565b6040516100b8929190610c12565b61010a610105366004610958565b6106fb565b6040516100b8929190610b2c565b6101206107b1565b6040516100b89190610b05565b6101206107c9565b6101206107e1565b6101206107f9565b610120610811565b606080825167ffffffffffffffff8111801561016857600080fd5b506040519080825280602002602001820160405280156101a257816020015b61018f6108bc565b8152602001906001900390816101875790505b50905060005b83518110156104745760008482815181106101bf57fe5b602002602001015190506000806101d5836104b0565b915091506040518060e00160405280838152602001828152602001846001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b15801561022957600080fd5b505afa15801561023d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102619190610a75565b8152602001846001600160a01b03166370a082318b6040518263ffffffff1660e01b81526004016102929190610b05565b60206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e29190610a75565b8152602001846001600160a01b03166395dd91938b6040518263ffffffff1660e01b81526004016103139190610b05565b60206040518083038186803b15801561032b57600080fd5b505afa15801561033f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103639190610a75565b8152602001846001600160a01b031663ae9d70b06040518163ffffffff1660e01b815260040160206040518083038186803b1580156103a157600080fd5b505afa1580156103b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d99190610a75565b8152602001846001600160a01b031663f8f9da286040518163ffffffff1660e01b815260040160206040518083038186803b15801561041757600080fd5b505afa15801561042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044f9190610a75565b81525085858151811061045e57fe5b60209081029190910101525050506001016101a8565b5090505b92915050565b6040518060400160405280601681526020017521b7b6b837bab73216a932b9b7b63b32b916bb18971960511b81525081565b6000806000836001600160a01b03166104c76107f9565b6001600160a01b0316146105bb57836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561050e57600080fd5b505afa158015610522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105469190610935565b6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561057e57600080fd5b505afa158015610592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b69190610a75565b6105be565b60125b905060006105ca6107e1565b6001600160a01b031663fc57d4df866040518263ffffffff1660e01b81526004016105f59190610b05565b60206040518083038186803b15801561060d57600080fd5b505afa158015610621573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106459190610a75565b905060006106516107e1565b6001600160a01b031663fc57d4df6106676107f9565b6040518263ffffffff1660e01b81526004016106839190610b05565b60206040518083038186803b15801561069b57600080fd5b505afa1580156106af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d39190610a75565b905082601203600a0a82816106e457fe5b0493506106f18482610829565b9450505050915091565b60606107056108f9565b61070f848461014d565b610717610811565b6001600160a01b0316631ea6374161072d6107b1565b6107356107c9565b886040518463ffffffff1660e01b815260040161075493929190610b75565b608060405180830381600087803b15801561076e57600080fd5b505af1158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a69190610a26565b915091509250929050565b73c00e94cb662c3520282e6f5717214004a7f2688890565b733d9819210a31b4961b30ef54
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806370a58ec61161006657806370a58ec61461011857806379feab871461012d578063b18b78dd14610135578063c9ce5d861461013d578063e5cc7da41461014557610093565b806303d2862b1461009857806306fdde03146100c157806334ff2eeb146100d65780635ba81c87146100f7575b600080fd5b6100ab6100a6366004610958565b61014d565b6040516100b89190610b19565b60405180910390f35b6100c961047e565b6040516100b89190610b98565b6100e96100e4366004610a0a565b6104b0565b6040516100b8929190610c12565b61010a610105366004610958565b6106fb565b6040516100b8929190610b2c565b6101206107b1565b6040516100b89190610b05565b6101206107c9565b6101206107e1565b6101206107f9565b610120610811565b606080825167ffffffffffffffff8111801561016857600080fd5b506040519080825280602002602001820160405280156101a257816020015b61018f6108bc565b8152602001906001900390816101875790505b50905060005b83518110156104745760008482815181106101bf57fe5b602002602001015190506000806101d5836104b0565b915091506040518060e00160405280838152602001828152602001846001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b15801561022957600080fd5b505afa15801561023d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102619190610a75565b8152602001846001600160a01b03166370a082318b6040518263ffffffff1660e01b81526004016102929190610b05565b60206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e29190610a75565b8152602001846001600160a01b03166395dd91938b6040518263ffffffff1660e01b81526004016103139190610b05565b60206040518083038186803b15801561032b57600080fd5b505afa15801561033f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103639190610a75565b8152602001846001600160a01b031663ae9d70b06040518163ffffffff1660e01b815260040160206040518083038186803b1580156103a157600080fd5b505afa1580156103b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d99190610a75565b8152602001846001600160a01b031663f8f9da286040518163ffffffff1660e01b815260040160206040518083038186803b15801561041757600080fd5b505afa15801561042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044f9190610a75565b81525085858151811061045e57fe5b60209081029190910101525050506001016101a8565b5090505b92915050565b6040518060400160405280601681526020017521b7b6b837bab73216a932b9b7b63b32b916bb18971960511b81525081565b6000806000836001600160a01b03166104c76107f9565b6001600160a01b0316146105bb57836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561050e57600080fd5b505afa158015610522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105469190610935565b6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561057e57600080fd5b505afa158015610592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b69190610a75565b6105be565b60125b905060006105ca6107e1565b6001600160a01b031663fc57d4df866040518263ffffffff1660e01b81526004016105f59190610b05565b60206040518083038186803b15801561060d57600080fd5b505afa158015610621573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106459190610a75565b905060006106516107e1565b6001600160a01b031663fc57d4df6106676107f9565b6040518263ffffffff1660e01b81526004016106839190610b05565b60206040518083038186803b15801561069b57600080fd5b505afa1580156106af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d39190610a75565b905082601203600a0a82816106e457fe5b0493506106f18482610829565b9450505050915091565b60606107056108f9565b61070f848461014d565b610717610811565b6001600160a01b0316631ea6374161072d6107b1565b6107356107c9565b886040518463ffffffff1660e01b815260040161075493929190610b75565b608060405180830381600087803b15801561076e57600080fd5b505af1158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a69190610a26565b915091509250929050565b73c00e94cb662c3520282e6f5717214004a7f2688890565b733d9819210a31b4961b30ef54be2aed79b9c9cd3b90565b73922018674c12a7f0d394ebeef9b58f18
"linkReferences": {},
"deployedLinkReferences": {}
}