Skip to content

Commit

Permalink
Added MinInt256 and MaxInt256 constants (#1576).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed May 31, 2021
1 parent 819b1ac commit bfcd05f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/constants/src.ts/bignumbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ const Two: BigNumber = (/*#__PURE__*/BigNumber.from(2));
const WeiPerEther: BigNumber = (/*#__PURE__*/BigNumber.from("1000000000000000000"));
const MaxUint256: BigNumber = (/*#__PURE__*/BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));

const MinInt256: BigNumber = (/*#__PURE__*/BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000"));
const MaxInt256: BigNumber = (/*#__PURE__*/BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));

export {
NegativeOne,
Zero,
One,
Two,
WeiPerEther,
MaxUint256
MaxUint256,
MinInt256,
MaxInt256,
};
4 changes: 3 additions & 1 deletion packages/constants/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export {
One,
Two,
WeiPerEther,
MaxUint256
MaxUint256,
MinInt256,
MaxInt256
} from "./bignumbers";
export { HashZero } from "./hashes";
export { EtherSymbol } from "./strings";
Expand Down

0 comments on commit bfcd05f

Please sign in to comment.