Skip to content

Commit 16751b3

Browse files
committed
S2: Error Handling
1 parent ecfd948 commit 16751b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contracts/InverseApi3ReaderProxyV1.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ contract InverseApi3ReaderProxyV1 is IInverseApi3ReaderProxyV1 {
3838
(int224 baseValue, uint32 baseTimestamp) = IApi3ReaderProxy(proxy)
3939
.read();
4040

41+
if (baseValue == 0) {
42+
revert DivisionByZero();
43+
}
44+
4145
value = int224(1e36) / baseValue;
4246
timestamp = baseTimestamp;
4347
}

0 commit comments

Comments
 (0)