Gelato-automations/pre-compiles/InstaCompoundResolver.json
2020-10-23 16:46:29 +02:00

261 lines
19 KiB
JSON

{
"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": "0x608060405234801561001057600080fd5b50610cb5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806370a58ec61161006657806370a58ec61461011857806379feab871461012d578063b18b78dd14610135578063c9ce5d861461013d578063e5cc7da41461014557610093565b806303d2862b1461009857806306fdde03146100c157806334ff2eeb146100d65780635ba81c87146100f7575b600080fd5b6100ab6100a6366004610958565b61014d565b6040516100b89190610b19565b60405180910390f35b6100c961047e565b6040516100b89190610b98565b6100e96100e4366004610a0a565b6104b0565b6040516100b8929190610c12565b61010a610105366004610958565b6106fb565b6040516100b8929190610b2c565b6101206107b1565b6040516100b89190610b05565b6101206107c9565b6101206107e1565b6101206107f9565b610120610811565b606080825167ffffffffffffffff8111801561016857600080fd5b506040519080825280602002602001820160405280156101a257816020015b61018f6108bc565b8152602001906001900390816101875790505b50905060005b83518110156104745760008482815181106101bf57fe5b602002602001015190506000806101d5836104b0565b915091506040518060e00160405280838152602001828152602001846001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b15801561022957600080fd5b505afa15801561023d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102619190610a75565b8152602001846001600160a01b03166370a082318b6040518263ffffffff1660e01b81526004016102929190610b05565b60206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e29190610a75565b8152602001846001600160a01b03166395dd91938b6040518263ffffffff1660e01b81526004016103139190610b05565b60206040518083038186803b15801561032b57600080fd5b505afa15801561033f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103639190610a75565b8152602001846001600160a01b031663ae9d70b06040518163ffffffff1660e01b815260040160206040518083038186803b1580156103a157600080fd5b505afa1580156103b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d99190610a75565b8152602001846001600160a01b031663f8f9da286040518163ffffffff1660e01b815260040160206040518083038186803b15801561041757600080fd5b505afa15801561042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044f9190610a75565b81525085858151811061045e57fe5b60209081029190910101525050506001016101a8565b5090505b92915050565b6040518060400160405280601681526020017521b7b6b837bab73216a932b9b7b63b32b916bb18971960511b81525081565b6000806000836001600160a01b03166104c76107f9565b6001600160a01b0316146105bb57836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561050e57600080fd5b505afa158015610522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105469190610935565b6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561057e57600080fd5b505afa158015610592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b69190610a75565b6105be565b60125b905060006105ca6107e1565b6001600160a01b031663fc57d4df866040518263ffffffff1660e01b81526004016105f59190610b05565b60206040518083038186803b15801561060d57600080fd5b505afa158015610621573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106459190610a75565b905060006106516107e1565b6001600160a01b031663fc57d4df6106676107f9565b6040518263ffffffff1660e01b81526004016106839190610b05565b60206040518083038186803b15801561069b57600080fd5b505afa1580156106af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d39190610a75565b905082601203600a0a82816106e457fe5b0493506106f18482610829565b9450505050915091565b60606107056108f9565b61070f848461014d565b610717610811565b6001600160a01b0316631ea6374161072d6107b1565b6107356107c9565b886040518463ffffffff1660e01b815260040161075493929190610b75565b608060405180830381600087803b15801561076e57600080fd5b505af1158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a69190610a26565b915091509250929050565b73c00e94cb662c3520282e6f5717214004a7f2688890565b733d9819210a31b4961b30ef54be2aed79b9c9cd3b90565b73922018674c12a7f0d394ebeef9b58f186cde13c190565b734ddc2d193948926d02f9b1fe9e1daa0718270ed590565b73d513d22422a3062bd342ae374b4b9c20e0a9a07490565b60008161084a61084185670de0b6b3a7640000610859565b60028504610899565b8161085157fe5b049392505050565b60008115806108745750508082028282828161087157fe5b04145b6104785760405162461bcd60e51b815260040161089090610beb565b60405180910390fd5b808201828110156104785760405162461bcd60e51b815260040161089090610beb565b6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001600081525090565b803561047881610c67565b600060208284031215610946578081fd5b815161095181610c67565b9392505050565b6000806040838503121561096a578081fd5b823561097581610c67565b915060208381013567ffffffffffffffff811115610991578283fd5b8401601f810186136109a1578283fd5b80356109b46109af82610c47565b610c20565b81815283810190838501858402850186018a10156109d0578687fd5b8694505b838510156109fa576109e68a8261092a565b8352600194909401939185019185016109d4565b5080955050505050509250929050565b600060208284031215610a1b578081fd5b813561095181610c67565b600060808284031215610a37578081fd5b610a416080610c20565b82518152602083015160208201526040830151610a5d81610c67565b60408201526060928301519281019290925250919050565b600060208284031215610a86578081fd5b5051919050565b6000815180845260208085019450808401835b83811015610afa57815180518852838101518489015260408082015190890152606080820151908901526080808201519089015260a0808201519089015260c0908101519088015260e09096019590820190600101610aa0565b509495945050505050565b6001600160a01b0391909116815260200190565b6000602082526109516020830184610a8d565b600060a08252610b3f60a0830185610a8d565b9050825160208301526020830151604083015260018060a01b036040840151166060830152606083015160808301529392505050565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6000602080835283518082850152825b81811015610bc457858101830151858201604001528201610ba8565b81811115610bd55783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600d908201526c6d6174682d6e6f742d7361666560981b604082015260600190565b918252602082015260400190565b60405181810167ffffffffffffffff81118282101715610c3f57600080fd5b604052919050565b600067ffffffffffffffff821115610c5d578081fd5b5060209081020190565b6001600160a01b0381168114610c7c57600080fd5b5056fea264697066735822122065f6c5febce010eea8b7efdfac6606aa93f12657978912ed93e87684bb42fe9364736f6c634300060c0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806370a58ec61161006657806370a58ec61461011857806379feab871461012d578063b18b78dd14610135578063c9ce5d861461013d578063e5cc7da41461014557610093565b806303d2862b1461009857806306fdde03146100c157806334ff2eeb146100d65780635ba81c87146100f7575b600080fd5b6100ab6100a6366004610958565b61014d565b6040516100b89190610b19565b60405180910390f35b6100c961047e565b6040516100b89190610b98565b6100e96100e4366004610a0a565b6104b0565b6040516100b8929190610c12565b61010a610105366004610958565b6106fb565b6040516100b8929190610b2c565b6101206107b1565b6040516100b89190610b05565b6101206107c9565b6101206107e1565b6101206107f9565b610120610811565b606080825167ffffffffffffffff8111801561016857600080fd5b506040519080825280602002602001820160405280156101a257816020015b61018f6108bc565b8152602001906001900390816101875790505b50905060005b83518110156104745760008482815181106101bf57fe5b602002602001015190506000806101d5836104b0565b915091506040518060e00160405280838152602001828152602001846001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b15801561022957600080fd5b505afa15801561023d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102619190610a75565b8152602001846001600160a01b03166370a082318b6040518263ffffffff1660e01b81526004016102929190610b05565b60206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e29190610a75565b8152602001846001600160a01b03166395dd91938b6040518263ffffffff1660e01b81526004016103139190610b05565b60206040518083038186803b15801561032b57600080fd5b505afa15801561033f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103639190610a75565b8152602001846001600160a01b031663ae9d70b06040518163ffffffff1660e01b815260040160206040518083038186803b1580156103a157600080fd5b505afa1580156103b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d99190610a75565b8152602001846001600160a01b031663f8f9da286040518163ffffffff1660e01b815260040160206040518083038186803b15801561041757600080fd5b505afa15801561042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044f9190610a75565b81525085858151811061045e57fe5b60209081029190910101525050506001016101a8565b5090505b92915050565b6040518060400160405280601681526020017521b7b6b837bab73216a932b9b7b63b32b916bb18971960511b81525081565b6000806000836001600160a01b03166104c76107f9565b6001600160a01b0316146105bb57836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561050e57600080fd5b505afa158015610522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105469190610935565b6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561057e57600080fd5b505afa158015610592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b69190610a75565b6105be565b60125b905060006105ca6107e1565b6001600160a01b031663fc57d4df866040518263ffffffff1660e01b81526004016105f59190610b05565b60206040518083038186803b15801561060d57600080fd5b505afa158015610621573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106459190610a75565b905060006106516107e1565b6001600160a01b031663fc57d4df6106676107f9565b6040518263ffffffff1660e01b81526004016106839190610b05565b60206040518083038186803b15801561069b57600080fd5b505afa1580156106af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d39190610a75565b905082601203600a0a82816106e457fe5b0493506106f18482610829565b9450505050915091565b60606107056108f9565b61070f848461014d565b610717610811565b6001600160a01b0316631ea6374161072d6107b1565b6107356107c9565b886040518463ffffffff1660e01b815260040161075493929190610b75565b608060405180830381600087803b15801561076e57600080fd5b505af1158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a69190610a26565b915091509250929050565b73c00e94cb662c3520282e6f5717214004a7f2688890565b733d9819210a31b4961b30ef54be2aed79b9c9cd3b90565b73922018674c12a7f0d394ebeef9b58f186cde13c190565b734ddc2d193948926d02f9b1fe9e1daa0718270ed590565b73d513d22422a3062bd342ae374b4b9c20e0a9a07490565b60008161084a61084185670de0b6b3a7640000610859565b60028504610899565b8161085157fe5b049392505050565b60008115806108745750508082028282828161087157fe5b04145b6104785760405162461bcd60e51b815260040161089090610beb565b60405180910390fd5b808201828110156104785760405162461bcd60e51b815260040161089090610beb565b6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001600081525090565b803561047881610c67565b600060208284031215610946578081fd5b815161095181610c67565b9392505050565b6000806040838503121561096a578081fd5b823561097581610c67565b915060208381013567ffffffffffffffff811115610991578283fd5b8401601f810186136109a1578283fd5b80356109b46109af82610c47565b610c20565b81815283810190838501858402850186018a10156109d0578687fd5b8694505b838510156109fa576109e68a8261092a565b8352600194909401939185019185016109d4565b5080955050505050509250929050565b600060208284031215610a1b578081fd5b813561095181610c67565b600060808284031215610a37578081fd5b610a416080610c20565b82518152602083015160208201526040830151610a5d81610c67565b60408201526060928301519281019290925250919050565b600060208284031215610a86578081fd5b5051919050565b6000815180845260208085019450808401835b83811015610afa57815180518852838101518489015260408082015190890152606080820151908901526080808201519089015260a0808201519089015260c0908101519088015260e09096019590820190600101610aa0565b509495945050505050565b6001600160a01b0391909116815260200190565b6000602082526109516020830184610a8d565b600060a08252610b3f60a0830185610a8d565b9050825160208301526020830151604083015260018060a01b036040840151166060830152606083015160808301529392505050565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6000602080835283518082850152825b81811015610bc457858101830151858201604001528201610ba8565b81811115610bd55783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600d908201526c6d6174682d6e6f742d7361666560981b604082015260600190565b918252602082015260400190565b60405181810167ffffffffffffffff81118282101715610c3f57600080fd5b604052919050565b600067ffffffffffffffff821115610c5d578081fd5b5060209081020190565b6001600160a01b0381168114610c7c57600080fd5b5056fea264697066735822122065f6c5febce010eea8b7efdfac6606aa93f12657978912ed93e87684bb42fe9364736f6c634300060c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}