Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more details for malformed addrs #676

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,14 @@ jobs:
pip install -r requirements_dev.txt
- name: Delete default runner images
run: |
docker image rm node:14
alexcos20 marked this conversation as resolved.
Show resolved Hide resolved
docker image rm node:14-alpine
docker image rm node:16
docker image rm node:16-alpine
docker image rm node:18
docker image rm node:18-alpine
docker image rm node:20
docker image rm node:20-alpine
docker image rm buildpack-deps:buster
docker image rm buildpack-deps:bullseye
docker image rm debian:10
docker image rm debian:11
docker image rm moby/buildkit:latest
docker image rm alpine:3.16
docker image rm alpine:3.17
docker image rm alpine:3.18
docker image rm ubuntu:18.04
docker image rm ubuntu:20.04
- name: Wait for contracts deployment and C2D cluster to be ready
working-directory: ${{ github.workspace }}/barge
run: |
Expand Down
27 changes: 18 additions & 9 deletions ocean_provider/utils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,29 @@ def get_service_files_list(
f"Provider {network_name}: Key {key} not found in files."
)

if Web3.toChecksumAddress(
files_json["datatokenAddress"]
) != Web3.toChecksumAddress(service.datatoken_address):
try:
if Web3.toChecksumAddress(
files_json["datatokenAddress"]
) != Web3.toChecksumAddress(service.datatoken_address):
raise Exception(
f"Provider {network_name}: Mismatch of datatoken. Got {files_json['datatokenAddress']} vs expected {service.datatoken_address}"
)
except Exception as e:
raise Exception(
f"Provider {network_name}: Mismatch of datatoken. Got {files_json['datatokenAddress']} vs expected {service.datatoken_address}"
f"Provider {network_name}: Invalid datatokenAddress. Got {files_json['datatokenAddress']} vs expected {service.datatoken_address}"
)

if Web3.toChecksumAddress(files_json["nftAddress"]) != Web3.toChecksumAddress(
asset.nftAddress
):
try:
if Web3.toChecksumAddress(
files_json["nftAddress"]
) != Web3.toChecksumAddress(asset.nftAddress):
raise Exception(
f"Provider {network_name}: Mismatch of dataNft. Got {files_json['nftAddress']} vs expected {asset.nftAddress}"
)
except:
raise Exception(
f"Provider {network_name}: Mismatch of dataNft. Got {files_json['nftAddress']} vs expected {asset.nftAddress}"
f"Provider {network_name}: Invalid nftAddress. Got {files_json['nftAddress']} vs expected {asset.nftAddress}"
)

files_list = files_json["files"]
if not isinstance(files_list, list):
raise TypeError(
Expand Down
Loading