Adding SafeCast variants for signed integers (#2243)
* feat: Adding SafeCast variants for signed integers * Add newline at EOF * Update CHANGELOG.md * Update contracts/utils/SafeCast.sol Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com> Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c18ffd7c81
commit
5513dfd3cf
@ -35,4 +35,24 @@ contract SafeCastMock {
|
||||
function toUint8(uint a) public pure returns (uint8) {
|
||||
return a.toUint8();
|
||||
}
|
||||
|
||||
function toInt128(int a) public pure returns (int128) {
|
||||
return a.toInt128();
|
||||
}
|
||||
|
||||
function toInt64(int a) public pure returns (int64) {
|
||||
return a.toInt64();
|
||||
}
|
||||
|
||||
function toInt32(int a) public pure returns (int32) {
|
||||
return a.toInt32();
|
||||
}
|
||||
|
||||
function toInt16(int a) public pure returns (int16) {
|
||||
return a.toInt16();
|
||||
}
|
||||
|
||||
function toInt8(int a) public pure returns (int8) {
|
||||
return a.toInt8();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user