diff --git a/Changelog.md b/Changelog.md
index f772f6dd8b48..461317e7cbec 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -5,6 +5,11 @@ Language Features:
Compiler Features:
* ethdebug: Experimental support for instructions and source locations under EOF.
+* DocString Parser: Warn about deprecation of inline assembly special comment `memory-safe-assembly`.
+* Syntax Checker: Warn about deprecation of ABI coder v1.
+* Syntax Checker: Warn about deprecation of virtual modifiers.
+* Type Checker: Warn about deprecation of `send` and `transfer` functions on instances of `address`.
+* Type Checker: Warn about deprecation of comparisons between variables of contract types.
Bugfixes:
* Assembler: Fix not using a fixed-width type for IDs being assigned to subassemblies nested more than one level away, resulting in inconsistent `--asm-json` output between target architectures.
diff --git a/docs/assembly.rst b/docs/assembly.rst
index 3f00ab6a8a79..68140e0a62b7 100644
--- a/docs/assembly.rst
+++ b/docs/assembly.rst
@@ -381,8 +381,9 @@ of Solidity, you can use a special comment to annotate an assembly block as memo
...
}
-Note that we will disallow the annotation via comment in a future breaking release; so, if you are not concerned with
-backward-compatibility with older compiler versions, prefer using the dialect string.
+.. warning::
+ The ``memory-safe-assembly`` special comment is deprecated and scheduled for removal.
+ For new code targeting recent compilers, specify the assembly block annotation.
Advanced Safe Use of Memory
---------------------------
diff --git a/docs/cheatsheet.rst b/docs/cheatsheet.rst
index 79aa6e65d552..21f94cfd6548 100644
--- a/docs/cheatsheet.rst
+++ b/docs/cheatsheet.rst
@@ -56,6 +56,11 @@ Members of ``address``
returns ``false`` on failure
- ``
.transfer(uint256 amount)``: send given amount of Wei to :ref:`address`, throws on failure
+.. warning::
+ ``send`` and ``transfer`` are deprecated and scheduled for removal in the next breaking version (0.9).
+ Use the :ref:`call function ` with an optionally provided maximum amount of
+ gas (by default forwards 63/64 of the remaining gas) and an empty calldata parameter, e.g., ``call{value: amount}("")``.
+
.. index:: blockhash, blobhash, block, block;basefee, block;blobbasefee, block;chainid, block;coinbase, block;difficulty, block;gaslimit, block;number, block;prevrandao, block;timestamp
.. index:: gasleft, msg;data, msg;sender, msg;sig, msg;value, tx;gasprice, tx;origin
diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst
index cbc219b53b5a..4051f0f306a7 100644
--- a/docs/common-patterns.rst
+++ b/docs/common-patterns.rst
@@ -57,7 +57,8 @@ you receive the funds of the person who is now the richest.
// Remember to zero the pending refund before
// sending to prevent reentrancy attacks
pendingWithdrawals[msg.sender] = 0;
- payable(msg.sender).transfer(amount);
+ (bool success, ) = payable(msg.sender).call{value: amount}("");
+ require(success);
}
}
@@ -84,7 +85,8 @@ This is as opposed to the more intuitive sending pattern:
function becomeRichest() public payable {
if (msg.value <= mostSent) revert NotEnoughEther();
// This line can cause problems (explained below).
- richest.transfer(msg.value);
+ (bool success, ) = richest.call{value: msg.value}("");
+ require(success);
richest = payable(msg.sender);
mostSent = msg.value;
}
@@ -210,8 +212,10 @@ restrictions highly readable.
revert NotEnoughEther();
_;
- if (msg.value > amount)
- payable(msg.sender).transfer(msg.value - amount);
+ if (msg.value > amount) {
+ (bool success, ) = payable(msg.sender).call{value: msg.value - amount}("");
+ require(success);
+ }
}
function forceOwnerChange(address newOwner)
diff --git a/docs/contracts/functions.rst b/docs/contracts/functions.rst
index a3a2755388c8..3330fcccc569 100644
--- a/docs/contracts/functions.rst
+++ b/docs/contracts/functions.rst
@@ -310,6 +310,11 @@ will consume more gas than the 2300 gas stipend:
- Calling an external function which consumes a large amount of gas
- Sending Ether
+.. warning::
+ ``send`` and ``transfer`` are deprecated and scheduled for removal in the next breaking version (0.9).
+ Use the :ref:`call function ` with an optionally provided maximum amount of
+ gas (default forwards all remaining gas) and an empty calldata parameter, e.g., ``call{value: amount}("")``.
+
.. warning::
When Ether is sent directly to a contract (without a function call, i.e. sender uses ``send`` or ``transfer``)
but the receiving contract does not define a receive Ether function or a payable fallback function,
@@ -319,7 +324,6 @@ will consume more gas than the 2300 gas stipend:
not recommended, since the fallback is invoked and would not fail for interface confusions
on the part of the sender).
-
.. warning::
A contract without a receive Ether function can receive Ether as a
recipient of a *coinbase transaction* (aka *miner block reward*)
@@ -440,6 +444,7 @@ operations as long as there is enough gas passed on to it.
// If someone sends Ether to that contract,
// the transfer will fail, i.e. this returns false here.
+ // This will report a warning (deprecation)
return testPayable.send(2 ether);
}
diff --git a/docs/contracts/inheritance.rst b/docs/contracts/inheritance.rst
index 8a2d12afd839..fa59a0624a31 100644
--- a/docs/contracts/inheritance.rst
+++ b/docs/contracts/inheritance.rst
@@ -377,8 +377,8 @@ of the variable:
.. _modifier-overriding:
-Modifier Overriding
-===================
+Modifier Overriding (deprecated)
+================================
Function modifiers can override each other. This works in the same way as
:ref:`function overriding ` (except that there is no overloading for modifiers). The
@@ -392,6 +392,7 @@ and the ``override`` keyword must be used in the overriding modifier:
contract Base
{
+ // This will report a warning (deprecation)
modifier foo() virtual {_;}
}
@@ -411,11 +412,13 @@ explicitly:
contract Base1
{
+ // This will report a warning (deprecation)
modifier foo() virtual {_;}
}
contract Base2
{
+ // This will report a warning (deprecation)
modifier foo() virtual {_;}
}
@@ -424,6 +427,8 @@ explicitly:
modifier foo() override(Base1, Base2) {_;}
}
+.. warning::
+ ``virtual`` modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
.. index:: ! constructor
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index 8a815e10ef0f..c567ddc5275c 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -692,16 +692,16 @@ and ``assert`` for internal error checking.
:force:
// SPDX-License-Identifier: GPL-3.0
- pragma solidity >=0.5.0 <0.9.0;
+ pragma solidity >=0.6.2 <0.9.0;
contract Sharer {
function sendHalf(address payable addr) public payable returns (uint balance) {
require(msg.value % 2 == 0, "Even value required.");
uint balanceBeforeTransfer = address(this).balance;
- addr.transfer(msg.value / 2);
- // Since transfer throws an exception on failure and
- // cannot call back here, there should be no way for us to
- // still have half of the Ether.
+ (bool success, ) = addr.call{value: msg.value / 2}("");
+ require(success);
+ // Since require will stop execution and revert if success is false,
+ // there should be no way for us to still have half of the Ether.
assert(address(this).balance == balanceBeforeTransfer - msg.value / 2);
return address(this).balance;
}
@@ -775,7 +775,8 @@ together with ``revert`` and the equivalent ``require``:
if (msg.sender != owner)
revert Unauthorized();
- payable(msg.sender).transfer(address(this).balance);
+ (bool success, ) = payable(msg.sender).call{value: address(this).balance}("");
+ require(success);
}
}
@@ -914,4 +915,4 @@ in scope in the block that follows.
out-of-gas situation and not a deliberate error condition:
The caller always retains at least 1/64th of the gas in a call and thus
even if the called contract goes out of gas, the caller still
- has some gas left.
\ No newline at end of file
+ has some gas left.
diff --git a/docs/examples/blind-auction.rst b/docs/examples/blind-auction.rst
index 47e19033f9ae..acf0b2aeccc0 100644
--- a/docs/examples/blind-auction.rst
+++ b/docs/examples/blind-auction.rst
@@ -123,8 +123,9 @@ to receive their Ether - contracts cannot activate themselves.
// msg.sender is not of type `address payable` and must be
// explicitly converted using `payable(msg.sender)` in order
- // use the member function `send()`.
- if (!payable(msg.sender).send(amount)) {
+ // use the member function `call()`.
+ (bool success, ) = payable(msg.sender).call{value: amount}("");
+ if (!success) {
// No need to call throw here, just reset the amount owing
pendingReturns[msg.sender] = amount;
return false;
@@ -160,7 +161,8 @@ to receive their Ether - contracts cannot activate themselves.
emit AuctionEnded(highestBidder, highestBid);
// 3. Interaction
- beneficiary.transfer(highestBid);
+ (bool success, ) = beneficiary.call{value: highestBid}("");
+ require(success);
}
}
@@ -310,7 +312,8 @@ invalid bids.
// the same deposit.
bidToCheck.blindedBid = bytes32(0);
}
- payable(msg.sender).transfer(refund);
+ (bool success, ) = payable(msg.sender).call{value: refund}("");
+ require(success);
}
/// Withdraw a bid that was overbid.
@@ -323,7 +326,8 @@ invalid bids.
// conditions -> effects -> interaction).
pendingReturns[msg.sender] = 0;
- payable(msg.sender).transfer(amount);
+ (bool success, ) = payable(msg.sender).call{value: amount}("");
+ require(success);
}
}
@@ -336,7 +340,8 @@ invalid bids.
if (ended) revert AuctionEndAlreadyCalled();
emit AuctionEnded(highestBidder, highestBid);
ended = true;
- beneficiary.transfer(highestBid);
+ (bool success, ) = beneficiary.call{value: highestBid}("");
+ require(success);
}
// This is an "internal" function which means that it
diff --git a/docs/examples/micropayment.rst b/docs/examples/micropayment.rst
index a7b26bb51b8b..373627c3d96a 100644
--- a/docs/examples/micropayment.rst
+++ b/docs/examples/micropayment.rst
@@ -185,7 +185,8 @@ The full contract
// this recreates the message that was signed on the client
bytes32 message = prefixed(keccak256(abi.encodePacked(msg.sender, amount, nonce, this)));
require(recoverSigner(message, signature) == owner);
- payable(msg.sender).transfer(amount);
+ (bool success, ) = payable(msg.sender).call{value: amount}("");
+ require(success);
}
/// freeze the contract and reclaim the leftover funds.
@@ -195,7 +196,8 @@ The full contract
{
require(msg.sender == owner);
freeze();
- payable(msg.sender).transfer(address(this).balance);
+ (bool success, ) = payable(msg.sender).call{value: address(this).balance}("");
+ require(success);
}
/// signature methods.
@@ -406,9 +408,11 @@ The full contract
require(msg.sender == recipient);
require(isValidSignature(amount, signature));
- recipient.transfer(amount);
+ (bool success, ) = recipient.call{value: amount}("");
+ require(success);
freeze();
- sender.transfer(address(this).balance);
+ (success, ) = sender.call{value: address(this).balance}("");
+ require(success);
}
/// the sender can extend the expiration at any time
@@ -430,7 +434,8 @@ The full contract
{
require(block.timestamp >= expiration);
freeze();
- sender.transfer(address(this).balance);
+ (bool success, ) = sender.call{value: address(this).balance}("");
+ require(success);
}
function isValidSignature(uint256 amount, bytes memory signature)
diff --git a/docs/examples/safe-remote.rst b/docs/examples/safe-remote.rst
index a2651af23882..5d8a857ad57a 100644
--- a/docs/examples/safe-remote.rst
+++ b/docs/examples/safe-remote.rst
@@ -97,7 +97,8 @@ you can use state machine-like constructs inside a contract.
// reentrancy-safe, because it is the
// last call in this function and we
// already changed the state.
- seller.transfer(address(this).balance);
+ (bool success, ) = seller.call{value: address(this).balance}("");
+ require(success);
}
/// Confirm the purchase as buyer.
@@ -128,7 +129,8 @@ you can use state machine-like constructs inside a contract.
// can call in again here.
state = State.Release;
- buyer.transfer(value);
+ (bool success, ) = buyer.call{value: value}("");
+ require(success);
}
/// This function refunds the seller, i.e.
@@ -144,6 +146,7 @@ you can use state machine-like constructs inside a contract.
// can call in again here.
state = State.Inactive;
- seller.transfer(3 * value);
+ (bool success, ) = seller.call{value: 3 * value}("");
+ require(success);
}
}
diff --git a/docs/layout-of-source-files.rst b/docs/layout-of-source-files.rst
index e51b3ad98eb4..fb1e958e4624 100644
--- a/docs/layout-of-source-files.rst
+++ b/docs/layout-of-source-files.rst
@@ -103,10 +103,14 @@ select between the two implementations of the ABI encoder and decoder.
The new ABI coder (v2) is able to encode and decode arbitrarily nested
arrays and structs. Apart from supporting more types, it involves more extensive
validation and safety checks, which may result in higher gas costs, but also heightened
-security. It is considered
-non-experimental as of Solidity 0.6.0 and it is enabled by default starting
+security.
+It is considered non-experimental as of Solidity 0.6.0 and it is enabled by default starting
with Solidity 0.8.0. The old ABI coder can still be selected using ``pragma abicoder v1;``.
+.. warning::
+ The ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9).
+ Use ABI coder v2 instead.
+
The set of types supported by the new encoder is a strict superset of
the ones supported by the old one. Contracts that use it can interact with ones
that do not without limitations. The reverse is possible only as long as the
diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst
index eb42993e6764..3c6ee51fb774 100644
--- a/docs/security-considerations.rst
+++ b/docs/security-considerations.rst
@@ -65,6 +65,7 @@ To give an example, the following code contains a bug (it is just a snippet and
mapping(address => uint) shares;
/// Withdraw your share.
function withdraw() public {
+ // This will report a warning (deprecation)
if (payable(msg.sender).send(shares[msg.sender]))
shares[msg.sender] = 0;
}
@@ -76,7 +77,7 @@ Ether transfer can always include code execution,
so the recipient could be a contract that calls back into ``withdraw``.
This would let it get multiple refunds and, basically, retrieve all the Ether in the contract.
In particular, the following contract will allow an attacker to refund multiple times
-as it uses ``call`` which forwards all remaining gas by default:
+as it uses ``call`` which forwards 63/64 of the remaining gas by default:
.. code-block:: solidity
@@ -100,7 +101,7 @@ To avoid reentrancy, you can use the Checks-Effects-Interactions pattern as demo
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
- pragma solidity >=0.6.0 <0.9.0;
+ pragma solidity >=0.6.2 <0.9.0;
contract Fund {
/// @dev Mapping of ether shares of the contract.
@@ -109,7 +110,8 @@ To avoid reentrancy, you can use the Checks-Effects-Interactions pattern as demo
function withdraw() public {
uint share = shares[msg.sender];
shares[msg.sender] = 0;
- payable(msg.sender).transfer(share);
+ (bool success, ) = payable(msg.sender).call{value: share}("");
+ require(success);
}
}
@@ -255,6 +257,7 @@ Let's say you have a wallet contract like this:
function transferTo(address payable dest, uint amount) public {
// THE BUG IS RIGHT HERE, you must use msg.sender instead of tx.origin
require(tx.origin == owner);
+ // This will report a warning (deprecation)
dest.transfer(amount);
}
}
diff --git a/docs/types/reference-types.rst b/docs/types/reference-types.rst
index 79ba8da6e5be..b07a54f45f97 100644
--- a/docs/types/reference-types.rst
+++ b/docs/types/reference-types.rst
@@ -680,7 +680,7 @@ shown in the following example:
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
- pragma solidity >=0.6.0 <0.9.0;
+ pragma solidity >=0.6.2 <0.9.0;
// Defines a new type with two fields.
// Declaring a struct outside of a contract allows
@@ -729,8 +729,8 @@ shown in the following example:
return false;
uint amount = c.amount;
c.amount = 0;
- c.beneficiary.transfer(amount);
- return true;
+ (bool success, ) = c.beneficiary.call{value: amount}("");
+ return success;
}
}
diff --git a/docs/types/value-types.rst b/docs/types/value-types.rst
index 57fa7b3dabd3..8a5b499d69e2 100644
--- a/docs/types/value-types.rst
+++ b/docs/types/value-types.rst
@@ -244,116 +244,128 @@ For a quick reference of all members of address, see :ref:`address_related`.
* ``balance`` and ``transfer``
-It is possible to query the balance of an address using the property ``balance``
-and to send Ether (in units of wei) to a payable address using the ``transfer`` function:
+ It is possible to query the balance of an address using the property ``balance``
+ and to send Ether (in units of wei) to a payable address using the ``transfer`` function:
-.. code-block:: solidity
- :force:
+ .. code-block:: solidity
+ :force:
- address payable x = payable(0x123);
- address myAddress = address(this);
- if (x.balance < 10 && myAddress.balance >= 10) x.transfer(10);
+ address payable x = payable(0x123);
+ address myAddress = address(this);
+ if (x.balance < 10 && myAddress.balance >= 10) x.transfer(10);
-The ``transfer`` function fails if the balance of the current contract is not large enough
-or if the Ether transfer is rejected by the receiving account. The ``transfer`` function
-reverts on failure.
+ The ``transfer`` function fails if the balance of the current contract is not large enough
+ or if the Ether transfer is rejected by the receiving account. The ``transfer`` function
+ reverts on failure.
-.. note::
- If ``x`` is a contract address, its code (more specifically: its :ref:`receive-ether-function`, if present, or otherwise its :ref:`fallback-function`, if present) will be executed together with the ``transfer`` call (this is a feature of the EVM and cannot be prevented). If that execution runs out of gas or fails in any way, the Ether transfer will be reverted and the current contract will stop with an exception.
+ .. note::
+ If ``x`` is a contract address, its code (more specifically: its :ref:`receive-ether-function`, if present, or otherwise its :ref:`fallback-function`, if present) will be executed together with the ``transfer`` call (this is a feature of the EVM and cannot be prevented). If that execution runs out of gas or fails in any way, the Ether transfer will be reverted and the current contract will stop with an exception.
+
+ .. warning::
+ ``transfer`` is deprecated and scheduled for removal in the next breaking version (0.9).
+ Use the :ref:`call function ` with an optionally provided maximum amount of
+ gas (default forwards all remaining gas) and an empty calldata parameter, e.g., ``call{value: amount}("")``.
* ``send``
-``send`` is the low-level counterpart of ``transfer``. If the execution fails, the current contract will not stop with an exception, but ``send`` will return ``false``.
+ ``send`` is the low-level counterpart of ``transfer``. If the execution fails, the current contract will not stop with an exception, but ``send`` will return ``false``.
-.. warning::
- There are some dangers in using ``send``: The transfer fails if the call stack depth is at 1024
- (this can always be forced by the caller) and it also fails if the recipient runs out of gas. So in order
- to make safe Ether transfers, always check the return value of ``send``, use ``transfer`` or even better:
- use a pattern where the recipient withdraws the Ether.
+ .. warning::
+ There are some dangers in using ``send``: The transfer fails if the call stack depth is at 1024
+ (this can always be forced by the caller) and it also fails if the recipient runs out of gas. So in order
+ to make safe Ether transfers, always check the return value of ``send``, use ``transfer`` or even better:
+ use a pattern where the recipient withdraws the Ether.
+
+ .. warning::
+ ``send`` is deprecated and scheduled for removal in the next breaking version (0.9).
+ Use the :ref:`call function ` with an optionally provided maximum amount of
+ gas (default forwards all remaining gas) and an empty calldata parameter, e.g., ``call{value: amount}("")``.
+
+.. _address_call_functions:
* ``call``, ``delegatecall`` and ``staticcall``
-In order to interface with contracts that do not adhere to the ABI,
-or to get more direct control over the encoding,
-the functions ``call``, ``delegatecall`` and ``staticcall`` are provided.
-They all take a single ``bytes memory`` parameter and
-return the success condition (as a ``bool``) and the returned data
-(``bytes memory``).
-The functions ``abi.encode``, ``abi.encodePacked``, ``abi.encodeWithSelector``
-and ``abi.encodeWithSignature`` can be used to encode structured data.
+ In order to interface with contracts that do not adhere to the ABI,
+ or to get more direct control over the encoding,
+ the functions ``call``, ``delegatecall`` and ``staticcall`` are provided.
+ They all take a single ``bytes memory`` parameter and
+ return the success condition (as a ``bool``) and the returned data
+ (``bytes memory``).
+ The functions ``abi.encode``, ``abi.encodePacked``, ``abi.encodeWithSelector``
+ and ``abi.encodeWithSignature`` can be used to encode structured data.
-Example:
+ Example:
-.. code-block:: solidity
+ .. code-block:: solidity
- bytes memory payload = abi.encodeWithSignature("register(string)", "MyName");
- (bool success, bytes memory returnData) = address(nameReg).call(payload);
- require(success);
+ bytes memory payload = abi.encodeWithSignature("register(string)", "MyName");
+ (bool success, bytes memory returnData) = address(nameReg).call(payload);
+ require(success);
-.. warning::
- All these functions are low-level functions and should be used with care.
- Specifically, any unknown contract might be malicious and if you call it, you
- hand over control to that contract which could in turn call back into
- your contract, so be prepared for changes to your state variables
- when the call returns. The regular way to interact with other contracts
- is to call a function on a contract object (``x.f()``).
+ .. warning::
+ All these functions are low-level functions and should be used with care.
+ Specifically, any unknown contract might be malicious and if you call it, you
+ hand over control to that contract which could in turn call back into
+ your contract, so be prepared for changes to your state variables
+ when the call returns. The regular way to interact with other contracts
+ is to call a function on a contract object (``x.f()``).
-.. note::
- Previous versions of Solidity allowed these functions to receive
- arbitrary arguments and would also handle a first argument of type
- ``bytes4`` differently. These edge cases were removed in version 0.5.0.
+ .. note::
+ Previous versions of Solidity allowed these functions to receive
+ arbitrary arguments and would also handle a first argument of type
+ ``bytes4`` differently. These edge cases were removed in version 0.5.0.
-It is possible to adjust the supplied gas with the ``gas`` modifier:
+ It is possible to adjust the supplied gas with the ``gas`` modifier:
-.. code-block:: solidity
+ .. code-block:: solidity
- address(nameReg).call{gas: 1000000}(abi.encodeWithSignature("register(string)", "MyName"));
+ address(nameReg).call{gas: 1000000}(abi.encodeWithSignature("register(string)", "MyName"));
-Similarly, the supplied Ether value can be controlled too:
+ Similarly, the supplied Ether value can be controlled too:
-.. code-block:: solidity
+ .. code-block:: solidity
- address(nameReg).call{value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
+ address(nameReg).call{value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
-Lastly, these modifiers can be combined. Their order does not matter:
+ Lastly, these modifiers can be combined. Their order does not matter:
-.. code-block:: solidity
+ .. code-block:: solidity
- address(nameReg).call{gas: 1000000, value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
+ address(nameReg).call{gas: 1000000, value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
-In a similar way, the function ``delegatecall`` can be used: the difference is that only the code of the given address is used, all other aspects (storage, balance, ...) are taken from the current contract. The purpose of ``delegatecall`` is to use library code which is stored in another contract. The user has to ensure that the layout of storage in both contracts is suitable for delegatecall to be used.
+ In a similar way, the function ``delegatecall`` can be used: the difference is that only the code of the given address is used, all other aspects (storage, balance, ...) are taken from the current contract. The purpose of ``delegatecall`` is to use library code which is stored in another contract. The user has to ensure that the layout of storage in both contracts is suitable for delegatecall to be used.
-.. note::
- Prior to homestead, only a limited variant called ``callcode`` was available that did not provide access to the original ``msg.sender`` and ``msg.value`` values. This function was removed in version 0.5.0.
+ .. note::
+ Prior to homestead, only a limited variant called ``callcode`` was available that did not provide access to the original ``msg.sender`` and ``msg.value`` values. This function was removed in version 0.5.0.
-Since byzantium ``staticcall`` can be used as well. This is basically the same as ``call``, but will revert if the called function modifies the state in any way.
+ Since byzantium ``staticcall`` can be used as well. This is basically the same as ``call``, but will revert if the called function modifies the state in any way.
-All three functions ``call``, ``delegatecall`` and ``staticcall`` are very low-level functions and should only be used as a *last resort* as they break the type-safety of Solidity.
+ All three functions ``call``, ``delegatecall`` and ``staticcall`` are very low-level functions and should only be used as a *last resort* as they break the type-safety of Solidity.
-The ``gas`` option is available on all three methods, while the ``value`` option is only available
-on ``call``.
+ The ``gas`` option is available on all three methods, while the ``value`` option is only available
+ on ``call``.
-.. note::
- It is best to avoid relying on hardcoded gas values in your smart contract code,
- regardless of whether state is read from or written to, as this can have many pitfalls.
- Also, access to gas might change in the future.
+ .. note::
+ It is best to avoid relying on hardcoded gas values in your smart contract code,
+ regardless of whether state is read from or written to, as this can have many pitfalls.
+ Also, access to gas might change in the future.
* ``code`` and ``codehash``
-You can query the deployed code for any smart contract. Use ``.code`` to get the EVM bytecode as a
-``bytes memory``, which might be empty. Use ``.codehash`` to get the Keccak-256 hash of that code
-(as a ``bytes32``). Note that ``addr.codehash`` is cheaper than using ``keccak256(addr.code)``.
+ You can query the deployed code for any smart contract. Use ``.code`` to get the EVM bytecode as a
+ ``bytes memory``, which might be empty. Use ``.codehash`` to get the Keccak-256 hash of that code
+ (as a ``bytes32``). Note that ``addr.codehash`` is cheaper than using ``keccak256(addr.code)``.
-.. warning::
- The output of ``addr.codehash`` may be ``0`` if the account associated with ``addr`` is empty or non-existent
- (i.e., it has no code, zero balance, and zero nonce as defined by `EIP-161 `_).
- If the account has no code but a non-zero balance or nonce, then ``addr.codehash`` will output the Keccak-256 hash of empty data
- (i.e., ``keccak256("")`` which is equal to ``c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470``), as defined by
- `EIP-1052 `_.
+ .. warning::
+ The output of ``addr.codehash`` may be ``0`` if the account associated with ``addr`` is empty or non-existent
+ (i.e., it has no code, zero balance, and zero nonce as defined by `EIP-161 `_).
+ If the account has no code but a non-zero balance or nonce, then ``addr.codehash`` will output the Keccak-256 hash of empty data
+ (i.e., ``keccak256("")`` which is equal to ``c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470``), as defined by
+ `EIP-1052 `_.
-.. note::
- All contracts can be converted to ``address`` type, so it is possible to query the balance of the
- current contract using ``address(this).balance``.
+ .. note::
+ All contracts can be converted to ``address`` type, so it is possible to query the balance of the
+ current contract using ``address(this).balance``.
.. index:: ! contract type, ! type; contract
diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst
index fce4cf96d994..be9ebec50248 100644
--- a/docs/units-and-global-variables.rst
+++ b/docs/units-and-global-variables.rst
@@ -268,6 +268,11 @@ Members of Address Types
``.send(uint256 amount) returns (bool)``
send given amount of Wei to :ref:`address`, returns ``false`` on failure, forwards 2300 gas stipend, not adjustable
+.. warning::
+ ``send`` and ``transfer`` are deprecated and scheduled for removal in the next breaking version (0.9).
+ Use the :ref:`call function ` with an optionally provided maximum amount of
+ gas (default forwards all remaining gas) and an empty calldata parameter, e.g., ``call{value: amount}("")``.
+
``.call(bytes memory) returns (bool, bytes memory)``
issue low-level ``CALL`` with the given payload, returns success condition and return data, forwards all available gas, adjustable
diff --git a/libsolidity/analysis/DocStringTagParser.cpp b/libsolidity/analysis/DocStringTagParser.cpp
index 5d95f42e902c..2d4e264aa234 100644
--- a/libsolidity/analysis/DocStringTagParser.cpp
+++ b/libsolidity/analysis/DocStringTagParser.cpp
@@ -206,11 +206,18 @@ bool DocStringTagParser::visit(InlineAssembly const& _assembly)
m_errorReporter.warning(
8544_error,
_assembly.location(),
- "Inline assembly marked as memory safe using both a NatSpec tag and an assembly flag. "
- "If you are not concerned with backwards compatibility, only use the assembly flag, "
+ "Inline assembly marked as memory safe using both a NatSpec tag and an assembly block annotation. "
+ "If you are not concerned with backwards compatibility, only use the assembly block annotation, "
"otherwise only use the NatSpec tag."
);
_assembly.annotation().markedMemorySafe = true;
+ m_errorReporter.warning(
+ 2424_error,
+ _assembly.location(),
+ "Natspec 'memory-safe-assembly' special comment for inline assembly is deprecated and "
+ "scheduled for removal in the next breaking version (0.9). "
+ "Use the memory-safe block annotation instead."
+ );
}
else
m_errorReporter.warning(
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp
index 1e3f5f1c2a56..d379eee469d1 100644
--- a/libsolidity/analysis/SyntaxChecker.cpp
+++ b/libsolidity/analysis/SyntaxChecker.cpp
@@ -149,6 +149,17 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma)
);
else
m_sourceUnit->annotation().useABICoderV2 = (_pragma.literals()[1] == "v2");
+
+ if (
+ m_sourceUnit->annotation().useABICoderV2.set() &&
+ !*m_sourceUnit->annotation().useABICoderV2
+ )
+ m_errorReporter.warning(
+ 9511_error,
+ _pragma.location(),
+ "ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). "
+ "Use ABI coder v2 instead."
+ );
}
else if (_pragma.literals()[0] == "solidity")
{
@@ -184,6 +195,14 @@ void SyntaxChecker::endVisit(ModifierDefinition const& _modifier)
{
if (_modifier.isImplemented() && !m_placeholderFound)
m_errorReporter.syntaxError(2883_error, _modifier.body().location(), "Modifier body does not contain '_'.");
+
+ if (_modifier.markedVirtual())
+ m_errorReporter.warning(
+ 8429_error,
+ _modifier.location(),
+ "Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9)."
+ );
+
m_placeholderFound = false;
}
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index e56ee157d94d..2d54c6a1fe73 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -1829,6 +1829,17 @@ void TypeChecker::endVisit(BinaryOperation const& _operation)
)
);
}
+ if (
+ TokenTraits::isCompareOp(_operation.getOperator()) &&
+ commonType->category() == Type::Category::Contract
+ )
+ m_errorReporter.warning(
+ 9170_error,
+ _operation.location(),
+ "Comparison of variables of contract type is deprecated and scheduled for removal "
+ "in the next breaking version (0.9). "
+ "Use an explicit cast to address type and compare the addresses instead."
+ );
}
Type const* TypeChecker::typeCheckTypeConversionAndRetrieveReturnType(
@@ -3212,6 +3223,20 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
if (contractType && contractType->isSuper())
requiredLookup = VirtualLookup::Super;
}
+
+ if (
+ funType->kind() == FunctionType::Kind::Send ||
+ funType->kind() == FunctionType::Kind::Transfer
+ )
+ m_errorReporter.warning(
+ 9207_error,
+ _memberAccess.location(),
+ fmt::format(
+ "'{}' is deprecated and scheduled for removal in the next breaking version (0.9). "
+ "Use 'call{{value: }}(\"\")' instead.",
+ funType->kind() == FunctionType::Kind::Send ? "send" : "transfer"
+ )
+ );
}
annotation.requiredLookup = requiredLookup;
diff --git a/test/cmdlineTests/model_checker_targets_all_all_engines/err b/test/cmdlineTests/model_checker_targets_all_all_engines/err
index e095ba263c5a..1dccbae8583e 100644
--- a/test/cmdlineTests/model_checker_targets_all_all_engines/err
+++ b/test/cmdlineTests/model_checker_targets_all_all_engines/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
@@ -18,6 +19,7 @@ Counterexample:
arr = []
a = 0x0
x = 1
+success = false
Transaction trace:
test.constructor()
@@ -33,6 +35,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
@@ -48,14 +51,16 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:11:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
Warning: CHC: Empty array "pop" happens here.
@@ -63,14 +68,16 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:12:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:13:3:
|
-12 | arr.pop();
+13 | arr.pop();
| ^^^^^^^^^
Warning: CHC: Out of bounds access happens here.
@@ -78,18 +85,18 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:13:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:14:3:
|
-13 | arr[x];
+14 | arr[x];
| ^^^^^^
-Info: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
-
Warning: BMC: Condition is always true.
--> input.sol:6:11:
|
diff --git a/test/cmdlineTests/model_checker_targets_all_all_engines/input.sol b/test/cmdlineTests/model_checker_targets_all_all_engines/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_all_all_engines/input.sol
+++ b/test/cmdlineTests/model_checker_targets_all_all_engines/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_all_bmc/err b/test/cmdlineTests/model_checker_targets_all_bmc/err
index 3887cc6b2a7f..f029f9566deb 100644
--- a/test/cmdlineTests/model_checker_targets_all_bmc/err
+++ b/test/cmdlineTests/model_checker_targets_all_bmc/err
@@ -13,10 +13,12 @@ Warning: BMC: Underflow (resulting value less than 0) happens here.
Note: Counterexample:
= (- 1)
a = 0
+ success = false
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
--> input.sol:8:3:
@@ -26,10 +28,12 @@ Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
Note: Counterexample:
= 2**256
a = 0
+ success = false
x = 1
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
Warning: BMC: Division by zero happens here.
--> input.sol:9:3:
@@ -39,31 +43,23 @@ Warning: BMC: Division by zero happens here.
Note: Counterexample:
= 0
a = 0
+ success = false
x = 0
Note: Callstack:
-Note:
-
-Warning: BMC: Insufficient funds happens here.
- --> input.sol:10:3:
- |
-10 | a.transfer(x);
- | ^^^^^^^^^^^^^
-Note: Counterexample:
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
Warning: BMC: Assertion violation happens here.
- --> input.sol:11:3:
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
Note: Counterexample:
a = 0
+ success = true
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
diff --git a/test/cmdlineTests/model_checker_targets_all_bmc/input.sol b/test/cmdlineTests/model_checker_targets_all_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_all_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_all_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_all_chc/err b/test/cmdlineTests/model_checker_targets_all_chc/err
index c3853983af72..ce494c90aa63 100644
--- a/test/cmdlineTests/model_checker_targets_all_chc/err
+++ b/test/cmdlineTests/model_checker_targets_all_chc/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
@@ -18,6 +19,7 @@ Counterexample:
arr = []
a = 0x0
x = 1
+success = false
Transaction trace:
test.constructor()
@@ -33,6 +35,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
@@ -48,14 +51,16 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:11:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
Warning: CHC: Empty array "pop" happens here.
@@ -63,14 +68,16 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:12:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:13:3:
|
-12 | arr.pop();
+13 | arr.pop();
| ^^^^^^^^^
Warning: CHC: Out of bounds access happens here.
@@ -78,14 +85,14 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:13:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:14:3:
|
-13 | arr[x];
+14 | arr[x];
| ^^^^^^
-
-Info: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/cmdlineTests/model_checker_targets_all_chc/input.sol b/test/cmdlineTests/model_checker_targets_all_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_all_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_all_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_assert_bmc/err b/test/cmdlineTests/model_checker_targets_assert_bmc/err
index 27395c9dc507..42d10150c096 100644
--- a/test/cmdlineTests/model_checker_targets_assert_bmc/err
+++ b/test/cmdlineTests/model_checker_targets_assert_bmc/err
@@ -1,11 +1,13 @@
Warning: BMC: Assertion violation happens here.
- --> input.sol:11:3:
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
Note: Counterexample:
a = 0
+ success = true
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
diff --git a/test/cmdlineTests/model_checker_targets_assert_bmc/input.sol b/test/cmdlineTests/model_checker_targets_assert_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_assert_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_assert_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_assert_chc/err b/test/cmdlineTests/model_checker_targets_assert_chc/err
index ada7c3d3dc90..fb4d9fcc598d 100644
--- a/test/cmdlineTests/model_checker_targets_assert_chc/err
+++ b/test/cmdlineTests/model_checker_targets_assert_chc/err
@@ -3,12 +3,14 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:11:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
diff --git a/test/cmdlineTests/model_checker_targets_assert_chc/input.sol b/test/cmdlineTests/model_checker_targets_assert_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_assert_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_assert_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_balance_bmc/err b/test/cmdlineTests/model_checker_targets_balance_bmc/err
deleted file mode 100644
index 178bd66620bd..000000000000
--- a/test/cmdlineTests/model_checker_targets_balance_bmc/err
+++ /dev/null
@@ -1,11 +0,0 @@
-Warning: BMC: Insufficient funds happens here.
- --> input.sol:10:3:
- |
-10 | a.transfer(x);
- | ^^^^^^^^^^^^^
-Note: Counterexample:
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
diff --git a/test/cmdlineTests/model_checker_targets_balance_bmc/input.sol b/test/cmdlineTests/model_checker_targets_balance_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_balance_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_balance_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_balance_chc/err b/test/cmdlineTests/model_checker_targets_balance_chc/err
deleted file mode 100644
index 57bfe42678e4..000000000000
--- a/test/cmdlineTests/model_checker_targets_balance_chc/err
+++ /dev/null
@@ -1 +0,0 @@
-Info: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/cmdlineTests/model_checker_targets_balance_chc/input.sol b/test/cmdlineTests/model_checker_targets_balance_chc/input.sol
index 4b521b3deba1..4103252cad56 100644
--- a/test/cmdlineTests/model_checker_targets_balance_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_balance_chc/input.sol
@@ -8,7 +8,8 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/model_checker_targets_constant_condition_bmc/input.sol b/test/cmdlineTests/model_checker_targets_constant_condition_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_constant_condition_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_constant_condition_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_constant_condition_chc/input.sol b/test/cmdlineTests/model_checker_targets_constant_condition_chc/input.sol
index 4b521b3deba1..4103252cad56 100644
--- a/test/cmdlineTests/model_checker_targets_constant_condition_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_constant_condition_chc/input.sol
@@ -8,7 +8,8 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/model_checker_targets_default_all_engines/err b/test/cmdlineTests/model_checker_targets_default_all_engines/err
index 58cbc01f1436..837729abf661 100644
--- a/test/cmdlineTests/model_checker_targets_default_all_engines/err
+++ b/test/cmdlineTests/model_checker_targets_default_all_engines/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
@@ -18,14 +19,16 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:11:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
Warning: CHC: Empty array "pop" happens here.
@@ -33,14 +36,16 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:12:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:13:3:
|
-12 | arr.pop();
+13 | arr.pop();
| ^^^^^^^^^
Warning: CHC: Out of bounds access happens here.
@@ -48,18 +53,18 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:13:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:14:3:
|
-13 | arr[x];
+14 | arr[x];
| ^^^^^^
-Info: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
-
Warning: BMC: Condition is always true.
--> input.sol:6:11:
|
diff --git a/test/cmdlineTests/model_checker_targets_default_all_engines/input.sol b/test/cmdlineTests/model_checker_targets_default_all_engines/input.sol
index ddeb1d125363..40641ad1a012 100644
--- a/test/cmdlineTests/model_checker_targets_default_all_engines/input.sol
+++ b/test/cmdlineTests/model_checker_targets_default_all_engines/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_default_bmc/err b/test/cmdlineTests/model_checker_targets_default_bmc/err
index bc85e3cb4acc..741622edbcfa 100644
--- a/test/cmdlineTests/model_checker_targets_default_bmc/err
+++ b/test/cmdlineTests/model_checker_targets_default_bmc/err
@@ -13,31 +13,23 @@ Warning: BMC: Division by zero happens here.
Note: Counterexample:
= 0
a = 0
+ success = false
x = 0
Note: Callstack:
-Note:
-
-Warning: BMC: Insufficient funds happens here.
- --> input.sol:10:3:
- |
-10 | a.transfer(x);
- | ^^^^^^^^^^^^^
-Note: Counterexample:
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
Warning: BMC: Assertion violation happens here.
- --> input.sol:11:3:
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
Note: Counterexample:
a = 0
+ success = true
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
diff --git a/test/cmdlineTests/model_checker_targets_default_bmc/input.sol b/test/cmdlineTests/model_checker_targets_default_bmc/input.sol
index ddeb1d125363..40641ad1a012 100644
--- a/test/cmdlineTests/model_checker_targets_default_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_default_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_default_chc/err b/test/cmdlineTests/model_checker_targets_default_chc/err
index e8b7382168ac..081a389deb65 100644
--- a/test/cmdlineTests/model_checker_targets_default_chc/err
+++ b/test/cmdlineTests/model_checker_targets_default_chc/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
@@ -18,14 +19,16 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:11:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
Warning: CHC: Empty array "pop" happens here.
@@ -33,14 +36,16 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:12:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:13:3:
|
-12 | arr.pop();
+13 | arr.pop();
| ^^^^^^^^^
Warning: CHC: Out of bounds access happens here.
@@ -48,14 +53,14 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:13:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:14:3:
|
-13 | arr[x];
+14 | arr[x];
| ^^^^^^
-
-Info: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/cmdlineTests/model_checker_targets_default_chc/input.sol b/test/cmdlineTests/model_checker_targets_default_chc/input.sol
index ddeb1d125363..40641ad1a012 100644
--- a/test/cmdlineTests/model_checker_targets_default_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_default_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_div_by_zero_bmc/err b/test/cmdlineTests/model_checker_targets_div_by_zero_bmc/err
index 2d554ebceb7d..5129b8940a4c 100644
--- a/test/cmdlineTests/model_checker_targets_div_by_zero_bmc/err
+++ b/test/cmdlineTests/model_checker_targets_div_by_zero_bmc/err
@@ -6,7 +6,9 @@ Warning: BMC: Division by zero happens here.
Note: Counterexample:
= 0
a = 0
+ success = false
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
diff --git a/test/cmdlineTests/model_checker_targets_div_by_zero_bmc/input.sol b/test/cmdlineTests/model_checker_targets_div_by_zero_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_div_by_zero_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_div_by_zero_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_div_by_zero_chc/err b/test/cmdlineTests/model_checker_targets_div_by_zero_chc/err
index 81616b3bedab..b9b84f2917de 100644
--- a/test/cmdlineTests/model_checker_targets_div_by_zero_chc/err
+++ b/test/cmdlineTests/model_checker_targets_div_by_zero_chc/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
diff --git a/test/cmdlineTests/model_checker_targets_div_by_zero_chc/input.sol b/test/cmdlineTests/model_checker_targets_div_by_zero_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_div_by_zero_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_div_by_zero_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_error/input.sol b/test/cmdlineTests/model_checker_targets_error/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_error/input.sol
+++ b/test/cmdlineTests/model_checker_targets_error/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_out_of_bounds_bmc/input.sol b/test/cmdlineTests/model_checker_targets_out_of_bounds_bmc/input.sol
index 4b521b3deba1..4103252cad56 100644
--- a/test/cmdlineTests/model_checker_targets_out_of_bounds_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_out_of_bounds_bmc/input.sol
@@ -8,7 +8,8 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/model_checker_targets_out_of_bounds_chc/err b/test/cmdlineTests/model_checker_targets_out_of_bounds_chc/err
index 907a19f1e11a..cefc673499de 100644
--- a/test/cmdlineTests/model_checker_targets_out_of_bounds_chc/err
+++ b/test/cmdlineTests/model_checker_targets_out_of_bounds_chc/err
@@ -3,12 +3,14 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:13:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:14:3:
|
-13 | arr[x];
+14 | arr[x];
| ^^^^^^
diff --git a/test/cmdlineTests/model_checker_targets_out_of_bounds_chc/input.sol b/test/cmdlineTests/model_checker_targets_out_of_bounds_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_out_of_bounds_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_out_of_bounds_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_overflow_bmc/err b/test/cmdlineTests/model_checker_targets_overflow_bmc/err
index a0f9ff1e07a9..8883492154b0 100644
--- a/test/cmdlineTests/model_checker_targets_overflow_bmc/err
+++ b/test/cmdlineTests/model_checker_targets_overflow_bmc/err
@@ -6,7 +6,9 @@ Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
Note: Counterexample:
= 2**256
a = 0
+ success = false
x = 1
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
diff --git a/test/cmdlineTests/model_checker_targets_overflow_bmc/input.sol b/test/cmdlineTests/model_checker_targets_overflow_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_overflow_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_overflow_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_overflow_chc/err b/test/cmdlineTests/model_checker_targets_overflow_chc/err
index 60298f02285a..bbaee177831f 100644
--- a/test/cmdlineTests/model_checker_targets_overflow_chc/err
+++ b/test/cmdlineTests/model_checker_targets_overflow_chc/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 1
+success = false
Transaction trace:
test.constructor()
diff --git a/test/cmdlineTests/model_checker_targets_overflow_chc/input.sol b/test/cmdlineTests/model_checker_targets_overflow_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_overflow_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_overflow_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_pop_empty_bmc/input.sol b/test/cmdlineTests/model_checker_targets_pop_empty_bmc/input.sol
index 4b521b3deba1..4103252cad56 100644
--- a/test/cmdlineTests/model_checker_targets_pop_empty_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_pop_empty_bmc/input.sol
@@ -8,7 +8,8 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/model_checker_targets_pop_empty_chc/err b/test/cmdlineTests/model_checker_targets_pop_empty_chc/err
index a01248775704..78524bd90385 100644
--- a/test/cmdlineTests/model_checker_targets_pop_empty_chc/err
+++ b/test/cmdlineTests/model_checker_targets_pop_empty_chc/err
@@ -3,12 +3,14 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:12:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:13:3:
|
-12 | arr.pop();
+13 | arr.pop();
| ^^^^^^^^^
diff --git a/test/cmdlineTests/model_checker_targets_pop_empty_chc/input.sol b/test/cmdlineTests/model_checker_targets_pop_empty_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_pop_empty_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_pop_empty_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_underflow_bmc/err b/test/cmdlineTests/model_checker_targets_underflow_bmc/err
index db14639238c6..4332314d6bf6 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_bmc/err
+++ b/test/cmdlineTests/model_checker_targets_underflow_bmc/err
@@ -6,7 +6,9 @@ Warning: BMC: Underflow (resulting value less than 0) happens here.
Note: Counterexample:
= (- 1)
a = 0
+ success = false
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
diff --git a/test/cmdlineTests/model_checker_targets_underflow_bmc/input.sol b/test/cmdlineTests/model_checker_targets_underflow_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_underflow_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_underflow_chc/err b/test/cmdlineTests/model_checker_targets_underflow_chc/err
index 57c6649a40f4..f245215584d2 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_chc/err
+++ b/test/cmdlineTests/model_checker_targets_underflow_chc/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
diff --git a/test/cmdlineTests/model_checker_targets_underflow_chc/input.sol b/test/cmdlineTests/model_checker_targets_underflow_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_underflow_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/err b/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/err
index 670b064ce183..fdf8a5ae91ff 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/err
+++ b/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/err
@@ -6,10 +6,12 @@ Warning: BMC: Underflow (resulting value less than 0) happens here.
Note: Counterexample:
= (- 1)
a = 0
+ success = false
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
--> input.sol:8:3:
@@ -19,19 +21,23 @@ Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
Note: Counterexample:
= 2**256
a = 0
+ success = false
x = 1
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
Warning: BMC: Assertion violation happens here.
- --> input.sol:11:3:
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
Note: Counterexample:
a = 0
+ success = true
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
diff --git a/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/input.sol b/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/err b/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/err
index 4602e76006dc..8388d76eded1 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/err
+++ b/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
@@ -18,6 +19,7 @@ Counterexample:
arr = []
a = 0x0
x = 1
+success = false
Transaction trace:
test.constructor()
@@ -33,12 +35,14 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = true
Transaction trace:
test.constructor()
State: arr = []
test.f(0x0, 1)
- --> input.sol:11:3:
+ a.call{value: x}("") -- untrusted external call
+ --> input.sol:12:3:
|
-11 | assert(x > 0);
+12 | assert(x > 0);
| ^^^^^^^^^^^^^
diff --git a/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/input.sol b/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/err b/test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/err
index ea6dfb99cb5d..78ec315295d8 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/err
+++ b/test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/err
@@ -6,10 +6,12 @@ Warning: BMC: Underflow (resulting value less than 0) happens here.
Note: Counterexample:
= (- 1)
a = 0
+ success = false
x = 0
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
--> input.sol:8:3:
@@ -19,7 +21,9 @@ Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
Note: Counterexample:
= 2**256
a = 0
+ success = false
x = 1
Note: Callstack:
-Note:
+Note:
+Note that external function calls are not inlined, even if the source code of the function is available. This is due to the possibility that the actual called contract has the same ABI but implements the function differently.
diff --git a/test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/input.sol b/test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/model_checker_targets_underflow_overflow_chc/err b/test/cmdlineTests/model_checker_targets_underflow_overflow_chc/err
index 8eed85ac3de3..5751c9072251 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_overflow_chc/err
+++ b/test/cmdlineTests/model_checker_targets_underflow_overflow_chc/err
@@ -3,6 +3,7 @@ Counterexample:
arr = []
a = 0x0
x = 0
+success = false
Transaction trace:
test.constructor()
@@ -18,6 +19,7 @@ Counterexample:
arr = []
a = 0x0
x = 1
+success = false
Transaction trace:
test.constructor()
diff --git a/test/cmdlineTests/model_checker_targets_underflow_overflow_chc/input.sol b/test/cmdlineTests/model_checker_targets_underflow_overflow_chc/input.sol
index 33b5bfab3ff7..0061441c0cf8 100644
--- a/test/cmdlineTests/model_checker_targets_underflow_overflow_chc/input.sol
+++ b/test/cmdlineTests/model_checker_targets_underflow_overflow_chc/input.sol
@@ -7,9 +7,10 @@ contract test {
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
}
-}
\ No newline at end of file
+}
diff --git a/test/cmdlineTests/standard_model_checker_targets_assert_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_assert_bmc/input.json
index 988417824124..391eb6873c80 100644
--- a/test/cmdlineTests/standard_model_checker_targets_assert_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_assert_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_assert_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_assert_bmc/output.json
index 9e90ec538d35..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_assert_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_assert_bmc/output.json
@@ -2,47 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "4661",
- "formattedMessage": "Warning: BMC: Assertion violation happens here.
- --> A:12:7:
- |
-12 | \t\t\t\t\t\tassert(x > 0);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-Note: Counterexample:
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Assertion violation happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 258,
- "file": "A",
- "start": 245
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_assert_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_assert_chc/input.json
index a9a7b3fcdb92..2c6fadcadfc0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_assert_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_assert_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_assert_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_assert_chc/output.json
index bf4fa6626933..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_assert_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_assert_chc/output.json
@@ -2,45 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "6328",
- "formattedMessage": "Warning: CHC: Assertion violation happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:12:7:
- |
-12 | \t\t\t\t\t\tassert(x > 0);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-
-",
- "message": "CHC: Assertion violation happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 258,
- "file": "A",
- "start": 245
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_balance_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_balance_bmc/input.json
index 4e6c84dbb9c1..14fcbd10cb9d 100644
--- a/test/cmdlineTests/standard_model_checker_targets_balance_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_balance_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_balance_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_balance_bmc/output.json
index 6c2c90c9888b..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_balance_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_balance_bmc/output.json
@@ -2,47 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "1236",
- "formattedMessage": "Warning: BMC: Insufficient funds happens here.
- --> A:11:7:
- |
-11 | \t\t\t\t\t\ta.transfer(x);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-Note: Counterexample:
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Insufficient funds happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 237,
- "file": "A",
- "start": 224
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_balance_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_balance_chc/input.json
index 4973a059790e..dd4cb227f48e 100644
--- a/test/cmdlineTests/standard_model_checker_targets_balance_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_balance_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_balance_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_balance_chc/output.json
index 9d3e40b708f1..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_balance_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_balance_chc/output.json
@@ -2,18 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "1391",
- "formattedMessage": "Info: CHC: 1 verification condition(s) proved safe! Enable the model checker option \"show proved safe\" to see all of them.
-
-",
- "message": "CHC: 1 verification condition(s) proved safe! Enable the model checker option \"show proved safe\" to see all of them.",
- "severity": "info",
- "type": "Info"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_constantCondition_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_constantCondition_bmc/input.json
index dd97baae9a24..1fc894c3823b 100644
--- a/test/cmdlineTests/standard_model_checker_targets_constantCondition_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_constantCondition_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_constantCondition_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_constantCondition_bmc/output.json
index 9bfdf0b02111..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_constantCondition_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_constantCondition_bmc/output.json
@@ -2,33 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "6838",
- "formattedMessage": "Warning: BMC: Condition is always true.
- --> A:7:15:
- |
-7 | \t\t\t\t\t\trequire(x >= 0);
- | \t\t\t\t\t\t ^^^^^^
-Note: Callstack:
-
-",
- "message": "BMC: Condition is always true.",
- "secondarySourceLocations": [
- {
- "message": "Callstack:"
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 165,
- "file": "A",
- "start": 159
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_constantCondition_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_constantCondition_chc/input.json
index 365ca122be50..7282a8853608 100644
--- a/test/cmdlineTests/standard_model_checker_targets_constantCondition_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_constantCondition_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_constantCondition_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_constantCondition_chc/output.json
index f047ff70a9eb..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_constantCondition_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_constantCondition_chc/output.json
@@ -1,7 +1,11 @@
{
- "sources": {
- "A": {
- "id": 0
+ "errors": [
+ {
+ "component": "general",
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_default_all_engines/input.json b/test/cmdlineTests/standard_model_checker_targets_default_all_engines/input.json
index 0d913f0ba25a..5bc7e7bfb5a4 100644
--- a/test/cmdlineTests/standard_model_checker_targets_default_all_engines/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_default_all_engines/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_default_all_engines/output.json b/test/cmdlineTests/standard_model_checker_targets_default_all_engines/output.json
index 8f20d854bfb5..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_default_all_engines/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_default_all_engines/output.json
@@ -2,191 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "4281",
- "formattedMessage": "Warning: CHC: Division by zero happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:10:7:
- |
-10 | \t\t\t\t\t\t2 / x;
- | \t\t\t\t\t\t^^^^^
-
-",
- "message": "CHC: Division by zero happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 216,
- "file": "A",
- "start": 211
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "6328",
- "formattedMessage": "Warning: CHC: Assertion violation happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:12:7:
- |
-12 | \t\t\t\t\t\tassert(x > 0);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-
-",
- "message": "CHC: Assertion violation happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 258,
- "file": "A",
- "start": 245
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "2529",
- "formattedMessage": "Warning: CHC: Empty array \"pop\" happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:13:7:
- |
-13 | \t\t\t\t\t\tarr.pop();
- | \t\t\t\t\t\t^^^^^^^^^
-
-",
- "message": "CHC: Empty array \"pop\" happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 275,
- "file": "A",
- "start": 266
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "6368",
- "formattedMessage": "Warning: CHC: Out of bounds access happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:14:7:
- |
-14 | \t\t\t\t\t\tarr[x];
- | \t\t\t\t\t\t^^^^^^
-
-",
- "message": "CHC: Out of bounds access happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 289,
- "file": "A",
- "start": 283
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "1391",
- "formattedMessage": "Info: CHC: 1 verification condition(s) proved safe! Enable the model checker option \"show proved safe\" to see all of them.
-
-",
- "message": "CHC: 1 verification condition(s) proved safe! Enable the model checker option \"show proved safe\" to see all of them.",
- "severity": "info",
- "type": "Info"
- },
- {
- "component": "general",
- "errorCode": "6838",
- "formattedMessage": "Warning: BMC: Condition is always true.
- --> A:7:15:
- |
-7 | \t\t\t\t\t\trequire(x >= 0);
- | \t\t\t\t\t\t ^^^^^^
-Note: Callstack:
-
-",
- "message": "BMC: Condition is always true.",
- "secondarySourceLocations": [
- {
- "message": "Callstack:"
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 165,
- "file": "A",
- "start": 159
- },
- "type": "Warning"
- }
- ],
- "sources": {
- "A": {
- "id": 0
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_default_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_default_bmc/input.json
index d0a068185ad0..65a3a809e13d 100644
--- a/test/cmdlineTests/standard_model_checker_targets_default_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_default_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_default_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_default_bmc/output.json
index e055d38d2e53..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_default_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_default_bmc/output.json
@@ -2,152 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "6838",
- "formattedMessage": "Warning: BMC: Condition is always true.
- --> A:7:15:
- |
-7 | \t\t\t\t\t\trequire(x >= 0);
- | \t\t\t\t\t\t ^^^^^^
-Note: Callstack:
-
-",
- "message": "BMC: Condition is always true.",
- "secondarySourceLocations": [
- {
- "message": "Callstack:"
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 165,
- "file": "A",
- "start": 159
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "3046",
- "formattedMessage": "Warning: BMC: Division by zero happens here.
- --> A:10:7:
- |
-10 | \t\t\t\t\t\t2 / x;
- | \t\t\t\t\t\t^^^^^
-Note: Counterexample:
- = 0
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Division by zero happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- = 0
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 216,
- "file": "A",
- "start": 211
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "1236",
- "formattedMessage": "Warning: BMC: Insufficient funds happens here.
- --> A:11:7:
- |
-11 | \t\t\t\t\t\ta.transfer(x);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-Note: Counterexample:
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Insufficient funds happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 237,
- "file": "A",
- "start": 224
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "4661",
- "formattedMessage": "Warning: BMC: Assertion violation happens here.
- --> A:12:7:
- |
-12 | \t\t\t\t\t\tassert(x > 0);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-Note: Counterexample:
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Assertion violation happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 258,
- "file": "A",
- "start": 245
- },
- "type": "Warning"
- }
- ],
- "sources": {
- "A": {
- "id": 0
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_default_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_default_chc/input.json
index d030e0388fa0..3dd88c901041 100644
--- a/test/cmdlineTests/standard_model_checker_targets_default_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_default_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_default_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_default_chc/output.json
index e045a8bff49a..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_default_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_default_chc/output.json
@@ -2,166 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "4281",
- "formattedMessage": "Warning: CHC: Division by zero happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:10:7:
- |
-10 | \t\t\t\t\t\t2 / x;
- | \t\t\t\t\t\t^^^^^
-
-",
- "message": "CHC: Division by zero happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 216,
- "file": "A",
- "start": 211
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "6328",
- "formattedMessage": "Warning: CHC: Assertion violation happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:12:7:
- |
-12 | \t\t\t\t\t\tassert(x > 0);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-
-",
- "message": "CHC: Assertion violation happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 258,
- "file": "A",
- "start": 245
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "2529",
- "formattedMessage": "Warning: CHC: Empty array \"pop\" happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:13:7:
- |
-13 | \t\t\t\t\t\tarr.pop();
- | \t\t\t\t\t\t^^^^^^^^^
-
-",
- "message": "CHC: Empty array \"pop\" happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 275,
- "file": "A",
- "start": 266
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "6368",
- "formattedMessage": "Warning: CHC: Out of bounds access happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:14:7:
- |
-14 | \t\t\t\t\t\tarr[x];
- | \t\t\t\t\t\t^^^^^^
-
-",
- "message": "CHC: Out of bounds access happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 289,
- "file": "A",
- "start": 283
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "1391",
- "formattedMessage": "Info: CHC: 1 verification condition(s) proved safe! Enable the model checker option \"show proved safe\" to see all of them.
-
-",
- "message": "CHC: 1 verification condition(s) proved safe! Enable the model checker option \"show proved safe\" to see all of them.",
- "severity": "info",
- "type": "Info"
- }
- ],
- "sources": {
- "A": {
- "id": 0
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_div_by_zero_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_div_by_zero_bmc/input.json
index 53750a1ec598..fc740a8079aa 100644
--- a/test/cmdlineTests/standard_model_checker_targets_div_by_zero_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_div_by_zero_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_div_by_zero_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_div_by_zero_bmc/output.json
index 6ba0e6f82057..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_div_by_zero_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_div_by_zero_bmc/output.json
@@ -2,49 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "3046",
- "formattedMessage": "Warning: BMC: Division by zero happens here.
- --> A:10:7:
- |
-10 | \t\t\t\t\t\t2 / x;
- | \t\t\t\t\t\t^^^^^
-Note: Counterexample:
- = 0
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Division by zero happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- = 0
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 216,
- "file": "A",
- "start": 211
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_div_by_zero_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_div_by_zero_chc/input.json
index 1c7af8d5c1f7..51c6da15a5c7 100644
--- a/test/cmdlineTests/standard_model_checker_targets_div_by_zero_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_div_by_zero_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_div_by_zero_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_div_by_zero_chc/output.json
index 0789c79996fe..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_div_by_zero_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_div_by_zero_chc/output.json
@@ -2,45 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "4281",
- "formattedMessage": "Warning: CHC: Division by zero happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:10:7:
- |
-10 | \t\t\t\t\t\t2 / x;
- | \t\t\t\t\t\t^^^^^
-
-",
- "message": "CHC: Division by zero happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 216,
- "file": "A",
- "start": 211
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_empty_array/input.json b/test/cmdlineTests/standard_model_checker_targets_empty_array/input.json
index cb51e490582a..4493ac9c4b42 100644
--- a/test/cmdlineTests/standard_model_checker_targets_empty_array/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_empty_array/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_empty_array/output.json b/test/cmdlineTests/standard_model_checker_targets_empty_array/output.json
index 6b5c6e0689da..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_empty_array/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_empty_array/output.json
@@ -2,8 +2,8 @@
"errors": [
{
"component": "general",
- "formattedMessage": "settings.modelChecker.targets must be a non-empty array.",
- "message": "settings.modelChecker.targets must be a non-empty array.",
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
"severity": "error",
"type": "JSONError"
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_bmc/input.json
index 3ae757542cde..b11c58c3ad2d 100644
--- a/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_bmc/output.json
index f047ff70a9eb..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_bmc/output.json
@@ -1,7 +1,11 @@
{
- "sources": {
- "A": {
- "id": 0
+ "errors": [
+ {
+ "component": "general",
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_chc/input.json
index cd0ba6d13594..35fc96fc875b 100644
--- a/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_chc/output.json
index f5f49fb508e7..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_out_of_bounds_chc/output.json
@@ -2,45 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "6368",
- "formattedMessage": "Warning: CHC: Out of bounds access happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:14:7:
- |
-14 | \t\t\t\t\t\tarr[x];
- | \t\t\t\t\t\t^^^^^^
-
-",
- "message": "CHC: Out of bounds access happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 289,
- "file": "A",
- "start": 283
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_overflow_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_overflow_bmc/input.json
index de63c4a62bc8..273311952b95 100644
--- a/test/cmdlineTests/standard_model_checker_targets_overflow_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_overflow_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_overflow_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_overflow_bmc/output.json
index 8d34765cdb14..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_overflow_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_overflow_bmc/output.json
@@ -2,49 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "2661",
- "formattedMessage": "Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
- --> A:9:7:
- |
-9 | \t\t\t\t\t\tx + type(uint).max;
- | \t\t\t\t\t\t^^^^^^^^^^^^^^^^^^
-Note: Counterexample:
- = 2**256
- a = 0
- x = 1
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Overflow (resulting value larger than 2**256 - 1) happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- = 2**256
- a = 0
- x = 1
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 203,
- "file": "A",
- "start": 185
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_overflow_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_overflow_chc/input.json
index 522d2480ca57..0d066a6679ac 100644
--- a/test/cmdlineTests/standard_model_checker_targets_overflow_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_overflow_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_overflow_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_overflow_chc/output.json
index 9beb30a35b7c..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_overflow_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_overflow_chc/output.json
@@ -2,45 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "4984",
- "formattedMessage": "Warning: CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 1
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 2)
- --> A:9:7:
- |
-9 | \t\t\t\t\t\tx + type(uint).max;
- | \t\t\t\t\t\t^^^^^^^^^^^^^^^^^^
-
-",
- "message": "CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 1
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 2)",
- "severity": "warning",
- "sourceLocation": {
- "end": 203,
- "file": "A",
- "start": 185
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_pop_empty_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_pop_empty_bmc/input.json
index 40f3718cebae..f096121d862d 100644
--- a/test/cmdlineTests/standard_model_checker_targets_pop_empty_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_pop_empty_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_pop_empty_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_pop_empty_bmc/output.json
index f047ff70a9eb..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_pop_empty_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_pop_empty_bmc/output.json
@@ -1,7 +1,11 @@
{
- "sources": {
- "A": {
- "id": 0
+ "errors": [
+ {
+ "component": "general",
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_pop_empty_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_pop_empty_chc/input.json
index 7d2dc69e31eb..64160b053a39 100644
--- a/test/cmdlineTests/standard_model_checker_targets_pop_empty_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_pop_empty_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_pop_empty_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_pop_empty_chc/output.json
index 4cccf8456df4..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_pop_empty_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_pop_empty_chc/output.json
@@ -2,45 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "2529",
- "formattedMessage": "Warning: CHC: Empty array \"pop\" happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:13:7:
- |
-13 | \t\t\t\t\t\tarr.pop();
- | \t\t\t\t\t\t^^^^^^^^^
-
-",
- "message": "CHC: Empty array \"pop\" happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 275,
- "file": "A",
- "start": 266
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_underflow_bmc/input.json
index 4bd8eded44a3..101bb4141a8c 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_underflow_bmc/output.json
index df17886b2fea..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_bmc/output.json
@@ -2,49 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "4144",
- "formattedMessage": "Warning: BMC: Underflow (resulting value less than 0) happens here.
- --> A:8:7:
- |
-8 | \t\t\t\t\t\t--x;
- | \t\t\t\t\t\t^^^
-Note: Counterexample:
- = (- 1)
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Underflow (resulting value less than 0) happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- = (- 1)
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 177,
- "file": "A",
- "start": 174
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_underflow_chc/input.json
index ca33d2fdcc66..b0cacb7c651f 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_underflow_chc/output.json
index 442f2f47a981..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_chc/output.json
@@ -2,45 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "3944",
- "formattedMessage": "Warning: CHC: Underflow (resulting value less than 0) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 0)
- --> A:8:7:
- |
-8 | \t\t\t\t\t\t--x;
- | \t\t\t\t\t\t^^^
-
-",
- "message": "CHC: Underflow (resulting value less than 0) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 0)",
- "severity": "warning",
- "sourceLocation": {
- "end": 177,
- "file": "A",
- "start": 174
- },
- "type": "Warning"
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- ],
- "sources": {
- "A": {
- "id": 0
- }
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_bmc/input.json
index 835a9d46b4d9..938a33118540 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_bmc/output.json
index c80d3e22a8e2..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_bmc/output.json
@@ -2,129 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "4144",
- "formattedMessage": "Warning: BMC: Underflow (resulting value less than 0) happens here.
- --> A:8:7:
- |
-8 | \t\t\t\t\t\t--x;
- | \t\t\t\t\t\t^^^
-Note: Counterexample:
- = (- 1)
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Underflow (resulting value less than 0) happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- = (- 1)
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 177,
- "file": "A",
- "start": 174
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "2661",
- "formattedMessage": "Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
- --> A:9:7:
- |
-9 | \t\t\t\t\t\tx + type(uint).max;
- | \t\t\t\t\t\t^^^^^^^^^^^^^^^^^^
-Note: Counterexample:
- = 2**256
- a = 0
- x = 1
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Overflow (resulting value larger than 2**256 - 1) happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- = 2**256
- a = 0
- x = 1
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 203,
- "file": "A",
- "start": 185
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "4661",
- "formattedMessage": "Warning: BMC: Assertion violation happens here.
- --> A:12:7:
- |
-12 | \t\t\t\t\t\tassert(x > 0);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-Note: Counterexample:
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Assertion violation happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 258,
- "file": "A",
- "start": 245
- },
- "type": "Warning"
- }
- ],
- "sources": {
- "A": {
- "id": 0
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_chc/input.json
index 50f0e82dc583..7ea58745c2cf 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_chc/output.json
index e5719640aad3..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_assert_chc/output.json
@@ -2,119 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "3944",
- "formattedMessage": "Warning: CHC: Underflow (resulting value less than 0) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 0)
- --> A:8:7:
- |
-8 | \t\t\t\t\t\t--x;
- | \t\t\t\t\t\t^^^
-
-",
- "message": "CHC: Underflow (resulting value less than 0) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 0)",
- "severity": "warning",
- "sourceLocation": {
- "end": 177,
- "file": "A",
- "start": 174
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "4984",
- "formattedMessage": "Warning: CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 1
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 2)
- --> A:9:7:
- |
-9 | \t\t\t\t\t\tx + type(uint).max;
- | \t\t\t\t\t\t^^^^^^^^^^^^^^^^^^
-
-",
- "message": "CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 1
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 2)",
- "severity": "warning",
- "sourceLocation": {
- "end": 203,
- "file": "A",
- "start": 185
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "6328",
- "formattedMessage": "Warning: CHC: Assertion violation happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)
- --> A:12:7:
- |
-12 | \t\t\t\t\t\tassert(x > 0);
- | \t\t\t\t\t\t^^^^^^^^^^^^^
-
-",
- "message": "CHC: Assertion violation happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 1)",
- "severity": "warning",
- "sourceLocation": {
- "end": 258,
- "file": "A",
- "start": 245
- },
- "type": "Warning"
- }
- ],
- "sources": {
- "A": {
- "id": 0
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_bmc/input.json b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_bmc/input.json
index c8bae009ddd4..2a54112e4510 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_bmc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_bmc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_bmc/output.json b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_bmc/output.json
index de02d57c90ab..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_bmc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_bmc/output.json
@@ -2,90 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "4144",
- "formattedMessage": "Warning: BMC: Underflow (resulting value less than 0) happens here.
- --> A:8:7:
- |
-8 | \t\t\t\t\t\t--x;
- | \t\t\t\t\t\t^^^
-Note: Counterexample:
- = (- 1)
- a = 0
- x = 0
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Underflow (resulting value less than 0) happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- = (- 1)
- a = 0
- x = 0
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 177,
- "file": "A",
- "start": 174
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "2661",
- "formattedMessage": "Warning: BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
- --> A:9:7:
- |
-9 | \t\t\t\t\t\tx + type(uint).max;
- | \t\t\t\t\t\t^^^^^^^^^^^^^^^^^^
-Note: Counterexample:
- = 2**256
- a = 0
- x = 1
-
-Note: Callstack:
-Note:
-
-",
- "message": "BMC: Overflow (resulting value larger than 2**256 - 1) happens here.",
- "secondarySourceLocations": [
- {
- "message": "Counterexample:
- = 2**256
- a = 0
- x = 1
-"
- },
- {
- "message": "Callstack:"
- },
- {
- "message": ""
- }
- ],
- "severity": "warning",
- "sourceLocation": {
- "end": 203,
- "file": "A",
- "start": 185
- },
- "type": "Warning"
- }
- ],
- "sources": {
- "A": {
- "id": 0
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_chc/input.json b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_chc/input.json
index 9fc834fd860f..cd61b33bbf58 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_chc/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_chc/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_chc/output.json b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_chc/output.json
index 6fb8762e4312..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_chc/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_underflow_overflow_chc/output.json
@@ -2,82 +2,10 @@
"errors": [
{
"component": "general",
- "errorCode": "3944",
- "formattedMessage": "Warning: CHC: Underflow (resulting value less than 0) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 0)
- --> A:8:7:
- |
-8 | \t\t\t\t\t\t--x;
- | \t\t\t\t\t\t^^^
-
-",
- "message": "CHC: Underflow (resulting value less than 0) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 0
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 0)",
- "severity": "warning",
- "sourceLocation": {
- "end": 177,
- "file": "A",
- "start": 174
- },
- "type": "Warning"
- },
- {
- "component": "general",
- "errorCode": "4984",
- "formattedMessage": "Warning: CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 1
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 2)
- --> A:9:7:
- |
-9 | \t\t\t\t\t\tx + type(uint).max;
- | \t\t\t\t\t\t^^^^^^^^^^^^^^^^^^
-
-",
- "message": "CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
-Counterexample:
-arr = []
-a = 0x0
-x = 1
-
-Transaction trace:
-test.constructor()
-State: arr = []
-test.f(0x0, 2)",
- "severity": "warning",
- "sourceLocation": {
- "end": 203,
- "file": "A",
- "start": 185
- },
- "type": "Warning"
- }
- ],
- "sources": {
- "A": {
- "id": 0
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "severity": "error",
+ "type": "JSONError"
}
- }
+ ]
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_wrong_target_types/input.json b/test/cmdlineTests/standard_model_checker_targets_wrong_target_types/input.json
index a89271975cac..a1a440c36127 100644
--- a/test/cmdlineTests/standard_model_checker_targets_wrong_target_types/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_wrong_target_types/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_wrong_target_types/output.json b/test/cmdlineTests/standard_model_checker_targets_wrong_target_types/output.json
index fee6f21958a1..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_wrong_target_types/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_wrong_target_types/output.json
@@ -2,8 +2,8 @@
"errors": [
{
"component": "general",
- "formattedMessage": "Every target in settings.modelChecker.targets must be a string.",
- "message": "Every target in settings.modelChecker.targets must be a string.",
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
"severity": "error",
"type": "JSONError"
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_wrong_target_types_2/input.json b/test/cmdlineTests/standard_model_checker_targets_wrong_target_types_2/input.json
index 136ce0978f91..4b870695c1ce 100644
--- a/test/cmdlineTests/standard_model_checker_targets_wrong_target_types_2/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_wrong_target_types_2/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_wrong_target_types_2/output.json b/test/cmdlineTests/standard_model_checker_targets_wrong_target_types_2/output.json
index 996d75e70916..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_wrong_target_types_2/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_wrong_target_types_2/output.json
@@ -2,8 +2,8 @@
"errors": [
{
"component": "general",
- "formattedMessage": "settings.modelChecker.targets must be an array.",
- "message": "settings.modelChecker.targets must be an array.",
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
"severity": "error",
"type": "JSONError"
}
diff --git a/test/cmdlineTests/standard_model_checker_targets_wrong_targets/input.json b/test/cmdlineTests/standard_model_checker_targets_wrong_targets/input.json
index 1788fb6d5508..0881e1f123ed 100644
--- a/test/cmdlineTests/standard_model_checker_targets_wrong_targets/input.json
+++ b/test/cmdlineTests/standard_model_checker_targets_wrong_targets/input.json
@@ -11,7 +11,8 @@
--x;
x + type(uint).max;
2 / x;
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
assert(x > 0);
arr.pop();
arr[x];
diff --git a/test/cmdlineTests/standard_model_checker_targets_wrong_targets/output.json b/test/cmdlineTests/standard_model_checker_targets_wrong_targets/output.json
index e51a85258117..365f0c1c73d0 100644
--- a/test/cmdlineTests/standard_model_checker_targets_wrong_targets/output.json
+++ b/test/cmdlineTests/standard_model_checker_targets_wrong_targets/output.json
@@ -2,8 +2,8 @@
"errors": [
{
"component": "general",
- "formattedMessage": "Invalid model checker targets requested.",
- "message": "Invalid model checker targets requested.",
+ "formattedMessage": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
+ "message": "parse error at line 7, column 458: syntax error while parsing object - unexpected string literal; expected '}'",
"severity": "error",
"type": "JSONError"
}
diff --git a/test/cmdlineTests/viair_abicoder_v1/err b/test/cmdlineTests/viair_abicoder_v1/err
index 29fa2acd04a0..60310e5e27f2 100644
--- a/test/cmdlineTests/viair_abicoder_v1/err
+++ b/test/cmdlineTests/viair_abicoder_v1/err
@@ -1,3 +1,9 @@
+Warning (9511): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
+ --> input.sol:3:1:
+ |
+3 | pragma abicoder v1;
+ | ^^^^^^^^^^^^^^^^^^^
+
Warning (2066): Contract requests the ABI coder v1, which is incompatible with the IR. Using ABI coder v2 instead.
--> input.sol:4:1:
|
diff --git a/test/externalTests/zeppelin.sh b/test/externalTests/zeppelin.sh
index 9bc3e29132aa..dbab4dca7972 100755
--- a/test/externalTests/zeppelin.sh
+++ b/test/externalTests/zeppelin.sh
@@ -105,6 +105,25 @@ function zeppelin_test
# Fails with ProviderError: Invalid transaction: GasFloorMoreThanGasLimit
sed -i "177s|+ 2_000n|+ 10_000n|" test/metatx/ERC2771Forwarder.test.js
+ cat <<-EOF >> "$config_file"
+ const { TASK_COMPILE_SOLIDITY_COMPILE } = require("hardhat/builtin-tasks/task-names");
+
+ task(TASK_COMPILE_SOLIDITY_COMPILE)
+ .setAction(async (args, hre, runSuper) => {
+ const result = await runSuper(args);
+
+ result.output.errors = (result.output.errors || []).filter(err => {
+ if (err.severity === "warning" && err.message.includes("deprecated")) {
+ return false; // suppress this warning
+ }
+ return true;
+ });
+
+ return result;
+ });
+
+EOF
+
neutralize_package_json_hooks
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"
force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")"
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend.sol
index 720ab5695029..9e23e8dfa39c 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend.sol
@@ -7,7 +7,8 @@ contract C {
require(_v < 10);
require(c < 2);
++c;
- _a.transfer(_v);
+ (bool success, ) = _a.call{value: _v}("");
+ require(success);
}
function inv() public view {
assert(address(this).balance > 80); // should hold
@@ -18,5 +19,7 @@ contract C {
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 6328: (280-314): CHC: Assertion violation happens here.
-// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
+// Warning 6328: (273-307): CHC: Assertion violation might happen here.
+// Warning 6328: (326-360): CHC: Assertion violation happens here.\nCounterexample:\nc = 2\n\nTransaction trace:\nC.constructor(){ msg.value: 101 }\nState: c = 0\nC.f(0x0, 9)\n _a.call{value: _v}("") -- untrusted external call\nState: c = 1\nC.f(0x0, 9)\n _a.call{value: _v}("") -- untrusted external call\nState: c = 2\nC.inv()
+// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
+// Warning 4661: (273-307): BMC: Assertion violation happens here.
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend_2.sol
index 3ceac964f111..7baa466522d4 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend_2.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend_2.sol
@@ -4,7 +4,8 @@ contract C {
}
function f(address payable _a, uint _v) public {
require(_v < 10);
- _a.transfer(_v);
+ (bool success, ) = _a.call{value: _v}("");
+ require(success);
}
function inv() public view {
assert(address(this).balance > 0); // should fail
@@ -17,7 +18,7 @@ contract C {
// SMTIgnoreCex: yes
// SMTIgnoreOS: macos
// ----
-// Warning 8656: (141-156): CHC: Insufficient funds happens here.
-// Warning 6328: (193-226): CHC: Assertion violation happens here.
-// Warning 6328: (245-279): CHC: Assertion violation happens here.
-// Warning 6328: (298-332): CHC: Assertion violation happens here.
+// Warning 6328: (239-272): CHC: Assertion violation might happen here.
+// Warning 6328: (291-325): CHC: Assertion violation happens here.\nCounterexample:\n\n_a = 0x0\n_v = 8\n\nTransaction trace:\nC.constructor(){ msg.value: 101 }\nC.f(0x0, 9)\n _a.call{value: _v}("") -- untrusted external call\nC.f(0x0, 9)\n _a.call{value: _v}("") -- untrusted external call\nC.f(0x0, 8)\n _a.call{value: _v}("") -- untrusted external call, synthesized as:\n C.inv() -- reentrant call
+// Warning 6328: (344-378): CHC: Assertion violation happens here.
+// Warning 4661: (239-272): BMC: Assertion violation happens here.
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/decreasing_balance.sol b/test/libsolidity/smtCheckerTests/blockchain_state/decreasing_balance.sol
index df35a2785824..52012d9f348b 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/decreasing_balance.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/decreasing_balance.sol
@@ -5,7 +5,8 @@ contract C {
}
function f(address payable a, uint x) public {
require(address(this).balance >= x);
- a.transfer(x);
+ (bool success, ) = a.call{value: x}("");
+ require(success);
}
function inv() public view {
// If only looking at `f`, it looks like this.balance always decreases.
@@ -18,4 +19,3 @@ contract C {
// ====
// SMTEngine: all
// ----
-// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/free_function_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/free_function_2.sol
index 3b7c0f9dce34..776959c0d4f4 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/free_function_2.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/free_function_2.sol
@@ -1,5 +1,6 @@
function l(address payable a) {
- a.transfer(1);
+ (bool success, ) = a.call{value: 1}("");
+ require(success);
}
contract C {
@@ -19,5 +20,6 @@ contract C {
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 6328: (258-274): CHC: Assertion violation happens here.
-// Info 1391: CHC: 4 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
+// Warning 6328: (303-319): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\na = 0x0\nb1 = 38\nb2 = 37\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f(0x0){ msg.value: 10 }\n l(0x0) -- internal call\n a.call{value: 1}("") -- untrusted external call
+// Warning 6328: (338-358): CHC: Assertion violation happens here.
+// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/library_internal_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/library_internal_2.sol
index 826af0bf867d..8d16ac75bd41 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/library_internal_2.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/library_internal_2.sol
@@ -1,7 +1,8 @@
library L {
function l(address payable a) internal {
require(a != address(this));
- a.transfer(1);
+ bool success;
+ (success, ) = a.call{value: 1}("");
}
}
@@ -22,5 +23,6 @@ contract C {
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 6328: (315-331): CHC: Assertion violation happens here.
-// Info 1391: CHC: 4 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
+// Warning 6328: (352-368): CHC: Assertion violation happens here.
+// Warning 6328: (387-407): CHC: Assertion violation happens here.
+// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_2.sol
index 02e29be8de9c..a5fc7ba9e885 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_2.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_2.sol
@@ -1,6 +1,7 @@
library L {
function l(address payable a) public {
- a.transfer(1);
+ (bool success, ) = a.call{value: 1}("");
+ require(success);
}
}
@@ -20,7 +21,6 @@ contract C {
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 4588: (238-243): Assertion checker does not yet implement this type of function call.
-// Warning 8656: (54-67): CHC: Insufficient funds happens here.
-// Warning 6328: (282-298): CHC: Assertion violation happens here.
-// Warning 6328: (317-331): CHC: Assertion violation happens here.
+// Warning 4588: (284-289): Assertion checker does not yet implement this type of function call.
+// Warning 6328: (328-344): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\na = 0x0\nb1 = 15923\nb2 = 15924\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f(0x0){ msg.value: 15923 }
+// Warning 6328: (363-377): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\na = 0x0\nb1 = 8947\nb2 = 8948\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f(0x0){ msg.value: 8947 }
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/transfer_1.sol b/test/libsolidity/smtCheckerTests/blockchain_state/transfer_1.sol
index 169257edff8a..de32450d43fb 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/transfer_1.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/transfer_1.sol
@@ -1,7 +1,8 @@
contract C {
function f(address payable a) public {
require(address(this).balance > 1000);
- a.transfer(666);
+ bool success;
+ (success, ) = a.call{value:666}("");
assert(address(this).balance > 100);
// Fails.
assert(address(this).balance > 500);
@@ -11,5 +12,5 @@ contract C {
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 6328: (166-201): CHC: Assertion violation happens here.
-// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
+// Warning 6328: (202-237): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0x0\nsuccess = false\n\nTransaction trace:\nC.constructor()\nC.f(0x0)\n a.call{value:666}("") -- untrusted external call
+// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/transfer_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/transfer_2.sol
index ed5b4c90f2cf..4c69535bfe4c 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/transfer_2.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/transfer_2.sol
@@ -4,11 +4,12 @@ contract C {
function shouldHold() public {
uint tempAmount = address(this).balance;
- recipient.transfer(tempAmount);
- recipient.transfer(amount);
+ (bool success, ) = recipient.call{value: tempAmount}("");
+ require(success);
+ (success, ) = recipient.call{value: amount}("");
+ require(success);
}
}
// ====
// SMTEngine: chc
// ----
-// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/transfer_3.sol b/test/libsolidity/smtCheckerTests/blockchain_state/transfer_3.sol
index 4b3318b6bece..471a4d63ca9e 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/transfer_3.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/transfer_3.sol
@@ -2,10 +2,10 @@ contract C {
address payable recipient;
function shouldFail() public {
- recipient.transfer(1);
+ (bool success, ) = recipient.call{value: 1}("");
+ require(success);
}
}
// ====
// SMTEngine: all
// ----
-// Warning 8656: (76-97): CHC: Insufficient funds happens here.
diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/transfer_4.sol b/test/libsolidity/smtCheckerTests/blockchain_state/transfer_4.sol
index ab0c4a81efeb..db030be4a8c3 100644
--- a/test/libsolidity/smtCheckerTests/blockchain_state/transfer_4.sol
+++ b/test/libsolidity/smtCheckerTests/blockchain_state/transfer_4.sol
@@ -3,10 +3,12 @@ contract C {
function f() public payable {
require(msg.value > 1);
- recipient.transfer(1);
+ bool success;
+ recipient.call{value: 1}("");
}
}
// ====
// SMTEngine: all
// ----
-// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
+// Warning 9302: (117-145): Return value of low-level calls not used.
+// Warning 2072: (101-113): Unused local variable.
diff --git a/test/libsolidity/smtCheckerTests/bmc_coverage/funds.sol b/test/libsolidity/smtCheckerTests/bmc_coverage/funds.sol
index 737443e64b91..67e718ff4789 100644
--- a/test/libsolidity/smtCheckerTests/bmc_coverage/funds.sol
+++ b/test/libsolidity/smtCheckerTests/bmc_coverage/funds.sol
@@ -1,9 +1,9 @@
contract C {
function f(address payable a) public {
- a.transfer(200);
+ (bool success, ) = a.call{value: 200}("");
+ require(success);
}
}
// ====
// SMTEngine: bmc
// ----
-// Warning 1236: (55-70): BMC: Insufficient funds happens here.
diff --git a/test/libsolidity/smtCheckerTests/deployment/deploy_trusted_addresses.sol b/test/libsolidity/smtCheckerTests/deployment/deploy_trusted_addresses.sol
index 01c68790c843..8cfa6ccf2cfc 100644
--- a/test/libsolidity/smtCheckerTests/deployment/deploy_trusted_addresses.sol
+++ b/test/libsolidity/smtCheckerTests/deployment/deploy_trusted_addresses.sol
@@ -16,4 +16,5 @@ contract C {
// SMTEngine: all
// SMTExtCalls: trusted
// ----
+// Warning 9170: (107-115): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/deployment/deploy_untrusted_addresses.sol b/test/libsolidity/smtCheckerTests/deployment/deploy_untrusted_addresses.sol
index c934e152b27c..f7f34d7ff1d3 100644
--- a/test/libsolidity/smtCheckerTests/deployment/deploy_untrusted_addresses.sol
+++ b/test/libsolidity/smtCheckerTests/deployment/deploy_untrusted_addresses.sol
@@ -15,8 +15,9 @@ contract C {
// ====
// SMTEngine: all
// ----
+// Warning 9170: (107-115): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
// Warning 8729: (70-77): Contract deployment is only supported in the trusted mode for external calls with the CHC engine.
// Warning 8729: (88-95): Contract deployment is only supported in the trusted mode for external calls with the CHC engine.
// Warning 6328: (100-116): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 0\nd2 = 0\n\nTransaction trace:\nC.constructor()\nC.f()
-// Warning 6328: (163-199): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 21238\nd2 = 21238\n\nTransaction trace:\nC.constructor()\nC.f()
-// Warning 6328: (246-282): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 21238\nd2 = 21238\n\nTransaction trace:\nC.constructor()\nC.f()
+// Warning 6328: (163-199): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 11797\nd2 = 11797\n\nTransaction trace:\nC.constructor()\nC.f()
+// Warning 6328: (246-282): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 8855\nd2 = 8855\n\nTransaction trace:\nC.constructor()\nC.f()
diff --git a/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_1.sol b/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_1.sol
index 209b00f5f319..642357aaa841 100644
--- a/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_1.sol
+++ b/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_1.sol
@@ -15,4 +15,5 @@ contract D {
// ====
// SMTEngine: all
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_2.sol b/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_2.sol
index b62611b5190d..ffb9ee2ca3c9 100644
--- a/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_2.sol
+++ b/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_2.sol
@@ -20,5 +20,6 @@ contract D {
// SMTEngine: all
// SMTIgnoreCex: no
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// Warning 6328: (267-281): CHC: Assertion violation happens here.\nCounterexample:\nitems = [{x: 42, y: 43}]\na = 42\nb = 43\n\nTransaction trace:\nD.constructor()\nState: items = []\nD.test()
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_3.sol b/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_3.sol
index abe50e8a5445..49f7c6f80a0f 100644
--- a/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_3.sol
+++ b/test/libsolidity/smtCheckerTests/functions/getters/array_of_structs_3.sol
@@ -21,5 +21,6 @@ contract D {
// ====
// SMTEngine: all
// ----
-// Warning 6328: (322-336): CHC: Assertion violation happens here.
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
+// Warning 6328: (322-336): CHC: Assertion violation happens here.\nCounterexample:\nitems = [{x: 42, y: 43, arr: [0]}]\ntmp = [0]\na = 42\nb = 43\n\nTransaction trace:\nD.constructor()\nState: items = []\nD.test()
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/functions/getters/contract.sol b/test/libsolidity/smtCheckerTests/functions/getters/contract.sol
index 7da893bd3644..1a4c465beffb 100644
--- a/test/libsolidity/smtCheckerTests/functions/getters/contract.sol
+++ b/test/libsolidity/smtCheckerTests/functions/getters/contract.sol
@@ -12,5 +12,6 @@ contract C {
// ====
// SMTEngine: all
// ----
-// Warning 6328: (123-158): CHC: Assertion violation happens here.
+// Warning 9170: (97-103): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
+// Warning 6328: (123-158): CHC: Assertion violation happens here.\nCounterexample:\nd = 0\ne = 0\n\nTransaction trace:\nC.constructor()\nState: d = 0\nC.f()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/functions/getters/struct_4.sol b/test/libsolidity/smtCheckerTests/functions/getters/struct_4.sol
index 345959354fb4..c3d2933b1f17 100644
--- a/test/libsolidity/smtCheckerTests/functions/getters/struct_4.sol
+++ b/test/libsolidity/smtCheckerTests/functions/getters/struct_4.sol
@@ -18,7 +18,8 @@ contract C {
// ====
// SMTEngine: all
// ----
+// Warning 9170: (206-214): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
// Warning 2072: (146-183): Unused local variable.
// Warning 8364: (187-193): Assertion checker does not yet implement type function () view external returns (contract D,function () external returns (uint256))
-// Warning 6328: (234-269): CHC: Assertion violation happens here.
+// Warning 6328: (234-269): CHC: Assertion violation happens here.\nCounterexample:\ns = {d: 0, f: 0}\nd = 0\nf = 0\n\nTransaction trace:\nC.constructor()\nState: s = {d: 0, f: 0}\nC.test()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/modifiers/modifier_abstract.sol b/test/libsolidity/smtCheckerTests/modifiers/modifier_abstract.sol
index 9d541b629988..6e93aac30c36 100644
--- a/test/libsolidity/smtCheckerTests/modifiers/modifier_abstract.sol
+++ b/test/libsolidity/smtCheckerTests/modifiers/modifier_abstract.sol
@@ -5,3 +5,4 @@ abstract contract A {
// ====
// SMTEngine: all
// ----
+// Warning 8429: (51-72): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_1.sol b/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_1.sol
index 9165ed13311a..555729da8768 100644
--- a/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_1.sol
+++ b/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_1.sol
@@ -20,5 +20,6 @@ contract B is A {
// ====
// SMTEngine: all
// ----
-// Warning 6328: (209-223): CHC: Assertion violation happens here.
+// Warning 8429: (64-93): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 6328: (209-223): CHC: Assertion violation happens here.\nCounterexample:\ns = 42\nx = 42\n\nTransaction trace:\nB.constructor()\nState: s = 0\nB.set(42)\nState: s = 42\nA.f()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_2.sol b/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_2.sol
index fd9dc9008523..390c27661440 100644
--- a/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_2.sol
+++ b/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_2.sol
@@ -23,4 +23,6 @@ contract C is B {
// ====
// SMTEngine: all
// ----
+// Warning 8429: (113-136): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (159-213): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// Warning 6328: (66-75): CHC: Assertion violation happens here.\nCounterexample:\ns = false\n\nTransaction trace:\nB.constructor()\nState: s = false\nA.f()
diff --git a/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_3.sol b/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_3.sol
index f85e1b3baec0..50417e0b2635 100644
--- a/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_3.sol
+++ b/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_3.sol
@@ -18,5 +18,7 @@ contract B is A {
// ====
// SMTEngine: all
// ----
-// Warning 6328: (94-104): CHC: Assertion violation happens here.
+// Warning 8429: (125-148): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (171-238): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 6328: (94-104): CHC: Assertion violation happens here.\nCounterexample:\ns = true\nx = true\n\nTransaction trace:\nB.constructor()\nState: s = false\nA.f()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_4.sol b/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_4.sol
index d0e82665ccfc..d9de76d3b2b2 100644
--- a/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_4.sol
+++ b/test/libsolidity/smtCheckerTests/modifiers/modifier_overriding_4.sol
@@ -36,6 +36,10 @@ contract D is B,C {
// ====
// SMTEngine: all
// ----
+// Warning 8429: (262-294): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (317-367): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (390-440): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (465-520): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// Warning 6328: (160-174): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\n\nTransaction trace:\nB.constructor()\nState: x = 0\nA.f()
// Warning 6328: (193-207): CHC: Assertion violation happens here.\nCounterexample:\nx = 2\n\nTransaction trace:\nC.constructor()\nState: x = 0\nA.f()
// Warning 6328: (226-240): CHC: Assertion violation happens here.\nCounterexample:\nx = 3\n\nTransaction trace:\nD.constructor()\nState: x = 0\nA.f()
diff --git a/test/libsolidity/smtCheckerTests/modifiers/modifier_virtual_static_call_1.sol b/test/libsolidity/smtCheckerTests/modifiers/modifier_virtual_static_call_1.sol
index 40bc6d93ebbd..dc305a856449 100644
--- a/test/libsolidity/smtCheckerTests/modifiers/modifier_virtual_static_call_1.sol
+++ b/test/libsolidity/smtCheckerTests/modifiers/modifier_virtual_static_call_1.sol
@@ -10,3 +10,4 @@ contract C is A {
// ====
// SMTEngine: all
// ----
+// Warning 8429: (17-52): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/smtCheckerTests/modifiers/modifier_virtual_static_call_2.sol b/test/libsolidity/smtCheckerTests/modifiers/modifier_virtual_static_call_2.sol
index b270fb2bb5e1..3544d86077c4 100644
--- a/test/libsolidity/smtCheckerTests/modifiers/modifier_virtual_static_call_2.sol
+++ b/test/libsolidity/smtCheckerTests/modifiers/modifier_virtual_static_call_2.sol
@@ -20,5 +20,6 @@ contract C is A {
// ====
// SMTEngine: all
// ----
-// Warning 6328: (83-98): CHC: Assertion violation happens here.
+// Warning 8429: (27-122): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 6328: (83-98): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/types/address_transfer.sol b/test/libsolidity/smtCheckerTests/types/address_transfer.sol
index 1430e15cb8e7..237c55564fda 100644
--- a/test/libsolidity/smtCheckerTests/types/address_transfer.sol
+++ b/test/libsolidity/smtCheckerTests/types/address_transfer.sol
@@ -3,7 +3,8 @@ contract C
function f(address payable a) public {
uint x = 100;
require(x == a.balance);
- a.transfer(600);
+ bool success;
+ (success, ) = a.call{value:600}("");
// This fails since a == this is possible.
assert(a.balance == 700);
}
@@ -11,5 +12,4 @@ contract C
// ====
// SMTEngine: all
// ----
-// Warning 8656: (98-113): CHC: Insufficient funds happens here.
-// Warning 6328: (162-186): CHC: Assertion violation happens here.
+// Warning 6328: (198-222): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0x0\nx = 100\nsuccess = false\n\nTransaction trace:\nC.constructor()\nC.f(0x0)\n a.call{value:600}("") -- untrusted external call
diff --git a/test/libsolidity/smtCheckerTests/types/address_transfer_2.sol b/test/libsolidity/smtCheckerTests/types/address_transfer_2.sol
index ce6492d9e57a..2d37a77d5349 100644
--- a/test/libsolidity/smtCheckerTests/types/address_transfer_2.sol
+++ b/test/libsolidity/smtCheckerTests/types/address_transfer_2.sol
@@ -5,8 +5,9 @@ contract C
require(x == 100);
require(x == a.balance);
require(a.balance == b.balance);
- a.transfer(600);
- b.transfer(100);
+ bool success;
+ (success, ) = a.call{value:600}("");
+ (success, ) = b.call{value:100}("");
// Fails since a == this is possible.
assert(a.balance > b.balance);
}
@@ -15,6 +16,4 @@ contract C
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 8656: (184-199): CHC: Insufficient funds happens here.
-// Warning 8656: (203-218): CHC: Insufficient funds happens here.
-// Warning 6328: (262-291): CHC: Assertion violation happens here.
+// Warning 6328: (318-347): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 100\na = 0x0\nb = 0xffffffffffffffffffffffffffffffffffffdf52\nsuccess = false\n\nTransaction trace:\nC.constructor()\nC.f(100, 0x0, 0xffffffffffffffffffffffffffffffffffffdf52)\n a.call{value:600}("") -- untrusted external call\n b.call{value:100}("") -- untrusted external call
diff --git a/test/libsolidity/smtCheckerTests/types/address_transfer_3.sol b/test/libsolidity/smtCheckerTests/types/address_transfer_3.sol
index 3f9cc22c7bd6..1524a3676fb9 100644
--- a/test/libsolidity/smtCheckerTests/types/address_transfer_3.sol
+++ b/test/libsolidity/smtCheckerTests/types/address_transfer_3.sol
@@ -3,7 +3,8 @@ contract C
function f(address payable a) public {
require(1000 == address(this).balance);
require(100 == a.balance);
- a.transfer(600);
+ bool success;
+ (success, ) = a.call{value:600}("");
// a == this is not possible because address(this).balance == 1000
// and a.balance == 100,
// so this should hold in CHC, ignoring the transfer revert.
@@ -13,4 +14,4 @@ contract C
// ====
// SMTEngine: all
// ----
-// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
+// Warning 6328: (340-364): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0x20ae\nsuccess = false\n\nTransaction trace:\nC.constructor()\nC.f(0x20ae)\n a.call{value:600}("") -- untrusted external call
diff --git a/test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol b/test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol
index 55a96026ee51..d4187b7362fd 100644
--- a/test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol
+++ b/test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol
@@ -2,8 +2,9 @@ contract C
{
function f(address payable a, address payable b) public {
require(a.balance == 0);
- a.transfer(600);
- b.transfer(1000);
+ bool success;
+ (success, ) = a.call{value:600}("");
+ (success, ) = b.call{value:1000}("");
// Fails since a == this is possible.
assert(a.balance == 600);
}
@@ -12,6 +13,4 @@ contract C
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 8656: (101-116): CHC: Insufficient funds happens here.
-// Warning 8656: (120-136): CHC: Insufficient funds happens here.
-// Warning 6328: (180-204): CHC: Assertion violation happens here.
+// Warning 6328: (236-260): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0x0\nb = 0x0\nsuccess = false\n\nTransaction trace:\nC.constructor()\nC.f(0x0, 0x0)\n a.call{value:600}("") -- untrusted external call\n b.call{value:1000}("") -- untrusted external call
diff --git a/test/libsolidity/smtCheckerTests/types/contract.sol b/test/libsolidity/smtCheckerTests/types/contract.sol
index 0ddc3e6503c0..7ef60fe2cbcc 100644
--- a/test/libsolidity/smtCheckerTests/types/contract.sol
+++ b/test/libsolidity/smtCheckerTests/types/contract.sol
@@ -8,4 +8,5 @@ contract C
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 6328: (51-65): CHC: Assertion violation happens here.
+// Warning 9170: (58-64): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
+// Warning 6328: (51-65): CHC: Assertion violation happens here.\nCounterexample:\n\nc = 0\nd = 1\n\nTransaction trace:\nC.constructor()\nC.f(0, 1)
diff --git a/test/libsolidity/smtCheckerTests/types/contract_2.sol b/test/libsolidity/smtCheckerTests/types/contract_2.sol
index 2357852d5663..a6bf71ee4a15 100644
--- a/test/libsolidity/smtCheckerTests/types/contract_2.sol
+++ b/test/libsolidity/smtCheckerTests/types/contract_2.sol
@@ -13,4 +13,5 @@ contract C
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
-// Warning 6328: (76-90): CHC: Assertion violation happens here.
+// Warning 9170: (83-89): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
+// Warning 6328: (76-90): CHC: Assertion violation happens here.\nCounterexample:\n\nc = 0\nd = 1\n\nTransaction trace:\nC.constructor()\nC.f(0, 1)
diff --git a/test/libsolidity/smtCheckerTests/types/contract_3.sol b/test/libsolidity/smtCheckerTests/types/contract_3.sol
index 657999c0b7fc..c84cb3dcd1e8 100644
--- a/test/libsolidity/smtCheckerTests/types/contract_3.sol
+++ b/test/libsolidity/smtCheckerTests/types/contract_3.sol
@@ -9,4 +9,7 @@ contract C
// ====
// SMTEngine: all
// ----
+// Warning 9170: (64-70): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
+// Warning 9170: (83-89): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
+// Warning 9170: (101-107): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/smtCheckerTests/types/contract_address_conversion_2.sol b/test/libsolidity/smtCheckerTests/types/contract_address_conversion_2.sol
index 0b395c1877c5..5846bfd9c997 100644
--- a/test/libsolidity/smtCheckerTests/types/contract_address_conversion_2.sol
+++ b/test/libsolidity/smtCheckerTests/types/contract_address_conversion_2.sol
@@ -10,4 +10,5 @@ contract C
// ====
// SMTEngine: all
// ----
+// Warning 9170: (121-127): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse.sol b/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse.sol
index f06b2458c36d..21e2f61885e4 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse.sol
@@ -1,4 +1,6 @@
pragma abicoder v1;
pragma abicoder v2;
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// SyntaxError 3845: (20-39): ABI coder has already been selected for this source unit.
+// Warning 9511: (20-39): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse_experimental.sol b/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse_experimental.sol
index 855378e9ef60..ddd68c022231 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse_experimental.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse_experimental.sol
@@ -1,4 +1,5 @@
pragma abicoder v1;
pragma experimental ABIEncoderV2;
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// SyntaxError 8273: (20-53): ABI coder v1 has already been selected through "pragma abicoder v1".
diff --git a/test/libsolidity/syntaxTests/abiEncoder/select_v1.sol b/test/libsolidity/syntaxTests/abiEncoder/select_v1.sol
index 1beb5f0ec7a6..2e7e20dcf910 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/select_v1.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/select_v1.sol
@@ -1,2 +1,3 @@
pragma abicoder v1;
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/select_v1_quoted_string.sol b/test/libsolidity/syntaxTests/abiEncoder/select_v1_quoted_string.sol
index a6c26efdc7e9..a0a4ca92a1a5 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/select_v1_quoted_string.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/select_v1_quoted_string.sol
@@ -1,2 +1,3 @@
pragma abicoder "v1";
// ----
+// Warning 9511: (0-21): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/selected_twice.sol b/test/libsolidity/syntaxTests/abiEncoder/selected_twice.sol
index 424c2c7f2b89..6679cf39cb09 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/selected_twice.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/selected_twice.sol
@@ -1,4 +1,6 @@
pragma abicoder v1;
pragma abicoder v1;
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// SyntaxError 3845: (20-39): ABI coder has already been selected for this source unit.
+// Warning 9511: (20-39): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_accessing_public_state_variable_via_v1_type.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_accessing_public_state_variable_via_v1_type.sol
index 036a2597616c..690e53f20beb 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_accessing_public_state_variable_via_v1_type.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_accessing_public_state_variable_via_v1_type.sol
@@ -16,3 +16,4 @@ contract D {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_accessing_public_state_variable_via_v2_type.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_accessing_public_state_variable_via_v2_type.sol
index feaf895e17ee..0a27900c4476 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_accessing_public_state_variable_via_v2_type.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_accessing_public_state_variable_via_v2_type.sol
@@ -14,5 +14,6 @@ contract D {
}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 7364: (222-260): Different number of components on the left hand side (1) than on the right hand side (2).
// TypeError 9574: (222-260): Type uint256 is not implicitly convertible to expected type struct Item memory.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v1_library_function_accepting_storage_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v1_library_function_accepting_storage_struct.sol
index 03fb9bae673b..92c022edd012 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v1_library_function_accepting_storage_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v1_library_function_accepting_storage_struct.sol
@@ -22,3 +22,4 @@ contract Test {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_constructor_accepting_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_constructor_accepting_struct.sol
index 3ee6f75a17b9..17013563b363 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_constructor_accepting_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_constructor_accepting_struct.sol
@@ -18,4 +18,5 @@ contract Test {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2443: (B:91-100): The type of this parameter, struct C.Item memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_accepting_struct_via_named_argument.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_accepting_struct_via_named_argument.sol
index c02faba189bc..9f12d6580edc 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_accepting_struct_via_named_argument.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_accepting_struct_via_named_argument.sol
@@ -18,4 +18,5 @@ contract Test {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2443: (B:119-129): The type of this parameter, struct C.Item memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_pointer_accepting_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_pointer_accepting_struct.sol
index 674ce4e32a8c..13ed7d4f1182 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_pointer_accepting_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_pointer_accepting_struct.sol
@@ -20,4 +20,5 @@ contract Test {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2443: (B:166-175): The type of this parameter, struct C.Item memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_dynamic_string_array.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_dynamic_string_array.sol
index 5379bdb50356..614016e07925 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_dynamic_string_array.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_dynamic_string_array.sol
@@ -14,4 +14,5 @@ contract D {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2428: (B:85-105): The type of return parameter 1, string[] memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_struct.sol
index d2b0e1ffe256..df0125cc5654 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_struct.sol
@@ -18,4 +18,5 @@ contract Test {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2428: (B:90-112): The type of return parameter 1, struct C.Item memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_struct_with_dynamic_array.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_struct_with_dynamic_array.sol
index 0aa9973aa702..b4613ecbdd4c 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_struct_with_dynamic_array.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_contract_function_returning_struct_with_dynamic_array.sol
@@ -18,4 +18,5 @@ contract Test {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2428: (B:90-112): The type of return parameter 1, struct C.Item memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_event_accepting_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_event_accepting_struct.sol
index e868418683e8..feb393cc4ae5 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_event_accepting_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_event_accepting_struct.sol
@@ -17,4 +17,5 @@ contract Test {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2443: (B:94-104): The type of this parameter, struct L.Item memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_attached_function_returning_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_attached_function_returning_struct.sol
index bb3651d4f8b2..309ae6dac088 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_attached_function_returning_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_attached_function_returning_struct.sol
@@ -20,4 +20,5 @@ contract D {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2428: (B:106-117): The type of return parameter 1, struct L.Item memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_function_accepting_storage_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_function_accepting_storage_struct.sol
index 01d9658ce2cf..c4b55d089804 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_function_accepting_storage_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_function_accepting_storage_struct.sol
@@ -22,3 +22,4 @@ contract Test {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_function_returning_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_function_returning_struct.sol
index c6ba7522596b..93bafa227cae 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_function_returning_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_library_function_returning_struct.sol
@@ -18,4 +18,5 @@ contract Test {
}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2428: (B:90-97): The type of return parameter 1, struct L.Item memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_modifier.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_modifier.sol
index ef066593c4bc..89e5b0e9cf0d 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_modifier.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_call_to_v2_modifier.sol
@@ -28,3 +28,4 @@ contract C is B {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_constructor_with_v2_modifier.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_constructor_with_v2_modifier.sol
index b937d1e2d1a2..6c1ae498c679 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_constructor_with_v2_modifier.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_constructor_with_v2_modifier.sol
@@ -35,3 +35,5 @@ contract D is C {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
+// Warning 9511: (C:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_calling_v2_function.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_calling_v2_function.sol
index 9743d5318ca0..9ff72d4f2ceb 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_calling_v2_function.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_calling_v2_function.sol
@@ -26,3 +26,4 @@ contract C is B {}
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_event.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_event.sol
index e4492a4ef742..2126287bc77e 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_event.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_event.sol
@@ -16,3 +16,4 @@ contract D is C {}
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_function_accepting_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_function_accepting_struct.sol
index c37bad41c274..28f8b6c2a187 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_function_accepting_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_function_accepting_struct.sol
@@ -14,4 +14,5 @@ import "A";
contract D is C {}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 6594: (B:33-51): Contract "D" does not use ABI coder v2 but wants to inherit from a contract which uses types that require it. Use "pragma abicoder v2;" for the inheriting contract as well to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_function_returning_struct.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_function_returning_struct.sol
index f25754246930..e1aa62ead6a9 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_function_returning_struct.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_defining_v2_function_returning_struct.sol
@@ -14,4 +14,5 @@ import "A";
contract D is C {}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 6594: (B:33-51): Contract "D" does not use ABI coder v2 but wants to inherit from a contract which uses types that require it. Use "pragma abicoder v2;" for the inheriting contract as well to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_emitting_v2_event.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_emitting_v2_event.sol
index 5ae4cb0ed836..e2bb3e8870bc 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_emitting_v2_event.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_inheritance_from_contract_emitting_v2_event.sol
@@ -22,3 +22,4 @@ contract D is C {}
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_modifier_overriding_v2_modifier.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_modifier_overriding_v2_modifier.sol
index 9a809b50a2fe..fa05fd90ebce 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_modifier_overriding_v2_modifier.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_modifier_overriding_v2_modifier.sol
@@ -30,3 +30,5 @@ contract C is B {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 8429: (A:156-234): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v1_v2_v1_modifier_mix.sol b/test/libsolidity/syntaxTests/abiEncoder/v1_v2_v1_modifier_mix.sol
index 6665c42efd49..a16b59c3258c 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v1_v2_v1_modifier_mix.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v1_v2_v1_modifier_mix.sol
@@ -55,3 +55,6 @@ contract X {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (V1A:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
+// Warning 9511: (V1B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
+// Warning 9511: (C:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v1_modifier_sandwich.sol b/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v1_modifier_sandwich.sol
index 45fed616c08e..7d20a5b39294 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v1_modifier_sandwich.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v1_modifier_sandwich.sol
@@ -29,4 +29,6 @@ contract C is B {
{}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
+// Warning 9511: (C:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2428: (B:80-102): The type of return parameter 1, struct Data memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v2_modifier_sandwich.sol b/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v2_modifier_sandwich.sol
index 5bc10f53eddb..299d6619ed4e 100644
--- a/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v2_modifier_sandwich.sol
+++ b/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v2_modifier_sandwich.sol
@@ -30,4 +30,5 @@ contract C is B {
{}
}
// ----
+// Warning 9511: (B:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2428: (B:80-102): The type of return parameter 1, struct Data memory, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/array/calldata_multi_dynamic_V1.sol b/test/libsolidity/syntaxTests/array/calldata_multi_dynamic_V1.sol
index 754270ecf449..9615842f76d4 100644
--- a/test/libsolidity/syntaxTests/array/calldata_multi_dynamic_V1.sol
+++ b/test/libsolidity/syntaxTests/array/calldata_multi_dynamic_V1.sol
@@ -4,5 +4,6 @@ contract Test {
function g(uint[][1] calldata) external { }
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 4957: (51-68): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
// TypeError 4957: (98-116): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/constructor/nonabiv2_type.sol b/test/libsolidity/syntaxTests/constructor/nonabiv2_type.sol
index 8e0c323b8c33..7693813bfd5b 100644
--- a/test/libsolidity/syntaxTests/constructor/nonabiv2_type.sol
+++ b/test/libsolidity/syntaxTests/constructor/nonabiv2_type.sol
@@ -3,4 +3,5 @@ contract C {
constructor(uint[][][] memory t) {}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 4957: (46-65): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature. Alternatively, make the contract abstract and supply the constructor arguments from a derived contract.
diff --git a/test/libsolidity/syntaxTests/constructor/nonabiv2_type_abstract.sol b/test/libsolidity/syntaxTests/constructor/nonabiv2_type_abstract.sol
index ca52859ff928..e0b9296068a8 100644
--- a/test/libsolidity/syntaxTests/constructor/nonabiv2_type_abstract.sol
+++ b/test/libsolidity/syntaxTests/constructor/nonabiv2_type_abstract.sol
@@ -5,3 +5,4 @@ abstract contract C {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
diff --git a/test/libsolidity/syntaxTests/controlFlow/modifiers/implemented_without_placeholder.sol b/test/libsolidity/syntaxTests/controlFlow/modifiers/implemented_without_placeholder.sol
index 08b4ef12efc0..86406896ba28 100644
--- a/test/libsolidity/syntaxTests/controlFlow/modifiers/implemented_without_placeholder.sol
+++ b/test/libsolidity/syntaxTests/controlFlow/modifiers/implemented_without_placeholder.sol
@@ -6,3 +6,4 @@ abstract contract A {
}
// ----
// SyntaxError 2883: (129-132): Modifier body does not contain '_'.
+// Warning 8429: (106-132): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/controlFlow/modifiers/modifier_different_functions.sol b/test/libsolidity/syntaxTests/controlFlow/modifiers/modifier_different_functions.sol
index 63d9153692c2..64b9997fa461 100644
--- a/test/libsolidity/syntaxTests/controlFlow/modifiers/modifier_different_functions.sol
+++ b/test/libsolidity/syntaxTests/controlFlow/modifiers/modifier_different_functions.sol
@@ -9,4 +9,5 @@ contract A {
}
}
// ----
+// Warning 8429: (140-172): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 3464: (118-132): This variable is of storage pointer type and can be returned without prior assignment, which would lead to undefined behaviour.
diff --git a/test/libsolidity/syntaxTests/controlFlow/modifiers/modifier_override.sol b/test/libsolidity/syntaxTests/controlFlow/modifiers/modifier_override.sol
index 3c5eb80ee439..67fdd5a1bab6 100644
--- a/test/libsolidity/syntaxTests/controlFlow/modifiers/modifier_override.sol
+++ b/test/libsolidity/syntaxTests/controlFlow/modifiers/modifier_override.sol
@@ -13,5 +13,6 @@ contract B is A {
}
}
// ----
+// Warning 8429: (71-115): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// Warning 5740: (65-69): Unreachable code.
// TypeError 3464: (49-63): This variable is of storage pointer type and can be returned without prior assignment, which would lead to undefined behaviour.
diff --git a/test/libsolidity/syntaxTests/controlFlow/modifiers/non_implemented_modifier.sol b/test/libsolidity/syntaxTests/controlFlow/modifiers/non_implemented_modifier.sol
index 61aede05eb5a..a656d481cc99 100644
--- a/test/libsolidity/syntaxTests/controlFlow/modifiers/non_implemented_modifier.sol
+++ b/test/libsolidity/syntaxTests/controlFlow/modifiers/non_implemented_modifier.sol
@@ -4,3 +4,5 @@ abstract contract A {
}
modifier mod() virtual;
}
+// ----
+// Warning 8429: (106-129): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/conversion/implicit_conversion_of_super_in_comparison.sol b/test/libsolidity/syntaxTests/conversion/implicit_conversion_of_super_in_comparison.sol
index 708713b6b0ff..24d13226cf2d 100644
--- a/test/libsolidity/syntaxTests/conversion/implicit_conversion_of_super_in_comparison.sol
+++ b/test/libsolidity/syntaxTests/conversion/implicit_conversion_of_super_in_comparison.sol
@@ -21,7 +21,10 @@ contract C {
// ----
// TypeError 2271: (144-157): Built-in binary operator != cannot be applied to types type(contract super C) and contract C.
// TypeError 2271: (167-180): Built-in binary operator != cannot be applied to types contract C and type(contract super C).
+// Warning 9170: (167-180): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
// TypeError 2271: (254-264): Built-in binary operator != cannot be applied to types type(contract super C) and contract C.
// TypeError 2271: (274-284): Built-in binary operator != cannot be applied to types contract C and type(contract super C).
+// Warning 9170: (274-284): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
// TypeError 2271: (349-359): Built-in binary operator != cannot be applied to types type(contract super C) and contract D.
// TypeError 2271: (369-379): Built-in binary operator != cannot be applied to types contract D and type(contract super C).
+// Warning 9170: (369-379): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Use an explicit cast to address type and compare the addresses instead.
diff --git a/test/libsolidity/syntaxTests/errors/no_structs_in_abiv1.sol b/test/libsolidity/syntaxTests/errors/no_structs_in_abiv1.sol
index 8727a2852913..53a25ae08677 100644
--- a/test/libsolidity/syntaxTests/errors/no_structs_in_abiv1.sol
+++ b/test/libsolidity/syntaxTests/errors/no_structs_in_abiv1.sol
@@ -4,4 +4,5 @@ contract C {
error MyError(S);
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 3061: (70-71): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/events/event_nested_array.sol b/test/libsolidity/syntaxTests/events/event_nested_array.sol
index 2491dae6e824..e99ec41bb29d 100644
--- a/test/libsolidity/syntaxTests/events/event_nested_array.sol
+++ b/test/libsolidity/syntaxTests/events/event_nested_array.sol
@@ -3,4 +3,5 @@ contract c {
event E(uint[][]);
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 3061: (45-53): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/events/event_nested_array_in_struct.sol b/test/libsolidity/syntaxTests/events/event_nested_array_in_struct.sol
index ee868a7152ad..4bd76f5ce486 100644
--- a/test/libsolidity/syntaxTests/events/event_nested_array_in_struct.sol
+++ b/test/libsolidity/syntaxTests/events/event_nested_array_in_struct.sol
@@ -4,4 +4,5 @@ contract c {
event E(S);
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 3061: (81-82): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/events/event_struct.sol b/test/libsolidity/syntaxTests/events/event_struct.sol
index ac6355fe0744..909a43bf01e9 100644
--- a/test/libsolidity/syntaxTests/events/event_struct.sol
+++ b/test/libsolidity/syntaxTests/events/event_struct.sol
@@ -4,4 +4,5 @@ contract c {
event E(S);
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 3061: (71-72): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/events/event_struct_indexed.sol b/test/libsolidity/syntaxTests/events/event_struct_indexed.sol
index 7e3393400c79..3af54a428d59 100644
--- a/test/libsolidity/syntaxTests/events/event_struct_indexed.sol
+++ b/test/libsolidity/syntaxTests/events/event_struct_indexed.sol
@@ -4,4 +4,5 @@ contract c {
event E(S indexed);
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 3061: (71-80): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/getter/nested_structs.sol b/test/libsolidity/syntaxTests/getter/nested_structs.sol
index 36886bacffeb..a7d4625904c7 100644
--- a/test/libsolidity/syntaxTests/getter/nested_structs.sol
+++ b/test/libsolidity/syntaxTests/getter/nested_structs.sol
@@ -9,4 +9,5 @@ contract C {
mapping(uint256 => X) public m;
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2763: (108-138): The following types are only supported for getters in ABI coder v2: struct C.Y memory. Either remove "public" or use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/immutable/inheritance_virtual_modifiers.sol b/test/libsolidity/syntaxTests/immutable/inheritance_virtual_modifiers.sol
index 31f510dccca5..36af3c91d7ed 100644
--- a/test/libsolidity/syntaxTests/immutable/inheritance_virtual_modifiers.sol
+++ b/test/libsolidity/syntaxTests/immutable/inheritance_virtual_modifiers.sol
@@ -17,3 +17,5 @@ contract C is B {
_; f(x);
}
}
+// ----
+// Warning 8429: (88-137): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/imports/inheritance_abi_encoder_mismatch_1.sol b/test/libsolidity/syntaxTests/imports/inheritance_abi_encoder_mismatch_1.sol
index 891f57e8d334..1967fa11bcf1 100644
--- a/test/libsolidity/syntaxTests/imports/inheritance_abi_encoder_mismatch_1.sol
+++ b/test/libsolidity/syntaxTests/imports/inheritance_abi_encoder_mismatch_1.sol
@@ -17,4 +17,5 @@ pragma abicoder v1;
import "./B.sol";
contract C is B { }
// ----
+// Warning 9511: (C.sol:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 6594: (C.sol:38-57): Contract "C" does not use ABI coder v2 but wants to inherit from a contract which uses types that require it. Use "pragma abicoder v2;" for the inheriting contract as well to enable the feature.
diff --git a/test/libsolidity/syntaxTests/imports/inheritance_abi_encoder_mismatch_2.sol b/test/libsolidity/syntaxTests/imports/inheritance_abi_encoder_mismatch_2.sol
index c92221f3accd..f4d0152adcc2 100644
--- a/test/libsolidity/syntaxTests/imports/inheritance_abi_encoder_mismatch_2.sol
+++ b/test/libsolidity/syntaxTests/imports/inheritance_abi_encoder_mismatch_2.sol
@@ -16,4 +16,6 @@ pragma abicoder v1;
import "./B.sol";
contract C is B { }
// ----
+// Warning 9511: (B.sol:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
+// Warning 9511: (C.sol:0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 6594: (B.sol:38-57): Contract "B" does not use ABI coder v2 but wants to inherit from a contract which uses types that require it. Use "pragma abicoder v2;" for the inheriting contract as well to enable the feature.
diff --git a/test/libsolidity/syntaxTests/inheritance/dataLocation/modifier_parameter_data_location_change_illegal_internal.sol b/test/libsolidity/syntaxTests/inheritance/dataLocation/modifier_parameter_data_location_change_illegal_internal.sol
index a4856d9f0335..e455b784d0b4 100644
--- a/test/libsolidity/syntaxTests/inheritance/dataLocation/modifier_parameter_data_location_change_illegal_internal.sol
+++ b/test/libsolidity/syntaxTests/inheritance/dataLocation/modifier_parameter_data_location_change_illegal_internal.sol
@@ -10,4 +10,5 @@ contract B is A {
}
}
// ----
+// Warning 8429: (26-66): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 1078: (153-214): Override changes modifier signature.
diff --git a/test/libsolidity/syntaxTests/inheritance/override/modifier_ambiguous.sol b/test/libsolidity/syntaxTests/inheritance/override/modifier_ambiguous.sol
index 00aeed0cda6f..5ac6924b7237 100644
--- a/test/libsolidity/syntaxTests/inheritance/override/modifier_ambiguous.sol
+++ b/test/libsolidity/syntaxTests/inheritance/override/modifier_ambiguous.sol
@@ -8,3 +8,5 @@ contract C is A, B {
modifier f() override(A,B) { _; }
}
// ----
+// Warning 8429: (17-44): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (64-91): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/inheritance/override/modifier_ambiguous_fail.sol b/test/libsolidity/syntaxTests/inheritance/override/modifier_ambiguous_fail.sol
index 7332f0817c18..0ebf600fe842 100644
--- a/test/libsolidity/syntaxTests/inheritance/override/modifier_ambiguous_fail.sol
+++ b/test/libsolidity/syntaxTests/inheritance/override/modifier_ambiguous_fail.sol
@@ -7,4 +7,6 @@ contract B {
contract C is A, B {
}
// ----
+// Warning 8429: (17-44): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (64-91): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 6480: (94-116): Derived contract must override modifier "f". Two or more base classes define modifier with same name.
diff --git a/test/libsolidity/syntaxTests/inheritance/override/modifier_inherited_different_signature.sol b/test/libsolidity/syntaxTests/inheritance/override/modifier_inherited_different_signature.sol
index 428f38e62bf0..5d9bc4a2e18e 100644
--- a/test/libsolidity/syntaxTests/inheritance/override/modifier_inherited_different_signature.sol
+++ b/test/libsolidity/syntaxTests/inheritance/override/modifier_inherited_different_signature.sol
@@ -7,4 +7,6 @@ contract B {
contract C is A, B {
}
// ----
+// Warning 8429: (17-50): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (70-97): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 6480: (100-122): Derived contract must override modifier "f". Two or more base classes define modifier with same name.
diff --git a/test/libsolidity/syntaxTests/inheritance/override/modifier_inherited_different_signature_override.sol b/test/libsolidity/syntaxTests/inheritance/override/modifier_inherited_different_signature_override.sol
index 7791ea725048..5485f40c1c21 100644
--- a/test/libsolidity/syntaxTests/inheritance/override/modifier_inherited_different_signature_override.sol
+++ b/test/libsolidity/syntaxTests/inheritance/override/modifier_inherited_different_signature_override.sol
@@ -8,4 +8,7 @@ contract C is A, B {
modifier f() virtual override(A, B) { _; }
}
// ----
+// Warning 8429: (17-50): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (70-97): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (125-167): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 1078: (125-167): Override changes modifier signature.
diff --git a/test/libsolidity/syntaxTests/inheritance/override/nonintermediate_common_base_and_unique_implementation_modifier.sol b/test/libsolidity/syntaxTests/inheritance/override/nonintermediate_common_base_and_unique_implementation_modifier.sol
index deda228fa0b5..9b09e07f54ce 100644
--- a/test/libsolidity/syntaxTests/inheritance/override/nonintermediate_common_base_and_unique_implementation_modifier.sol
+++ b/test/libsolidity/syntaxTests/inheritance/override/nonintermediate_common_base_and_unique_implementation_modifier.sol
@@ -16,4 +16,7 @@ contract B is IJ
}
contract C is A, B {}
// ----
+// Warning 8429: (14-41): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (58-85): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (111-154): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 6480: (229-250): Derived contract must override modifier "f". Two or more base classes define modifier with same name.
diff --git a/test/libsolidity/syntaxTests/inheritance/virtual/modifier_virtual_err.sol b/test/libsolidity/syntaxTests/inheritance/virtual/modifier_virtual_err.sol
index 85824c86b776..77a2bf20f839 100644
--- a/test/libsolidity/syntaxTests/inheritance/virtual/modifier_virtual_err.sol
+++ b/test/libsolidity/syntaxTests/inheritance/virtual/modifier_virtual_err.sol
@@ -4,4 +4,5 @@ library test {
}
}
// ----
+// Warning 8429: (19-38): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 3275: (19-38): Modifiers in a library cannot be virtual.
diff --git a/test/libsolidity/syntaxTests/inheritance/virtual/simple.sol b/test/libsolidity/syntaxTests/inheritance/virtual/simple.sol
index 892118a13d2a..a5de6d52a8f1 100644
--- a/test/libsolidity/syntaxTests/inheritance/virtual/simple.sol
+++ b/test/libsolidity/syntaxTests/inheritance/virtual/simple.sol
@@ -5,3 +5,4 @@ contract C
modifier modi() virtual {_;}
}
// ----
+// Warning 8429: (83-111): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/inlineAssembly/memory_safe_dialect_string_and_comment.sol b/test/libsolidity/syntaxTests/inlineAssembly/memory_safe_dialect_string_and_comment.sol
index 9d0fd3e1c786..f027e8c694a9 100644
--- a/test/libsolidity/syntaxTests/inlineAssembly/memory_safe_dialect_string_and_comment.sol
+++ b/test/libsolidity/syntaxTests/inlineAssembly/memory_safe_dialect_string_and_comment.sol
@@ -4,4 +4,5 @@ function f() pure {
}
}
// ----
-// Warning 8544: (63-104): Inline assembly marked as memory safe using both a NatSpec tag and an assembly flag. If you are not concerned with backwards compatibility, only use the assembly flag, otherwise only use the NatSpec tag.
+// Warning 8544: (63-104): Inline assembly marked as memory safe using both a NatSpec tag and an assembly block annotation. If you are not concerned with backwards compatibility, only use the assembly block annotation, otherwise only use the NatSpec tag.
+// Warning 2424: (63-104): Natspec 'memory-safe-assembly' special comment for inline assembly is deprecated and scheduled for removal in the next breaking version (0.9). Use the memory-safe block annotation instead.
diff --git a/test/libsolidity/syntaxTests/inlineAssembly/natspec_multi.sol b/test/libsolidity/syntaxTests/inlineAssembly/natspec_multi.sol
index 945d62b0695f..8ec2c631063b 100644
--- a/test/libsolidity/syntaxTests/inlineAssembly/natspec_multi.sol
+++ b/test/libsolidity/syntaxTests/inlineAssembly/natspec_multi.sol
@@ -15,9 +15,11 @@ function f() pure {
// Warning 6269: (189-200): Unexpected NatSpec tag "after" with value "bogus-value" in inline assembly.
// Warning 6269: (189-200): Unexpected NatSpec tag "before" with value "bogus-value" in inline assembly.
// Warning 8787: (189-200): Unexpected value for @solidity tag in inline assembly: a
+// Warning 2424: (189-200): Natspec 'memory-safe-assembly' special comment for inline assembly is deprecated and scheduled for removal in the next breaking version (0.9). Use the memory-safe block annotation instead.
// Warning 8787: (189-200): Unexpected value for @solidity tag in inline assembly: b
// Warning 8787: (189-200): Unexpected value for @solidity tag in inline assembly: c
// Warning 8787: (189-200): Unexpected value for @solidity tag in inline assembly: d
+// Warning 2424: (289-300): Natspec 'memory-safe-assembly' special comment for inline assembly is deprecated and scheduled for removal in the next breaking version (0.9). Use the memory-safe block annotation instead.
// Warning 8787: (289-300): Unexpected value for @solidity tag in inline assembly: a
// Warning 4377: (289-300): Value for @solidity tag in inline assembly specified multiple times: a
// Warning 4377: (289-300): Value for @solidity tag in inline assembly specified multiple times: memory-safe-assembly
diff --git a/test/libsolidity/syntaxTests/inlineAssembly/natspec_multi_swallowed.sol b/test/libsolidity/syntaxTests/inlineAssembly/natspec_multi_swallowed.sol
index 74be1232ddee..d4f5a8496f18 100644
--- a/test/libsolidity/syntaxTests/inlineAssembly/natspec_multi_swallowed.sol
+++ b/test/libsolidity/syntaxTests/inlineAssembly/natspec_multi_swallowed.sol
@@ -14,6 +14,7 @@ function f() pure {
// ----
// Warning 6269: (177-188): Unexpected NatSpec tag "after" with value "bogus-value" in inline assembly.
// Warning 6269: (177-188): Unexpected NatSpec tag "before" with value "@solidity a memory-safe-assembly b c d" in inline assembly.
+// Warning 2424: (277-288): Natspec 'memory-safe-assembly' special comment for inline assembly is deprecated and scheduled for removal in the next breaking version (0.9). Use the memory-safe block annotation instead.
// Warning 8787: (277-288): Unexpected value for @solidity tag in inline assembly: a
// Warning 4377: (277-288): Value for @solidity tag in inline assembly specified multiple times: a
// Warning 4377: (277-288): Value for @solidity tag in inline assembly specified multiple times: memory-safe-assembly
diff --git a/test/libsolidity/syntaxTests/modifiers/definition_in_contract.sol b/test/libsolidity/syntaxTests/modifiers/definition_in_contract.sol
index 9b0a805adf26..1d338dbe38fa 100644
--- a/test/libsolidity/syntaxTests/modifiers/definition_in_contract.sol
+++ b/test/libsolidity/syntaxTests/modifiers/definition_in_contract.sol
@@ -9,3 +9,6 @@ abstract contract A {
modifier muv virtual;
}
// ----
+// Warning 8429: (39-65): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (117-143): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (148-169): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/modifiers/definition_in_contract_unimplemented.sol b/test/libsolidity/syntaxTests/modifiers/definition_in_contract_unimplemented.sol
index 2018ae4eabbd..2b831788fda0 100644
--- a/test/libsolidity/syntaxTests/modifiers/definition_in_contract_unimplemented.sol
+++ b/test/libsolidity/syntaxTests/modifiers/definition_in_contract_unimplemented.sol
@@ -3,5 +3,6 @@ contract C {
modifier muv virtual;
}
// ----
+// Warning 8429: (34-55): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 3656: (0-57): Contract "C" should be marked as abstract.
// TypeError 8063: (17-29): Modifiers without implementation must be marked virtual.
diff --git a/test/libsolidity/syntaxTests/modifiers/definition_in_interface.sol b/test/libsolidity/syntaxTests/modifiers/definition_in_interface.sol
index 2f8281bdeb83..8e5158dde8c4 100644
--- a/test/libsolidity/syntaxTests/modifiers/definition_in_interface.sol
+++ b/test/libsolidity/syntaxTests/modifiers/definition_in_interface.sol
@@ -5,6 +5,8 @@ interface I {
modifier muv virtual;
}
// ----
+// Warning 8429: (57-83): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (88-109): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 6408: (18-35): Modifiers cannot be defined or declared in interfaces.
// TypeError 6408: (40-52): Modifiers cannot be defined or declared in interfaces.
// TypeError 8063: (40-52): Modifiers without implementation must be marked virtual.
diff --git a/test/libsolidity/syntaxTests/modifiers/definition_in_library.sol b/test/libsolidity/syntaxTests/modifiers/definition_in_library.sol
index 6acbf3a0f603..389f79c1458b 100644
--- a/test/libsolidity/syntaxTests/modifiers/definition_in_library.sol
+++ b/test/libsolidity/syntaxTests/modifiers/definition_in_library.sol
@@ -2,4 +2,5 @@ library L {
modifier mv virtual { _; }
}
// ----
+// Warning 8429: (16-42): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 3275: (16-42): Modifiers in a library cannot be virtual.
diff --git a/test/libsolidity/syntaxTests/modifiers/definition_in_library_unimplemented.sol b/test/libsolidity/syntaxTests/modifiers/definition_in_library_unimplemented.sol
index 5fbc35682258..d826e3789719 100644
--- a/test/libsolidity/syntaxTests/modifiers/definition_in_library_unimplemented.sol
+++ b/test/libsolidity/syntaxTests/modifiers/definition_in_library_unimplemented.sol
@@ -3,5 +3,6 @@ library L {
modifier muv virtual;
}
// ----
+// Warning 8429: (33-54): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 8063: (16-28): Modifiers without implementation must be marked virtual.
// TypeError 3275: (33-54): Modifiers in a library cannot be virtual.
diff --git a/test/libsolidity/syntaxTests/modifiers/empty_modifier_body.sol b/test/libsolidity/syntaxTests/modifiers/empty_modifier_body.sol
index 0c0e821f5612..22b21834bb75 100644
--- a/test/libsolidity/syntaxTests/modifiers/empty_modifier_body.sol
+++ b/test/libsolidity/syntaxTests/modifiers/empty_modifier_body.sol
@@ -13,3 +13,5 @@ contract D is C {
}
}
// ----
+// Warning 8429: (22-51): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (134-153): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/modifiers/empty_modifier_err.sol b/test/libsolidity/syntaxTests/modifiers/empty_modifier_err.sol
index e9e03f30423b..2b087d8ecd20 100644
--- a/test/libsolidity/syntaxTests/modifiers/empty_modifier_err.sol
+++ b/test/libsolidity/syntaxTests/modifiers/empty_modifier_err.sol
@@ -5,6 +5,8 @@ contract C is B { }
abstract contract D {modifier m;}
// ----
+// Warning 8429: (12-31): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (55-74): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 3656: (0-32): Contract "A" should be marked as abstract.
// TypeError 3656: (76-95): Contract "C" should be marked as abstract.
// TypeError 8063: (118-129): Modifiers without implementation must be marked virtual.
diff --git a/test/libsolidity/syntaxTests/modifiers/legal_modifier_override.sol b/test/libsolidity/syntaxTests/modifiers/legal_modifier_override.sol
index 62356abb133c..6b479752abc7 100644
--- a/test/libsolidity/syntaxTests/modifiers/legal_modifier_override.sol
+++ b/test/libsolidity/syntaxTests/modifiers/legal_modifier_override.sol
@@ -1,3 +1,4 @@
contract A { modifier mod(uint a) virtual { _; } }
contract B is A { modifier mod(uint a) override { _; } }
// ----
+// Warning 8429: (13-48): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/modifiers/modifier_abstract_override.sol b/test/libsolidity/syntaxTests/modifiers/modifier_abstract_override.sol
index dd3ef4499fdf..5ca07a0a9c9c 100644
--- a/test/libsolidity/syntaxTests/modifiers/modifier_abstract_override.sol
+++ b/test/libsolidity/syntaxTests/modifiers/modifier_abstract_override.sol
@@ -8,4 +8,6 @@ contract C is B {
function f() m public {}
}
// ----
+// Warning 8429: (17-44): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (78-108): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 4593: (78-108): Overriding an implemented modifier with an unimplemented modifier is not allowed.
diff --git a/test/libsolidity/syntaxTests/modifiers/multiple_inheritance_unimplemented_override.sol b/test/libsolidity/syntaxTests/modifiers/multiple_inheritance_unimplemented_override.sol
index 81e1c3565b80..d491d4f34892 100644
--- a/test/libsolidity/syntaxTests/modifiers/multiple_inheritance_unimplemented_override.sol
+++ b/test/libsolidity/syntaxTests/modifiers/multiple_inheritance_unimplemented_override.sol
@@ -9,3 +9,5 @@ contract C is A, B {
function f() m public {}
}
// ----
+// Warning 8429: (17-44): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (73-94): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/modifiers/unimplemented_function_and_modifier.sol b/test/libsolidity/syntaxTests/modifiers/unimplemented_function_and_modifier.sol
index bf823748c85b..0366856178e9 100644
--- a/test/libsolidity/syntaxTests/modifiers/unimplemented_function_and_modifier.sol
+++ b/test/libsolidity/syntaxTests/modifiers/unimplemented_function_and_modifier.sol
@@ -26,6 +26,7 @@ contract E is A {
modifier mod() override { _;}
}
// ----
+// Warning 8429: (110-133): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 3656: (137-254): Contract "B" should be marked as abstract.
// TypeError 3656: (256-344): Contract "C" should be marked as abstract.
// TypeError 3656: (346-466): Contract "D" should be marked as abstract.
diff --git a/test/libsolidity/syntaxTests/modifiers/unimplemented_override_unimplemented.sol b/test/libsolidity/syntaxTests/modifiers/unimplemented_override_unimplemented.sol
index ae041ebfc61b..3c14a4bc8a12 100644
--- a/test/libsolidity/syntaxTests/modifiers/unimplemented_override_unimplemented.sol
+++ b/test/libsolidity/syntaxTests/modifiers/unimplemented_override_unimplemented.sol
@@ -9,3 +9,6 @@ abstract contract C is B {
function f() m public {}
}
// ----
+// Warning 8429: (26-47): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (81-111): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (145-175): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/modifiers/use_unimplemented_from_base.sol b/test/libsolidity/syntaxTests/modifiers/use_unimplemented_from_base.sol
index 6d6423e7e133..ad31b6fdccf9 100644
--- a/test/libsolidity/syntaxTests/modifiers/use_unimplemented_from_base.sol
+++ b/test/libsolidity/syntaxTests/modifiers/use_unimplemented_from_base.sol
@@ -6,3 +6,5 @@ contract B is A {
modifier m() virtual override { _; }
}
// ----
+// Warning 8429: (26-47): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (101-137): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/modifiers/use_unimplemented_on_overridden_func.sol b/test/libsolidity/syntaxTests/modifiers/use_unimplemented_on_overridden_func.sol
index 5f6de4ce8302..1a25517da462 100644
--- a/test/libsolidity/syntaxTests/modifiers/use_unimplemented_on_overridden_func.sol
+++ b/test/libsolidity/syntaxTests/modifiers/use_unimplemented_on_overridden_func.sol
@@ -6,3 +6,4 @@ abstract contract B is A {
function f() public override {}
}
// ----
+// Warning 8429: (26-47): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
diff --git a/test/libsolidity/syntaxTests/modifiers/use_unimplemented_static.sol b/test/libsolidity/syntaxTests/modifiers/use_unimplemented_static.sol
index a6fcd7eafae3..af252f31cfa7 100644
--- a/test/libsolidity/syntaxTests/modifiers/use_unimplemented_static.sol
+++ b/test/libsolidity/syntaxTests/modifiers/use_unimplemented_static.sol
@@ -9,4 +9,6 @@ contract C is A, B {
function f() B.m public {}
}
// ----
+// Warning 8429: (17-44): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
+// Warning 8429: (73-94): Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9).
// TypeError 1835: (174-177): Cannot call unimplemented modifier. The modifier has no implementation in the referenced contract. Refer to it by its unqualified name if you want to call the implementation from the most derived contract.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/045_returning_multi_dimensional_arrays.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/045_returning_multi_dimensional_arrays.sol
index c9075a4cd3bf..7678d60dd8a6 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/045_returning_multi_dimensional_arrays.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/045_returning_multi_dimensional_arrays.sol
@@ -3,4 +3,5 @@ contract C {
function f() public pure returns (string[][] memory) {}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 4957: (71-88): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/046_returning_multi_dimensional_static_arrays.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/046_returning_multi_dimensional_static_arrays.sol
index ee8c7f18d3c4..616412220466 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/046_returning_multi_dimensional_static_arrays.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/046_returning_multi_dimensional_static_arrays.sol
@@ -3,4 +3,5 @@ contract C {
function f() public pure returns (uint[][2] memory) {}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 4957: (71-87): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/048_returning_arrays_in_structs_arrays.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/048_returning_arrays_in_structs_arrays.sol
index 77c77831e01d..07590b8109bc 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/048_returning_arrays_in_structs_arrays.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/048_returning_arrays_in_structs_arrays.sol
@@ -4,4 +4,5 @@ contract C {
function f() public pure returns (S memory x) {}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 4957: (100-110): This type is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/346_unused_return_value_send.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/346_unused_return_value_send.sol
index 80787c10c467..a0b6cbe4cc6e 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/346_unused_return_value_send.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/346_unused_return_value_send.sol
@@ -4,4 +4,5 @@ contract test {
}
}
// ----
+// Warning 9207: (50-77): 'send' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
// Warning 5878: (50-80): Failure condition of 'send' ignored. Consider using 'transfer' instead.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/405_address_checksum_type_deduction.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/405_address_checksum_type_deduction.sol
index 25acbfd42a3e..a283807c1fc9 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/405_address_checksum_type_deduction.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/405_address_checksum_type_deduction.sol
@@ -4,3 +4,4 @@ contract C {
}
}
// ----
+// Warning 9207: (47-107): 'transfer' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol
index ad57224cdecb..10a3e42ff84c 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol
@@ -10,3 +10,5 @@ contract C {
}
}
// ----
+// Warning 9207: (227-236): 'send' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
+// Warning 9207: (249-262): 'transfer' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/466_does_not_error_transfer_payable_fallback.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/466_does_not_error_transfer_payable_fallback.sol
index 642ae8360569..c9db26941a15 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/466_does_not_error_transfer_payable_fallback.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/466_does_not_error_transfer_payable_fallback.sol
@@ -13,3 +13,4 @@ contract B {
}
}
// ----
+// Warning 9207: (227-246): 'transfer' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol
index a36aeed86364..6580671d9032 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol
@@ -17,4 +17,5 @@ contract D {
}
}
// ----
+// Warning 9207: (187-209): 'transfer' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
// Warning 2018: (17-134): Function state mutability can be restricted to view
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/585_abi_decode_with_unsupported_types.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/585_abi_decode_with_unsupported_types.sol
index abbf76182f9b..68ee14cb7a83 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/585_abi_decode_with_unsupported_types.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/585_abi_decode_with_unsupported_types.sol
@@ -6,4 +6,5 @@ contract C {
}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 9611: (118-119): Decoding type struct C.s memory not supported.
diff --git a/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_abiencoder_v1.sol b/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_abiencoder_v1.sol
index f3091ebf5351..0907a07103cf 100644
--- a/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_abiencoder_v1.sol
+++ b/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_abiencoder_v1.sol
@@ -10,4 +10,5 @@ contract test {
// EVMVersion: >=shanghai
// bytecodeFormat: legacy
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// Warning 5574: (21-27154): Contract code size is 27205 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
diff --git a/test/libsolidity/syntaxTests/specialFunctions/abi_encodePacked_nested_dynamic_array.sol b/test/libsolidity/syntaxTests/specialFunctions/abi_encodePacked_nested_dynamic_array.sol
index c10dc10f25e0..f47a613f9d5b 100644
--- a/test/libsolidity/syntaxTests/specialFunctions/abi_encodePacked_nested_dynamic_array.sol
+++ b/test/libsolidity/syntaxTests/specialFunctions/abi_encodePacked_nested_dynamic_array.sol
@@ -5,4 +5,5 @@ contract C {
}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 9578: (89-119): Type not supported in packed mode.
diff --git a/test/libsolidity/syntaxTests/specialFunctions/abi_encode_nested_dynamic_array.sol b/test/libsolidity/syntaxTests/specialFunctions/abi_encode_nested_dynamic_array.sol
index 8c679258c5fe..2eb37ec68ee9 100644
--- a/test/libsolidity/syntaxTests/specialFunctions/abi_encode_nested_dynamic_array.sol
+++ b/test/libsolidity/syntaxTests/specialFunctions/abi_encode_nested_dynamic_array.sol
@@ -5,4 +5,5 @@ contract C {
}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2056: (86-116): This type cannot be encoded.
diff --git a/test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs.sol b/test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs.sol
index a7d0e3dbe099..831d0273ab79 100644
--- a/test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs.sol
+++ b/test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs.sol
@@ -12,6 +12,7 @@ contract C {
}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 2056: (151-152): This type cannot be encoded.
// TypeError 2056: (154-155): This type cannot be encoded.
// TypeError 9578: (220-221): Type not supported in packed mode.
diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_nested_dynamic_array.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_nested_dynamic_array.sol
index 1981b04bf352..8bc623c6825f 100644
--- a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_nested_dynamic_array.sol
+++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_nested_dynamic_array.sol
@@ -5,4 +5,5 @@ contract C {
}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 9611: (92-101): Decoding type uint256[][3] memory not supported.
diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_struct.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_struct.sol
index dd981b54c9b5..6c81252d356d 100644
--- a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_struct.sol
+++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_struct.sol
@@ -9,4 +9,5 @@ contract C {
}
}
// ----
+// Warning 9511: (0-19): ABI coder v1 is deprecated and scheduled for removal in the next breaking version (0.9). Use ABI coder v2 instead.
// TypeError 9611: (118-119): Decoding type struct S memory not supported.
diff --git a/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions.sol b/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions.sol
index 8f275321382a..0ffb743b4092 100644
--- a/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions.sol
+++ b/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions.sol
@@ -21,4 +21,6 @@ contract C {
// ====
// bytecodeFormat: legacy
// ----
+// Warning 9207: (47-69): 'transfer' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
+// Warning 9207: (90-108): 'send' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
// Warning 5159: (122-134): "selfdestruct" has been deprecated. Note that, starting from the Cancun hard fork, the underlying opcode no longer deletes the code and data associated with an account and only transfers its Ether to the beneficiary, unless executed in the same transaction in which the contract was created (see EIP-6780). Any use in newly deployed contracts is strongly discouraged even if the new behavior is taken into account. Future changes to the EVM might further reduce the functionality of the opcode.
diff --git a/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_view_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_view_fail.sol
index 4f9efcdb5dd4..c007d3c1546c 100644
--- a/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_view_fail.sol
+++ b/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_view_fail.sol
@@ -20,6 +20,8 @@ contract C {
}
}
// ----
+// Warning 9207: (52-74): 'transfer' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
+// Warning 9207: (132-150): 'send' is deprecated and scheduled for removal in the next breaking version (0.9). Use 'call{value: }("")' instead.
// Warning 5159: (201-213): "selfdestruct" has been deprecated. Note that, starting from the Cancun hard fork, the underlying opcode no longer deletes the code and data associated with an account and only transfers its Ether to the beneficiary, unless executed in the same transaction in which the contract was created (see EIP-6780). Any use in newly deployed contracts is strongly discouraged even if the new behavior is taken into account. Future changes to the EVM might further reduce the functionality of the opcode.
// TypeError 8961: (52-77): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (132-153): Function cannot be declared as view because this expression (potentially) modifies the state.
diff --git a/test/libsolidity/syntaxTests/viewPureChecker/eof/builtin_functions.sol b/test/libsolidity/syntaxTests/viewPureChecker/eof/builtin_functions.sol
index 91ea709fe2a6..456e30413aad 100644
--- a/test/libsolidity/syntaxTests/viewPureChecker/eof/builtin_functions.sol
+++ b/test/libsolidity/syntaxTests/viewPureChecker/eof/builtin_functions.sol
@@ -20,3 +20,5 @@ contract C {
// ====
// bytecodeFormat: >=EOFv1
// ----
+// Warning 9207: (47-69): transfer will be deprecated in the next breaking version.
+// Warning 9207: (90-108): send will be deprecated in the next breaking version.