Repository: oceanprotocol/ocean.py (language: python)

Issue:
pip install ocean-lib not working on Ubuntu Linux with Python 3.10.6
**Describe the bug**
ocean-lib is not installing correctly on Linux (Ubuntu 22.04.1) with Python 3.10.6

I followed the installation described in the Simple Remote Flow (https://github.com/oceanprotocol/ocean.py/blob/main/READMEs/simple-remote.md).

running the following commands:
```
cd ~
mkdir my_project
cd my_project
python3 -m venv venv
source venv/bin/activate
pip3 install wheel
pip3 install ocean-lib
```
throws this error

```
Collecting varint
  Downloading varint-1.0.2.tar.gz (1.9 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: PyYAML, coincurve, websockets, parsimonious, varint
  Building wheel for PyYAML (pyproject.toml) ... done
  Created wheel for PyYAML: filename=PyYAML-5.4.1-cp310-cp310-linux_x86_64.whl size=45656 sha256=bfc68c6e067c06863426be0737a9401224fd045b61e4727999b76efd81b954c3
  Stored in directory: /home/mihai/.cache/pip/wheels/c7/0d/22/696ee92245ad710f506eee79bb05c740d8abccd3ecdb778683
  Building wheel for coincurve (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for coincurve (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [66 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/context.py -> build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/keys.py -> build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/utils.py -> build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/__init__.py -> build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/ecdsa.py -> build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/flags.py -> build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/types.py -> build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/_windows_libsecp256k1.py -> build/lib.linux-x86_64-cpython-310/coincurve
      copying coincurve/py.typed -> build/lib.linux-x86_64-cpython-310/coincurve
      running build_clib
      /tmp/pip-install-nrlvv3il/coincurve_2064f308d9ca470a80254a6fcb6edd41/libsecp256k1/autogen.sh: 3: autoreconf: not found
      Traceback (most recent call last):
        File "/home/mihai/my_project/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/home/mihai/my_project/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/mihai/my_project/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 412, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 482, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 260, in <module>
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "<string>", line 95, in run
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-690gpljt/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "<string>", line 152, in run
        File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/tmp/pip-install-nrlvv3il/coincurve_2064f308d9ca470a80254a6fcb6edd41/libsecp256k1/autogen.sh']' returned non-zero exit status 127.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for coincurve
  Building wheel for websockets (setup.py) ... done
  Created wheel for websockets: filename=websockets-9.1-cp310-cp310-linux_x86_64.whl size=85892 sha256=a8594dca6d309e7d1790fd7c794c928be95ad645455fe00e460e036e154e18a2
  Stored in directory: /home/mihai/.cache/pip/wheels/79/f7/4e/873eca27ecd6d7230caff265283a5a5112ad4cd1d945c022dd
  Building wheel for parsimonious (setup.py) ... done
  Created wheel for parsimonious: filename=parsimonious-0.8.1-py3-none-any.whl size=42723 sha256=e130a16c0bbe4d2ac4519684f4a0f7c634115ec10894dde55043d6c5eb92915c
  Stored in directory: /home/mihai/.cache/pip/wheels/b1/12/f1/7a2f39b30d6780ae9f2be9a52056595e0d97c1b4531d183085
  Building wheel for varint (setup.py) ... done
  Created wheel for varint: filename=varint-1.0.2-py3-none-any.whl size=1980 sha256=cf7bfd5013ab8a020559e2a3b1374f6e04adeae322a0ac96f719880c2d161632
  Stored in directory: /home/mihai/.cache/pip/wheels/39/48/5e/33919c52a2a695a512ca394a5308dd12626a40bbcd288de814
Successfully built PyYAML websockets parsimonious varint
Failed to build coincurve
ERROR: Could not build wheels for coincurve, which is required to install pyproject.toml-based projects
```

**To Reproduce**
Steps to reproduce the behavior:

1. Install latest Ubuntu version (22.04.1)
```
2. sudo apt install python3.10-venv
3. cd ~
4. mkdir my_project
5. cd my_project
6. python3 -m venv venv
7. source venv/bin/activate
8. pip3 install wheel
9. pip3 install ocean-lib
```

**Expected behavior**
ocean-lib is installed successfully.


**Desktop (please complete the following information):**
 - OS: Ubuntu 22.04.1 running on VMWare Workstation 16 Player 
 - Python: 3.10.6 (preinstalled by OS installation)


Discussion / hints:

Fix patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 71d116281..c72858184 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -8,11 +8,11 @@ repos:
     hooks:
     - id: isort
 -   repo: https://github.com/psf/black
-    rev: 22.3.0
+    rev: 'refs/tags/22.6.0:refs/tags/22.6.0'
     hooks:
     -   id: black
 -   repo: https://gitlab.com/pycqa/flake8
-    rev: 3.9.2
+    rev: 5.0.4
     hooks:
     - id: flake8
 -   repo: https://github.com/johann-petrak/licenseheaders.git
diff --git a/README.md b/README.md
index e7efead66..5b52a25f3 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ SPDX-License-Identifier: Apache-2.0
 
 > Python library to privately & securely publish, exchange, and consume data.
 
-[![Maintainability](https://api.codeclimate.com/v1/badges/a0be65f412a35440c63e/maintainability)](https://codeclimate.com/github/oceanprotocol/ocean.py/maintainability) 
+[![Maintainability](https://api.codeclimate.com/v1/badges/a0be65f412a35440c63e/maintainability)](https://codeclimate.com/github/oceanprotocol/ocean.py/maintainability)
 [![Test Coverage](https://api.codeclimate.com/v1/badges/a0be65f412a35440c63e/test_coverage)](https://codeclimate.com/github/oceanprotocol/ocean.py/test_coverage)
 
 With ocean.py, you can:
@@ -22,20 +22,10 @@ ocean.py is part of the [Ocean Protocol](https://www.oceanprotocol.com) toolset.
 
 This is in beta state. If you run into problems, please open up a [new issue](/issues).
 
-- [🏗 Installation](#-installation)
 - [🏄 Quickstart](#-quickstart): simple flow, marketplace, compute-to-data, more
 - [🦑 Development](#-development)
 - [🏛 License](#-license)
 
-## 🏗 Installation
-
-```console
-#Install the ocean.py library. Allow pre-releases for the latest v4 version. Install wheel first to avoid errors.
-pip install wheel
-pip install --pre ocean-lib
-```
-⚠️ Mac users: if you encounter an "Unsupported Architecture" issue, then install including ARCHFLAGS: `ARCHFLAGS="-arch x86_64" pip install ocean-lib`. [[Details](https://github.com/oceanprotocol/ocean.py/issues/486).]
-
 ## 🏄 Quickstart
 
 Here are flows to try out, from simple to specific detailed variants.
diff --git a/READMEs/data-nfts-and-datatokens-flow.md b/READMEs/data-nfts-and-datatokens-flow.md
index afed464eb..83d6724e4 100644
--- a/READMEs/data-nfts-and-datatokens-flow.md
+++ b/READMEs/data-nfts-and-datatokens-flow.md
@@ -7,13 +7,40 @@ SPDX-License-Identifier: Apache-2.0
 
 ## 1. Setup
 
-### Prerequisites
+### 🏗 Installation
+
+#### ⚙️i Prerequisites
 
 -   Linux/MacOS
 -   [Docker](https://docs.docker.com/engine/install/), [Docker Compose](https://docs.docker.com/compose/install/), [allowing non-root users](https://www.thegeekdiary.com/run-docker-as-a-non-root-user/)
--   Python 3.8.5+
+-   Python 3.8.5 - Python 3.10.4
+
+In a new console:
+
+```console
+# Create your working directory
+mkdir my_project
+cd my_project
+
+# Initialize virtual environment and activate it. Install artifacts.
+python3 -m venv venv
+source venv/bin/activate
+
+# Avoid errors for the step that follows
+pip3 install wheel
+
+# Install Ocean library. Allow pre-releases to get the latest v4 version.
+pip3 install ocean-lib
+```
+
+#### ⚠️ Known issues
+
+- for M1 processors, `coincurve` and `cryptography` installation may fail due to dependency/compilation issues. It is recommended to install them individually, e.g. `pip3 install coincurve && pip3 install cryptography`
 
-### Download barge and run services
+- Mac users: if you encounter an "Unsupported Architecture" issue, then install including ARCHFLAGS: `ARCHFLAGS="-arch x86_64" pip install ocean-lib`. [[Details](https://github.com/oceanprotocol/ocean.py/issues/486).]
+
+
+### ⬇️Download barge and run services
 
 Ocean `barge` runs ganache (local blockchain), Provider (data service), and Aquarius (metadata cache).
 
@@ -31,27 +58,8 @@ docker system prune -a --volumes
 ./start_ocean.sh
 ```
 
-### Install the library
-
-In a new console:
-
-```console
-# Create your working directory
-mkdir my_project
-cd my_project
-
-# Initialize virtual environment and activate it. Install artifacts.
-python3 -m venv venv
-source venv/bin/activate
-
-# Avoid errors for the step that follows
-pip3 install wheel
-
-# Install Ocean library. Allow pre-releases to get the latest v4 version.
-pip3 install --pre ocean-lib
-```
 
-### Set envvars
+### 🔧 Set envvars
 
 In the same console (or another one with venv activated):
 ```console
@@ -59,7 +67,7 @@ export TEST_PRIVATE_KEY1=0x8467415bb2ba7c91084d932276214b11a3dd9bdb2930fefa194b6
 export TEST_PRIVATE_KEY2=0x1d751ded5a32226054cd2e71261039b65afb9ee1c746d055dd699b1150a5befc
 ```
 
-### Setup in Python
+### 🐍 Setup in Python
 
 In the same console, run Python console:
 ```console
@@ -88,7 +96,7 @@ assert ocean.web3.eth.get_balance(bob_wallet.address) > 0, "Bob needs ganache ET
 
 ## 2. Publish Data NFT & Datatoken
 
-### 2.1 Create a data NFT
+### 2.1 🪄 Create a data NFT
 
 In the same Python console:
 ```python
@@ -98,7 +106,7 @@ print(f"Created data NFT. Its address is {data_nft.address}")
 
 Congrats, you've created your first Ocean data NFT!
 
-### 2.2 Create a datatoken from the data NFT
+### 2.2 🎉 Create a datatoken from the data NFT
 
 In the same Python console:
 ```python
diff --git a/READMEs/datatoken-enterprise.md b/READMEs/datatoken-enterprise.md
index 100bb8e41..a728dcb71 100644
--- a/READMEs/datatoken-enterprise.md
+++ b/READMEs/datatoken-enterprise.md
@@ -244,6 +244,8 @@ tx_id = datatoken_enterprise_token.buy_from_fre_and_order(
     consume_market_swap_fee_address=bob_wallet.address,
     from_wallet=alice_wallet,
 )
-tx_receipt = ocean.web3.eth.wait_for_transaction_receipt(tx_id)
+
+from brownie.network.transaction import TransactionReceipt
+tx_receipt = TransactionReceipt(tx_id)
 assert tx_receipt.status == 1, "failed buying data tokens from FRE."
 ```
diff --git a/READMEs/key-value-flow.md b/READMEs/key-value-flow.md
index 9d2fa2efb..81dddda36 100644
--- a/READMEs/key-value-flow.md
+++ b/READMEs/key-value-flow.md
@@ -35,16 +35,13 @@ From [data-nfts-and-datatokens-flow](data-nfts-and-datatokens-flow.md), do:
 ```python
 # Key-value pair
 key = "fav_color"
-value = "blue"
+value = b"blue"
 
 # prep key for setter
 key_hash = ocean.web3.keccak(text=key)  # Contract/ERC725 requires keccak256 hash
 
-# prep value for setter
-value_hex = value.encode('utf-8').hex()  # set_new_data() needs hex
-
 # set
-data_nft.set_new_data(key_hash, value_hex, alice_wallet)
+data_nft.set_new_data(key_hash, value, alice_wallet)
 ```
 
 ## 4. Retrieve value from data NFT
diff --git a/network-config.sample b/network-config.sample
new file mode 100644
index 000000000..ca927f2e2
--- /dev/null
+++ b/network-config.sample
@@ -0,0 +1,16 @@
+development:
+  - name: development
+    chainid: 8996
+    host: http://127.0.0.1:8545
+    id: development
+live:
+  - name: mumbai
+    networks:
+      - chainid: 80001
+        host: https://rpc-mumbai.maticvigil.com
+        id: mumbai
+  - name: polygon
+    networks:
+      - chainid: 137
+        host: https://polygon-rpc.com
+        id: polygon
diff --git a/ocean_lib/data_provider/base.py b/ocean_lib/data_provider/base.py
index af4ff08be..49b69b278 100644
--- a/ocean_lib/data_provider/base.py
+++ b/ocean_lib/data_provider/base.py
@@ -302,8 +302,13 @@ def check_response(
 
                 raise DataProviderException(f"{endpoint_name} failed: {error}")
 
+            response_content = (
+                getattr(response, "content")
+                if hasattr(response, "content")
+                else "<none>"
+            )
             raise DataProviderException(
-                f"Failed to get a response for request: {endpoint_name}={endpoint}, payload={payload}, response is {response}"
+                f"Failed to get a response for request: {endpoint_name}={endpoint}, payload={payload}, response is {response_content}"
             )
 
         if not success_codes:
diff --git a/ocean_lib/example_config.py b/ocean_lib/example_config.py
index 4918891bd..6ca726d39 100644
--- a/ocean_lib/example_config.py
+++ b/ocean_lib/example_config.py
@@ -74,6 +74,18 @@
     },
 }
 
+NETWORK_IDS = {
+    8996: "development",
+    1: "mainnet",
+    5: "goerli",
+    56: "bsc",
+    137: "polygon",
+    246: "energyweb",
+    1287: "moonbase",
+    1285: "moonriver",
+    80001: "mumbai",
+}
+
 
 @enforce_types
 def get_config_dict(chain_id: int, network_url: str) -> dict:
diff --git a/ocean_lib/exceptions.py b/ocean_lib/exceptions.py
index b5206f6ad..b57623d57 100644
--- a/ocean_lib/exceptions.py
+++ b/ocean_lib/exceptions.py
@@ -12,10 +12,6 @@ class InsufficientBalance(Exception):
     """The token balance is insufficient."""
 
 
-class ContractNotFound(Exception):
-    """Contract address is not found in the factory events."""
-
-
 class AquariusError(Exception):
     """Error invoking an Aquarius metadata service endpoint."""
 
diff --git a/ocean_lib/models/btoken.py b/ocean_lib/models/btoken.py
index 5a5713c30..a10d4d454 100644
--- a/ocean_lib/models/btoken.py
+++ b/ocean_lib/models/btoken.py
@@ -13,19 +13,19 @@ class BTokenBase(BConst):
 
     @enforce_types
     def token_name(self) -> str:
-        return self.contract.caller.name()
+        return self.contract.name()
 
     @enforce_types
     def symbol(self) -> str:
-        return self.contract.caller.symbol()
+        return self.contract.symbol()
 
     @enforce_types
     def decimals(self) -> int:
-        return self.contract.caller.decimals()
+        return self.contract.decimals()
 
     @enforce_types
     def balanceOf(self, address: str) -> int:
-        return self.contract.caller.balanceOf(address)
+        return self.contract.balanceOf(address)
 
     @enforce_types
     def increase_approval(self, dst: str, amt: int, from_wallet: Wallet) -> str:
@@ -49,8 +49,8 @@ def transfer_from(self, src: str, dst: str, amt: int, from_wallet: Wallet) -> st
 
     @enforce_types
     def allowance(self, src_address: str, dst_address: str) -> int:
-        return self.contract.caller.allowance(src_address, dst_address)
+        return self.contract.allowance(src_address, dst_address)
 
     @enforce_types
     def total_supply(self) -> int:
-        return self.contract.caller.totalSupply()
+        return self.contract.totalSupply()
diff --git a/ocean_lib/models/data_nft.py b/ocean_lib/models/data_nft.py
index 765af0070..5a0a8afc7 100644
--- a/ocean_lib/models/data_nft.py
+++ b/ocean_lib/models/data_nft.py
@@ -78,7 +78,7 @@ def set_metadata(
         self,
         metadata_state: int,
         metadata_decryptor_url: str,
-        metadata_decryptor_address: str,
+        metadata_decryptor_address: bytes,
         flags: bytes,
         data: Union[str, bytes],
         data_hash: Union[str, bytes],
@@ -104,7 +104,7 @@ def set_metadata_token_uri(
         self,
         metadata_state: int,
         metadata_decryptor_url: str,
-        metadata_decryptor_address: str,
+        metadata_decryptor_address: bytes,
         flags: bytes,
         data: Union[str, bytes],
         data_hash: Union[str, bytes],
@@ -119,7 +119,7 @@ def set_metadata_token_uri(
                 (
                     metadata_state,
                     metadata_decryptor_url,
-                    ContractBase.to_checksum_address(metadata_decryptor_address),
+                    metadata_decryptor_address,
                     flags,
                     data,
                     data_hash,
@@ -133,7 +133,7 @@ def set_metadata_token_uri(
 
     @enforce_types
     def get_metadata(self) -> tuple:
-        return self.contract.caller.getMetaData()
+        return self.contract.getMetaData()
 
     @enforce_types
     def create_erc20(
@@ -265,21 +265,18 @@ def execute_call(
             from_wallet,
         )
 
-    @enforce_types
-    def set_new_data(self, key: bytes, value: str, from_wallet: Wallet) -> str:
+    def set_new_data(self, key: bytes, value: bytes, from_wallet: Wallet) -> str:
         return self.send_transaction("setNewData", (key, value), from_wallet)
 
-    @enforce_types
-    def set_data_erc20(self, key: bytes, value: str, from_wallet: Wallet) -> str:
+    def set_data_erc20(self, key: bytes, value: bytes, from_wallet: Wallet) -> str:
         return self.send_transaction("setDataERC20", (key, value), from_wallet)
 
-    @enforce_types
     def get_data(self, key: bytes) -> bytes:
-        return self.contract.caller.getData(key)
+        return self.contract.getData(key)
 
     @enforce_types
     def token_uri(self, token_id: int) -> str:
-        return self.contract.caller.tokenURI(token_id)
+        return self.contract.tokenURI(token_id)
 
     @enforce_types
     def transfer_from(
@@ -315,15 +312,15 @@ def withdraw(self, from_wallet: Wallet):
 
     @enforce_types
     def token_name(self) -> str:
-        return self.contract.caller.name()
+        return self.contract.name()
 
     @enforce_types
     def symbol(self) -> str:
-        return self.contract.caller.symbol()
+        return self.contract.symbol()
 
     @enforce_types
     def is_initialized(self) -> bool:
-        return self.contract.caller.isInitialized()
+        return self.contract.isInitialized()
 
     @enforce_types
     def clean_permissions(self, from_wallet: Wallet) -> str:
@@ -331,41 +328,35 @@ def clean_permissions(self, from_wallet: Wallet) -> str:
 
     @enforce_types
     def get_address_length(self, array: List[str]) -> int:
-        return self.contract.caller.getAddressLength(array)
+        return self.contract.getAddressLength(array)
 
     @enforce_types
     def get_id(self) -> int:
-        return self.contract.caller.getId()
+        return self.contract.getId()
 
     @enforce_types
     def get_permissions(self, user: str) -> list:
-        return self.contract.caller.getPermissions(
-            ContractBase.to_checksum_address(user)
-        )
+        return self.contract.getPermissions(ContractBase.to_checksum_address(user))
 
     @enforce_types
     def balance_of(self, account: str) -> int:
-        return self.contract.caller.balanceOf(ContractBase.to_checksum_address(account))
+        return self.contract.balanceOf(ContractBase.to_checksum_address(account))
 
     @enforce_types
     def owner_of(self, token_id: int) -> str:
-        return self.contract.caller.ownerOf(token_id)
+        return self.contract.ownerOf(token_id)
 
     @enforce_types
     def get_tokens_list(self) -> list:
-        return self.contract.caller.getTokensList()
+        return self.contract.getTokensList()
 
     @enforce_types
     def is_deployed(self, datatoken: str) -> bool:
-        return self.contract.caller.isDeployed(
-            ContractBase.to_checksum_address(datatoken)
-        )
+        return self.contract.isDeployed(ContractBase.to_checksum_address(datatoken))
 
     @enforce_types
     def is_erc20_deployer(self, account: str) -> bool:
-        return self.contract.caller.isERC20Deployer(
-            ContractBase.to_checksum_address(account)
-        )
+        return self.contract.isERC20Deployer(ContractBase.to_checksum_address(account))
 
     @enforce_types
     def set_token_uri(
diff --git a/ocean_lib/models/data_nft_factory.py b/ocean_lib/models/data_nft_factory.py
index 7b601688c..1a764323d 100644
--- a/ocean_lib/models/data_nft_factory.py
+++ b/ocean_lib/models/data_nft_factory.py
@@ -4,6 +4,7 @@
 #
 from typing import List, Optional, Union
 
+from brownie.network.transaction import TransactionReceipt
 from enforce_typing import enforce_types
 from web3.exceptions import BadFunctionCallOutput
 
@@ -100,37 +101,37 @@ def deploy_erc721_contract(
 
     @enforce_types
     def get_current_nft_count(self) -> int:
-        return self.contract.caller.getCurrentNFTCount()
+        return self.contract.getCurrentNFTCount()
 
     @enforce_types
     def get_nft_template(self, template_index: int) -> list:
-        return self.contract.caller.getNFTTemplate(template_index)
+        return self.contract.getNFTTemplate(template_index)
 
     @enforce_types
     def get_current_nft_template_count(self) -> int:
-        return self.contract.caller.getCurrentNFTTemplateCount()
+        return self.contract.getCurrentNFTTemplateCount()
 
     @enforce_types
     def is_contract(self, account_address: str) -> bool:
-        return self.contract.caller.isContract(
+        return self.contract.isContract(
             ContractBase.to_checksum_address(account_address)
         )
 
     @enforce_types
     def get_current_token_count(self) -> int:
-        return self.contract.caller.getCurrentTokenCount()
+        return self.contract.getCurrentTokenCount()
 
     @enforce_types
     def get_token_template(self, index: int) -> list:
-        return self.contract.caller.getTokenTemplate(index)
+        return self.contract.getTokenTemplate(index)
 
     @enforce_types
     def get_current_template_count(self) -> int:
-        return self.contract.caller.getCurrentTemplateCount()
+        return self.contract.getCurrentTemplateCount()
 
     @enforce_types
     def template_count(self) -> int:
-        return self.contract.caller.templateCount()
+        return self.contract.templateCount()
 
     @enforce_types
     def start_multiple_token_order(
@@ -380,7 +381,7 @@ def create_nft_with_metadata(
         nft_owner: str,
         metadata_state: int,
         metadata_decryptor_url: str,
-        metadata_decryptor_address: str,
+        metadata_decryptor_address: bytes,
         metadata_flags: bytes,
         metadata_data: Union[str, bytes],
         metadata_data_hash: Union[str, bytes],
@@ -401,7 +402,7 @@ def create_nft_with_metadata(
                 (
                     metadata_state,
                     metadata_decryptor_url,
-                    ContractBase.to_checksum_address(metadata_decryptor_address),
+                    metadata_decryptor_address,
                     metadata_flags,
                     metadata_data,
                     metadata_data_hash,
@@ -426,27 +427,23 @@ def search_exchange_by_datatoken(
             else [
                 exchange_address_and_id
                 for exchange_address_and_id in exchange_addresses_and_ids
-                if fixed_rate_exchange.get_exchange(exchange_address_and_id[1])[0]
+                if fixed_rate_exchange.get_exchange(
+                    "0x" + exchange_address_and_id[1].hex()
+                )[0]
                 == exchange_owner
             ]
         )
 
     @enforce_types
     def get_token_address(self, tx_id: Union[str, bytes]):
-        tx_receipt = self.web3.eth.wait_for_transaction_receipt(tx_id)
-        registered_event = self.get_event_log(
-            event_name=DataNFTFactoryContract.EVENT_NFT_CREATED,
-            from_block=tx_receipt.blockNumber,
-            to_block=self.web3.eth.block_number,
-            filters=None,
-        )
+        receipt = TransactionReceipt(tx_id)
 
-        return registered_event[0].args.newTokenAddress
+        return receipt.events["NFTCreated"]["newTokenAddress"]
 
     @enforce_types
     def check_datatoken(self, datatoken_address: str) -> bool:
-        return self.contract.caller.erc20List(datatoken_address)
+        return self.contract.erc20List(datatoken_address)
 
     @enforce_types
     def check_nft(self, nft_address: str) -> bool:
-        return self.contract.caller.erc721List(nft_address) == nft_address
+        return self.contract.erc721List(nft_address) == nft_address
diff --git a/ocean_lib/models/datatoken.py b/ocean_lib/models/datatoken.py
index e725b2eb7..90db9f313 100644
--- a/ocean_lib/models/datatoken.py
+++ b/ocean_lib/models/datatoken.py
@@ -76,7 +76,7 @@ def event_NewFixedRate(self):
 
     @enforce_types
     def router(self) -> str:
-        return self.contract.caller.router()
+        return self.contract.router()
 
     @enforce_types
     def create_fixed_rate(
@@ -278,7 +278,7 @@ def transfer(self, to: str, amount: int, from_wallet: Wallet) -> str:
 
     @enforce_types
     def allowance(self, owner_address: str, spender_address: str) -> int:
-        return self.contract.caller.allowance(
+        return self.contract.allowance(
             ContractBase.to_checksum_address(owner_address),
             ContractBase.to_checksum_address(spender_address),
         )
@@ -317,7 +317,7 @@ def burn_from(self, from_address: str, amount: int, from_wallet: Wallet) -> str:
 
     @enforce_types
     def is_minter(self, account: str) -> bool:
-        return self.contract.caller.isMinter(ContractBase.to_checksum_address(account))
+        return self.contract.isMinter(ContractBase.to_checksum_address(account))
 
     @enforce_types
     def add_minter(self, minter_address: str, from_wallet: Wallet) -> str:
@@ -351,7 +351,6 @@ def remove_payment_manager(self, fee_manager: str, from_wallet: Wallet) -> str:
             from_wallet,
         )
 
-    @enforce_types
     def set_data(self, data: str, from_wallet: Wallet) -> str:
         return self.send_transaction("setData", (data,), from_wallet)
 
@@ -375,7 +374,7 @@ def set_payment_collector(
 
     @enforce_types
     def get_publishing_market_fee(self) -> tuple:
-        return self.contract.caller.getPublishingMarketFee()
+        return self.contract.getPublishingMarketFee()
 
     @enforce_types
     def set_publishing_market_fee(
@@ -397,31 +396,31 @@ def set_publishing_market_fee(
 
     @enforce_types
     def get_id(self) -> int:
-        return self.contract.caller.getId()
+        return self.contract.getId()
 
     @enforce_types
     def token_name(self) -> str:
-        return self.contract.caller.name()
+        return self.contract.name()
 
     @enforce_types
     def symbol(self) -> str:
-        return self.contract.caller.symbol()
+        return self.contract.symbol()
 
     @enforce_types
     def get_erc721_address(self) -> str:
-        return self.contract.caller.getERC721Address()
+        return self.contract.getERC721Address()
 
     @enforce_types
     def decimals(self) -> int:
-        return self.contract.caller.decimals()
+        return self.contract.decimals()
 
     @enforce_types
     def cap(self) -> int:
-        return self.contract.caller.cap()
+        return self.contract.cap()
 
     @enforce_types
     def is_initialized(self) -> bool:
-        return self.contract.caller.isInitialized()
+        return self.contract.isInitialized()
 
     @enforce_types
     def permit(
@@ -451,31 +450,31 @@ def permit(
 
     @enforce_types
     def get_address_length(self, array: List[str]) -> int:
-        return self.contract.caller.getAddressLength(array)
+        return self.contract.getAddressLength(array)
 
     @enforce_types
     def get_uint_length(self, array: List[int]) -> int:
-        return self.contract.caller.getUintLength(array)
+        return self.contract.getUintLength(array)
 
     @enforce_types
     def get_bytes_length(self, array: List[bytes]) -> int:
-        return self.contract.caller.getBytesLength(array)
+        return self.contract.getBytesLength(array)
 
     @enforce_types
     def get_payment_collector(self) -> str:
-        return self.contract.caller.getPaymentCollector()
+        return self.contract.getPaymentCollector()
 
     @enforce_types
     def get_fixed_rates(self) -> List[Tuple[str, bytes]]:
-        return self.contract.caller.getFixedRates()
+        return self.contract.getFixedRates()
 
     @enforce_types
     def get_dispensers(self) -> List[str]:
-        return self.contract.caller.getDispensers()
+        return self.contract.getDispensers()
 
     @enforce_types
     def balanceOf(self, account: str) -> int:
-        return self.contract.caller.balanceOf(account)
+        return self.contract.balanceOf(account)
 
     @enforce_types
     def withdraw(self, from_wallet: Wallet):
@@ -483,17 +482,15 @@ def withdraw(self, from_wallet: Wallet):
 
     @enforce_types
     def get_permissions(self, user: str) -> list:
-        return self.contract.caller.getPermissions(
-            ContractBase.to_checksum_address(user)
-        )
+        return self.contract.getPermissions(ContractBase.to_checksum_address(user))
 
     @enforce_types
     def permissions(self, user: str) -> list:
-        return self.contract.caller.permissions(ContractBase.to_checksum_address(user))
+        return self.contract.permissions(ContractBase.to_checksum_address(user))
 
     @enforce_types
     def get_total_supply(self) -> int:
-        return self.contract.caller.totalSupply()
+        return self.contract.totalSupply()
 
     @enforce_types
     def get_start_order_logs(
@@ -501,7 +498,6 @@ def get_start_order_logs(
         consumer_address: Optional[str] = None,
         from_block: Optional[int] = 0,
         to_block: Optional[int] = "latest",
-        from_all_tokens: bool = False,
     ) -> Tuple:
         topic0 = self.get_event_signature(self.EVENT_ORDER_STARTED)
         topics = [topic0]
@@ -516,7 +512,6 @@ def get_start_order_logs(
             argument_filters=argument_filters,
             fromBlock=from_block,
             toBlock=to_block,
-            from_all_addresses=from_all_tokens,
         )
         return logs
 
diff --git a/ocean_lib/models/datatoken_enterprise.py b/ocean_lib/models/datatoken_enterprise.py
index 92d0f181e..3989deb1d 100644
--- a/ocean_lib/models/datatoken_enterprise.py
+++ b/ocean_lib/models/datatoken_enterprise.py
@@ -14,7 +14,6 @@
 class DatatokenEnterprise(Datatoken):
     CONTRACT_NAME = "ERC20TemplateEnterprise"
 
-    @enforce_types
     def buy_from_fre_and_order(
         self,
         consumer: str,
@@ -31,7 +30,7 @@ def buy_from_fre_and_order(
         consume_market_order_fee_token: str,
         consume_market_order_fee_amount: int,
         exchange_contract: str,
-        exchange_id: bytes,
+        exchange_id: str,
         max_base_token_amount: int,
         consume_market_swap_fee_amount: int,
         consume_market_swap_fee_address: str,
diff --git a/ocean_lib/models/dispenser.py b/ocean_lib/models/dispenser.py
index c1fc239df..4c0879507 100644
--- a/ocean_lib/models/dispenser.py
+++ b/ocean_lib/models/dispenser.py
@@ -45,7 +45,7 @@ def event_OwnerWithdrawed(self):
 
     @enforce_types
     def status(self, datatoken: str) -> tuple:
-        return self.contract.caller.status(datatoken)
+        return self.contract.status(datatoken)
 
     @enforce_types
     def activate(
diff --git a/ocean_lib/models/erc721_token_factory_base.py b/ocean_lib/models/erc721_token_factory_base.py
index 793fa5a03..33c86ba3e 100644
--- a/ocean_lib/models/erc721_token_factory_base.py
+++ b/ocean_lib/models/erc721_token_factory_base.py
@@ -12,28 +12,28 @@
 class ERC721TokenFactoryBase(ABC, ContractBase):
     @enforce_types
     def get_current_token_count(self) -> int:
-        return self.contract.caller.getCurrentTokenCount()
+        return self.contract.getCurrentTokenCount()
 
     @enforce_types
     def get_token_template(self, index: int) -> int:
-        return self.contract.caller.getTokenTemplate(index)
+        return self.contract.getTokenTemplate(index)
 
     @enforce_types
     def add_token_template(self, template_address: str) -> int:
-        return self.contract.caller.addTokenTemplate(template_address)
+        return self.contract.addTokenTemplate(template_address)
 
     @enforce_types
     def disable_token_template(self, index: int) -> int:
-        return self.contract.caller.disableTokenTemplate(index)
+        return self.contract.disableTokenTemplate(index)
 
     @enforce_types
     def reactivate_token_template(self, index: int) -> int:
-        return self.contract.caller.reactivateTokenTemplate(index)
+        return self.contract.reactivateTokenTemplate(index)
 
     @enforce_types
     def get_current_template_count(self) -> int:
-        return self.contract.caller.getCurrentTemplateCount()
+        return self.contract.getCurrentTemplateCount()
 
     @enforce_types
     def is_contract(self, account_address: str) -> int:
-        return self.contract.caller.isContract(account_address)
+        return self.contract.isContract(account_address)
diff --git a/ocean_lib/models/factory_router.py b/ocean_lib/models/factory_router.py
index 8cbc44457..18b9c9705 100644
--- a/ocean_lib/models/factory_router.py
+++ b/ocean_lib/models/factory_router.py
@@ -23,56 +23,56 @@ def event_NewPool(self):
     @enforce_types
     def router_owner(self) -> str:
         """Gets a router owner address."""
-        return self.contract.caller.routerOwner()
+        return self.contract.routerOwner()
 
     @enforce_types
     def factory(self) -> str:
-        return self.contract.caller.factory()
+        return self.contract.factory()
 
     @enforce_types
     def swap_ocean_fee(self) -> int:
-        return self.contract.caller.swapOceanFee()
+        return self.contract.swapOceanFee()
 
     @enforce_types
     def swap_non_ocean_fee(self) -> int:
-        return self.contract.caller.swapNonOceanFee()
+        return self.contract.swapNonOceanFee()
 
     @enforce_types
     def is_approved_token(self, address: str) -> bool:
-        return self.contract.caller.isApprovedToken(address)
+        return self.contract.isApprovedToken(address)
 
     @enforce_types
     def is_ss_contract(self, address: str):
-        return self.contract.caller.isSSContract(address)
+        return self.contract.isSSContract(address)
 
     @enforce_types
     def is_fixed_rate_contract(self, address: str) -> bool:
-        return self.contract.caller.isFixedRateContract(address)
+        return self.contract.isFixedRateContract(address)
 
     @enforce_types
     def is_dispenser_contract(self, address: str) -> bool:
-        return self.contract.caller.isDispenserContract(address)
+        return self.contract.isDispenserContract(address)
 
     @enforce_types
     def get_opc_collector(self) -> str:
-        return self.contract.caller.getOPCCollector()
+        return self.contract.getOPCCollector()
 
     @enforce_types
     def get_opc_fee(self, base_token: str) -> int:
-        return self.contract.caller.getOPCFee(base_token)
+        return self.contract.getOPCFee(base_token)
 
     @enforce_types
     def get_opc_fees(self) -> Tuple[int, int]:
         """Gets OP Community Fees for approved tokens and non approved tokens"""
-        return self.contract.caller.getOPCFees()
+        return self.contract.getOPCFees()
 
     @enforce_types
     def get_opc_consume_fee(self) -> int:
-        return self.contract.caller.getOPCConsumeFee()
+        return self.contract.getOPCConsumeFee()
 
     @enforce_types
     def get_opc_provider_fee(self) -> int:
-        return self.contract.caller.getOPCProviderFee()
+        return self.contract.getOPCProviderFee()
 
     @enforce_types
     def stake_batch(
diff --git a/ocean_lib/models/fixed_rate_exchange.py b/ocean_lib/models/fixed_rate_exchange.py
index 0b846396a..4be01f6c8 100644
--- a/ocean_lib/models/fixed_rate_exchange.py
+++ b/ocean_lib/models/fixed_rate_exchange.py
@@ -101,49 +101,45 @@ def event_MarketFeeCollected(self):
 
     @enforce_types
     def router(self) -> str:
-        return self.contract.caller.router()
+        return self.contract.router()
 
     @enforce_types
     def get_opc_fee(self, base_token: str) -> int:
-        return self.contract.caller.getOPCFee(base_token)
+        return self.contract.getOPCFee(base_token)
 
     @enforce_types
-    def generate_exchange_id(self, base_token: str, datatoken: str) -> bytes:
-        return self.contract.caller.generateExchangeId(
+    def generate_exchange_id(self, base_token: str, datatoken: str) -> str:
+        return self.contract.generateExchangeId(
             ContractBase.to_checksum_address(base_token),
             ContractBase.to_checksum_address(datatoken),
         )
 
-    @enforce_types
-    def get_base_token_out_price(self, exchange_id: bytes, dt_amount: int) -> int:
-        return self.contract.caller.getBaseTokenOutPrice(exchange_id, dt_amount)
+    def get_base_token_out_price(self, exchange_id: str, dt_amount: int) -> int:
+        return self.contract.getBaseTokenOutPrice(exchange_id, dt_amount)
 
-    @enforce_types
     def calc_base_in_given_out_dt(
         self,
-        exchange_id: bytes,
+        exchange_id: str,
         datatoken_amount: int,
         consume_market_swap_fee_amount: int,
     ) -> tuple:
-        return self.contract.caller.calcBaseInGivenOutDT(
+        return self.contract.calcBaseInGivenOutDT(
             exchange_id, datatoken_amount, consume_market_swap_fee_amount
         )
 
-    @enforce_types
     def calc_base_out_given_in_dt(
         self,
-        exchange_id: bytes,
+        exchange_id: str,
         datatoken_amount: int,
         consume_market_swap_fee_amount: int,
     ) -> tuple:
-        return self.contract.caller.calcBaseOutGivenInDT(
+        return self.contract.calcBaseOutGivenInDT(
             exchange_id, datatoken_amount, consume_market_swap_fee_amount
         )
 
-    @enforce_types
     def buy_dt(
         self,
-        exchange_id: bytes,
+        exchange_id: str,
         datatoken_amount: int,
         max_base_token_amount: int,
         consume_market_swap_fee_address: str,
@@ -162,10 +158,9 @@ def buy_dt(
             from_wallet,
         )
 
-    @enforce_types
     def sell_dt(
         self,
-        exchange_id: bytes,
+        exchange_id: str,
         datatoken_amount: int,
         min_base_token_amount: int,
         consume_market_swap_fee_address: str,
@@ -184,8 +179,7 @@ def sell_dt(
             from_wallet,
         )
 
-    @enforce_types
-    def collect_bt(self, exchange_id: bytes, amount: int, from_wallet: Wallet) -> str:
+    def collect_bt(self, exchange_id: str, amount: int, from_wallet: Wallet) -> str:
         return self.send_transaction(
             "collectBT",
             (
@@ -195,8 +189,7 @@ def collect_bt(self, exchange_id: bytes, amount: int, from_wallet: Wallet) -> st
             from_wallet,
         )
 
-    @enforce_types
-    def collect_dt(self, exchange_id: bytes, amount: int, from_wallet: Wallet) -> str:
+    def collect_dt(self, exchange_id: str, amount: int, from_wallet: Wallet) -> str:
         return self.send_transaction(
             "collectDT",
             (
@@ -206,18 +199,15 @@ def collect_dt(self, exchange_id: bytes, amount: int, from_wallet: Wallet) -> st
             from_wallet,
         )
 
-    @enforce_types
-    def collect_market_fee(self, exchange_id: bytes, from_wallet: Wallet) -> str:
+    def collect_market_fee(self, exchange_id: str, from_wallet: Wallet) -> str:
         return self.send_transaction("collectMarketFee", (exchange_id,), from_wallet)
 
-    @enforce_types
-    def collect_ocean_fee(self, exchange_id: bytes, from_wallet: Wallet) -> str:
+    def collect_ocean_fee(self, exchange_id: str, from_wallet: Wallet) -> str:
         return self.send_transaction("collectOceanFee", (exchange_id,), from_wallet)
 
-    @enforce_types
     def update_market_fee_collector(
         self,
-        exchange_id: bytes,
+        exchange_id: str,
         publish_market_swap_fee_collector: str,
         from_wallet: Wallet,
     ) -> str:
@@ -230,10 +220,9 @@ def update_market_fee_collector(
             from_wallet,
         )
 
-    @enforce_types
     def update_market_fee(
         self,
-        exchange_id: bytes,
+        exchange_id: str,
         publish_market_swap_fee_amount: int,
         from_wallet: Wallet,
     ) -> str:
@@ -243,28 +232,24 @@ def update_market_fee(
             from_wallet,
         )
 
-    @enforce_types
     def get_market_fee(
         self,
-        exchange_id: bytes,
+        exchange_id: str,
     ) -> int:
-        return self.contract.caller.getMarketFee(exchange_id)
+        return self.contract.getMarketFee(exchange_id)
 
     @enforce_types
     def get_number_of_exchanges(self) -> int:
-        return self.contract.caller.getNumberOfExchanges()
+        return self.contract.getNumberOfExchanges()
 
-    @enforce_types
-    def get_allowed_swapper(self, exchange_id: bytes) -> str:
-        return self.contract.caller.getAllowedSwapper(exchange_id)
+    def get_allowed_swapper(self, exchange_id: str) -> str:
+        return self.contract.getAllowedSwapper(exchange_id)
 
-    @enforce_types
-    def set_rate(self, exchange_id: bytes, new_rate: int, from_wallet: Wallet) -> str:
+    def set_rate(self, exchange_id: str, new_rate: int, from_wallet: Wallet) -> str:
         return self.send_transaction("setRate", (exchange_id, new_rate), from_wallet)
 
-    @enforce_types
     def set_allowed_swapper(
-        self, exchange_id: bytes, new_allowed_swapper: str, from_wallet: Wallet
+        self, exchange_id: str, new_allowed_swapper: str, from_wallet: Wallet
     ) -> str:
         return self.send_transaction(
             "setAllowedSwapper",
@@ -272,37 +257,30 @@ def set_allowed_swapper(
             from_wallet,
         )
 
-    @enforce_types
-    def toggle_exchange_state(self, exchange_id: bytes, from_wallet: Wallet) -> str:
+    def toggle_exchange_state(self, exchange_id: str, from_wallet: Wallet) -> str:
         return self.send_transaction("toggleExchangeState", (exchange_id,), from_wallet)
 
-    @enforce_types
-    def get_rate(self, exchange_id: bytes) -> int:
-        return self.contract.caller.getRate(exchange_id)
+    def get_rate(self, exchange_id: str) -> int:
+        return self.contract.getRate(exchange_id)
 
-    @enforce_types
-    def get_dt_supply(self, exchange_id: bytes) -> int:
-        return self.contract.caller.getDTSupply(exchange_id)
+    def get_dt_supply(self, exchange_id: str) -> int:
+        return self.contract.getDTSupply(exchange_id)
 
-    @enforce_types
-    def get_bt_supply(self, exchange_id: bytes) -> int:
-        return self.contract.caller.getBTSupply(exchange_id)
+    def get_bt_supply(self, exchange_id: str) -> int:
+        return self.contract.getBTSupply(exchange_id)
 
-    @enforce_types
-    def get_exchange(self, exchange_id: bytes) -> tuple:
-        return self.contract.caller.getExchange(exchange_id)
+    def get_exchange(self, exchange_id: str) -> tuple:
+        return self.contract.getExchange(exchange_id)
 
-    @enforce_types
-    def get_fees_info(self, exchange_id: bytes) -> tuple:
-        return self.contract.caller.getFeesInfo(exchange_id)
+    def get_fees_info(self, exchange_id: str) -> tuple:
+        return self.contract.getFeesInfo(exchange_id)
 
     @enforce_types
-    def get_exchanges(self) -> List[bytes]:
-        return self.contract.caller.getExchanges()
+    def get_exchanges(self) -> List[str]:
+        return self.contract.getExchanges()
 
-    @enforce_types
-    def is_active(self, exchange_id: bytes) -> bool:
-        return self.contract.caller.isActive(exchange_id)
+    def is_active(self, exchange_id: str) -> bool:
+        return self.contract.isActive(exchange_id)
 
 
 class MockExchange(ContractBase):
diff --git a/ocean_lib/models/side_staking.py b/ocean_lib/models/side_staking.py
index 311955764..4e52c0bc8 100644
--- a/ocean_lib/models/side_staking.py
+++ b/ocean_lib/models/side_staking.py
@@ -13,31 +13,31 @@ class SideStaking(ContractBase):
 
     @enforce_types
     def get_datatoken_circulating_supply(self, datatoken: str) -> int:
-        return self.contract.caller.getDatatokenCirculatingSupply(datatoken)
+        return self.contract.getDatatokenCirculatingSupply(datatoken)
 
     @enforce_types
     def get_datatoken_current_circulating_supply(self, datatoken: str) -> int:
-        return self.contract.caller.getDatatokenCurrentCirculatingSupply(datatoken)
+        return self.contract.getDatatokenCurrentCirculatingSupply(datatoken)
 
     @enforce_types
     def get_publisher_address(self, datatoken: str) -> str:
-        return self.contract.caller.getPublisherAddress(datatoken)
+        return self.contract.getPublisherAddress(datatoken)
 
     @enforce_types
     def get_base_token_address(self, datatoken: str) -> str:
-        return self.contract.caller.getBaseTokenAddress(datatoken)
+        return self.contract.getBaseTokenAddress(datatoken)
 
     @enforce_types
     def get_pool_address(self, datatoken: str) -> str:
-        return self.contract.caller.getPoolAddress(datatoken)
+        return self.contract.getPoolAddress(datatoken)
 
     @enforce_types
     def get_base_token_balance(self, datatoken: str) -> int:
-        return self.contract.caller.getBaseTokenBalance(datatoken)
+        return self.contract.getBaseTokenBalance(datatoken)
 
     @enforce_types
     def get_datatoken_balance(self, datatoken: str) -> int:
-        return self.contract.caller.getDatatokenBalance(datatoken)
+        return self.contract.getDatatokenBalance(datatoken)
 
     @enforce_types
     def notify_finalize(
diff --git a/ocean_lib/ocean/ocean.py b/ocean_lib/ocean/ocean.py
index 198ea44d9..a71d05e5a 100644
--- a/ocean_lib/ocean/ocean.py
+++ b/ocean_lib/ocean/ocean.py
@@ -9,6 +9,7 @@
 from decimal import Decimal
 from typing import Dict, List, Optional, Type, Union
 
+from brownie.network.transaction import TransactionReceipt
 from enforce_typing import enforce_types
 from web3.datastructures import AttributeDict
 
@@ -214,17 +215,13 @@ def get_nft_factory(self, nft_factory_address: str = "") -> DataNFTFactoryContra
         return DataNFTFactoryContract(self.web3, nft_factory_address)
 
     @enforce_types
-    def get_user_orders(
-        self, address: str, datatoken: Optional[str] = None
-    ) -> List[AttributeDict]:
+    def get_user_orders(self, address: str, datatoken: str) -> List[AttributeDict]:
         """
         :return: List of orders `[Order]`
         """
         dt = Datatoken(self.web3, datatoken)
         _orders = []
-        for log in dt.get_start_order_logs(
-            address, from_all_tokens=not bool(datatoken)
-        ):
+        for log in dt.get_start_order_logs(address):
             a = dict(log.args.items())
             a["amount"] = int(log.args.amount)
             a["address"] = log.address
@@ -277,14 +274,13 @@ def create_fixed_rate(
             with_mint=0,
             from_wallet=from_wallet,
         )
-        tx_receipt = self.web3.eth.wait_for_transaction_receipt(tx)
-        fixed_rate_event = datatoken.get_event_log(
-            DataNFTFactoryContract.EVENT_NEW_FIXED_RATE,
-            tx_receipt.blockNumber,
-            self.web3.eth.block_number,
-            None,
-        )
-        exchange_id = fixed_rate_event[0].args.exchangeId
+
+        receipt = TransactionReceipt(tx)
+        fixed_price_address == receipt.events[datatoken.EVENT_NEW_FIXED_RATE][
+            "exchangeContract"
+        ]
+
+        exchange_id = receipt.events[datatoken.EVENT_NEW_FIXED_RATE]["exchangeId"]
 
         return exchange_id
 
diff --git a/ocean_lib/ocean/ocean_assets.py b/ocean_lib/ocean/ocean_assets.py
index dbab86730..0018afaf5 100644
--- a/ocean_lib/ocean/ocean_assets.py
+++ b/ocean_lib/ocean/ocean_assets.py
@@ -12,6 +12,7 @@
 from datetime import datetime
 from typing import Any, Dict, List, Optional, Tuple, Type, Union
 
+from brownie.network.transaction import TransactionReceipt
 from enforce_typing import enforce_types
 from web3 import Web3
 
@@ -22,7 +23,7 @@
 from ocean_lib.assets.asset_downloader import download_asset_files, is_consumable
 from ocean_lib.data_provider.data_encryptor import DataEncryptor
 from ocean_lib.data_provider.data_service_provider import DataServiceProvider
-from ocean_lib.exceptions import AquariusError, ContractNotFound, InsufficientBalance
+from ocean_lib.exceptions import AquariusError, InsufficientBalance
 from ocean_lib.models.compute_input import ComputeInput
 from ocean_lib.models.data_nft import DataNFT
 from ocean_lib.models.data_nft_factory import DataNFTFactoryContract
@@ -39,7 +40,7 @@
 )
 from ocean_lib.utils.utilities import create_checksum
 from ocean_lib.web3_internal.constants import ZERO_ADDRESS
-from ocean_lib.web3_internal.currency import pretty_ether_and_wei, to_wei, from_wei
+from ocean_lib.web3_internal.currency import from_wei, pretty_ether_and_wei, to_wei
 from ocean_lib.web3_internal.wallet import Wallet
 
 logger = logging.getLogger("ocean")
@@ -159,16 +160,13 @@ def deploy_datatoken(
         )
         assert tx_result, "Failed to create ERC20 token."
 
-        tx_receipt = self._web3.eth.wait_for_transaction_receipt(tx_result)
-        registered_token_event = data_nft_factory.get_event_log(
-            DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-            tx_receipt.blockNumber,
-            self._web3.eth.block_number,
-            None,
-        )
+        receipt = TransactionReceipt(tx_result)
+        registered_token_event = receipt.events[
+            DataNFTFactoryContract.EVENT_TOKEN_CREATED
+        ]
         assert registered_token_event, "Cannot find TokenCreated event."
 
-        return registered_token_event[0].args.newTokenAddress
+        return registered_token_event["newTokenAddress"]
 
     @enforce_types
     def find_service_by_datatoken(self, datatoken: str, services: list) -> str:
@@ -184,7 +182,7 @@ def build_datatokens_list(self, services: list, deployed_datatokens: list) -> li
             datatokens = datatokens + [
                 {
                     "address": datatoken.address,
-                    "name": datatoken.contract.caller.name(),
+                    "name": datatoken.contract.name(),
                     "symbol": datatoken.symbol(),
                     "serviceId": service.id,
                 }
@@ -446,14 +444,10 @@ def create(
                 owner=owner,
                 from_wallet=publisher_wallet,
             )
-            tx_receipt = self._web3.eth.wait_for_transaction_receipt(tx_id)
-            registered_event = data_nft_factory.get_event_log(
-                DataNFTFactoryContract.EVENT_NFT_CREATED,
-                tx_receipt.blockNumber,
-                self._web3.eth.block_number,
-                None,
-            )
-            data_nft_address = registered_event[0].args.newTokenAddress
+            receipt = TransactionReceipt(tx_id)
+
+            registered_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+            data_nft_address = registered_event["newTokenAddress"]
             data_nft = DataNFT(self._web3, data_nft_address)
             if not data_nft:
                 logger.warning("Creating new NFT failed.")
@@ -461,12 +455,6 @@ def create(
             logger.info(
                 f"Successfully created NFT with address " f"{data_nft.address}."
             )
-        else:
-            # verify nft address
-            if not data_nft_factory.verify_nft(data_nft_address):
-                raise ContractNotFound(
-                    f"NFT address {data_nft_address} is not found in the DataNFTFactory events."
-                )
 
         assert (
             data_nft_address
@@ -599,7 +587,9 @@ def create(
         data_nft.set_metadata(
             metadata_state=0,
             metadata_decryptor_url=provider_uri,
-            metadata_decryptor_address=publisher_wallet.address,
+            metadata_decryptor_address=Web3.toChecksumAddress(
+                publisher_wallet.address.lower()
+            ).encode("utf-8"),
             flags=flags,
             data=document,
             data_hash=ddo_hash,
@@ -642,18 +632,8 @@ def update(
         if not provider_uri:
             provider_uri = DataServiceProvider.get_url(self._config_dict)
 
-        address = get_address_of_type(
-            self._config_dict, DataNFTFactoryContract.CONTRACT_NAME
-        )
-        data_nft_factory = DataNFTFactoryContract(self._web3, address)
         data_nft_address = asset.nft_address
 
-        # Verify nft address
-        if not data_nft_factory.verify_nft(data_nft_address):
-            raise ContractNotFound(
-                f"NFT address {data_nft_address} is not found in the DataNFTFactory events."
-            )
-
         assert (
             data_nft_address
         ), "nft_address is required for publishing a dataset asset."
@@ -685,7 +665,9 @@ def update(
         tx_result = data_nft.set_metadata(
             metadata_state=0,
             metadata_decryptor_url=provider_uri,
-            metadata_decryptor_address=publisher_wallet.address,
+            metadata_decryptor_address=Web3.toChecksumAddress(
+                publisher_wallet.address.lower()
+            ).encode("utf-8"),
             flags=flags,
             data=document,
             data_hash=ddo_hash,
@@ -758,7 +740,7 @@ def download_file(self, asset_did: str, wallet: Wallet) -> str:
 
             # catch key failure modes
             st = dispenser.status(datatoken.address)
-            active, disp_bal, allowedSwapper = st[0], from_wei(st[5]), st[6]
+            active, allowedSwapper = st[0], st[6]
             if not active:
                 raise ValueError("No active dispenser for datatoken")
             if allowedSwapper not in [ZERO_ADDRESS, wallet.address]:
diff --git a/ocean_lib/web3_internal/contract_base.py b/ocean_lib/web3_internal/contract_base.py
index c8e511da3..bfa7f53f4 100644
--- a/ocean_lib/web3_internal/contract_base.py
+++ b/ocean_lib/web3_internal/contract_base.py
@@ -5,9 +5,12 @@
 
 """All contracts inherit from `ContractBase` class."""
 import logging
+import time
 from typing import Any, Callable, Dict, List, Optional, Tuple, Union
 
 import requests
+from brownie import network
+from brownie.network.transaction import TransactionReceipt
 from enforce_typing import enforce_types
 from eth_typing import ChecksumAddress
 from hexbytes import HexBytes
@@ -18,13 +21,13 @@
 from web3.datastructures import AttributeDict
 from web3.exceptions import MismatchedABI, ValidationError
 
+from ocean_lib.example_config import NETWORK_IDS
 from ocean_lib.web3_internal.contract_utils import (
     get_contract_definition,
     load_contract,
 )
 from ocean_lib.web3_internal.utils import get_gas_price
 from ocean_lib.web3_internal.wallet import Wallet
-from ocean_lib.web3_internal.web3_overrides.contract import CustomContractFunction
 
 logger = logging.getLogger(__name__)
 
@@ -44,12 +47,31 @@ def __init__(self, web3: Web3, address: Optional[str]) -> None:
         ), "contract_name property needs to be implemented in subclasses."
 
         self.web3 = web3
+
+        self.network = NETWORK_IDS[web3.eth.chain_id]
+        self.connect_to_network()
+
         self.contract = load_contract(self.web3, self.name, address)
         assert not address or (
             self.contract.address.lower() == address.lower()
             and self.address.lower() == address.lower()
         )
-        assert self.contract.caller is not None
+
+    def connect_to_network(self):
+        if network.show_active() != self.network:
+            if network.is_connected():
+                network.disconnect()
+
+            network.connect(self.network)
+
+    def __getattribute__(self, attr):
+        method = object.__getattribute__(self, attr)
+        if not method:
+            raise Exception("Method %s not implemented" % attr)
+        if callable(method) and not method.__name__ == "connect_to_network":
+            self.connect_to_network()
+
+        return method
 
     @enforce_types
     def __str__(self) -> str:
@@ -175,13 +197,11 @@ def send_transaction(
         :param transact: dict arguments for the transaction such as from, gas, etc.
         :return: hex str transaction hash
         """
-        contract_fn = getattr(self.contract.functions, fn_name)(*fn_args)
-        contract_function = CustomContractFunction(contract_fn)
-
         _transact = {
             "from": ContractBase.to_checksum_address(from_wallet.address),
             "account_key": from_wallet.key,
-            "chainId": self.web3.eth.chain_id,
+            # "nonce": self.web3.eth.getTransactionCount(from_wallet.address)
+            # 'nonce': Wallet._get_nonce(self.web3, from_wallet.address)
         }
 
         gas_tx = get_gas_price(web3_object=self.web3, tx=_transact)
@@ -190,11 +210,33 @@ def send_transaction(
         if transact:
             _transact.update(transact)
 
-        return contract_function.transact(
-            _transact,
-            from_wallet.block_confirmations.value,
-            from_wallet.transaction_timeout.value,
-        ).hex()
+        receipt = getattr(self.contract, fn_name)(*fn_args, _transact)
+        receipt.wait(from_wallet.block_confirmations.value)
+
+        txid = receipt.txid
+
+        return self.wait_for_transaction_status(from_wallet, txid)
+
+    @enforce_types
+    def wait_for_transaction_status(self, wallet: Wallet, txid: str):
+        receipt = TransactionReceipt(txid)
+
+        if wallet.transaction_timeout.value == 0:
+            return txid
+
+        start = time.time()
+        receipt = TransactionReceipt(txid)
+        if receipt.status.value == 1:
+            return txid
+
+        while time.time() - start > wallet.transaction_timeout.value:
+            receipt = TransactionReceipt(txid)
+            if receipt.status.value == 1:
+                return txid
+
+            time.sleep(0.2)
+
+        raise Exception("Transaction Timeout reached without successful status.")
 
     @enforce_types
     def get_event_argument_names(self, event_name: str) -> Tuple:
@@ -364,7 +406,6 @@ def getLogs(
         fromBlock: Optional[int] = None,
         toBlock: Optional[int] = None,
         blockHash: Optional[HexBytes] = None,
-        from_all_addresses: Optional[bool] = False,
     ):
         """Get events for this contract instance using eth_getLogs API.
 
@@ -413,8 +454,6 @@ def getLogs(
         :param toBlock: block number or "latest". Defaults to "latest"
         :param blockHash: block hash. blockHash cannot be set at the
           same time as fromBlock or toBlock
-        :param from_all_addresses: True = return logs from all addresses
-          False = return logs originating from event.address
         :yield: Tuple of :class:`AttributeDict` instances
         """
 
@@ -438,7 +477,7 @@ def getLogs(
 
         # Construct JSON-RPC raw filter presentation based on human readable Python descriptions
         # Namely, convert event names to their keccak signatures
-        address = event.address if not from_all_addresses else None
+        address = event.address
         _, event_filter_params = construct_event_filter_params(
             abi,
             event.web3.codec,
diff --git a/ocean_lib/web3_internal/contract_utils.py b/ocean_lib/web3_internal/contract_utils.py
index 043ef5420..ed5b44c55 100644
--- a/ocean_lib/web3_internal/contract_utils.py
+++ b/ocean_lib/web3_internal/contract_utils.py
@@ -11,9 +11,9 @@
 
 from jsonsempai import magic  # noqa: F401
 from addresses import address as contract_addresses  # noqa: F401
+from brownie import Contract
 from enforce_typing import enforce_types
 from web3 import WebsocketProvider
-from web3.contract import Contract
 from web3.exceptions import ExtraDataLengthError
 from web3.main import Web3
 from web3.middleware import geth_poa_middleware
@@ -39,9 +39,8 @@ def load_contract(web3: Web3, contract_name: str, address: Optional[str]) -> Con
     """Loads a contract using its name and address."""
     contract_definition = get_contract_definition(contract_name)
     abi = contract_definition["abi"]
-    bytecode = contract_definition["bytecode"]
-    contract = web3.eth.contract(address=address, abi=abi, bytecode=bytecode)
-    return contract
+
+    return Contract.from_abi(contract_name, address, abi)
 
 
 @enforce_types
diff --git a/ocean_lib/web3_internal/wallet.py b/ocean_lib/web3_internal/wallet.py
index 9981dc5da..b82f10ee0 100644
--- a/ocean_lib/web3_internal/wallet.py
+++ b/ocean_lib/web3_internal/wallet.py
@@ -3,20 +3,21 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 import logging
-import os
 from typing import Dict, Optional, Union
 
+from brownie import network
 from enforce_typing import enforce_types
 from eth_account.datastructures import SignedMessage
 from eth_account.messages import SignableMessage
 from hexbytes.main import HexBytes
 from web3.main import Web3
 
+from ocean_lib.example_config import NETWORK_IDS
 from ocean_lib.integer import Integer
 from ocean_lib.web3_internal.utils import (
+    get_gas_price,
     private_key_to_address,
     private_key_to_public_key,
-    get_gas_price,
 )
 
 logger = logging.getLogger(__name__)
@@ -74,6 +75,20 @@ def __init__(
         self.private_key = private_key
         self._address = private_key_to_address(self.private_key)
 
+        self.network = NETWORK_IDS[web3.eth.chain_id]
+        self.add_to_network()
+
+    def add_to_network(self):
+        previously_active = network.show_active()
+        if previously_active != self.network:
+            if network.is_connected():
+                network.disconnect()
+
+            network.connect(self.network)
+            network.accounts.add(self.private_key)
+        else:
+            network.accounts.add(self.private_key)
+
     @property
     @enforce_types
     def address(self) -> str:
diff --git a/ocean_lib/web3_internal/web3_overrides/contract.py b/ocean_lib/web3_internal/web3_overrides/contract.py
deleted file mode 100644
index a016b80cd..000000000
--- a/ocean_lib/web3_internal/web3_overrides/contract.py
+++ /dev/null
@@ -1,150 +0,0 @@
-#
-# Copyright 2022 Ocean Protocol Foundation
-# SPDX-License-Identifier: Apache-2.0
-#
-import logging
-from typing import Any, Dict, Optional
-
-from enforce_typing import enforce_types
-from hexbytes.main import HexBytes
-from web3.contract import prepare_transaction
-from web3.main import Web3
-
-from ocean_lib.integer import Integer
-from ocean_lib.web3_internal.constants import BLOCK_NUMBER_POLL_INTERVAL
-from ocean_lib.web3_internal.utils import get_chain_id
-from ocean_lib.web3_internal.wallet import Wallet
-from ocean_lib.web3_internal.web3_overrides.utils import (
-    wait_for_transaction_receipt_and_block_confirmations,
-)
-
-
-class CustomContractFunction:
-    @enforce_types
-    def __init__(self, contract_function):
-        """Initializes CustomContractFunction."""
-        self._contract_function = contract_function
-
-    @enforce_types
-    def transact(
-        self,
-        transaction: Dict[str, Any],
-        block_confirmations: int,
-        transaction_timeout: int,
-    ) -> HexBytes:
-        """Customize calling smart contract transaction functions.
-        This function is copied from web3 ContractFunction with a few changes:
-
-        1. Don't set `from` using the web3.eth.default account
-        2. Add chainId if `chainId` is not in the `transaction` dict
-        3. Estimate gas limit if `gas` is not in the `transaction` dict
-
-        :param transaction: dict which has the required transaction arguments
-        :return: hex str transaction hash
-        """
-        transact_transaction = dict(**transaction)
-
-        if "data" in transact_transaction:
-            raise ValueError("Cannot set data in transact transaction")
-
-        cf = self._contract_function
-        if cf.address is not None:
-            transact_transaction.setdefault("to", cf.address)
-
-        if "to" not in transact_transaction:
-            if isinstance(self, type):
-                raise ValueError(
-                    "When using `Contract.transact` from a contract factory you "
-                    "must provide a `to` address with the transaction"
-                )
-            else:
-                raise ValueError(
-                    "Please ensure that this contract instance has an address."
-                )
-        if "chainId" not in transact_transaction:
-            transact_transaction["chainId"] = cf.web3.eth.chain_id
-
-        if "gas" not in transact_transaction:
-            tx = transaction.copy()
-            if "account_key" in tx:
-                tx.pop("account_key")
-            gas = cf.estimateGas(tx)
-            transact_transaction["gas"] = gas
-
-        return transact_with_contract_function(
-            cf.address,
-            cf.web3,
-            block_confirmations,
-            transaction_timeout,
-            cf.function_identifier,
-            transact_transaction,
-            cf.contract_abi,
-            cf.abi,
-            *cf.args,
-            **cf.kwargs,
-        )
-
-
-@enforce_types
-def transact_with_contract_function(
-    address: str,
-    web3: Web3,
-    block_confirmations: int,
-    transaction_timeout: int,
-    function_name: Optional[str] = None,
-    transaction: Optional[dict] = None,
-    contract_abi: Optional[list] = None,
-    fn_abi: Optional[dict] = None,
-    *args,
-    **kwargs,
-) -> HexBytes:
-    """
-    Helper function for interacting with a contract function by sending a
-    transaction. This is copied from web3 `transact_with_contract_function`
-    with a few additions:
-        1. If `account_key` in transaction dict, sign and send transaction via
-           `web3.eth.send_raw_transaction`
-        2. Otherwise, send via `web3.eth.send_transaction`
-        3. Retry failed transactions (when txn_receipt.status indicates failure)
-        4. Network-dependent timeout
-    """
-    transact_transaction = prepare_transaction(
-        address,
-        web3,
-        fn_identifier=function_name,
-        contract_abi=contract_abi,
-        transaction=transaction,
-        fn_abi=fn_abi,
-        fn_args=args,
-        fn_kwargs=kwargs,
-    )
-
-    account_key = None
-    if transaction and "account_key" in transaction:
-        account_key = transaction["account_key"]
-        transact_transaction.pop("account_key")
-
-    if account_key:
-        raw_tx = Wallet(
-            web3,
-            private_key=account_key,
-            block_confirmations=Integer(block_confirmations),
-            transaction_timeout=Integer(transaction_timeout),
-        ).sign_tx(transact_transaction)
-        logging.debug(
-            f"sending raw tx: function: {function_name}, tx hash: {raw_tx.hex()}"
-        )
-        txn_hash = web3.eth.send_raw_transaction(raw_tx)
-    else:
-        txn_hash = web3.eth.send_transaction(transact_transaction)
-
-    chain_id = get_chain_id(web3)
-    block_number_poll_interval = BLOCK_NUMBER_POLL_INTERVAL[chain_id]
-    wait_for_transaction_receipt_and_block_confirmations(
-        web3,
-        txn_hash,
-        block_confirmations,
-        block_number_poll_interval,
-        transaction_timeout,
-    )
-    return txn_hash
diff --git a/setup.py b/setup.py
index af8174881..b17b7f4a2 100644
--- a/setup.py
+++ b/setup.py
@@ -28,12 +28,12 @@
     "pycryptodomex",
     "tqdm",
     "pytz",
-    "web3==5.28.0",
     "cryptography==3.3.2",
     "scipy",
     "enforce-typing==1.0.0.post1",
     "json-sempai==0.4.0",
     "eciespy",
+    "eth-brownie==1.19.1",
     # web3 requires eth-abi, requests, and more,
     # so those will be installed too.
     # See https://github.com/ethereum/web3.py/blob/master/setup.py
@@ -61,9 +61,9 @@
     "pkginfo",
     "twine",
     "watchdog",
-    "flake8==3.9.2",
+    "flake8==5.0.4",
     "isort==5.10.1",
-    "black==22.3.0",
+    "black==22.6.0",  # need to keep this up to date to brownie
     "pre-commit",
     # for the following: maybe needed, maybe not
     "pytest",


Test patch:
diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml
index 79029839b..ea43a66a3 100644
--- a/.github/workflows/pytest.yml
+++ b/.github/workflows/pytest.yml
@@ -40,6 +40,8 @@ jobs:
           pip install -r requirements_dev.txt
       - name: Test with pytest
         run: |
+          mkdir ~/.brownie
+          cp network-config.sample ~/.brownie/network-config.yaml 
           mkcodes --github --output tests/generated-readmes/test_{name}.{ext} READMEs
           coverage run --source ocean_lib -m py.test -m "not slow"
           coverage report
diff --git a/conftest_ganache.py b/conftest_ganache.py
index d4bd8d2c8..d1d63b4be 100644
--- a/conftest_ganache.py
+++ b/conftest_ganache.py
@@ -3,6 +3,7 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 import pytest
+from brownie.network.transaction import TransactionReceipt
 
 from ocean_lib.aquarius.aquarius import Aquarius
 from ocean_lib.models.data_nft import DataNFT
@@ -176,7 +177,7 @@ def data_nft(web3, publisher_wallet, data_nft_factory):
 
 @pytest.fixture
 def datatoken(web3, data_nft, publisher_wallet, data_nft_factory):
-    tx_result = data_nft.create_erc20(
+    tx_id = data_nft.create_erc20(
         template_index=1,
         name="DT1",
         symbol="DT1Symbol",
@@ -188,23 +189,16 @@ def datatoken(web3, data_nft, publisher_wallet, data_nft_factory):
         bytess=[b""],
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx_result)
 
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-
-    dt_address = registered_event[0].args.newTokenAddress
+    receipt = TransactionReceipt(tx_id)
+    dt_address = receipt.events["TokenCreated"]["newTokenAddress"]
 
     return Datatoken(web3, dt_address)
 
 
 @pytest.fixture
 def datatoken_enterprise_token(web3, data_nft, publisher_wallet, data_nft_factory):
-    tx_result = data_nft.create_erc20(
+    tx_id = data_nft.create_erc20(
         template_index=2,
         name="DT1",
         symbol="DT1Symbol",
@@ -217,16 +211,9 @@ def datatoken_enterprise_token(web3, data_nft, publisher_wallet, data_nft_factor
         from_wallet=publisher_wallet,
         datatoken_cap=to_wei(100),
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx_result)
-
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
 
-    dt_address = registered_event[0].args.newTokenAddress
+    receipt = TransactionReceipt(tx_id)
+    dt_address = receipt.events["TokenCreated"]["newTokenAddress"]
 
     return DatatokenEnterprise(web3, dt_address)
 
diff --git a/ocean_lib/assets/test/test_asset_downloader.py b/ocean_lib/assets/test/test_asset_downloader.py
index b5c955c0e..debe6068f 100644
--- a/ocean_lib/assets/test/test_asset_downloader.py
+++ b/ocean_lib/assets/test/test_asset_downloader.py
@@ -216,7 +216,9 @@ def ocean_assets_download_destination_file_helper(
         from_wallet=publisher_wallet,
     )
 
-    orders = publisher_ocean_instance.get_user_orders(publisher_wallet.address)
+    orders = publisher_ocean_instance.get_user_orders(
+        publisher_wallet.address, datatoken.address
+    )
     assert datatoken.address in [order.address for order in orders]
     assert tx_id in [order.transactionHash.hex() for order in orders]
 
diff --git a/ocean_lib/models/test/test_data_nft.py b/ocean_lib/models/test/test_data_nft.py
index 294bb24fa..4f21c07a7 100644
--- a/ocean_lib/models/test/test_data_nft.py
+++ b/ocean_lib/models/test/test_data_nft.py
@@ -3,7 +3,8 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 import pytest
-from web3 import Web3, exceptions
+from brownie.network.transaction import TransactionReceipt
+from web3 import Web3
 
 from ocean_lib.models.data_nft import DataNFT, DataNFTPermissions
 from ocean_lib.models.data_nft_factory import DataNFTFactoryContract
@@ -47,7 +48,7 @@ def test_permissions(
     data_nft,
 ):
     """Tests permissions' functions."""
-    assert data_nft.contract.caller.name() == "NFT"
+    assert data_nft.contract.name() == "NFT"
     assert data_nft.symbol() == "NFTSYMBOL"
     assert data_nft.balance_of(account=publisher_addr) == 1
 
@@ -61,12 +62,8 @@ def test_permissions(
     assert data_nft.token_uri(1) == "https://oceanprotocol.com/nft/"
 
     # Tests failing clearing permissions
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="not NFTOwner"):
         data_nft.clean_permissions(from_wallet=another_consumer_wallet)
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: not NFTOwner"
-    )
 
     # Tests clearing permissions
     data_nft.add_to_create_erc20_list(
@@ -82,12 +79,8 @@ def test_permissions(
         DataNFTPermissions.DEPLOY_DATATOKEN
     ]
     # Still is not the NFT owner, cannot clear permissions then
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="not NFTOwner"):
         data_nft.clean_permissions(from_wallet=another_consumer_wallet)
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: not NFTOwner"
-    )
 
     data_nft.clean_permissions(from_wallet=publisher_wallet)
 
@@ -111,14 +104,10 @@ def test_permissions(
     assert not (
         data_nft.get_permissions(user=consumer_addr)[DataNFTPermissions.MANAGER]
     )
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="not NFTOwner"):
         data_nft.add_manager(
             manager_address=another_consumer_addr, from_wallet=consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: not NFTOwner"
-    )
     assert not (
         data_nft.get_permissions(user=another_consumer_addr)[DataNFTPermissions.MANAGER]
     )
@@ -134,14 +123,10 @@ def test_permissions(
     # Tests failing removing a manager if it has not the NFT owner role
     data_nft.add_manager(manager_address=consumer_addr, from_wallet=publisher_wallet)
     assert data_nft.get_permissions(user=consumer_addr)[DataNFTPermissions.MANAGER]
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="not NFTOwner"):
         data_nft.remove_manager(
             manager_address=publisher_addr, from_wallet=consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: not NFTOwner"
-    )
     assert data_nft.get_permissions(user=publisher_addr)[DataNFTPermissions.MANAGER]
 
     # Tests removing the NFT owner from the manager role
@@ -158,7 +143,7 @@ def test_permissions(
     assert not (
         data_nft.get_permissions(user=another_consumer_addr)[DataNFTPermissions.MANAGER]
     )
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT MANAGER"):
         data_nft.execute_call(
             operation=0,
             to=consumer_addr,
@@ -166,10 +151,6 @@ def test_permissions(
             data=web3.toHex(text="SomeData"),
             from_wallet=another_consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721RolesAddress: NOT MANAGER"
-    )
 
     # Tests calling execute_call with a manager role
     assert data_nft.get_permissions(user=publisher_addr)[DataNFTPermissions.MANAGER]
@@ -188,40 +169,31 @@ def test_permissions(
     )
     assert data_nft.get_permissions(user=consumer_addr)[DataNFTPermissions.STORE]
     data_nft.set_new_data(
-        key=web3.keccak(text="ARBITRARY_KEY"),
-        value=web3.toHex(text="SomeData"),
+        key=b"ARBITRARY_KEY",
+        value=b"SomeData",
         from_wallet=consumer_wallet,
     )
-    assert data_nft.get_data(key=web3.keccak(text="ARBITRARY_KEY")) == b"SomeData"
+    assert data_nft.get_data(key=b"ARBITRARY_KEY").hex() == b"SomeData".hex()
 
     # Tests failing setting new data if user has not STORE UPDATER role.
     assert not (
         data_nft.get_permissions(user=another_consumer_addr)[DataNFTPermissions.STORE]
     )
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT STORE UPDATER"):
         data_nft.set_new_data(
-            key=web3.keccak(text="ARBITRARY_KEY"),
-            value=web3.toHex(text="SomeData"),
+            key=b"ARBITRARY_KEY",
+            value=b"SomeData",
             from_wallet=another_consumer_wallet,
         )
 
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: NOT STORE UPDATER"
-    )
-
     # Tests failing setting ERC20 data
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT ERC20 Contract"):
         data_nft.set_data_erc20(
-            key=web3.keccak(text="FOO_KEY"),
-            value=web3.toHex(text="SomeData"),
+            key=b"FOO_KEY",
+            value=b"SomeData",
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: NOT ERC20 Contract"
-    )
-    assert data_nft.get_data(key=web3.keccak(text="FOO_KEY")) == b""
+    assert data_nft.get_data(key=b"FOO_KEY").hex() == b"".hex()
 
 
 def test_add_and_remove_permissions(
@@ -283,22 +255,15 @@ def test_success_update_metadata(
     tx = data_nft.set_metadata(
         metadata_state=1,
         metadata_decryptor_url="http://myprovider:8030",
-        metadata_decryptor_address="0x123",
+        metadata_decryptor_address=b"0x123",
         flags=web3.toBytes(hexstr=BLOB),
         data=web3.toBytes(hexstr=BLOB),
         data_hash=web3.toBytes(hexstr=BLOB),
         metadata_proofs=[],
         from_wallet=consumer_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    create_metadata_event = data_nft.get_event_log(
-        event_name="MetadataCreated",
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
-    assert create_metadata_event, "Cannot find MetadataCreated event."
-    assert create_metadata_event[0].args.decryptorUrl == "http://myprovider:8030"
+    receipt = TransactionReceipt(tx)
+    assert receipt.events["MetadataCreated"]["decryptorUrl"] == "http://myprovider:8030"
 
     metadata_info = data_nft.get_metadata()
     assert metadata_info[3]
@@ -307,22 +272,15 @@ def test_success_update_metadata(
     tx = data_nft.set_metadata(
         metadata_state=1,
         metadata_decryptor_url="http://foourl",
-        metadata_decryptor_address="0x123",
+        metadata_decryptor_address=b"0x123",
         flags=web3.toBytes(hexstr=BLOB),
         data=web3.toBytes(hexstr=BLOB),
         data_hash=web3.toBytes(hexstr=BLOB),
         metadata_proofs=[],
         from_wallet=consumer_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    update_metadata_event = data_nft.get_event_log(
-        event_name="MetadataUpdated",
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
-    assert update_metadata_event, "Cannot find MetadataUpdated event."
-    assert update_metadata_event[0].args.decryptorUrl == "http://foourl"
+    receipt = TransactionReceipt(tx)
+    assert receipt.events["MetadataUpdated"]["decryptorUrl"] == "http://foourl"
 
     metadata_info = data_nft.get_metadata()
     assert metadata_info[3]
@@ -332,7 +290,7 @@ def test_success_update_metadata(
     tx = data_nft.set_metadata_token_uri(
         metadata_state=1,
         metadata_decryptor_url="http://foourl",
-        metadata_decryptor_address=publisher_addr,
+        metadata_decryptor_address=b"0x123",
         flags=web3.toBytes(hexstr=BLOB),
         data=web3.toBytes(hexstr=BLOB),
         data_hash=web3.toBytes(hexstr=BLOB),
@@ -342,26 +300,13 @@ def test_success_update_metadata(
         from_wallet=publisher_wallet,
     )
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    update_token_uri_event = data_nft.get_event_log(
-        event_name="TokenURIUpdate",
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
-    assert update_token_uri_event, "Cannot find TokenURIUpdate event."
-    assert update_token_uri_event[0].args.tokenURI == "https://anothernewurl.com/nft/"
-    assert update_token_uri_event[0].args.updatedBy == publisher_addr
-
-    update_metadata_event = data_nft.get_event_log(
-        event_name="MetadataUpdated",
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
+    receipt = TransactionReceipt(tx)
+    assert (
+        receipt.events["TokenURIUpdate"]["tokenURI"] == "https://anothernewurl.com/nft/"
     )
+    assert receipt.events["TokenURIUpdate"]["updatedBy"] == publisher_addr
 
-    assert update_metadata_event, "Cannot find MetadataUpdated event."
-    assert update_metadata_event[0].args.decryptorUrl == "http://foourl"
+    assert receipt.events["MetadataUpdated"]["decryptorUrl"] == "http://foourl"
 
     metadata_info = data_nft.get_metadata()
     assert metadata_info[3]
@@ -380,23 +325,18 @@ def test_fails_update_metadata(web3, consumer_wallet, consumer_addr, data_nft):
         data_nft.get_permissions(user=consumer_addr)[DataNFTPermissions.UPDATE_METADATA]
     )
 
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT METADATA_ROLE"):
         data_nft.set_metadata(
             metadata_state=1,
             metadata_decryptor_url="http://myprovider:8030",
-            metadata_decryptor_address="0x123",
-            flags=web3.toBytes(hexstr=BLOB),
-            data=web3.toBytes(hexstr=BLOB),
-            data_hash=web3.toBytes(hexstr=BLOB),
+            metadata_decryptor_address=b"0x123",
+            flags=BLOB.encode("utf-8"),
+            data=BLOB,
+            data_hash=BLOB,
             metadata_proofs=[],
             from_wallet=consumer_wallet,
         )
 
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: NOT METADATA_ROLE"
-    )
-
 
 @pytest.mark.unit
 def test_create_erc20(
@@ -426,14 +366,10 @@ def test_create_erc20(
     )
     assert tx, "Could not create ERC20."
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_token_event, "Cannot find TokenCreated event."
+    receipt = TransactionReceipt(tx)
+    assert receipt.events[
+        DataNFTFactoryContract.EVENT_TOKEN_CREATED
+    ], "Cannot find TokenCreated event."
 
     with pytest.raises(Exception, match="Cap is needed for Datatoken Enterprise"):
         data_nft.create_erc20(
@@ -504,16 +440,11 @@ def test_create_datatoken_with_usdc_order_fee(
         bytess=[b""],
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-
-    event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx)
+    dt_address = receipt.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED][
+        "newTokenAddress"
+    ]
 
-    dt_address = event[0].args.newTokenAddress
     dt = Datatoken(web3, dt_address)
 
     # Check publish fee info
@@ -563,14 +494,10 @@ def test_create_datatoken_with_non_owner(
     )
     assert tx, "Failed to create ERC20 token."
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_token_event, "Cannot find TokenCreated event."
+    receipt = TransactionReceipt(tx)
+    assert receipt.events[
+        DataNFTFactoryContract.EVENT_TOKEN_CREATED
+    ], "Cannot find TokenCreated event."
 
     # Consumer self-revokes permission to create ERC20
     data_nft.remove_from_create_erc20_list(consumer_wallet.address, consumer_wallet)
@@ -585,7 +512,7 @@ def test_fail_creating_erc20(consumer_wallet, publisher_addr, consumer_addr, dat
     assert not (
         data_nft.get_permissions(consumer_addr)[DataNFTPermissions.DEPLOY_DATATOKEN]
     )
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT ERC20DEPLOYER_ROLE"):
         data_nft.create_erc20(
             template_index=1,
             name="DT1",
@@ -598,11 +525,6 @@ def test_fail_creating_erc20(consumer_wallet, publisher_addr, consumer_addr, dat
             bytess=[b""],
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: NOT "
-        "ERC20DEPLOYER_ROLE"
-    )
 
 
 @pytest.mark.unit
@@ -625,32 +547,23 @@ def test_erc721_datatoken_functions(
         new_token_uri="https://newurl.com/nft/",
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    assert tx_receipt.status == 1
-    registered_event = data_nft.get_event_log(
-        event_name=DataNFT.EVENT_TOKEN_URI_UPDATED,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
+    receipt = TransactionReceipt(tx)
+    registered_event = receipt.events[DataNFT.EVENT_TOKEN_URI_UPDATED]
+
     assert registered_event, "Cannot find TokenURIUpdate event."
-    assert registered_event[0].args.updatedBy == publisher_addr
-    assert registered_event[0].args.tokenID == 1
-    assert registered_event[0].args.blockNumber == tx_receipt.blockNumber
+    assert registered_event["updatedBy"] == publisher_addr
+    assert registered_event["tokenID"] == 1
+    assert registered_event["blockNumber"] == receipt.block_number
     assert data_nft.token_uri(token_id=1) == "https://newurl.com/nft/"
-    assert data_nft.token_uri(token_id=1) == registered_event[0].args.tokenURI
+    assert data_nft.token_uri(token_id=1) == registered_event["tokenURI"]
 
     # Tests failing setting token URI by another user
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="not NFTOwner"):
         data_nft.set_token_uri(
             token_id=1,
             new_token_uri="https://foourl.com/nft/",
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: not NFTOwner"
-    )
 
     # Tests transfer functions
     datatoken.mint(
@@ -684,16 +597,12 @@ def test_erc721_datatoken_functions(
         bytess=[b""],
         from_wallet=consumer_wallet,
     )
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT MINTER"):
         datatoken.mint(
             account_address=consumer_addr,
             value=to_wei("1"),
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT MINTER"
-    )
 
     datatoken.add_minter(minter_address=consumer_addr, from_wallet=consumer_wallet)
     datatoken.mint(
@@ -709,32 +618,28 @@ def test_fail_transfer_function(
     consumer_wallet, publisher_addr, consumer_addr, data_nft
 ):
     """Tests failure of using the transfer functions."""
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(
+        Exception,
+        match="transfer caller is not owner nor approved",
+    ):
         data_nft.transfer_from(
             from_address=publisher_addr,
             to_address=consumer_addr,
             token_id=1,
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721: transfer caller is not "
-        "owner nor approved"
-    )
 
     # Tests for safe transfer as well
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(
+        Exception,
+        match="transfer caller is not owner nor approved",
+    ):
         data_nft.safe_transfer_from(
             from_address=publisher_addr,
             to_address=consumer_addr,
             token_id=1,
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721: transfer caller is not "
-        "owner nor approved"
-    )
 
 
 def test_transfer_nft(
@@ -760,18 +665,12 @@ def test_transfer_nft(
         owner=publisher_addr,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_event[0].event == "NFTCreated"
-    assert registered_event[0].args.admin == publisher_wallet.address
-    token_address = registered_event[0].args.newTokenAddress
+    receipt = TransactionReceipt(tx)
+    registered_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+    assert registered_event["admin"] == publisher_wallet.address
+    token_address = registered_event["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
-    assert data_nft.contract.caller.name() == "NFT to TRANSFER"
+    assert data_nft.contract.name() == "NFT to TRANSFER"
     assert data_nft.symbol() == "NFTtT"
 
     tx = data_nft.safe_transfer_from(
@@ -780,16 +679,11 @@ def test_transfer_nft(
         token_id=1,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    transfer_event = data_nft.get_event_log(
-        DataNFTFactoryContract.EVENT_TRANSFER,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert transfer_event[0].event == "Transfer"
-    assert transfer_event[0].args["from"] == publisher_addr
-    assert transfer_event[0].args.to == consumer_addr
+    receipt = TransactionReceipt(tx)
+    transfer_event = receipt.events[DataNFTFactoryContract.EVENT_TRANSFER]
+
+    assert transfer_event["from"] == publisher_addr
+    assert transfer_event["to"] == consumer_addr
     assert data_nft.balance_of(consumer_addr) == 1
     assert data_nft.balance_of(publisher_addr) == 0
     assert data_nft.is_erc20_deployer(consumer_addr)
@@ -807,14 +701,10 @@ def test_transfer_nft(
         owner=publisher_addr,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    token_address = registered_event[0].args.newTokenAddress
+    receipt = TransactionReceipt(tx)
+    registered_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+
+    token_address = registered_event["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
     tx = data_nft.safe_transfer_from(
         publisher_addr,
@@ -822,16 +712,11 @@ def test_transfer_nft(
         token_id=1,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    transfer_event = data_nft.get_event_log(
-        DataNFTFactoryContract.EVENT_TRANSFER,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert transfer_event[0].event == "Transfer"
-    assert transfer_event[0].args["from"] == publisher_addr
-    assert transfer_event[0].args.to == consumer_addr
+    receipt = TransactionReceipt(tx)
+    transfer_event = receipt.events[DataNFTFactoryContract.EVENT_TRANSFER]
+
+    assert transfer_event["from"] == publisher_addr
+    assert transfer_event["to"] == consumer_addr
     assert data_nft.is_erc20_deployer(consumer_addr)
 
     # Creates an ERC20
@@ -848,15 +733,11 @@ def test_transfer_nft(
         from_wallet=consumer_wallet,
     )
     assert tx_result, "Failed to create ERC20 token."
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx_result)
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+
+    receipt = TransactionReceipt(tx_result)
+    registered_token_event = receipt.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED]
     assert registered_token_event, "Cannot find TokenCreated event."
-    datatoken_address = registered_token_event[0].args.newTokenAddress
+    datatoken_address = registered_token_event["newTokenAddress"]
     datatoken = Datatoken(web3, datatoken_address)
 
     assert not datatoken.is_minter(publisher_addr)
@@ -873,14 +754,12 @@ def test_transfer_nft(
     )
 
     assert tx_result, "Failed to set the publish fee."
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx_result)
-    set_publishing_fee_event = datatoken.get_event_log(
-        Datatoken.EVENT_PUBLISH_MARKET_FEE_CHANGED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx_result)
+    set_publishing_fee_event = receipt.events[
+        Datatoken.EVENT_PUBLISH_MARKET_FEE_CHANGED
+    ]
     assert set_publishing_fee_event, "Cannot find PublishMarketFeeChanged event."
+
     publish_fees = datatoken.get_publishing_market_fee()
     assert publish_fees[0] == consumer_addr
     assert publish_fees[1] == ocean_token.address
@@ -905,16 +784,11 @@ def test_nft_transfer_with_fre(
         token_id=1,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    transfer_event = data_nft.get_event_log(
-        DataNFTFactoryContract.EVENT_TRANSFER,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert transfer_event[0].event == "Transfer"
-    assert transfer_event[0].args["from"] == publisher_wallet.address
-    assert transfer_event[0].args.to == consumer_wallet.address
+    receipt = TransactionReceipt(tx)
+    transfer_event = receipt.events[DataNFTFactoryContract.EVENT_TRANSFER]
+
+    assert transfer_event["from"] == publisher_wallet.address
+    assert transfer_event["to"] == consumer_wallet.address
     assert data_nft.balance_of(consumer_wallet.address) == 1
     assert data_nft.balance_of(publisher_wallet.address) == 0
     assert data_nft.is_erc20_deployer(consumer_wallet.address) is True
@@ -937,19 +811,13 @@ def test_nft_transfer_with_fre(
         from_wallet=consumer_wallet,
     )
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-
-    fre_event = datatoken.get_event_log(
-        event_name=DataNFTFactoryContract.EVENT_NEW_FIXED_RATE,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
+    receipt = TransactionReceipt(tx)
+    fre_event = receipt.events[DataNFTFactoryContract.EVENT_NEW_FIXED_RATE]
 
     assert fixed_exchange.get_number_of_exchanges() == number_of_exchanges + 1
-    assert fre_event[0].args.owner == consumer_addr
+    assert fre_event["owner"] == consumer_addr
 
-    exchange_id = fre_event[0].args.exchangeId
+    exchange_id = fre_event["exchangeId"]
 
     # Exchange should have supply and fees setup
     exchange_details = fixed_exchange.get_exchange(exchange_id)
@@ -1028,18 +896,12 @@ def test_transfer_nft_with_erc20_pool_fre(
         owner=publisher_addr,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_event[0].event == "NFTCreated"
-    assert registered_event[0].args.admin == publisher_addr
-    token_address = registered_event[0].args.newTokenAddress
+    receipt = TransactionReceipt(tx)
+    registered_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+    assert registered_event["admin"] == publisher_addr
+    token_address = registered_event["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
-    assert data_nft.contract.caller.name() == "NFT to TRANSFER"
+    assert data_nft.contract.name() == "NFT to TRANSFER"
     assert data_nft.symbol() == "NFTtT"
 
     # Creates an ERC20
@@ -1056,15 +918,10 @@ def test_transfer_nft_with_erc20_pool_fre(
         from_wallet=publisher_wallet,
     )
     assert tx_result, "Failed to create ERC20 token."
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx_result)
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx_result)
+    registered_token_event = receipt.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED]
     assert registered_token_event, "Cannot find TokenCreated event."
-    datatoken_address = registered_token_event[0].args.newTokenAddress
+    datatoken_address = registered_token_event["newTokenAddress"]
     datatoken = Datatoken(web3, datatoken_address)
 
     assert datatoken.is_minter(publisher_addr)
@@ -1088,19 +945,12 @@ def test_transfer_nft_with_erc20_pool_fre(
         from_wallet=publisher_wallet,
     )
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-
-    fre_event = datatoken.get_event_log(
-        event_name=DataNFTFactoryContract.EVENT_NEW_FIXED_RATE,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
-
+    receipt = TransactionReceipt(tx)
+    fre_event = receipt.events[DataNFTFactoryContract.EVENT_NEW_FIXED_RATE]
     assert fixed_exchange.get_number_of_exchanges() == number_of_exchanges + 1
-    assert fre_event[0].args.owner == publisher_addr
+    assert fre_event["owner"] == publisher_addr
 
-    exchange_id = fre_event[0].args.exchangeId
+    exchange_id = fre_event["exchangeId"]
 
     exchange_details = fixed_exchange.get_exchange(exchange_id)
     assert exchange_details[FixedRateExchangeDetails.EXCHANGE_OWNER] == publisher_addr
@@ -1126,16 +976,11 @@ def test_transfer_nft_with_erc20_pool_fre(
         token_id=1,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    transfer_event = data_nft.get_event_log(
-        DataNFTFactoryContract.EVENT_TRANSFER,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert transfer_event[0].event == "Transfer"
-    assert transfer_event[0].args["from"] == publisher_addr
-    assert transfer_event[0].args.to == consumer_addr
+    receipt = TransactionReceipt(tx)
+    transfer_event = receipt.events[DataNFTFactoryContract.EVENT_TRANSFER]
+
+    assert transfer_event["from"] == publisher_addr
+    assert transfer_event["to"] == consumer_addr
     assert data_nft.balance_of(consumer_addr) == 1
     assert data_nft.balance_of(publisher_addr) == 0
     assert data_nft.is_erc20_deployer(consumer_addr)
diff --git a/ocean_lib/models/test/test_data_nft_factory.py b/ocean_lib/models/test/test_data_nft_factory.py
index 5fafa607a..155c8e1d4 100644
--- a/ocean_lib/models/test/test_data_nft_factory.py
+++ b/ocean_lib/models/test/test_data_nft_factory.py
@@ -3,7 +3,7 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 import pytest
-from web3 import exceptions
+from brownie.network.transaction import TransactionReceipt
 from web3.main import Web3
 
 from ocean_lib.models.data_nft import DataNFT
@@ -86,18 +86,13 @@ def test_main(
         owner=publisher_wallet.address,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_event[0].event == "NFTCreated"
-    assert registered_event[0].args.admin == publisher_wallet.address
-    token_address = registered_event[0].args.newTokenAddress
+    receipt = TransactionReceipt(tx)
+    registered_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+
+    assert registered_event["admin"] == publisher_wallet.address
+    token_address = registered_event["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
-    assert data_nft.contract.caller.name() == "DT1"
+    assert data_nft.contract.name() == "DT1"
     assert data_nft.symbol() == "DTSYMBOL"
 
     # Tests current NFT count
@@ -136,15 +131,10 @@ def test_main(
         from_wallet=consumer_wallet,
     )
     assert tx_result, "Failed to create ERC20 token."
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx_result)
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx_result)
+    registered_token_event = receipt.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED]
     assert registered_token_event, "Cannot find TokenCreated event."
-    datatoken_address = registered_token_event[0].args.newTokenAddress
+    datatoken_address = registered_token_event["newTokenAddress"]
 
     # Tests templateCount function (one of them should be the Enterprise template)
     assert data_nft_factory.template_count() == 2
@@ -182,35 +172,24 @@ def test_main(
         datatoken_bytess=[b""],
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_nft_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx)
+    registered_nft_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
 
     # Verify if the NFT was created.
     assert registered_nft_event, "Cannot find NFTCreated event."
-    assert registered_nft_event[0].event == "NFTCreated"
-    assert registered_nft_event[0].args.admin == publisher_wallet.address
-    data_nft_address2 = registered_nft_event[0].args.newTokenAddress
+    assert registered_nft_event["admin"] == publisher_wallet.address
+    data_nft_address2 = registered_nft_event["newTokenAddress"]
     data_nft_token2 = DataNFT(web3, data_nft_address2)
-    assert data_nft_token2.contract.caller.name() == "72120Bundle"
+    assert data_nft_token2.contract.name() == "72120Bundle"
     assert data_nft_token2.symbol() == "72Bundle"
 
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    registered_token_event = receipt.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED]
 
     # Verify if the ERC20 token was created.
     assert registered_token_event, "Cannot find TokenCreated event."
-    datatoken_address2 = registered_token_event[0].args.newTokenAddress
+    datatoken_address2 = registered_token_event["newTokenAddress"]
     datatoken2 = Datatoken(web3, datatoken_address2)
-    assert datatoken2.contract.caller.name() == "DTB1"
+    assert datatoken2.contract.name() == "DTB1"
     assert datatoken2.symbol() == "DT1Symbol"
 
     # Tests creating NFT with ERC20 and with Fixed Rate Exchange successfully.
@@ -230,15 +209,12 @@ def test_main(
         from_wallet=publisher_wallet,
     )
     assert tx, "Failed to create ERC20 token."
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_fee_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx)
+    registered_fee_token_event = receipt.events[
+        DataNFTFactoryContract.EVENT_TOKEN_CREATED
+    ]
     assert registered_fee_token_event, "Cannot find TokenCreated event."
-    fee_datatoken_address = registered_fee_token_event[0].args.newTokenAddress
+    fee_datatoken_address = registered_fee_token_event["newTokenAddress"]
 
     tx = data_nft_factory.create_nft_erc20_with_fixed_rate(
         nft_name="72120Bundle",
@@ -268,46 +244,33 @@ def test_main(
         fixed_price_with_mint=0,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_nft_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx)
+    registered_nft_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+
     # Verify if the NFT was created.
     assert registered_nft_event, "Cannot find NFTCreated event."
-    assert registered_nft_event[0].event == "NFTCreated"
-    assert registered_nft_event[0].args.admin == publisher_wallet.address
-    data_nft_address4 = registered_nft_event[0].args.newTokenAddress
+    assert registered_nft_event["admin"] == publisher_wallet.address
+    data_nft_address4 = registered_nft_event["newTokenAddress"]
     data_nft_token4 = DataNFT(web3, data_nft_address4)
-    assert data_nft_token4.contract.caller.name() == "72120Bundle"
+    assert data_nft_token4.contract.name() == "72120Bundle"
     assert data_nft_token4.symbol() == "72Bundle"
 
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    registered_token_event = receipt.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED]
 
     # Verify if the ERC20 token was created.
     assert registered_token_event, "Cannot find TokenCreated event."
-    datatoken_address4 = registered_token_event[0].args.newTokenAddress
+    datatoken_address4 = registered_token_event["newTokenAddress"]
     datatoken4 = Datatoken(web3, datatoken_address4)
-    assert datatoken4.contract.caller.name() == "DTWithPool"
+    assert datatoken4.contract.name() == "DTWithPool"
     assert datatoken4.symbol() == "DTP"
 
-    registered_fixed_rate_event = datatoken4.get_event_log(
-        DataNFTFactoryContract.EVENT_NEW_FIXED_RATE,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    registered_fixed_rate_event = receipt.events[
+        DataNFTFactoryContract.EVENT_NEW_FIXED_RATE
+    ]
 
     # Verify if the Fixed Rate Exchange was created.
     assert registered_fixed_rate_event, "Cannot find NewFixedRate event."
-    assert registered_fixed_rate_event[0].args.exchangeId, "Invalid exchange id."
+    assert registered_fixed_rate_event["exchangeId"], "Invalid exchange id."
 
     # Tests creating NFT with ERC20 and with Dispenser successfully.
     dispenser_address = get_address_of_type(config, Dispenser.CONTRACT_NAME)
@@ -335,50 +298,37 @@ def test_main(
         dispenser_allowed_swapper=ZERO_ADDRESS,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_nft_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx)
+    registered_nft_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+
     # Verify if the NFT was created.
     assert registered_nft_event, "Cannot find NFTCreated event."
-    assert registered_nft_event[0].event == "NFTCreated"
-    assert registered_nft_event[0].args.admin == publisher_wallet.address
-    data_nft_address5 = registered_nft_event[0].args.newTokenAddress
+    assert registered_nft_event["admin"] == publisher_wallet.address
+    data_nft_address5 = registered_nft_event["newTokenAddress"]
     data_nft_token5 = DataNFT(web3, data_nft_address5)
-    assert data_nft_token5.contract.caller.name() == "72120Bundle"
+    assert data_nft_token5.contract.name() == "72120Bundle"
     assert data_nft_token5.symbol() == "72Bundle"
 
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    registered_token_event = receipt.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED]
 
     # Verify if the datatoken was created.
     assert registered_token_event, "Cannot find TokenCreated event."
-    datatoken_address5 = registered_token_event[0].args.newTokenAddress
+    datatoken_address5 = registered_token_event["newTokenAddress"]
     datatoken5 = Datatoken(web3, datatoken_address5)
-    assert datatoken5.contract.caller.name() == "DTWithPool"
+    assert datatoken5.contract.name() == "DTWithPool"
     assert datatoken5.symbol() == "DTP"
 
-    dispenser = Dispenser(web3, dispenser_address)
+    _ = Dispenser(web3, dispenser_address)
 
-    registered_dispenser_event = dispenser.get_event_log(
-        DataNFTFactoryContract.EVENT_DISPENSER_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    registered_dispenser_event = receipt.events[
+        DataNFTFactoryContract.EVENT_DISPENSER_CREATED
+    ]
 
     # Verify if the Dispenser data token was created.
     assert registered_dispenser_event, "Cannot find DispenserCreated event."
     assert registered_dispenser_event[
-        0
-    ].args.datatokenAddress, "Invalid data token address by dispenser."
+        "datatokenAddress"
+    ], "Invalid data token address by dispenser."
 
     # Create a new erc721 with metadata in one single call and get address
     tx = data_nft_factory.create_nft_with_metadata(
@@ -390,25 +340,20 @@ def test_main(
         nft_owner=publisher_wallet.address,
         metadata_state=1,
         metadata_decryptor_url="http://myprovider:8030",
-        metadata_decryptor_address=provider_wallet.address,
+        metadata_decryptor_address=b"0x123",
         metadata_flags=bytes(0),
         metadata_data=Web3.toHex(text="my cool metadata."),
         metadata_data_hash=create_checksum("my cool metadata."),
         metadata_proofs=[],
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_nft_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_nft_event[0].event == "NFTCreated", "Cannot find NFTCreated event"
+    receipt = TransactionReceipt(tx)
+    registered_nft_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+    assert registered_nft_event, "Cannot find NFTCreated event"
     assert (
-        registered_nft_event[0].args.admin == publisher_wallet.address
+        registered_nft_event["admin"] == publisher_wallet.address
     ), "Invalid NFT owner!"
-    data_nft_address = registered_nft_event[0].args.newTokenAddress
+    data_nft_address = registered_nft_event["newTokenAddress"]
     data_nft = DataNFT(web3, data_nft_address)
     assert (
         data_nft.token_name() == "72120Bundle"
@@ -439,18 +384,13 @@ def test_start_multiple_order(
         owner=publisher_wallet.address,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_event[0].event == "NFTCreated"
-    assert registered_event[0].args.admin == publisher_wallet.address
-    token_address = registered_event[0].args.newTokenAddress
+    receipt = TransactionReceipt(tx)
+    registered_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+
+    assert registered_event["admin"] == publisher_wallet.address
+    token_address = registered_event["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
-    assert data_nft.contract.caller.name() == "DT1"
+    assert data_nft.contract.name() == "DT1"
     assert data_nft.symbol() == "DTSYMBOL"
     assert data_nft_factory.check_nft(token_address)
 
@@ -490,15 +430,10 @@ def test_start_multiple_order(
         from_wallet=consumer_wallet,
     )
     assert tx_result, "Failed to create ERC20 token."
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx_result)
-    registered_token_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    receipt = TransactionReceipt(tx_result)
+    registered_token_event = receipt.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED]
     assert registered_token_event, "Cannot find TokenCreated event."
-    datatoken_address = registered_token_event[0].args.newTokenAddress
+    datatoken_address = registered_token_event["newTokenAddress"]
 
     # Tests templateCount function (one of them should be the Enterprise template)
     assert data_nft_factory.template_count() == 2
@@ -574,20 +509,12 @@ def test_start_multiple_order(
     orders = [order_data, order_data]
 
     tx = data_nft_factory.start_multiple_token_order(orders, consumer_wallet)
+    receipt = TransactionReceipt(tx)
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-
-    registered_erc20_start_order_event = datatoken.get_event_log(
-        Datatoken.EVENT_ORDER_STARTED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    registered_erc20_start_order_event = receipt.events[Datatoken.EVENT_ORDER_STARTED]
 
     assert tx, "Failed starting multiple token orders."
-    assert (
-        registered_erc20_start_order_event[0].args.consumer == consumer_wallet.address
-    )
+    assert registered_erc20_start_order_event["consumer"] == consumer_wallet.address
 
     assert datatoken.balanceOf(consumer_wallet.address) == 0
     assert datatoken.balanceOf(datatoken.get_payment_collector()) == (dt_amount * 0.97)
@@ -602,22 +529,12 @@ def test_fail_get_templates(web3, config):
     data_nft_factory = DataNFTFactoryContract(web3, data_nft_factory_address)
 
     # Should fail to get the Datatoken template if index = 0
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Template index doesnt exist"):
         data_nft_factory.get_token_template(0)
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Factory: "
-        "Template index doesnt exist"
-    )
 
     # Should fail to get the Datatoken template if index > templateCount
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Template index doesnt exist"):
         data_nft_factory.get_token_template(3)
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Factory: "
-        "Template index doesnt exist"
-    )
 
 
 @pytest.mark.unit
@@ -642,21 +559,15 @@ def test_fail_create_erc20(
         owner=publisher_wallet.address,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_event[0].event == "NFTCreated"
-    assert registered_event[0].args.admin == publisher_wallet.address
-    token_address = registered_event[0].args.newTokenAddress
+    receipt = TransactionReceipt(tx)
+    registered_event = receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+    assert registered_event["admin"] == publisher_wallet.address
+    token_address = registered_event["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
     data_nft.add_to_create_erc20_list(consumer_wallet.address, publisher_wallet)
 
     # Should fail to create a specific ERC20 Template if the index is ZERO
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Template index doesnt exist"):
         data_nft.create_erc20(
             template_index=0,
             name="DT1",
@@ -669,14 +580,9 @@ def test_fail_create_erc20(
             bytess=[b""],
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Factory: Template index "
-        "doesnt exist"
-    )
 
     # Should fail to create a specific ERC20 Template if the index doesn't exist
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Template index doesnt exist"):
         data_nft.create_erc20(
             template_index=3,
             name="DT1",
@@ -689,15 +595,10 @@ def test_fail_create_erc20(
             bytess=[b""],
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Factory: Template index "
-        "doesnt exist"
-    )
 
     # Should fail to create a specific ERC20 Template if the user is not added on the ERC20 deployers list
     assert data_nft.get_permissions(another_consumer_wallet.address)[1] is False
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT ERC20DEPLOYER_ROLE"):
         data_nft.create_erc20(
             template_index=1,
             name="DT1",
@@ -710,11 +611,6 @@ def test_fail_create_erc20(
             bytess=[b""],
             from_wallet=another_consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: NOT "
-        "ERC20DEPLOYER_ROLE"
-    )
 
 
 @pytest.mark.unit
diff --git a/ocean_lib/models/test/test_datatoken.py b/ocean_lib/models/test/test_datatoken.py
index 45c1ae53c..f479b8173 100644
--- a/ocean_lib/models/test/test_datatoken.py
+++ b/ocean_lib/models/test/test_datatoken.py
@@ -5,7 +5,7 @@
 import json
 
 import pytest
-from web3 import exceptions
+from brownie.network.transaction import TransactionReceipt
 from web3.main import Web3
 
 from ocean_lib.models.data_nft import DataNFT
@@ -53,7 +53,7 @@ def test_main(
 
     # Check datatoken params
     assert datatoken.get_id() == 1
-    assert datatoken.contract.caller.name() == "DT1"
+    assert datatoken.contract.name() == "DT1"
     assert datatoken.symbol() == "DT1Symbol"
     assert datatoken.decimals() == 18
     assert datatoken.cap() == MAX_UINT256
@@ -176,7 +176,7 @@ def test_start_order(
         consume_market_order_fee_amount=0,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
+    receipt = TransactionReceipt(tx)
     # Check erc20 balances
     assert datatoken.balanceOf(publisher_wallet.address) == to_wei("9")
     assert datatoken.balanceOf(
@@ -185,7 +185,7 @@ def test_start_order(
 
     provider_message = Web3.solidityKeccak(
         ["bytes32", "bytes"],
-        [tx_receipt.transactionHash, Web3.toHex(Web3.toBytes(text=provider_data))],
+        [receipt.txid, Web3.toHex(Web3.toBytes(text=provider_data))],
     )
     provider_signed = web3.eth.sign(provider_fee_address, data=provider_message)
 
@@ -195,8 +195,8 @@ def test_start_order(
     )
     consumer_signed = web3.eth.sign(consumer_wallet.address, data=message)
 
-    datatoken.order_executed(
-        order_tx_id=tx_receipt.transactionHash,
+    tx = datatoken.order_executed(
+        order_tx_id=receipt.txid,
         provider_data=Web3.toHex(Web3.toBytes(text=provider_data)),
         provider_signature=provider_signed,
         consumer_data=Web3.toHex(Web3.toBytes(text="12345")),
@@ -204,21 +204,16 @@ def test_start_order(
         consumer=consumer_wallet.address,
         from_wallet=publisher_wallet,
     )
-    executed_event = datatoken.get_event_log(
-        Datatoken.EVENT_ORDER_EXECUTED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert executed_event[0].event == "OrderExecuted", "Cannot find OrderExecuted event"
-    assert executed_event[0].args.orderTxId == tx_receipt.transactionHash
-    assert executed_event[0].args.providerAddress == provider_fee_address
+    receipt_interm = TransactionReceipt(tx)
+    executed_event = receipt_interm.events[Datatoken.EVENT_ORDER_EXECUTED]
+    assert executed_event["orderTxId"] == receipt.txid
+    assert executed_event["providerAddress"] == provider_fee_address
 
     # Tests exceptions for order_executed
     consumer_signed = web3.eth.sign(provider_fee_address, data=message)
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Consumer signature check failed"):
         datatoken.order_executed(
-            tx_receipt.transactionHash,
+            receipt.txid,
             provider_data=Web3.toHex(Web3.toBytes(text=provider_data)),
             provider_signature=provider_signed,
             consumer_data=Web3.toHex(Web3.toBytes(text="12345")),
@@ -226,10 +221,6 @@ def test_start_order(
             consumer=consumer_wallet.address,
             from_wallet=publisher_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert Consumer signature check failed"
-    )
 
     message = Web3.solidityKeccak(
         ["bytes"],
@@ -237,9 +228,9 @@ def test_start_order(
     )
     consumer_signed = web3.eth.sign(consumer_wallet.address, data=message)
 
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Provider signature check failed"):
         datatoken.order_executed(
-            tx_receipt.transactionHash,
+            receipt.txid,
             provider_data=Web3.toHex(Web3.toBytes(text=provider_data)),
             provider_signature=signed,
             consumer_data=Web3.toHex(Web3.toBytes(text="12345")),
@@ -247,14 +238,10 @@ def test_start_order(
             consumer=consumer_wallet.address,
             from_wallet=publisher_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert Provider signature check failed"
-    )
 
     # Tests reuses order
-    datatoken.reuse_order(
-        tx_receipt.transactionHash,
+    tx = datatoken.reuse_order(
+        receipt.txid,
         provider_fee_address=provider_fee_address,
         provider_fee_token=provider_fee_token,
         provider_fee_amount=provider_fee_amount,
@@ -266,23 +253,14 @@ def test_start_order(
         # make it compatible with last openzepellin https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1622
         from_wallet=publisher_wallet,
     )
-    reused_event = datatoken.get_event_log(
-        Datatoken.EVENT_ORDER_REUSED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert reused_event[0].event == "OrderReused", "Cannot find OrderReused event"
-    assert reused_event[0].args.orderTxId == tx_receipt.transactionHash
-    assert reused_event[0].args.caller == publisher_wallet.address
-
-    provider_fee_event = datatoken.get_event_log(
-        Datatoken.EVENT_PROVIDER_FEE,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert provider_fee_event[0].event == "ProviderFee", "Cannot find ProviderFee event"
+    receipt_interm = TransactionReceipt(tx)
+    reused_event = receipt_interm.events[Datatoken.EVENT_ORDER_REUSED]
+    assert reused_event, "Cannot find OrderReused event"
+    assert reused_event["orderTxId"] == receipt.txid
+    assert reused_event["caller"] == publisher_wallet.address
+
+    provider_fee_event = receipt.events[Datatoken.EVENT_PROVIDER_FEE]
+    assert provider_fee_event, "Cannot find ProviderFee event"
 
     # Set and get publishing market fee params
     datatoken.set_publishing_market_fee(
@@ -350,90 +328,54 @@ def test_exceptions(web3, consumer_wallet, datatoken):
     """Tests revert statements in contracts functions"""
 
     # Should fail to mint if wallet is not a minter
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT MINTER"):
         datatoken.mint(
             account_address=consumer_wallet.address,
             value=to_wei("1"),
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT MINTER"
-    )
 
     #  Should fail to set new FeeCollector if not NFTOwner
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT PAYMENT MANAGER or OWNER"):
         datatoken.set_payment_collector(
             publish_market_order_fee_address=consumer_wallet.address,
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT PAYMENT MANAGER or OWNER"
-    )
 
     # Should fail to addMinter if not erc20Deployer (permission to deploy the erc20Contract at 721 level)
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT DEPLOYER ROLE"):
         datatoken.add_minter(
             minter_address=consumer_wallet.address, from_wallet=consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT DEPLOYER ROLE"
-    )
 
     #  Should fail to removeMinter even if it's minter
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT DEPLOYER ROLE"):
         datatoken.remove_minter(
             minter_address=consumer_wallet.address, from_wallet=consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT DEPLOYER ROLE"
-    )
 
     # Should fail to addFeeManager if not erc20Deployer (permission to deploy the erc20Contract at 721 level)
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT DEPLOYER ROLE"):
         datatoken.add_payment_manager(
             fee_manager=consumer_wallet.address, from_wallet=consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT DEPLOYER ROLE"
-    )
 
     # Should fail to removeFeeManager if NOT erc20Deployer
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT DEPLOYER ROLE"):
         datatoken.remove_payment_manager(
             fee_manager=consumer_wallet.address, from_wallet=consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT DEPLOYER ROLE"
-    )
 
     # Should fail to setData if NOT erc20Deployer
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT DEPLOYER ROLE"):
         datatoken.set_data(
             data=web3.toHex(text="SomeData"), from_wallet=consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT DEPLOYER ROLE"
-    )
 
     # Should fail to call cleanPermissions if NOT NFTOwner
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="not NFTOwner"):
         datatoken.clean_permissions(from_wallet=consumer_wallet)
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: not NFTOwner"
-    )
 
     # Clean from nft should work shouldn't be callable by publisher or consumer, only by erc721 contract
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT 721 Contract"):
         datatoken.clean_from_721(from_wallet=consumer_wallet)
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT 721 Contract"
-    )
diff --git a/ocean_lib/models/test/test_datatoken_enterprise.py b/ocean_lib/models/test/test_datatoken_enterprise.py
index b3d429fa8..5142fb3e7 100644
--- a/ocean_lib/models/test/test_datatoken_enterprise.py
+++ b/ocean_lib/models/test/test_datatoken_enterprise.py
@@ -5,7 +5,7 @@
 import json
 
 import pytest
-from web3 import exceptions
+from brownie.network.transaction import TransactionReceipt
 from web3.main import Web3
 
 from ocean_lib.models.datatoken import Datatoken
@@ -31,7 +31,7 @@ def test_buy_from_dispenser_and_order(
     mock_dai_contract = Datatoken(web3, get_address_of_type(config, "MockDAI"))
     dispenser = Dispenser(web3, get_address_of_type(config, "Dispenser"))
 
-    tx = datatoken_enterprise_token.create_dispenser(
+    _ = datatoken_enterprise_token.create_dispenser(
         dispenser_address=dispenser.address,
         allowed_swapper=ZERO_ADDRESS,
         max_balance=to_wei("1"),
@@ -39,8 +39,6 @@ def test_buy_from_dispenser_and_order(
         max_tokens=to_wei("1"),
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    assert tx_receipt.status == 1
 
     status = dispenser.status(datatoken_enterprise_token.address)
 
@@ -48,7 +46,10 @@ def test_buy_from_dispenser_and_order(
     assert status[1] == publisher_wallet.address
     assert status[2] is True
 
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(
+        Exception,
+        match="This address is not allowed to request DT",
+    ):
         dispenser.dispense(
             datatoken=datatoken_enterprise_token.address,
             amount=to_wei("1"),
@@ -56,11 +57,6 @@ def test_buy_from_dispenser_and_order(
             from_wallet=consumer_wallet,
         )
 
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert This address is not allowed to request DT"
-    )
-
     consume_fee_amount = to_wei("2")
     consume_fee_address = consumer_wallet.address
     datatoken_enterprise_token.set_publishing_market_fee(
@@ -119,7 +115,7 @@ def test_buy_from_dispenser_and_order(
     balance_opf_consume_before = mock_dai_contract.balanceOf(opf_collector_address)
     balance_publish_before = mock_usdc_contract.balanceOf(consumer_wallet.address)
 
-    tx = datatoken_enterprise_token.buy_from_dispenser_and_order(
+    _ = datatoken_enterprise_token.buy_from_dispenser_and_order(
         consumer=consume_fee_address,
         service_index=1,
         provider_fee_address=provider_fee_address,
@@ -137,8 +133,6 @@ def test_buy_from_dispenser_and_order(
         from_wallet=publisher_wallet,
     )
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    assert tx_receipt.status == 1
     assert datatoken_enterprise_token.get_total_supply() == to_wei("0")
 
     balance_opf_consume = mock_dai_contract.balanceOf(opf_collector_address)
@@ -186,23 +180,17 @@ def test_buy_from_fre_and_order(
         from_wallet=publisher_wallet,
     )
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    assert tx_receipt.status == 1
+    tx_receipt = TransactionReceipt(tx)
 
-    new_fixed_rate_event = datatoken_enterprise_token.get_event_log(
-        "NewFixedRate",
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
+    new_fixed_rate_event = tx_receipt.events["NewFixedRate"]
 
-    exchange_id = new_fixed_rate_event[0].args.exchangeId
+    exchange_id = new_fixed_rate_event["exchangeId"]
     status = fixed_rate_exchange.get_exchange(exchange_id)
 
     assert status[6] is True  # is active
     assert status[11] is True  # is minter
 
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="This address is not allowed to swap"):
         fixed_rate_exchange.buy_dt(
             exchange_id=exchange_id,
             datatoken_amount=to_wei("1"),
@@ -212,11 +200,6 @@ def test_buy_from_fre_and_order(
             from_wallet=consumer_wallet,
         )
 
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert FixedRateExchange: This address is not allowed to swap"
-    )
-
     consume_fee_amount = to_wei("2")
     consume_fee_address = consumer_wallet.address
     datatoken_enterprise_token.set_publishing_market_fee(
@@ -273,7 +256,7 @@ def test_buy_from_fre_and_order(
         another_consumer_wallet.address
     )
 
-    tx = datatoken_enterprise_token.buy_from_fre_and_order(
+    _ = datatoken_enterprise_token.buy_from_fre_and_order(
         consumer=another_consumer_wallet.address,
         service_index=1,
         provider_fee_address=publisher_wallet.address,
@@ -295,8 +278,6 @@ def test_buy_from_fre_and_order(
         from_wallet=publisher_wallet,
     )
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    assert tx_receipt.status == 1
     assert datatoken_enterprise_token.get_total_supply() == to_wei("0")
 
     provider_fee_balance_after = mock_usdc_contract.balanceOf(
diff --git a/ocean_lib/models/test/test_dispenser.py b/ocean_lib/models/test/test_dispenser.py
index d5ce27e62..65e1b3055 100644
--- a/ocean_lib/models/test/test_dispenser.py
+++ b/ocean_lib/models/test/test_dispenser.py
@@ -3,7 +3,6 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 import pytest
-from web3 import exceptions
 
 from ocean_lib.models.dispenser import Dispenser
 from ocean_lib.ocean.util import get_address_of_type
@@ -56,7 +55,7 @@ def test_main(
     dispenser = Dispenser(web3, get_address_of_type(config, "Dispenser"))
 
     # Tests publisher creates a dispenser with minter role
-    tx = datatoken.create_dispenser(
+    _ = datatoken.create_dispenser(
         dispenser_address=dispenser.address,
         max_balance=to_wei("1"),
         max_tokens=to_wei("1"),
@@ -64,8 +63,6 @@ def test_main(
         allowed_swapper=ZERO_ADDRESS,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    assert tx_receipt.status == 1
 
     # Tests publisher gets the dispenser status
 
@@ -75,40 +72,30 @@ def test_main(
     assert dispenser_status[2] is True
 
     # Tests consumer requests more datatokens then allowed transaction reverts
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Amount too high"):
         dispenser.dispense(
             datatoken=datatoken.address,
             amount=to_wei("20"),
             destination=consumer_wallet.address,
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert Amount too high"
-    )
 
     # Tests consumer requests data tokens
-    tx = dispenser.dispense(
+    _ = dispenser.dispense(
         datatoken=datatoken.address,
         amount=to_wei("1"),
         destination=consumer_wallet.address,
         from_wallet=consumer_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    assert tx_receipt.status == 1
 
     # Tests consumer requests more datatokens then exceeds maxBalance
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Caller balance too high"):
         dispenser.dispense(
             datatoken=datatoken.address,
             amount=to_wei("1"),
             destination=consumer_wallet.address,
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert Caller balance too high"
-    )
 
     # Tests publisher deactivates the dispenser
     dispenser.deactivate(from_wallet=publisher_wallet, datatoken=datatoken.address)
@@ -116,7 +103,7 @@ def test_main(
     assert status[0] is False
 
     # Tests factory deployer should fail to get data tokens
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Dispenser not active"):
         dispenser.dispense(
             datatoken=datatoken.address,
             amount=to_wei("0.00001"),
@@ -124,13 +111,8 @@ def test_main(
             from_wallet=factory_deployer_wallet,
         )
 
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert Dispenser not active"
-    )
-
     # Tests consumer should fail to activate a dispenser for a token for he is not a minter
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Invalid owner"):
         dispenser.activate(
             datatoken=datatoken.address,
             max_tokens=to_wei("1"),
@@ -138,11 +120,6 @@ def test_main(
             from_wallet=consumer_wallet,
         )
 
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert Invalid owner"
-    )
-
 
 def test_dispenser_creation_without_minter(
     web3, config, publisher_wallet, consumer_wallet, datatoken
@@ -162,20 +139,15 @@ def test_dispenser_creation_without_minter(
     )
 
     # Tests consumer requests data tokens but they are not minted
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Not enough reserves"):
         dispenser.dispense(
             datatoken=datatoken.address,
             amount=to_wei("1"),
             destination=consumer_wallet.address,
             from_wallet=consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert Not enough reserves"
-    )
 
     # Tests publisher mints tokens and transfer them to the dispenser.
-
     datatoken.mint(
         from_wallet=publisher_wallet,
         account_address=dispenser.address,
diff --git a/ocean_lib/models/test/test_fixed_rate_exchange.py b/ocean_lib/models/test/test_fixed_rate_exchange.py
index 07bec467d..432284d83 100644
--- a/ocean_lib/models/test/test_fixed_rate_exchange.py
+++ b/ocean_lib/models/test/test_fixed_rate_exchange.py
@@ -3,7 +3,7 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 import pytest
-from web3 import exceptions
+from brownie.network.transaction import TransactionReceipt
 
 from ocean_lib.models.data_nft_factory import DataNFTFactoryContract
 from ocean_lib.models.fixed_rate_exchange import (
@@ -108,20 +108,15 @@ def test_exchange_rate_creation(
         from_wallet=publisher_wallet,
     )
 
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
+    tx_receipt = TransactionReceipt(tx)
 
-    registered_event = datatoken.get_event_log(
-        event_name=DataNFTFactoryContract.EVENT_NEW_FIXED_RATE,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
+    registered_event = tx_receipt.events[DataNFTFactoryContract.EVENT_NEW_FIXED_RATE]
 
     assert fixed_exchange.get_number_of_exchanges() == (number_of_exchanges_before + 1)
-    assert registered_event[0].args.owner == consumer_addr
+    assert registered_event["owner"] == consumer_addr
     assert len(fixed_exchange.get_exchanges()) == (number_of_exchanges_before + 1)
 
-    exchange_id = registered_event[0].args.exchangeId
+    exchange_id = registered_event["exchangeId"]
 
     # Generate exchange id works
     generated_exchange_id = fixed_exchange.generate_exchange_id(
@@ -180,14 +175,10 @@ def test_exchange_rate_creation(
     assert rate == exchange_rate
 
     # Buy should fail if price is too high
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Too many base tokens"):
         fixed_exchange.buy_dt(
             exchange_id, amount_dt_to_sell, 1, ZERO_ADDRESS, 0, another_consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert FixedRateExchange: Too many base tokens"
-    )
 
     ocean_token.transfer(
         another_consumer_addr,
@@ -212,22 +203,18 @@ def test_exchange_rate_creation(
         to_wei("0.1"),
         another_consumer_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(receipt)
 
-    event_log = fixed_exchange.get_event_log(
-        event_name=FixedRateExchange.EVENT_SWAPPED,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
+    tx_receipt = TransactionReceipt(receipt)
+
+    event_log = tx_receipt.events[FixedRateExchange.EVENT_SWAPPED]
 
     # Check fixed rate exchange outputs. Rate = 1
     assert (
-        event_log[0].args.baseTokenSwappedAmount
-        - event_log[0].args.marketFeeAmount
-        - event_log[0].args.oceanFeeAmount
-        - event_log[0].args.consumeMarketFeeAmount
-        == event_log[0].args.datatokenSwappedAmount
+        event_log["baseTokenSwappedAmount"]
+        - event_log["marketFeeAmount"]
+        - event_log["oceanFeeAmount"]
+        - event_log["consumeMarketFeeAmount"]
+        == event_log["datatokenSwappedAmount"]
     )
 
     assert datatoken.balanceOf(another_consumer_addr) == amount_dt_to_sell
@@ -282,16 +269,10 @@ def test_exchange_rate_creation(
         exchange_details[FixedRateExchangeDetails.DT_BALANCE],
         consumer_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-
-    logs = fixed_exchange.get_event_log(
-        event_name=FixedRateExchange.EVENT_TOKEN_COLLECTED,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
+    receipt = TransactionReceipt(tx)
 
-    assert datatoken.balanceOf(pmt_collector) == dt_balance_before + logs[0].args.amount
+    logs = receipt.events[FixedRateExchange.EVENT_TOKEN_COLLECTED]
+    assert datatoken.balanceOf(pmt_collector) == dt_balance_before + logs["amount"]
 
     # Fixed Rate Exchange owner withdraws BT balance
     # Needs to buy because he sold all the DT amount and BT balance will be 0.
@@ -313,18 +294,11 @@ def test_exchange_rate_creation(
         exchange_details[FixedRateExchangeDetails.BT_BALANCE],
         consumer_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
+    receipt = TransactionReceipt(tx)
 
-    logs = fixed_exchange.get_event_log(
-        event_name=FixedRateExchange.EVENT_TOKEN_COLLECTED,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
+    logs = receipt.events[FixedRateExchange.EVENT_TOKEN_COLLECTED]
 
-    assert (
-        ocean_token.balanceOf(pmt_collector) == bt_balance_before + logs[0].args.amount
-    )
+    assert ocean_token.balanceOf(pmt_collector) == bt_balance_before + logs["amount"]
 
     # Exchange should have fees available and claimable
     # Market fee collector bt balance
@@ -350,14 +324,10 @@ def test_exchange_rate_creation(
 
     # Market fee collector update
     # Only market fee collector should be able to update market_fee_collector
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="not marketFeeCollector"):
         fixed_exchange.update_market_fee_collector(
             exchange_id, consumer_addr, consumer_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert not marketFeeCollector"
-    )
 
     fixed_exchange.update_market_fee_collector(
         exchange_id, consumer_addr, another_consumer_wallet
diff --git a/ocean_lib/ocean/test/test_ocean.py b/ocean_lib/ocean/test/test_ocean.py
index 0975c5f10..fc48e9700 100644
--- a/ocean_lib/ocean/test/test_ocean.py
+++ b/ocean_lib/ocean/test/test_ocean.py
@@ -22,7 +22,7 @@ def test_nft_factory(data_nft, datatoken, publisher_ocean_instance, publisher_wa
         from_wallet=publisher_wallet,
     )
     assert isinstance(created_nft, DataNFT)
-    assert created_nft.contract.caller.name() == "TEST"
+    assert created_nft.contract.name() == "TEST"
     assert created_nft.symbol() == "TEST2"
     assert created_nft.address
     assert created_nft.token_uri(1) == "http://oceanprotocol.com/nft"
diff --git a/ocean_lib/ocean/test/test_ocean_assets.py b/ocean_lib/ocean/test/test_ocean_assets.py
index ea6061840..dd5b3b660 100644
--- a/ocean_lib/ocean/test/test_ocean_assets.py
+++ b/ocean_lib/ocean/test/test_ocean_assets.py
@@ -8,13 +8,15 @@
 from datetime import datetime
 from unittest.mock import patch
 
+import brownie
 import eth_keys
 import pytest
+from brownie.network.transaction import TransactionReceipt
 
 from ocean_lib.agreements.service_types import ServiceTypes
 from ocean_lib.assets.asset import Asset
 from ocean_lib.data_provider.data_service_provider import DataServiceProvider
-from ocean_lib.exceptions import AquariusError, ContractNotFound, InsufficientBalance
+from ocean_lib.exceptions import AquariusError, InsufficientBalance
 from ocean_lib.models.data_nft import DataNFT
 from ocean_lib.models.data_nft_factory import DataNFTFactoryContract
 from ocean_lib.ocean.util import get_address_of_type
@@ -54,15 +56,6 @@ def test_update_metadata(publisher_ocean_instance, publisher_wallet):
     new_metadata["updated"] = datetime.utcnow().isoformat()
     ddo.metadata = new_metadata
 
-    with patch(
-        "ocean_lib.ocean.ocean_assets.DataNFTFactoryContract.verify_nft"
-    ) as mock:
-        mock.return_value = False
-        with pytest.raises(ContractNotFound):
-            _asset = publisher_ocean_instance.assets.update(
-                asset=ddo, publisher_wallet=publisher_wallet
-            )
-
     _asset = publisher_ocean_instance.assets.update(
         asset=ddo, publisher_wallet=publisher_wallet
     )
@@ -119,7 +112,7 @@ def test_update_datatokens(
     ddo.datatokens.append(
         {
             "address": datatoken.address,
-            "name": datatoken.contract.caller.name(),
+            "name": datatoken.contract.name(),
             "symbol": datatoken.symbol(),
             "serviceId": access_service.id,
         }
@@ -461,16 +454,10 @@ def test_plain_asset_with_one_datatoken(
         owner=publisher_wallet.address,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-    assert registered_event[0].event == "NFTCreated"
-    assert registered_event[0].args.admin == publisher_wallet.address
-    data_nft_address = registered_event[0].args.newTokenAddress
+    tx_receipt = TransactionReceipt(tx)
+    registered_event = tx_receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
+    assert registered_event["admin"] == publisher_wallet.address
+    data_nft_address = registered_event["newTokenAddress"]
 
     ddo = publisher_ocean_instance.assets.create(
         metadata=metadata,
@@ -518,17 +505,11 @@ def test_plain_asset_multiple_datatokens(
         owner=publisher_wallet.address,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_NFT_CREATED,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
+    tx_receipt = TransactionReceipt(tx)
+    registered_event = tx_receipt.events[DataNFTFactoryContract.EVENT_NFT_CREATED]
 
-    assert registered_event[0].event == "NFTCreated"
-    assert registered_event[0].args.admin == publisher_wallet.address
-    data_nft_address2 = registered_event[0].args.newTokenAddress
+    assert registered_event["admin"] == publisher_wallet.address
+    data_nft_address2 = registered_event["newTokenAddress"]
 
     ddo = publisher_ocean_instance.assets.create(
         metadata=metadata,
@@ -713,7 +694,7 @@ def test_asset_creation_errors(
     _, metadata, files = create_basics(config, web3, data_provider)
 
     some_random_address = ZERO_ADDRESS
-    with pytest.raises(ContractNotFound):
+    with pytest.raises(brownie.exceptions.ContractNotFound):
         publisher_ocean_instance.assets.create(
             metadata=metadata,
             publisher_wallet=publisher_wallet,
diff --git a/ocean_lib/services/test/test_service.py b/ocean_lib/services/test/test_service.py
index 1840aa98c..05a9ea8af 100644
--- a/ocean_lib/services/test/test_service.py
+++ b/ocean_lib/services/test/test_service.py
@@ -197,7 +197,7 @@ def test_inexistent_removals():
     compute_service = ddo.services[1]
 
     with pytest.raises(
-        ValueError, match="Algorithm notadid is not in trusted algorithms"
+        Exception, match="Algorithm notadid is not in trusted algorithms"
     ):
         compute_service.remove_publisher_trusted_algorithm("notadid")
 
@@ -207,7 +207,7 @@ def test_inexistent_removals():
     compute_service = ddo.services[1]
 
     with pytest.raises(
-        ValueError, match="Publisher notadid is not in trusted algorithm publishers"
+        Exception, match="Publisher notadid is not in trusted algorithm publishers"
     ):
         compute_service.remove_publisher_trusted_algorithm_publisher("notadid")
 
diff --git a/ocean_lib/web3_internal/test/test_contract_base.py b/ocean_lib/web3_internal/test/test_contract_base.py
index 852fa5d06..015fde3a2 100644
--- a/ocean_lib/web3_internal/test/test_contract_base.py
+++ b/ocean_lib/web3_internal/test/test_contract_base.py
@@ -5,7 +5,6 @@
 
 import pytest
 from enforce_typing import enforce_types
-from web3.contract import ContractCaller
 
 from ocean_lib.web3_internal.constants import ZERO_ADDRESS
 from ocean_lib.web3_internal.contract_base import ContractBase
@@ -24,17 +23,11 @@ def deploy_erc721_contract(self, erc721_data, from_wallet: Wallet):
 
 @pytest.mark.unit
 def test_name_is_None(web3):
-    with pytest.raises(AssertionError):
+    with pytest.raises(Exception):
         # self.name will become None, triggering the error
         ContractBase(web3, None)
 
 
-@pytest.mark.unit
-def test_nochild(web3):
-    with pytest.raises(AssertionError):
-        ContractBase(web3, None)
-
-
 @pytest.mark.unit
 def test_main(network, alice_wallet, alice_ocean, nft_factory_address, web3):
 
@@ -56,7 +49,6 @@ def test_main(network, alice_wallet, alice_ocean, nft_factory_address, web3):
 
     # test attributes
     assert factory.name == "ERC721Factory"
-    assert isinstance(factory.contract.caller, ContractCaller)
     assert factory.contract is not None
     assert factory.contract.address == nft_factory_address
     assert ContractBase.to_checksum_address(nft_factory_address) == nft_factory_address
@@ -66,11 +58,10 @@ def test_main(network, alice_wallet, alice_ocean, nft_factory_address, web3):
     assert factory.address == nft_factory_address
     assert factory.events
     assert str(factory) == f"{factory.contract_name} @ {factory.address}"
-    assert (
-        "createToken" in factory.function_names
-    ), "The function createToken from the contract does not exist."
-    assert "getCurrentTokenCount" in factory.function_names
-    assert "getTokenTemplate" in factory.function_names
+    assert factory.contract.createToken
+    assert factory.contract.getCurrentTokenCount
+    assert factory.contract.getTokenTemplate
+
     with pytest.raises(ValueError):
         assert factory.get_event_signature("noevent")
 
diff --git a/ocean_lib/web3_internal/web3_overrides/test/test_contract.py b/ocean_lib/web3_internal/web3_overrides/test/test_contract.py
deleted file mode 100644
index c823469e6..000000000
--- a/ocean_lib/web3_internal/web3_overrides/test/test_contract.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright 2022 Ocean Protocol Foundation
-# SPDX-License-Identifier: Apache-2.0
-#
-import pytest
-
-from ocean_lib.models.test.conftest import *  # noqa
-from ocean_lib.web3_internal.constants import ZERO_ADDRESS
-from ocean_lib.web3_internal.test.test_contract_base import MyFactory
-from ocean_lib.web3_internal.web3_overrides.contract import CustomContractFunction
-
-
-@pytest.mark.unit
-def test_main(web3, config, nft_factory_address):
-    factory = MyFactory(web3, nft_factory_address)
-    fn_args = (
-        "NFT",
-        "NFTS",
-        1,
-        ZERO_ADDRESS,
-        ZERO_ADDRESS,
-        "https://oceanprotocol.com/nft/",
-        True,
-        web3.eth.accounts[0],
-    )
-    contract_fn = getattr(factory.contract.functions, "deployERC721Contract")(*fn_args)
-    custom_contract = CustomContractFunction(contract_fn)
-
-    with pytest.raises(ValueError):
-        custom_contract.transact(
-            {"data": "test"},
-            config["BLOCK_CONFIRMATIONS"],
-            config["TRANSACTION_TIMEOUT"],
-        )
-
-    with pytest.raises(ValueError):
-        custom_contract = CustomContractFunction(contract_fn)
-        custom_contract._contract_function.address = None
-        custom_contract.transact(
-            {}, config["BLOCK_CONFIRMATIONS"], config["TRANSACTION_TIMEOUT"]
-        )
diff --git a/tests/flows/test_exchange_swap_fees.py b/tests/flows/test_exchange_swap_fees.py
index 78167e5ce..4f790b015 100644
--- a/tests/flows/test_exchange_swap_fees.py
+++ b/tests/flows/test_exchange_swap_fees.py
@@ -5,6 +5,7 @@
 from decimal import Decimal
 
 import pytest
+from brownie.network.transaction import TransactionReceipt
 from web3 import Web3
 
 from ocean_lib.models.datatoken import Datatoken
@@ -144,19 +145,15 @@ def exchange_swap_fees(
         with_mint=with_mint,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-
-    exchange_event = dt.get_event_log(
-        dt.EVENT_NEW_FIXED_RATE,
-        tx_receipt.blockNumber,
-        web3.eth.block_number,
-        None,
+    receipt = TransactionReceipt(tx)
+    assert (
+        fixed_price_address
+        == receipt.events[dt.EVENT_NEW_FIXED_RATE]["exchangeContract"]
     )
-    assert fixed_price_address == exchange_event[0].args.exchangeContract
 
     exchange = FixedRateExchange(web3, fixed_price_address)
 
-    exchange_id = exchange_event[0].args.exchangeId
+    exchange_id = receipt.events[dt.EVENT_NEW_FIXED_RATE]["exchangeId"]
     assert exchange_id == exchange.generate_exchange_id(bt.address, dt.address)
 
     assert exchange.is_active(exchange_id)
@@ -359,7 +356,7 @@ def buy_or_sell_dt_and_verify_balances_swap_fees(
         consume_market_swap_fee,
         consumer_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
+    receipt = TransactionReceipt(tx)
 
     # Get exchange info again
     exchange_info = exchange.get_exchange(exchange_id)
@@ -371,22 +368,19 @@ def buy_or_sell_dt_and_verify_balances_swap_fees(
     exchange_dt_balance_after = exchange_info[FixedRateExchangeDetails.DT_BALANCE]
 
     # Get Swapped event
-    swapped_event = exchange.get_event_log(
-        exchange.EVENT_SWAPPED, tx_receipt.blockNumber, web3.eth.block_number, None
-    )
-    swapped_event_args = swapped_event[0].args
+    swapped_event = receipt.events[exchange.EVENT_SWAPPED]
 
     # Assign "in" token and "out" token
-    if swapped_event_args.tokenOutAddress == dt.address:
-        in_token_amount = swapped_event_args.baseTokenSwappedAmount
-        out_token_amount = swapped_event_args.datatokenSwappedAmount
+    if swapped_event["tokenOutAddress"] == dt.address:
+        in_token_amount = swapped_event["baseTokenSwappedAmount"]
+        out_token_amount = swapped_event["datatokenSwappedAmount"]
         consumer_in_token_balance_before = consumer_bt_balance_before
         consumer_out_token_balance_before = consumer_dt_balance_before
         consumer_in_token_balance_after = consumer_bt_balance_after
         consumer_out_token_balance_after = consumer_dt_balance_after
     else:
-        in_token_amount = swapped_event_args.datatokenSwappedAmount
-        out_token_amount = swapped_event_args.baseTokenSwappedAmount
+        in_token_amount = swapped_event["datatokenSwappedAmount"]
+        out_token_amount = swapped_event["baseTokenSwappedAmount"]
         consumer_in_token_balance_before = consumer_dt_balance_before
         consumer_out_token_balance_before = consumer_bt_balance_before
         consumer_in_token_balance_after = consumer_dt_balance_after
@@ -403,13 +397,13 @@ def buy_or_sell_dt_and_verify_balances_swap_fees(
     )
 
     # Check exchange balances
-    if swapped_event_args.tokenOutAddress == dt.address:
+    if swapped_event["tokenOutAddress"] == dt.address:
         assert (
             exchange_bt_balance_before
-            + swapped_event_args.baseTokenSwappedAmount
-            - swapped_event_args.marketFeeAmount
-            - swapped_event_args.oceanFeeAmount
-            - swapped_event_args.consumeMarketFeeAmount
+            + swapped_event["baseTokenSwappedAmount"]
+            - swapped_event["marketFeeAmount"]
+            - swapped_event["oceanFeeAmount"]
+            - swapped_event["consumeMarketFeeAmount"]
             == exchange_bt_balance_after
         )
         # When buying DT, exchange DT balance doesn't change because exchange mints DT
@@ -417,14 +411,14 @@ def buy_or_sell_dt_and_verify_balances_swap_fees(
     else:
         assert (
             exchange_bt_balance_before
-            - swapped_event_args.baseTokenSwappedAmount
-            - swapped_event_args.marketFeeAmount
-            - swapped_event_args.oceanFeeAmount
-            - swapped_event_args.consumeMarketFeeAmount
+            - swapped_event["baseTokenSwappedAmount"]
+            - swapped_event["marketFeeAmount"]
+            - swapped_event["oceanFeeAmount"]
+            - swapped_event["consumeMarketFeeAmount"]
             == exchange_bt_balance_after
         )
         assert (
-            exchange_dt_balance_before + swapped_event_args.datatokenSwappedAmount
+            exchange_dt_balance_before + swapped_event["datatokenSwappedAmount"]
             == exchange_dt_balance_after
         )
 
@@ -441,15 +435,15 @@ def buy_or_sell_dt_and_verify_balances_swap_fees(
 
     # Check fees
     assert (
-        publish_market_fee_bt_balance_before + swapped_event_args.marketFeeAmount
+        publish_market_fee_bt_balance_before + swapped_event["marketFeeAmount"]
         == publish_market_fee_bt_balance_after
     )
     assert (
-        opc_fee_bt_balance_before + swapped_event_args.oceanFeeAmount
+        opc_fee_bt_balance_before + swapped_event["oceanFeeAmount"]
         == opc_fee_bt_balance_after
     )
     assert (
-        consume_market_fee_bt_balance_before + swapped_event_args.consumeMarketFeeAmount
+        consume_market_fee_bt_balance_before + swapped_event["consumeMarketFeeAmount"]
         == consume_market_fee_bt_balance_after
     )
 
diff --git a/tests/flows/test_nft_creation.py b/tests/flows/test_nft_creation.py
index 24358ab93..b4e8b90b6 100644
--- a/tests/flows/test_nft_creation.py
+++ b/tests/flows/test_nft_creation.py
@@ -3,7 +3,7 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 import pytest
-from web3 import Web3, exceptions
+from brownie.network.transaction import TransactionReceipt
 
 from ocean_lib.models.data_nft import DataNFT, DataNFTPermissions
 from ocean_lib.models.data_nft_factory import DataNFTFactoryContract
@@ -38,16 +38,12 @@ def test_data_nft_roles(
         owner=publisher_wallet.address,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        event_name=DataNFTFactoryContract.EVENT_NFT_CREATED,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
-    assert registered_event[0].event == DataNFTFactoryContract.EVENT_NFT_CREATED
-    assert registered_event[0].args.admin == publisher_wallet.address
-    token_address = registered_event[0].args.newTokenAddress
+
+    receipt = TransactionReceipt(tx)
+    assert "NFTCreated" in receipt.events
+    assert receipt.events["NFTCreated"]["admin"] == publisher_wallet.address
+
+    token_address = receipt.events["NFTCreated"]["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
 
     # Publisher should be a manager
@@ -140,7 +136,7 @@ def test_nonexistent_template_index(web3, config, publisher_wallet):
     )
     assert non_existent_nft_template >= 0, "Non existent NFT template not found."
 
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="Template index doesnt exist"):
         data_nft_factory.deploy_erc721_contract(
             name="DT1",
             symbol="DTSYMBOL",
@@ -152,11 +148,6 @@ def test_nonexistent_template_index(web3, config, publisher_wallet):
             owner=publisher_wallet.address,
             from_wallet=publisher_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721DTFactory: Template index "
-        "doesnt exist"
-    )
 
 
 @pytest.mark.unit
@@ -177,19 +168,15 @@ def test_successful_data_nft_creation(web3, config, publisher_wallet):
         owner=publisher_wallet.address,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        event_name=DataNFTFactoryContract.EVENT_NFT_CREATED,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
-    assert registered_event[0].event == DataNFTFactoryContract.EVENT_NFT_CREATED
-    assert registered_event[0].args.admin == publisher_wallet.address
-    token_address = registered_event[0].args.newTokenAddress
+
+    receipt = TransactionReceipt(tx)
+    assert "NFTCreated" in receipt.events
+    assert receipt.events["NFTCreated"]["admin"] == publisher_wallet.address
+
+    token_address = receipt.events["NFTCreated"]["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
     owner_balance = data_nft.balance_of(publisher_wallet.address)
-    assert data_nft.contract.caller.name() == "NFT"
+    assert data_nft.contract.name() == "NFT"
     assert data_nft.symbol() == "NFTSYMBOL"
     assert owner_balance == 1
 
@@ -248,14 +235,8 @@ def test_datatoken_creation(
         owner=publisher_wallet.address,
         from_wallet=publisher_wallet,
     )
-    tx_receipt = web3.eth.wait_for_transaction_receipt(tx)
-    registered_event = data_nft_factory.get_event_log(
-        event_name=DataNFTFactoryContract.EVENT_NFT_CREATED,
-        from_block=tx_receipt.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
-    token_address = registered_event[0].args.newTokenAddress
+
+    token_address = TransactionReceipt(tx).events["NFTCreated"]["newTokenAddress"]
     data_nft = DataNFT(web3, token_address)
     data_nft.add_to_create_erc20_list(consumer_wallet.address, publisher_wallet)
     tx_result = data_nft.create_erc20(
@@ -270,16 +251,7 @@ def test_datatoken_creation(
         bytess=[b""],
         from_wallet=consumer_wallet,
     )
-    tx_receipt2 = web3.eth.wait_for_transaction_receipt(tx_result)
-
-    registered_event2 = data_nft_factory.get_event_log(
-        event_name=DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        from_block=tx_receipt2.blockNumber,
-        to_block=web3.eth.block_number,
-        filters=None,
-    )
-
-    datatoken_address = registered_event2[0].args.newTokenAddress
+    datatoken_address = TransactionReceipt(tx).events["NFTCreated"]["newTokenAddress"]
 
     datatoken = Datatoken(web3, datatoken_address)
 
@@ -289,7 +261,7 @@ def test_datatoken_creation(
     assert tx_result, "Error creating datatoken."
 
     # Tests failed creation of datatoken
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT ERC20DEPLOYER_ROLE"):
         data_nft.create_erc20(
             template_index=1,
             name="DT1",
@@ -302,11 +274,6 @@ def test_datatoken_creation(
             bytess=[b""],
             from_wallet=another_consumer_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: NOT "
-        "ERC20DEPLOYER_ROLE"
-    )
 
 
 @pytest.mark.unit
@@ -321,12 +288,8 @@ def test_datatoken_mint_function(
     assert datatoken.balanceOf(consumer_wallet.address) == 20
 
     # Tests failed mint
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT MINTER"):
         datatoken.mint(publisher_wallet.address, 10, consumer_wallet)
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT MINTER"
-    )
 
     # Test with another minter
     _, datatoken_2 = deploy_erc721_erc20(
@@ -348,23 +311,22 @@ def test_datatoken_set_data(web3, config, publisher_wallet, data_nft, datatoken)
     can be done only by who has deployERC20 rights(rights to create new erc20 token contract)
     the value is stored into the 725Y standard with a predefined key which is the erc20Token address"""
 
-    key = Web3.keccak(hexstr=datatoken.address)
-
-    value = Web3.toHex(text="SomeData")
+    key = web3.keccak(hexstr=datatoken.address)
+    value = b"SomeData"
 
-    assert Web3.toHex(data_nft.get_data(key)) == "0x"
+    assert data_nft.get_data(key) == "0x"
     datatoken.set_data(value, publisher_wallet)
 
-    assert Web3.toHex(data_nft.get_data(key)) == value
+    assert data_nft.get_data(key).hex() == value.hex()
     """This one is the generic version of updating data into the key-value story.
     Only users with 'store' permission can do that.
     NOTE: in this function the key is chosen by the caller."""
 
-    data_nft.set_new_data(Web3.keccak(text="arbitrary text"), value, publisher_wallet)
+    data_nft.set_new_data(b"arbitrary text", value, publisher_wallet)
 
-    res = data_nft.get_data(Web3.keccak(text="arbitrary text"))
+    res = data_nft.get_data(b"arbitrary text")
 
-    assert Web3.toHex(res) == value
+    assert res.hex() == value.hex()
 
 
 @pytest.mark.unit
@@ -375,14 +337,10 @@ def test_nft_owner_transfer(
 
     assert data_nft.owner_of(1) == publisher_wallet.address
 
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="transfer of token that is not own"):
         data_nft.transfer_from(
             consumer_wallet.address, publisher_wallet.address, 1, publisher_wallet
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721: transfer of token that is not own"
-    )
     data_nft.transfer_from(
         publisher_wallet.address, consumer_wallet.address, 1, publisher_wallet
     )
@@ -390,7 +348,7 @@ def test_nft_owner_transfer(
     assert data_nft.balance_of(publisher_wallet.address) == 0
     assert data_nft.owner_of(1) == consumer_wallet.address
     # Owner is not NFT owner anymore, nor has any other role, neither older users
-    with pytest.raises(exceptions.ContractLogicError) as err:
+    with pytest.raises(Exception, match="NOT ERC20DEPLOYER_ROLE"):
         data_nft.create_erc20(
             template_index=1,
             name="DT1",
@@ -403,16 +361,9 @@ def test_nft_owner_transfer(
             bytess=[b""],
             from_wallet=publisher_wallet,
         )
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC721Template: NOT ERC20DEPLOYER_ROLE"
-    )
-    with pytest.raises(exceptions.ContractLogicError) as err:
+
+    with pytest.raises(Exception, match="NOT MINTER"):
         datatoken.mint(publisher_wallet.address, 10, publisher_wallet)
-    assert (
-        err.value.args[0]
-        == "execution reverted: VM Exception while processing transaction: revert ERC20Template: NOT MINTER"
-    )
 
     # NewOwner now owns the NFT, is already Manager by default and has all roles
     data_nft.create_erc20(
diff --git a/tests/integration/ganache/test_compute_flow.py b/tests/integration/ganache/test_compute_flow.py
index 1e11e705b..a3f2a2f85 100644
--- a/tests/integration/ganache/test_compute_flow.py
+++ b/tests/integration/ganache/test_compute_flow.py
@@ -390,7 +390,6 @@ def test_compute_raw_algo(
 
 
 @pytest.mark.integration
-@pytest.mark.skip(reason="Don't skip, once fixed #988")
 def test_compute_registered_algo(
     publisher_wallet,
     publisher_ocean_instance,
@@ -409,7 +408,6 @@ def test_compute_registered_algo(
 
 
 @pytest.mark.integration
-@pytest.mark.skip(reason="Don't skip, once fixed #988")
 def test_compute_reuse_order(
     publisher_wallet,
     publisher_ocean_instance,
@@ -429,7 +427,6 @@ def test_compute_reuse_order(
 
 
 @pytest.mark.integration
-@pytest.mark.skip(reason="Don't skip, once fixed #988")
 def test_compute_multi_inputs(
     publisher_wallet,
     publisher_ocean_instance,
@@ -452,7 +449,6 @@ def test_compute_multi_inputs(
 
 
 @pytest.mark.integration
-@pytest.mark.skip(reason="Don't skip, once fixed #988")
 def test_compute_trusted_algorithm(
     publisher_wallet,
     publisher_ocean_instance,
@@ -491,7 +487,6 @@ def test_compute_trusted_algorithm(
 
 
 @pytest.mark.integration
-@pytest.mark.skip(reason="Don't skip once fixed #905")
 def test_compute_update_trusted_algorithm(
     publisher_wallet,
     publisher_ocean_instance,
diff --git a/tests/integration/ganache/test_market_flow.py b/tests/integration/ganache/test_market_flow.py
index 11e91f4be..fcc456839 100644
--- a/tests/integration/ganache/test_market_flow.py
+++ b/tests/integration/ganache/test_market_flow.py
@@ -94,11 +94,6 @@ def test_market_flow(
         orders
     ), f"no orders found using the order history: datatoken {datatoken.address}, consumer {consumer_wallet.address}"
 
-    orders = consumer_ocean.get_user_orders(consumer_wallet.address)
-    assert (
-        orders
-    ), f"no orders found using the order history: datatoken {datatoken.address}, consumer {consumer_wallet.address}"
-
 
 @pytest.mark.integration
 def test_pay_for_access_service_good_default(
diff --git a/tests/integration/remote/test_mumbai.py b/tests/integration/remote/test_mumbai.py
index 3c54090df..ad66adba8 100644
--- a/tests/integration/remote/test_mumbai.py
+++ b/tests/integration/remote/test_mumbai.py
@@ -3,15 +3,15 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 import random
+import time
 import warnings
 
-import pytest
 import requests
-import time
 
-from .util import get_wallets, random_chars
 from ocean_lib.ocean.ocean import Ocean
 
+from .util import get_wallets, random_chars
+
 
 def test_nonocean_tx(tmp_path):
     """Do a simple non-Ocean tx on Mumbai. Only use Ocean config"""
@@ -60,14 +60,13 @@ def test_nonocean_tx(tmp_path):
     assert bob_eth_after > bob_eth_before
 
 
-@pytest.mark.skip(reason="Don't skip, once fixed #943")
 def test_ocean_tx__create_data_nft(tmp_path):
     """On Mumbai, do a simple Ocean tx: create_data_nft"""
 
     # setup
     config = _remote_config_mumbai(tmp_path)
     ocean = Ocean(config)
-    (alice_wallet, _) = _get_wallets(ocean)
+    (alice_wallet, _) = get_wallets(ocean)
 
     # Alice publish data NFT
     # avoid "replacement transaction underpriced" error: make each tx diff't
diff --git a/tests/readmes/test_c2d_flow.py b/tests/readmes/test_c2d_flow.py
index 0ace9e6e5..83a0d6582 100644
--- a/tests/readmes/test_c2d_flow.py
+++ b/tests/readmes/test_c2d_flow.py
@@ -135,7 +135,7 @@ def c2d_flow_readme(
     DATA_compute_service = Service(
         service_id="2",
         service_type="compute",
-        service_endpoint=ocean.config.provider_url,
+        service_endpoint=ocean.config_dict["PROVIDER_URL"],
         datatoken=DATA_datatoken.address,
         files=DATA_files,
         timeout=3600,
diff --git a/tests/resources/helper_functions.py b/tests/resources/helper_functions.py
index 3d61a6982..7eb3d11da 100644
--- a/tests/resources/helper_functions.py
+++ b/tests/resources/helper_functions.py
@@ -12,6 +12,7 @@
 
 import coloredlogs
 import yaml
+from brownie.network.transaction import TransactionReceipt
 from enforce_typing import enforce_types
 from eth_keys import KeyAPI
 from eth_keys.backends import NativeECCBackend
@@ -252,16 +253,10 @@ def deploy_erc721_erc20(
         bytess=[b""],
         from_wallet=data_nft_publisher,
     )
-    tx_receipt2 = web3.eth.wait_for_transaction_receipt(tx_result)
+    tx_receipt2 = TransactionReceipt(tx_result)
 
-    registered_event2 = data_nft_factory.get_event_log(
-        DataNFTFactoryContract.EVENT_TOKEN_CREATED,
-        tx_receipt2.blockNumber,
-        web3.eth.block_number,
-        None,
-    )
-
-    datatoken_address = registered_event2[0].args.newTokenAddress
+    registered_event2 = tx_receipt2.events[DataNFTFactoryContract.EVENT_TOKEN_CREATED]
+    datatoken_address = registered_event2["newTokenAddress"]
 
     datatoken = Datatoken(web3, datatoken_address)
 
diff --git a/tests/stress/compute_flow_with_threads.py b/tests/stress/compute_flow_with_threads.py
index 54da9da11..7e9565c45 100644
--- a/tests/stress/compute_flow_with_threads.py
+++ b/tests/stress/compute_flow_with_threads.py
@@ -72,7 +72,7 @@ def c2d_flow_readme(
     DATA_compute_service = Service(
         service_id="2",
         service_type="compute",
-        service_endpoint=ocean.config.provider_url,
+        service_endpoint=ocean.config["PROVIDER_URL"],
         datatoken=DATA_datatoken.address,
         files=DATA_files,
         timeout=3600,