Copy type PoolDeployment @entity {
id: ID !
admin: String ! # pool admin
address: String ! # pool address
timestamp: Int !
block: Int !
transactionHash: String !
gasPrice: BigInt !
gasLimit: BigInt !
totalSupply: BigInt !
totalBorrow: BigInt !
totalLoans: Int !
# Requiring contract calls
decimals: Int !
symbol: String !
name: String !
withdrawalFee: BigInt !
asset: String !
maxSupply: BigInt !
loansOperator: String !
lagDuration: Int !
processingHour: Int !
}
Copy type Deposit @entity (immutable: true ) {
id: ID !
sender: String ! # sender address
owner: String ! # owner address
assets: BigInt !
shares: BigInt !
timestamp: Int !
transactionHash: String !
gasPrice: BigInt !
gasLimit: BigInt !
asset: String ! # asset address
pool: String ! # pool address
block: Int !
}
Copy type WithdrawalRequest @entity (immutable: true ) {
id: ID !
receiver: String ! # receiver address
owner: String ! # owner address
assets: BigInt !
shares: BigInt !
timestamp: Int !
transactionHash: String !
gasPrice: BigInt !
gasLimit: BigInt !
asset: String ! # underlying token address
pool: String ! # pool address
block: Int !
day: Int !
month: Int !
year: Int !
}
Copy type Withdraw @entity (immutable: true ) {
id: ID !
sender: String ! # sender address
owner: String ! # owner address
assets: BigInt !
shares: BigInt !
timestamp: Int !
transactionHash: String !
gasPrice: BigInt !
gasLimit: BigInt !
asset: String ! # underlying token address
pool: String ! # pool address
block: Int !
}
Copy type Loan @entity (immutable: true ) {
id: ID ! # loan address
gasPrice: BigInt !
gasLimit: BigInt !
transactionHash: String !
timestamp: Int !
collateral: String ! # collateral token address
asset: String ! # underlying token address
pool: String ! # pool address
block: Int !
apr: BigInt !
matured: Boolean !
closed: Boolean !
funded: Boolean !
}
Copy type LoanInterestRepayment @entity {
id: ID !
amount: BigInt !
timestamp: Int !
}
Copy type LoanPrincipalRepayment @entity {
id: ID !
amount: BigInt !
timestamp: Int !
}
Copy type LoanCollateralClaim @entity {
id: ID !
amount: BigInt !
timestamp: Int !
}