Before Token Transfer

April 12, 2023 ยท View on GitHub

Configuration

  • Check: pess-before-token-transfer
  • Severity: Low
  • Confidence: High

Description

The detector sees if a contract contains a beforeTokenTransfer function.

Potential Improvement

Find functions without virtual modifier and a call of a parent function without super.

Vulnerable Scenario

test scenarios

Recommendation

Function beforeTokenTransfer must be virtual if has override and must call its parent function using super.

Contents

  1. 1Configuration
  2. 2Description
  3. 2.1Potential Improvement
  4. 3Vulnerable Scenario
  5. 4Recommendation