RageTrade / core

Perpetuals on Uniswap V3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use SafeCast

134dd3v opened this issue · comments

In a number of places we have direct casting to lower ranges, e.g. casting uint256 to int256.

Current:

int256(val)

Desirable:

val.toInt256()

Additionally, since safecast would add some cost, it should only be used where it's reasonable.

Done