From 3ac15b135664f659347c8b4598c2ca37718716ed Mon Sep 17 00:00:00 2001 From: "jtriley.eth" Date: Tue, 16 Apr 2024 11:19:17 -0700 Subject: [PATCH] add behavior --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 6e6faf3..6bb16d5 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,21 @@ contract Vault { } ``` +### Behavior + +- Each external call asserts: + - The call succeeded. + - The call returned the correct returndatasize. + - If the call returns a boolean: + - The call returned `true`. + - If the call is ERC20's `transfer`, `transferFrom`, or `approve`: + - No data was returned OR (the returndata is 32 bytes AND is `true`). +- The operators `+`, `-`, `*`, `/`, and `%` revert if the operation: + - Overflows. + - Underflows. + - Divides by zero. +- The operator `~` masks the address to `160` bits after performing bitwise `not`. + ### Existing Types Documentation is prefixed to respective type and function definitions.