How to check if a contract is using SafeMath library?

Hi,
I want to check if the contract is using safeMaths library? Somebody please guide me.

1 Like

Hi @zak100,

Other than checking the verified source code and looking for SafeMath, I am not sure if there is another way to do this.

Hi,

Can you please provide me an example for a Truffle project?

Please tell me through a mocha program?

Zulfi.

1 Like

Emmm, how about this one: OpenZeppelin Upgrades: Step by Step Tutorial for Truffle

1 Like

Hi @zak100,

You could try to get a contract to overflow and if it does, then it isn’t using SafeMath. You could fork mainnet to check a contract.