Collateral Manager
The CollateralManager
contract manages loans and their underlying collateral. It is accessible only by the LendingPool contract and is responsible for the deposit/withdraw of collateral to open/close positions.
Methods
createBorrow()
function createBorrow(address initiator, address onBehalfOf, address collateral, uint256 tokenId, uint256 tokenValue, address asset, uint256 amount, uint256 duration, uint256 borrowIndex, uint256 reserveId)
Deposits NFT(s) in escrow and creates a borrow position.
initiator
address
address of the initiator of the transaction
onBehalfOf
address
address to receive the loan
collateral
address
address of the NFT to be used as collateral
tokenId
uint256
tokenId of the NFT to be used as collateral
tokenValue
uint256
amount of ERC1155 tokens to be used, 0 if ERC721
asset
address
address of currency to be borrowed
amount
uint256
amount of currency to be borrowed
duration
uint256
duration of the loan
borrowIndex
uint256
the current borrow index
reserveId
uint256
id of the target reserve
updateBorrow()
function updateBorrow(address initiator, uint256 borrowId, uint256 amountAdded, uint256 amountTaken, uint256 borrowIndex)
Updates a borrow position.
initiator
address
address of the initiator of the transaction
borrowId
uint256
id of the targeted borrow
amountAdded
uint256
amount of currency added to the borrow position
amountTaken
uint256
amount of currency taken from the borrow position
borrowIndex
uint256
the current borrow index
repayBorrow()
function repayBorrow(address initiator, uint256 borrowId, uint256 amount, uint256 borrowIndex)
Repays a borrow position to retrieve the underlying collateral.
initiator
address
address of the initiator of the transaction
borrowId
uint256
id of the targeted borrow
amount
uint256
amount of currency to repay the borrow position
borrowIndex
uint256
the current borrow index
refinanceBorrow()
function refinanceBorrow(address initiator, uint256 borrowId, uint256 borrowAmount, uint256 amountAdded, uint256 amountTaken, uint256 duration)
Refinances a borrow position.
initiator
address
address of the initiator of the transaction
borrowId
uint256
id of the targeted borrow
borrowAmount
uint256
current borrow position
amountAdded
uint256
amount of currency added to the borrow position
amountTaken
uint256
amount of currency taken from the borrow position
duration
uint256
duration of the new loan from moment of refinance
liquidateBorrow()
function liquidateBorrow(uint256 borrowId)
Liquidates a borrow position.
borrowId
uint256
id of the targeted borrow
setBorrowAuctionCall()
function setBorrowAuctionCall(uint256 borrowId, uint256 auctionStartPrice, uint256 auctionEndPrice, uint256 auctionTimestamp, address auctionCaller)
Calls a liquidation auction on a defaulted borrow. Accessible by the LendingPool, only.
borrowId
uint256
id of the targeted borrow
auctionStartPrice
uint256
start price of the Dutch auction
auctionEndPrice
uint256
end price of the Dutch auction
auctionTimestamp
uint256
timestamp of the auction
auctionCaller
address
address of the auction caller, to receive bonus
setBorrowStatus()
function setBorrowStatus(uint256 borrowId, DataTypes.BorrowStatus status)
Sets the status of a borrow. Accessible by the LendingPool, only.
borrowId
uint256
id of the targeted borrow
status
DataTypes.BorrowStatus status
status of the borrow:
None
, // Default zero
Active
, // Open
Repaid
, // Closed, repaid
Auction
, // In Auction
Liquidated
, // Closed, Defaulted
setBlacklisted()
function setBorrowStatus(address collateral, uint256 tokenId, bool isBlacklisted)
Blacklists a collateral tokenId.
collateral
address
address of the NFT to be used as collateral
tokenId
uint256
tokenId of the NFT to be used as collateral
isBlacklisted
bool
true if collateral tokenId is blacklisted, default: false
View Methods
getBorrowAmount()
function getBorrowAmount(uint256 borrowId)
Returns the amount
borrowed within a loan.
borrowId
uint256
id of the targeted borrow
getScaledAmount()
function getScaledAmount(uint256 borrowId)
Returns the scaledAmount
, i.e. the number of debtTokens against a borrow (not accounting for the normalised variable debt).
getBorrowNumTokens()
function getBorrowNumTokens(uint256 borrowId)
Returns the number of ERC1155 tokens
used as collateral, 0 if ERC721.
borrowerOf
function borrowerOf(uint256 borrowId)
Returns the address of the original loan borrower
.
As opposed to the original borrower, the current borrower is the holder of the obligation receipt.
getBorrowId()
function getBorrowId(address collateral, uint256 tokenId)
Returns the borrowId
of a loan.
getLastBorrowId()
function getLastBorrowId()
Returns the last borrowId
.
getNumNftBorrows()
function getNumNftBorrows(address collataral)
Returns the number of borrows
for a given NFT collateral.
getNumUserNftBorrows()
function getNumUserNftBorrows(address user, address collateral)
Returns the number of borrows
for a given user, using a given NFT collateral.
getBorrow()
function getBorrow(uint256 borrowId)
Returns borrowData
for a given id.
Returns
borrowData
DataTypes.Borrow memory
borrow data:
status
collateral
auction
borrower
erc20Token
borrowAmount
scaledAmount
timestamp
duration
reserveId
tokenizedId
getAuctionPrice()
function getAuctionPrice(uint256 borrowId)
Returns the current Dutch auction price
for the underlying collateral of a defaulted loan in auction.
isBlacklisted()
function isBlacklisted(address collateral, uint256 tokenId)
Returns true
if the specific NFT is blacklisted.
ABI
Collateral Manager ABI
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "onBehalfOf",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenValue",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenizedId",
"type": "uint256"
}
],
"name": "BorrowCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
}
],
"name": "BorrowLiquidated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "borrowAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountAdded",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountTaken",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "BorrowRefinanced",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
}
],
"name": "BorrowRepaid",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountAdded",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountTaken",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
}
],
"name": "BorrowUpdated",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"name": "borrowerOf",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"internalType": "address",
"name": "onBehalfOf",
"type": "address"
},
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenValue",
"type": "uint256"
},
{
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "reserveId",
"type": "uint256"
}
],
"name": "createBorrow",
"outputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenizedId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"name": "getAuctionPrice",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"name": "getBorrow",
"outputs": [
{
"components": [
{
"internalType": "enum DataTypes.BorrowStatus",
"name": "status",
"type": "uint8"
},
{
"components": [
{
"internalType": "enum DataTypes.CollateralType",
"name": "collateralType",
"type": "uint8"
},
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"internalType": "struct DataTypes.Collateral",
"name": "collateral",
"type": "tuple"
},
{
"components": [
{
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"internalType": "uint256",
"name": "startPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"internalType": "struct DataTypes.Auction",
"name": "auction",
"type": "tuple"
},
{
"internalType": "address",
"name": "borrower",
"type": "address"
},
{
"internalType": "address",
"name": "erc20Token",
"type": "address"
},
{
"internalType": "uint256",
"name": "borrowAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "scaledAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "reserveId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenizedId",
"type": "uint256"
}
],
"internalType": "struct DataTypes.Borrow",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"name": "getBorrowAmount",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getBorrowId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"name": "getBorrowNumTokens",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "collateral",
"type": "address"
}
],
"name": "getNumNftBorrows",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "address",
"name": "collateral",
"type": "address"
}
],
"name": "getNumUserNftBorrows",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"name": "getScaledAmount",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "isBlacklisted",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"name": "liquidateBorrow",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountAdded",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountTaken",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "refinanceBorrow",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
}
],
"name": "repayBorrow",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isBlacklisted_",
"type": "bool"
}
],
"name": "setBlacklisted",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "auctionStartPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "auctionEndPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "auctionTimestamp",
"type": "uint256"
},
{
"internalType": "address",
"name": "auctionCaller",
"type": "address"
}
],
"name": "setBorrowAuctionCall",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "enum DataTypes.BorrowStatus",
"name": "status",
"type": "uint8"
}
],
"name": "setBorrowStatus",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountAdded",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountTaken",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
}
],
"name": "updateBorrow",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": {
"object": "0x",
"sourceMap": "",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x",
"sourceMap": "",
"linkReferences": {}
},
"methodIdentifiers": {
"borrowerOf(uint256)": "2a24d53d",
"createBorrow(address,address,address,uint256,uint256,address,uint256,uint256,uint256,uint256)": "7f1acb01",
"getAuctionPrice(uint256)": "917d009e",
"getBorrow(uint256)": "b176e311",
"getBorrowAmount(uint256)": "01667623",
"getBorrowId(address,uint256)": "4dad3a3e",
"getBorrowNumTokens(uint256)": "d5300890",
"getNumNftBorrows(address)": "b02d58b9",
"getNumUserNftBorrows(address,address)": "073fa0b7",
"getScaledAmount(uint256)": "3c613456",
"isBlacklisted(address,uint256)": "e7571483",
"liquidateBorrow(uint256)": "34613dab",
"refinanceBorrow(address,uint256,uint256,uint256,uint256,uint256)": "7130d10e",
"repayBorrow(address,uint256,uint256,uint256)": "2d18159a",
"setBlacklisted(address,uint256,bool)": "09f4cf3f",
"setBorrowAuctionCall(uint256,uint256,uint256,uint256,address)": "60e2c78f",
"setBorrowStatus(uint256,uint8)": "e8a7cfff",
"updateBorrow(address,uint256,uint256,uint256,uint256)": "da1e2134"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"onBehalfOf\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenizedId\",\"type\":\"uint256\"}],\"name\":\"BorrowCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"}],\"name\":\"BorrowLiquidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountAdded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountTaken\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"BorrowRefinanced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"}],\"name\":\"BorrowRepaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountAdded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountTaken\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"}],\"name\":\"BorrowUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"}],\"name\":\"borrowerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"onBehalfOf\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenValue\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveId\",\"type\":\"uint256\"}],\"name\":\"createBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenizedId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"}],\"name\":\"getAuctionPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"}],\"name\":\"getBorrow\",\"outputs\":[{\"components\":[{\"internalType\":\"enum DataTypes.BorrowStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"enum DataTypes.CollateralType\",\"name\":\"collateralType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct DataTypes.Collateral\",\"name\":\"collateral\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct DataTypes.Auction\",\"name\":\"auction\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"erc20Token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"scaledAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenizedId\",\"type\":\"uint256\"}],\"internalType\":\"struct DataTypes.Borrow\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"}],\"name\":\"getBorrowAmount\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getBorrowId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"}],\"name\":\"getBorrowNumTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getNumNftBorrows\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getNumUserNftBorrows\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"}],\"name\":\"getScaledAmount\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"isBlacklisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"}],\"name\":\"liquidateBorrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAdded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTaken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"refinanceBorrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"}],\"name\":\"repayBorrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isBlacklisted_\",\"type\":\"bool\"}],\"name\":\"setBlacklisted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auctionStartPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auctionEndPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auctionTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"auctionCaller\",\"type\":\"address\"}],\"name\":\"setBorrowAuctionCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"internalType\":\"enum DataTypes.BorrowStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"setBorrowStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrowId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAdded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTaken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"}],\"name\":\"updateBorrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"BorrowCreated(address,address,uint256,address,uint256,uint256,address,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when a borrow is created\",\"params\":{\"initiator\":\"The address initiating the action\"}},\"BorrowLiquidated(address,uint256,address,uint256,address,uint256,uint256)\":{\"details\":\"Emitted when a borrow is liquidate by the liquidator\",\"params\":{\"initiator\":\"The address initiating the action\"}},\"BorrowRefinanced(address,uint256,address,uint256,address,uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when a borrow is refinanced by the borrower\",\"params\":{\"initiator\":\"The address initiating the action\"}},\"BorrowRepaid(address,uint256,address,uint256,address,uint256,uint256)\":{\"details\":\"Emitted when a borrow is repaid by the borrower\",\"params\":{\"initiator\":\"The address initiating the action\"}},\"BorrowUpdated(address,uint256,address,uint256,address,uint256,uint256,uint256)\":{\"details\":\"Emitted when a borrow is updated\",\"params\":{\"initiator\":\"The address initiating the action\"}}},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/interfaces/ICollateralManager.sol\":\"ICollateralManager\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@chainlink/=lib/chainlink/\",\":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":chainlink/=lib/chainlink/integration-tests/contracts/ethereum/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/interfaces/ICollateralManager.sol\":{\"keccak256\":\"0xdcb90cae810d15c23e0606ef3d9b30feec7d35e956082b88c1f35c5d6caf6438\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://c45a3cf14add38004018f32987cab971436cfd2e679eea71f2383f845bd68647\",\"dweb:/ipfs/QmPd9df3JmDFMHnhreYWw8tjmRGEQAtERnqj2YREXB5aP5\"]},\"src/protocol/libraries/types/DataTypes.sol\":{\"keccak256\":\"0x070f7865fe84ce4c9ebd86bbe24771607fbdb4e8777510b46cb5064e4d9b90a3\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://504fd0c937cc69cc0737c4ef5dcec477017ccbff609b45b210274fd7bf0792cf\",\"dweb:/ipfs/QmeW1TkAHib7XRBVmgMRTdmsa4Rg9HVToTMnifEE1C7mTi\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address",
"indexed": true
},
{
"internalType": "address",
"name": "onBehalfOf",
"type": "address",
"indexed": true
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256",
"indexed": true
},
{
"internalType": "address",
"name": "collateral",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "tokenValue",
"type": "uint256",
"indexed": false
},
{
"internalType": "address",
"name": "asset",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "tokenizedId",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "BorrowCreated",
"anonymous": false
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address",
"indexed": true
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256",
"indexed": true
},
{
"internalType": "address",
"name": "collateral",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256",
"indexed": false
},
{
"internalType": "address",
"name": "asset",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "BorrowLiquidated",
"anonymous": false
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address",
"indexed": true
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256",
"indexed": true
},
{
"internalType": "address",
"name": "collateral",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256",
"indexed": false
},
{
"internalType": "address",
"name": "asset",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "borrowAmount",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "amountAdded",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "amountTaken",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "BorrowRefinanced",
"anonymous": false
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address",
"indexed": true
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256",
"indexed": true
},
{
"internalType": "address",
"name": "collateral",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256",
"indexed": false
},
{
"internalType": "address",
"name": "asset",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "BorrowRepaid",
"anonymous": false
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address",
"indexed": true
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256",
"indexed": true
},
{
"internalType": "address",
"name": "collateral",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256",
"indexed": false
},
{
"internalType": "address",
"name": "asset",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "amountAdded",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "amountTaken",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "BorrowUpdated",
"anonymous": false
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "borrowerOf",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"internalType": "address",
"name": "onBehalfOf",
"type": "address"
},
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenValue",
"type": "uint256"
},
{
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "reserveId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "createBorrow",
"outputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenizedId",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getAuctionPrice",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getBorrow",
"outputs": [
{
"internalType": "struct DataTypes.Borrow",
"name": "",
"type": "tuple",
"components": [
{
"internalType": "enum DataTypes.BorrowStatus",
"name": "status",
"type": "uint8"
},
{
"internalType": "struct DataTypes.Collateral",
"name": "collateral",
"type": "tuple",
"components": [
{
"internalType": "enum DataTypes.CollateralType",
"name": "collateralType",
"type": "uint8"
},
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
]
},
{
"internalType": "struct DataTypes.Auction",
"name": "auction",
"type": "tuple",
"components": [
{
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"internalType": "uint256",
"name": "startPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
]
},
{
"internalType": "address",
"name": "borrower",
"type": "address"
},
{
"internalType": "address",
"name": "erc20Token",
"type": "address"
},
{
"internalType": "uint256",
"name": "borrowAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "scaledAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "reserveId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenizedId",
"type": "uint256"
}
]
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getBorrowAmount",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getBorrowId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getBorrowNumTokens",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "collateral",
"type": "address"
}
],
"stateMutability": "view",
"type": "function",
"name": "getNumNftBorrows",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "address",
"name": "collateral",
"type": "address"
}
],
"stateMutability": "view",
"type": "function",
"name": "getNumUserNftBorrows",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getScaledAmount",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "isBlacklisted",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "liquidateBorrow"
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountAdded",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountTaken",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "refinanceBorrow"
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "repayBorrow"
},
{
"inputs": [
{
"internalType": "address",
"name": "collateral",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isBlacklisted_",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "setBlacklisted"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "auctionStartPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "auctionEndPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "auctionTimestamp",
"type": "uint256"
},
{
"internalType": "address",
"name": "auctionCaller",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "setBorrowAuctionCall"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "enum DataTypes.BorrowStatus",
"name": "status",
"type": "uint8"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "setBorrowStatus",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"internalType": "uint256",
"name": "borrowId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountAdded",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountTaken",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowIndex",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "updateBorrow"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":@chainlink/=lib/chainlink/",
":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
":chainlink/=lib/chainlink/integration-tests/contracts/ethereum/src/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"src/interfaces/ICollateralManager.sol": "ICollateralManager"
},
"libraries": {}
},
"sources": {
"src/interfaces/ICollateralManager.sol": {
"keccak256": "0xdcb90cae810d15c23e0606ef3d9b30feec7d35e956082b88c1f35c5d6caf6438",
"urls": [
"bzz-raw://c45a3cf14add38004018f32987cab971436cfd2e679eea71f2383f845bd68647",
"dweb:/ipfs/QmPd9df3JmDFMHnhreYWw8tjmRGEQAtERnqj2YREXB5aP5"
],
"license": "AGPL-3.0"
},
"src/protocol/libraries/types/DataTypes.sol": {
"keccak256": "0x070f7865fe84ce4c9ebd86bbe24771607fbdb4e8777510b46cb5064e4d9b90a3",
"urls": [
"bzz-raw://504fd0c937cc69cc0737c4ef5dcec477017ccbff609b45b210274fd7bf0792cf",
"dweb:/ipfs/QmeW1TkAHib7XRBVmgMRTdmsa4Rg9HVToTMnifEE1C7mTi"
],
"license": "AGPL-3.0"
}
},
"version": 1
},
"ast": {
"absolutePath": "src/interfaces/ICollateralManager.sol",
"id": 46786,
"exportedSymbols": {
"DataTypes": [
65297
],
"ICollateralManager": [
46785
]
},
"nodeType": "SourceUnit",
"src": "38:5124:101",
"nodes": [
{
"id": 46486,
"nodeType": "PragmaDirective",
"src": "38:23:101",
"nodes": [],
"literals": [
"solidity",
"0.8",
".16"
]
},
{
"id": 46488,
"nodeType": "ImportDirective",
"src": "65:70:101",
"nodes": [],
"absolutePath": "src/protocol/libraries/types/DataTypes.sol",
"file": "../protocol/libraries/types/DataTypes.sol",
"nameLocation": "-1:-1:-1",
"scope": 46786,
"sourceUnit": 65298,
"symbolAliases": [
{
"foreign": {
"id": 46487,
"name": "DataTypes",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 65297,
"src": "74:9:101",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"id": 46785,
"nodeType": "ContractDefinition",
"src": "139:5023:101",
"nodes": [
{
"id": 46495,
"nodeType": "StructDefinition",
"src": "175:132:101",
"nodes": [],
"canonicalName": "ICollateralManager.UpdateVars",
"members": [
{
"constant": false,
"id": 46490,
"mutability": "mutable",
"name": "borrowAsset",
"nameLocation": "212:11:101",
"nodeType": "VariableDeclaration",
"scope": 46495,
"src": "204:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46489,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "204:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46492,
"mutability": "mutable",
"name": "accruedBorrowAmount",
"nameLocation": "242:19:101",
"nodeType": "VariableDeclaration",
"scope": 46495,
"src": "234:27:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46491,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "234:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46494,
"mutability": "mutable",
"name": "updatedBorrowAmount",
"nameLocation": "280:19:101",
"nodeType": "VariableDeclaration",
"scope": 46495,
"src": "272:27:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46493,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "272:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "UpdateVars",
"nameLocation": "182:10:101",
"scope": 46785,
"visibility": "public"
},
{
"id": 46520,
"nodeType": "EventDefinition",
"src": "438:355:101",
"nodes": [],
"anonymous": false,
"documentation": {
"id": 46496,
"nodeType": "StructuredDocumentation",
"src": "315:117:101",
"text": " @dev Emitted when a borrow is created\n @param initiator The address initiating the action"
},
"eventSelector": "de617ecaa64fba83afb549b6a243ada1259af7abf7071cfbe5a5d3bf6c0ed181",
"name": "BorrowCreated",
"nameLocation": "444:13:101",
"parameters": {
"id": 46519,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46498,
"indexed": true,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "484:9:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "468:25:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46497,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "468:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46500,
"indexed": true,
"mutability": "mutable",
"name": "onBehalfOf",
"nameLocation": "520:10:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "504:26:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46499,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "504:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46502,
"indexed": true,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "557:8:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "541:24:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46501,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "541:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46504,
"indexed": false,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "584:10:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "576:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46503,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "576:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46506,
"indexed": false,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "613:7:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "605:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46505,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "605:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46508,
"indexed": false,
"mutability": "mutable",
"name": "tokenValue",
"nameLocation": "639:10:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "631:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46507,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "631:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46510,
"indexed": false,
"mutability": "mutable",
"name": "asset",
"nameLocation": "668:5:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "660:13:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46509,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "660:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46512,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nameLocation": "692:6:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "684:14:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46511,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "684:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46514,
"indexed": false,
"mutability": "mutable",
"name": "duration",
"nameLocation": "717:8:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "709:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46513,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "709:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46516,
"indexed": false,
"mutability": "mutable",
"name": "borrowIndex",
"nameLocation": "744:11:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "736:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46515,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "736:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46518,
"indexed": false,
"mutability": "mutable",
"name": "tokenizedId",
"nameLocation": "774:11:101",
"nodeType": "VariableDeclaration",
"scope": 46520,
"src": "766:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46517,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "766:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "457:335:101"
}
},
{
"id": 46539,
"nodeType": "EventDefinition",
"src": "924:267:101",
"nodes": [],
"anonymous": false,
"documentation": {
"id": 46521,
"nodeType": "StructuredDocumentation",
"src": "801:117:101",
"text": " @dev Emitted when a borrow is updated\n @param initiator The address initiating the action"
},
"eventSelector": "f5b9074673be348494563f7c2048b0a7672c6d8f04147a00ce73f968ce920bfd",
"name": "BorrowUpdated",
"nameLocation": "930:13:101",
"parameters": {
"id": 46538,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46523,
"indexed": true,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "970:9:101",
"nodeType": "VariableDeclaration",
"scope": 46539,
"src": "954:25:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46522,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "954:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46525,
"indexed": true,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "1006:8:101",
"nodeType": "VariableDeclaration",
"scope": 46539,
"src": "990:24:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46524,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "990:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46527,
"indexed": false,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "1033:10:101",
"nodeType": "VariableDeclaration",
"scope": 46539,
"src": "1025:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46526,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1025:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46529,
"indexed": false,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "1062:7:101",
"nodeType": "VariableDeclaration",
"scope": 46539,
"src": "1054:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46528,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1054:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46531,
"indexed": false,
"mutability": "mutable",
"name": "asset",
"nameLocation": "1088:5:101",
"nodeType": "VariableDeclaration",
"scope": 46539,
"src": "1080:13:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46530,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1080:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46533,
"indexed": false,
"mutability": "mutable",
"name": "amountAdded",
"nameLocation": "1112:11:101",
"nodeType": "VariableDeclaration",
"scope": 46539,
"src": "1104:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46532,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1104:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46535,
"indexed": false,
"mutability": "mutable",
"name": "amountTaken",
"nameLocation": "1142:11:101",
"nodeType": "VariableDeclaration",
"scope": 46539,
"src": "1134:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46534,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1134:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46537,
"indexed": false,
"mutability": "mutable",
"name": "borrowIndex",
"nameLocation": "1172:11:101",
"nodeType": "VariableDeclaration",
"scope": 46539,
"src": "1164:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46536,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1164:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "943:247:101"
}
},
{
"id": 46556,
"nodeType": "EventDefinition",
"src": "1337:231:101",
"nodes": [],
"anonymous": false,
"documentation": {
"id": 46540,
"nodeType": "StructuredDocumentation",
"src": "1199:132:101",
"text": " @dev Emitted when a borrow is repaid by the borrower\n @param initiator The address initiating the action"
},
"eventSelector": "e6f0f841f009904ff64d6a1cb3441a66c0fa90373839cf1c07e3dfefced0c3a5",
"name": "BorrowRepaid",
"nameLocation": "1343:12:101",
"parameters": {
"id": 46555,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46542,
"indexed": true,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "1382:9:101",
"nodeType": "VariableDeclaration",
"scope": 46556,
"src": "1366:25:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46541,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1366:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46544,
"indexed": true,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "1418:8:101",
"nodeType": "VariableDeclaration",
"scope": 46556,
"src": "1402:24:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46543,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1402:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46546,
"indexed": false,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "1445:10:101",
"nodeType": "VariableDeclaration",
"scope": 46556,
"src": "1437:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46545,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1437:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46548,
"indexed": false,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "1474:7:101",
"nodeType": "VariableDeclaration",
"scope": 46556,
"src": "1466:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46547,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1466:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46550,
"indexed": false,
"mutability": "mutable",
"name": "asset",
"nameLocation": "1500:5:101",
"nodeType": "VariableDeclaration",
"scope": 46556,
"src": "1492:13:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46549,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1492:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46552,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nameLocation": "1524:6:101",
"nodeType": "VariableDeclaration",
"scope": 46556,
"src": "1516:14:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46551,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1516:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46554,
"indexed": false,
"mutability": "mutable",
"name": "borrowIndex",
"nameLocation": "1549:11:101",
"nodeType": "VariableDeclaration",
"scope": 46556,
"src": "1541:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46553,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1541:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1355:212:101"
}
},
{
"id": 46579,
"nodeType": "EventDefinition",
"src": "1718:326:101",
"nodes": [],
"anonymous": false,
"documentation": {
"id": 46557,
"nodeType": "StructuredDocumentation",
"src": "1576:136:101",
"text": " @dev Emitted when a borrow is refinanced by the borrower\n @param initiator The address initiating the action"
},
"eventSelector": "911e005cf0c211d5ec24c434f5e7e3084e4e1221f7e351a9b73f473fa817fd6d",
"name": "BorrowRefinanced",
"nameLocation": "1724:16:101",
"parameters": {
"id": 46578,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46559,
"indexed": true,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "1767:9:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1751:25:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46558,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1751:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46561,
"indexed": true,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "1803:8:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1787:24:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46560,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1787:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46563,
"indexed": false,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "1830:10:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1822:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46562,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1822:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46565,
"indexed": false,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "1859:7:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1851:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46564,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1851:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46567,
"indexed": false,
"mutability": "mutable",
"name": "asset",
"nameLocation": "1885:5:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1877:13:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46566,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1877:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46569,
"indexed": false,
"mutability": "mutable",
"name": "borrowAmount",
"nameLocation": "1909:12:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1901:20:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46568,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1901:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46571,
"indexed": false,
"mutability": "mutable",
"name": "amountAdded",
"nameLocation": "1940:11:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1932:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46570,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1932:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46573,
"indexed": false,
"mutability": "mutable",
"name": "amountTaken",
"nameLocation": "1970:11:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1962:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46572,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1962:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46575,
"indexed": false,
"mutability": "mutable",
"name": "duration",
"nameLocation": "2000:8:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "1992:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46574,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1992:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46577,
"indexed": false,
"mutability": "mutable",
"name": "timestamp",
"nameLocation": "2027:9:101",
"nodeType": "VariableDeclaration",
"scope": 46579,
"src": "2019:17:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46576,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2019:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1740:303:101"
}
},
{
"id": 46596,
"nodeType": "EventDefinition",
"src": "2195:235:101",
"nodes": [],
"anonymous": false,
"documentation": {
"id": 46580,
"nodeType": "StructuredDocumentation",
"src": "2052:137:101",
"text": " @dev Emitted when a borrow is liquidate by the liquidator\n @param initiator The address initiating the action"
},
"eventSelector": "c3f4fb0e0081143b0620d18ee26038c1d208483481251e2989bed65686c77ded",
"name": "BorrowLiquidated",
"nameLocation": "2201:16:101",
"parameters": {
"id": 46595,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46582,
"indexed": true,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "2244:9:101",
"nodeType": "VariableDeclaration",
"scope": 46596,
"src": "2228:25:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46581,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2228:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46584,
"indexed": true,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "2280:8:101",
"nodeType": "VariableDeclaration",
"scope": 46596,
"src": "2264:24:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46583,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2264:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46586,
"indexed": false,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "2307:10:101",
"nodeType": "VariableDeclaration",
"scope": 46596,
"src": "2299:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46585,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2299:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46588,
"indexed": false,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "2336:7:101",
"nodeType": "VariableDeclaration",
"scope": 46596,
"src": "2328:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46587,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2328:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46590,
"indexed": false,
"mutability": "mutable",
"name": "asset",
"nameLocation": "2362:5:101",
"nodeType": "VariableDeclaration",
"scope": 46596,
"src": "2354:13:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46589,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2354:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46592,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nameLocation": "2386:6:101",
"nodeType": "VariableDeclaration",
"scope": 46596,
"src": "2378:14:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46591,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2378:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46594,
"indexed": false,
"mutability": "mutable",
"name": "borrowIndex",
"nameLocation": "2411:11:101",
"nodeType": "VariableDeclaration",
"scope": 46596,
"src": "2403:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46593,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2403:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2217:212:101"
}
},
{
"id": 46603,
"nodeType": "FunctionDefinition",
"src": "2438:112:101",
"nodes": [],
"functionSelector": "2a24d53d",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "borrowerOf",
"nameLocation": "2447:10:101",
"parameters": {
"id": 46599,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46598,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "2476:8:101",
"nodeType": "VariableDeclaration",
"scope": 46603,
"src": "2468:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46597,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2468:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2457:34:101"
},
"returnParameters": {
"id": 46602,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46601,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46603,
"src": "2541:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46600,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2541:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "2540:9:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46610,
"nodeType": "FunctionDefinition",
"src": "2558:78:101",
"nodes": [],
"functionSelector": "b02d58b9",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getNumNftBorrows",
"nameLocation": "2567:16:101",
"parameters": {
"id": 46606,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46605,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "2592:10:101",
"nodeType": "VariableDeclaration",
"scope": 46610,
"src": "2584:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46604,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2584:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "2583:20:101"
},
"returnParameters": {
"id": 46609,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46608,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46610,
"src": "2627:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46607,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2627:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2626:9:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46619,
"nodeType": "FunctionDefinition",
"src": "2644:96:101",
"nodes": [],
"functionSelector": "073fa0b7",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getNumUserNftBorrows",
"nameLocation": "2653:20:101",
"parameters": {
"id": 46615,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46612,
"mutability": "mutable",
"name": "user",
"nameLocation": "2682:4:101",
"nodeType": "VariableDeclaration",
"scope": 46619,
"src": "2674:12:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46611,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2674:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46614,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "2696:10:101",
"nodeType": "VariableDeclaration",
"scope": 46619,
"src": "2688:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46613,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2688:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "2673:34:101"
},
"returnParameters": {
"id": 46618,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46617,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46619,
"src": "2731:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46616,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2731:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2730:9:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46627,
"nodeType": "FunctionDefinition",
"src": "2748:85:101",
"nodes": [],
"functionSelector": "b176e311",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getBorrow",
"nameLocation": "2757:9:101",
"parameters": {
"id": 46622,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46621,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "2775:8:101",
"nodeType": "VariableDeclaration",
"scope": 46627,
"src": "2767:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46620,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2767:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2766:18:101"
},
"returnParameters": {
"id": 46626,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46625,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46627,
"src": "2808:23:101",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Borrow_$64853_memory_ptr",
"typeString": "struct DataTypes.Borrow"
},
"typeName": {
"id": 46624,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46623,
"name": "DataTypes.Borrow",
"nameLocations": [
"2808:9:101",
"2818:6:101"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 64853,
"src": "2808:16:101"
},
"referencedDeclaration": 64853,
"src": "2808:16:101",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Borrow_$64853_storage_ptr",
"typeString": "struct DataTypes.Borrow"
}
},
"visibility": "internal"
}
],
"src": "2807:25:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46636,
"nodeType": "FunctionDefinition",
"src": "2841:90:101",
"nodes": [],
"functionSelector": "4dad3a3e",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getBorrowId",
"nameLocation": "2850:11:101",
"parameters": {
"id": 46632,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46629,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "2870:10:101",
"nodeType": "VariableDeclaration",
"scope": 46636,
"src": "2862:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46628,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2862:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46631,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "2890:7:101",
"nodeType": "VariableDeclaration",
"scope": 46636,
"src": "2882:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46630,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2882:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2861:37:101"
},
"returnParameters": {
"id": 46635,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46634,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46636,
"src": "2922:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46633,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2922:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2921:9:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46646,
"nodeType": "FunctionDefinition",
"src": "2940:142:101",
"nodes": [],
"functionSelector": "e8a7cfff",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "setBorrowStatus",
"nameLocation": "2949:15:101",
"parameters": {
"id": 46642,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46638,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "2983:8:101",
"nodeType": "VariableDeclaration",
"scope": 46646,
"src": "2975:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46637,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2975:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46641,
"mutability": "mutable",
"name": "status",
"nameLocation": "3025:6:101",
"nodeType": "VariableDeclaration",
"scope": 46646,
"src": "3002:29:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_BorrowStatus_$64716",
"typeString": "enum DataTypes.BorrowStatus"
},
"typeName": {
"id": 46640,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46639,
"name": "DataTypes.BorrowStatus",
"nameLocations": [
"3002:9:101",
"3012:12:101"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 64716,
"src": "3002:22:101"
},
"referencedDeclaration": 64716,
"src": "3002:22:101",
"typeDescriptions": {
"typeIdentifier": "t_enum$_BorrowStatus_$64716",
"typeString": "enum DataTypes.BorrowStatus"
}
},
"visibility": "internal"
}
],
"src": "2964:74:101"
},
"returnParameters": {
"id": 46645,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46644,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46646,
"src": "3076:4:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 46643,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3076:4:101",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "3075:6:101"
},
"scope": 46785,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"id": 46673,
"nodeType": "FunctionDefinition",
"src": "3090:421:101",
"nodes": [],
"functionSelector": "7f1acb01",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "createBorrow",
"nameLocation": "3099:12:101",
"parameters": {
"id": 46667,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46648,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "3130:9:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3122:17:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46647,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3122:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46650,
"mutability": "mutable",
"name": "onBehalfOf",
"nameLocation": "3158:10:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3150:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46649,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3150:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46652,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "3187:10:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3179:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46651,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3179:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46654,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "3216:7:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3208:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46653,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3208:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46656,
"mutability": "mutable",
"name": "tokenValue",
"nameLocation": "3243:10:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3235:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46655,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3235:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46658,
"mutability": "mutable",
"name": "asset",
"nameLocation": "3273:5:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3265:13:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46657,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3265:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46660,
"mutability": "mutable",
"name": "amount",
"nameLocation": "3298:6:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3290:14:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46659,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3290:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46662,
"mutability": "mutable",
"name": "duration",
"nameLocation": "3323:8:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3315:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46661,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3315:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46664,
"mutability": "mutable",
"name": "borrowIndex",
"nameLocation": "3350:11:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3342:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46663,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3342:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46666,
"mutability": "mutable",
"name": "reserveId",
"nameLocation": "3380:9:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3372:17:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46665,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3372:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3111:285:101"
},
"returnParameters": {
"id": 46672,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46669,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "3457:8:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3449:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46668,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3449:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46671,
"mutability": "mutable",
"name": "tokenizedId",
"nameLocation": "3488:11:101",
"nodeType": "VariableDeclaration",
"scope": 46673,
"src": "3480:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46670,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3480:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3434:76:101"
},
"scope": 46785,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"id": 46686,
"nodeType": "FunctionDefinition",
"src": "3519:192:101",
"nodes": [],
"functionSelector": "da1e2134",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "updateBorrow",
"nameLocation": "3528:12:101",
"parameters": {
"id": 46684,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46675,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "3559:9:101",
"nodeType": "VariableDeclaration",
"scope": 46686,
"src": "3551:17:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46674,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3551:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46677,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "3587:8:101",
"nodeType": "VariableDeclaration",
"scope": 46686,
"src": "3579:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46676,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3579:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46679,
"mutability": "mutable",
"name": "amountAdded",
"nameLocation": "3614:11:101",
"nodeType": "VariableDeclaration",
"scope": 46686,
"src": "3606:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46678,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3606:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46681,
"mutability": "mutable",
"name": "amountTaken",
"nameLocation": "3644:11:101",
"nodeType": "VariableDeclaration",
"scope": 46686,
"src": "3636:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46680,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3636:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46683,
"mutability": "mutable",
"name": "borrowIndex",
"nameLocation": "3674:11:101",
"nodeType": "VariableDeclaration",
"scope": 46686,
"src": "3666:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46682,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3666:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3540:152:101"
},
"returnParameters": {
"id": 46685,
"nodeType": "ParameterList",
"parameters": [],
"src": "3710:0:101"
},
"scope": 46785,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"id": 46697,
"nodeType": "FunctionDefinition",
"src": "3719:156:101",
"nodes": [],
"functionSelector": "2d18159a",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "repayBorrow",
"nameLocation": "3728:11:101",
"parameters": {
"id": 46695,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46688,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "3758:9:101",
"nodeType": "VariableDeclaration",
"scope": 46697,
"src": "3750:17:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46687,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3750:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46690,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "3786:8:101",
"nodeType": "VariableDeclaration",
"scope": 46697,
"src": "3778:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46689,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3778:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46692,
"mutability": "mutable",
"name": "amount",
"nameLocation": "3813:6:101",
"nodeType": "VariableDeclaration",
"scope": 46697,
"src": "3805:14:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46691,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3805:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46694,
"mutability": "mutable",
"name": "borrowIndex",
"nameLocation": "3838:11:101",
"nodeType": "VariableDeclaration",
"scope": 46697,
"src": "3830:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46693,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3830:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3739:117:101"
},
"returnParameters": {
"id": 46696,
"nodeType": "ParameterList",
"parameters": [],
"src": "3874:0:101"
},
"scope": 46785,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"id": 46712,
"nodeType": "FunctionDefinition",
"src": "3883:223:101",
"nodes": [],
"functionSelector": "7130d10e",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "refinanceBorrow",
"nameLocation": "3892:15:101",
"parameters": {
"id": 46710,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46699,
"mutability": "mutable",
"name": "initiator",
"nameLocation": "3926:9:101",
"nodeType": "VariableDeclaration",
"scope": 46712,
"src": "3918:17:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46698,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3918:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46701,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "3954:8:101",
"nodeType": "VariableDeclaration",
"scope": 46712,
"src": "3946:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46700,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3946:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46703,
"mutability": "mutable",
"name": "borrowAmount",
"nameLocation": "3981:12:101",
"nodeType": "VariableDeclaration",
"scope": 46712,
"src": "3973:20:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46702,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3973:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46705,
"mutability": "mutable",
"name": "amountAdded",
"nameLocation": "4012:11:101",
"nodeType": "VariableDeclaration",
"scope": 46712,
"src": "4004:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46704,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4004:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46707,
"mutability": "mutable",
"name": "amountTaken",
"nameLocation": "4042:11:101",
"nodeType": "VariableDeclaration",
"scope": 46712,
"src": "4034:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46706,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4034:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46709,
"mutability": "mutable",
"name": "duration",
"nameLocation": "4072:8:101",
"nodeType": "VariableDeclaration",
"scope": 46712,
"src": "4064:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46708,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4064:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3907:180:101"
},
"returnParameters": {
"id": 46711,
"nodeType": "ParameterList",
"parameters": [],
"src": "4105:0:101"
},
"scope": 46785,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"id": 46725,
"nodeType": "FunctionDefinition",
"src": "4114:145:101",
"nodes": [],
"functionSelector": "01667623",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getBorrowAmount",
"nameLocation": "4123:15:101",
"parameters": {
"id": 46715,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46714,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "4157:8:101",
"nodeType": "VariableDeclaration",
"scope": 46725,
"src": "4149:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46713,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4149:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4138:34:101"
},
"returnParameters": {
"id": 46724,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46717,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46725,
"src": "4223:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46716,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4223:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46719,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46725,
"src": "4232:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46718,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4232:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46721,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46725,
"src": "4241:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46720,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4241:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46723,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46725,
"src": "4250:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46722,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4250:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4222:36:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46732,
"nodeType": "FunctionDefinition",
"src": "4267:122:101",
"nodes": [],
"functionSelector": "d5300890",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getBorrowNumTokens",
"nameLocation": "4276:18:101",
"parameters": {
"id": 46728,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46727,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "4313:8:101",
"nodeType": "VariableDeclaration",
"scope": 46732,
"src": "4305:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46726,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4305:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4294:34:101"
},
"returnParameters": {
"id": 46731,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46730,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46732,
"src": "4380:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46729,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4380:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4379:9:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46739,
"nodeType": "FunctionDefinition",
"src": "4397:118:101",
"nodes": [],
"functionSelector": "917d009e",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getAuctionPrice",
"nameLocation": "4406:15:101",
"parameters": {
"id": 46735,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46734,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "4440:8:101",
"nodeType": "VariableDeclaration",
"scope": 46739,
"src": "4432:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46733,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4432:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4421:34:101"
},
"returnParameters": {
"id": 46738,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46737,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46739,
"src": "4506:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46736,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4506:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4505:9:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46748,
"nodeType": "FunctionDefinition",
"src": "4523:126:101",
"nodes": [],
"functionSelector": "3c613456",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getScaledAmount",
"nameLocation": "4532:15:101",
"parameters": {
"id": 46742,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46741,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "4566:8:101",
"nodeType": "VariableDeclaration",
"scope": 46748,
"src": "4558:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46740,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4558:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4547:34:101"
},
"returnParameters": {
"id": 46747,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46744,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46748,
"src": "4631:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46743,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4631:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46746,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46748,
"src": "4640:7:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46745,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4640:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4630:18:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"id": 46761,
"nodeType": "FunctionDefinition",
"src": "4657:221:101",
"nodes": [],
"functionSelector": "60e2c78f",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "setBorrowAuctionCall",
"nameLocation": "4666:20:101",
"parameters": {
"id": 46759,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46750,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "4705:8:101",
"nodeType": "VariableDeclaration",
"scope": 46761,
"src": "4697:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46749,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4697:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46752,
"mutability": "mutable",
"name": "auctionStartPrice",
"nameLocation": "4733:17:101",
"nodeType": "VariableDeclaration",
"scope": 46761,
"src": "4725:25:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46751,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4725:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46754,
"mutability": "mutable",
"name": "auctionEndPrice",
"nameLocation": "4769:15:101",
"nodeType": "VariableDeclaration",
"scope": 46761,
"src": "4761:23:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46753,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4761:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46756,
"mutability": "mutable",
"name": "auctionTimestamp",
"nameLocation": "4803:16:101",
"nodeType": "VariableDeclaration",
"scope": 46761,
"src": "4795:24:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46755,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4795:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46758,
"mutability": "mutable",
"name": "auctionCaller",
"nameLocation": "4838:13:101",
"nodeType": "VariableDeclaration",
"scope": 46761,
"src": "4830:21:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46757,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4830:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "4686:172:101"
},
"returnParameters": {
"id": 46760,
"nodeType": "ParameterList",
"parameters": [],
"src": "4877:0:101"
},
"scope": 46785,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"id": 46766,
"nodeType": "FunctionDefinition",
"src": "4886:77:101",
"nodes": [],
"functionSelector": "34613dab",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "liquidateBorrow",
"nameLocation": "4895:15:101",
"parameters": {
"id": 46764,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46763,
"mutability": "mutable",
"name": "borrowId",
"nameLocation": "4929:8:101",
"nodeType": "VariableDeclaration",
"scope": 46766,
"src": "4921:16:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46762,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4921:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4910:34:101"
},
"returnParameters": {
"id": 46765,
"nodeType": "ParameterList",
"parameters": [],
"src": "4962:0:101"
},
"scope": 46785,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"id": 46775,
"nodeType": "FunctionDefinition",
"src": "4971:91:101",
"nodes": [],
"functionSelector": "09f4cf3f",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "setBlacklisted",
"nameLocation": "4980:14:101",
"parameters": {
"id": 46773,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46768,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "5003:10:101",
"nodeType": "VariableDeclaration",
"scope": 46775,
"src": "4995:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46767,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4995:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46770,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "5023:7:101",
"nodeType": "VariableDeclaration",
"scope": 46775,
"src": "5015:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46769,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5015:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46772,
"mutability": "mutable",
"name": "isBlacklisted_",
"nameLocation": "5037:14:101",
"nodeType": "VariableDeclaration",
"scope": 46775,
"src": "5032:19:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 46771,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5032:4:101",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "4994:58:101"
},
"returnParameters": {
"id": 46774,
"nodeType": "ParameterList",
"parameters": [],
"src": "5061:0:101"
},
"scope": 46785,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"id": 46784,
"nodeType": "FunctionDefinition",
"src": "5070:89:101",
"nodes": [],
"functionSelector": "e7571483",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "isBlacklisted",
"nameLocation": "5079:13:101",
"parameters": {
"id": 46780,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46777,
"mutability": "mutable",
"name": "collateral",
"nameLocation": "5101:10:101",
"nodeType": "VariableDeclaration",
"scope": 46784,
"src": "5093:18:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46776,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5093:7:101",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46779,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "5121:7:101",
"nodeType": "VariableDeclaration",
"scope": 46784,
"src": "5113:15:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46778,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5113:7:101",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5092:37:101"
},
"returnParameters": {
"id": 46783,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46782,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 46784,
"src": "5153:4:101",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 46781,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5153:4:101",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "5152:6:101"
},
"scope": 46785,
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"abstract": false,
"baseContracts": [],
"canonicalName": "ICollateralManager",
"contractDependencies": [],
"contractKind": "interface",
"fullyImplemented": false,
"linearizedBaseContracts": [
46785
],
"name": "ICollateralManager",
"nameLocation": "149:18:101",
"scope": 46786,
"usedErrors": []
}
],
"license": "AGPL-3.0"
},
"id": 101
}
Last updated