Skip to content

Commit

Permalink
remove add 0 in GetNextBid and GetNextAsk
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulsharma21 committed Aug 31, 2023
1 parent e2c911b commit 750407d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions precompile/contracts/bibliophile/amm.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ func GetAskSize(stateDB contract.StateDB, market common.Address, price *big.Int)
}

func GetNextBid(stateDB contract.StateDB, market common.Address, price *big.Int) *big.Int {
return stateDB.GetState(market, common.BigToHash(new(big.Int).Add(bidsStorageSlot(price), big.NewInt(0)))).Big()
return stateDB.GetState(market, common.BigToHash(bidsStorageSlot(price))).Big()
}

func GetNextAsk(stateDB contract.StateDB, market common.Address, price *big.Int) *big.Int {
return stateDB.GetState(market, common.BigToHash(new(big.Int).Add(asksStorageSlot(price), big.NewInt(0)))).Big()
return stateDB.GetState(market, common.BigToHash(asksStorageSlot(price))).Big()
}

func GetImpactMarginNotional(stateDB contract.StateDB, market common.Address) *big.Int {
Expand Down

0 comments on commit 750407d

Please sign in to comment.