Static-Homeworks-CUB / fall2024

Assignments for the Static Program Analysis course, Constructor University Bremen, Fall 2024.
0 stars 10 forks source link

External Receiver is Used #11

Closed jubnzv closed 1 month ago

jubnzv commented 1 month ago

The detector should highlight all the external receivers defined within the project (see: AstReceiver node and its selector field).

Context

Contracts in TON communicate with each other using messages. This model resembles the actor model. The contract can send messages to any other contract and receive using the defined receiver functions.

Tact supports two kinds of message receiver functions: internal and external. External messages are different from internal messages: the contract has to pay gas for receiving messages, and there are some limits in gas processing.

Thus, the logic implemented in external messages may require extra attention from an auditor.

Examples

external("Check Timeout") { // Highlighted by the detector
  acceptMessage();
}
DLochmelis33 commented 1 month ago

I'd like to take this one