Skip to content

Instantly share code, notes, and snippets.

@alexroan
Created April 3, 2020 12:17
Show Gist options
  • Save alexroan/3a8ec17997b0d668bf20ce38bfdfbc71 to your computer and use it in GitHub Desktop.
Save alexroan/3a8ec17997b0d668bf20ce38bfdfbc71 to your computer and use it in GitHub Desktop.
BasicSafeCast.sol
pragma solidity ^0.5.5;
import "@openzeppelin/contracts/math/SafeCast.sol";
contract BasicSafeCast {
using SafeCast for uint;
function castToUint8(uint _a) public returns (uint8) {
return _a.toUint8();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment