Skip to content

Instantly share code, notes, and snippets.

@hayesgm
Last active May 18, 2018 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hayesgm/c541e7692d50cc6c46d527eac64b2944 to your computer and use it in GitHub Desktop.
Save hayesgm/c541e7692d50cc6c46d527eac64b2944 to your computer and use it in GitHub Desktop.
Compound Money Market ABI
[
{
"constant": true,
"inputs": [],
"name": "maxLiquidationDiscountRateBPS",
"outputs": [
{
"name": "",
"type": "uint16"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "customer",
"type": "address"
},
{
"name": "ledgerAccount",
"type": "uint8"
},
{
"name": "asset",
"type": "address"
}
],
"name": "getCustomerBalance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ledgerStorage",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "borrowStorage",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "customer",
"type": "address"
},
{
"name": "asset",
"type": "address"
}
],
"name": "getBorrowBalance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "asset",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"name": "customerBorrow",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "scaledMinCollateralToBorrowRatio",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "balanceSheet",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "priceOracle",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "asset",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
},
{
"name": "to",
"type": "address"
}
],
"name": "customerWithdraw",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenStoreAddress",
"type": "address"
}
],
"name": "setTokenStore",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "borrower",
"type": "address"
},
{
"name": "borrowedAsset",
"type": "address"
},
{
"name": "borrowedAssetAmount",
"type": "uint256"
},
{
"name": "collateralAsset",
"type": "address"
}
],
"name": "liquidateCollateral",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "customer",
"type": "address"
},
{
"name": "asset",
"type": "address"
}
],
"name": "accrueBorrowInterest",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "collateralRatioScale",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "borrower",
"type": "address"
},
{
"name": "borrowedAsset",
"type": "address"
},
{
"name": "borrowedAssetAmount",
"type": "uint256"
},
{
"name": "collateralAsset",
"type": "address"
}
],
"name": "previewLiquidateCollateral",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "customer",
"type": "address"
},
{
"name": "asset",
"type": "address"
}
],
"name": "accrueSupplyInterest",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "priceOracleAddress",
"type": "address"
}
],
"name": "setPriceOracle",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "balanceSheetAddress",
"type": "address"
}
],
"name": "setBalanceSheet",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "scaledRatio",
"type": "uint256"
}
],
"name": "setScaledMinimumCollateralRatio",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "tokenStore",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "getMaxWithdrawAvailable",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "interestModelAddress",
"type": "address"
}
],
"name": "setInterestModel",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "account",
"type": "address"
},
{
"name": "asset",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"name": "canWithdrawCollateral",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "srcAsset",
"type": "address"
},
{
"name": "srcAssetAmount",
"type": "uint256"
},
{
"name": "targetAsset",
"type": "address"
},
{
"name": "targetDiscountRateBPS",
"type": "uint16"
}
],
"name": "getConvertedAssetValueWithDiscount",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "basisPoints",
"type": "uint16"
}
],
"name": "setLiquidationDiscountRateBPS",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getOwner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "borrower",
"type": "address"
}
],
"name": "collateralShortfall",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "getMaxBorrowAvailable",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "asset",
"type": "address"
},
{
"name": "ledgerAccount",
"type": "uint8"
}
],
"name": "getInterestRate",
"outputs": [
{
"name": "",
"type": "uint64"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "ledgerStorageAddress",
"type": "address"
}
],
"name": "setLedgerStorage",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "asset",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"name": "customerSupply",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "discountRateScale",
"outputs": [
{
"name": "",
"type": "uint64"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "asset",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"name": "customerPayBorrow",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "interestModel",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "interestRateStorageAddress",
"type": "address"
}
],
"name": "setInterestRateStorage",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "customer",
"type": "address"
},
{
"name": "asset",
"type": "address"
}
],
"name": "getSupplyBalance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "price",
"type": "uint256"
},
{
"name": "unscaledDiscountRateBPS",
"type": "uint16"
}
],
"name": "scaledDiscountPrice",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "borrowStorageAddress",
"type": "address"
}
],
"name": "setBorrowStorage",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "liquidationDiscountRateBPS",
"outputs": [
{
"name": "",
"type": "uint16"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "interestRateStorage",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "newScaledMinimumCollateralRatio",
"type": "uint256"
}
],
"name": "MinimumCollateralRatioChange",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "ledgerReason",
"type": "uint8"
},
{
"indexed": false,
"name": "ledgerType",
"type": "uint8"
},
{
"indexed": false,
"name": "ledgerAccount",
"type": "uint8"
},
{
"indexed": false,
"name": "customer",
"type": "address"
},
{
"indexed": false,
"name": "asset",
"type": "address"
},
{
"indexed": false,
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"name": "balance",
"type": "uint256"
},
{
"indexed": false,
"name": "interestRateBPS",
"type": "uint64"
},
{
"indexed": false,
"name": "nextPaymentDate",
"type": "uint256"
}
],
"name": "LedgerEntry",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "errorMessage",
"type": "string"
},
{
"indexed": false,
"name": "values",
"type": "uint256[]"
}
],
"name": "GracefulFailure",
"type": "event"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment