Skip to content

Commit

Permalink
addressed PR concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
EdNoepel committed May 20, 2023
1 parent 9e0441a commit 8d343ce
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ type Pool @entity {
t0debt: BigDecimal!
# pool inflator snapshot
inflator: BigDecimal!
# block timestamp at which the inflator was last updated
inflatorLastUpdate: BigInt!
# interest rate paid by borrowers, excluding fees
borrowRate: BigDecimal!
# interest rate awarded to lenders, excluding fees
Expand Down
1 change: 0 additions & 1 deletion src/erc-20-pool-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export function handlePoolCreated(event: PoolCreatedEvent): void {
pool.t0debt = ZERO_BD
pool.feeRate = wadToDecimal(interestRateResults.value1)
pool.inflator = ONE_BD
pool.inflatorLastUpdate = event.block.timestamp
pool.borrowRate = wadToDecimal(interestRateResults.value0)
pool.lendRate = wadToDecimal(interestRateResults.value0.times(lenderInterestMargin))
pool.pledgedCollateral = ZERO_BD
Expand Down
2 changes: 0 additions & 2 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ export const ZERO_ADDRESS = Address.fromString('0x000000000000000000000000000000
export const ZERO_BI = BigInt.zero()
export const ONE_BI = BigInt.fromI32(1)
export const TEN_BI = BigInt.fromI32(10)
export const ONE_RAY_BI = BigInt.fromString("1000000000000000000000000000")
export const ONE_PERCENT_BI = BigInt.fromString("10000000000000000") // 0.01 * 1e18
export const FIVE_PERCENT_BI = BigInt.fromString("50000000000000000") // 0.05 * 1e18
export const HALF_WAD_BI = BigInt.fromString("500000000000000000")
export const ONE_WAD_BI = BigInt.fromString("1000000000000000000")


// BigDecimal constants
export const ZERO_BD = BigDecimal.zero()
export const EXP_18_BD = BigDecimal.fromString('1000000000000000000')
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/position-manager-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function mintPosition(lender: Address, pool: Address, tokenId: BigInt, to
handleMint(newMintEvent)
}

export function assertPosition(lender: Address, pool: Address, tokenId: BigInt, tokenContractAddress: Address): void {
export function assertPosition(lender: Address, pool: Address, tokenId: BigInt, tokenContractAddress: Address): void {
const expectedTokenId = bigIntToBytes(tokenId).toHexString()

// check position attributes
Expand Down

0 comments on commit 8d343ce

Please sign in to comment.