mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-11-10 10:05:17 +00:00
b6972b97af
Some checks are pending
abi-consistent-check / build-and-compare (push) Waiting to run
code-coverage / unittest-cov (push) Waiting to run
rust / check (push) Waiting to run
rust / test (push) Waiting to run
rust / lints (push) Waiting to run
functional-test / test (push) Waiting to run
* Adjust default value for testnet configs * Supports to disable sequential auto sync * Add py tests for auto sync * fix py file name * rm dummy ;py code * change default block confirm count
12 lines
324 B
Python
12 lines
324 B
Python
from pathlib import Path
|
|
import json
|
|
|
|
def load_contract_metadata(path: str, name: str):
|
|
path = Path(path)
|
|
try:
|
|
found_file = next(path.rglob(f"{name}.json"))
|
|
return json.loads(open(found_file, "r").read())
|
|
except StopIteration:
|
|
raise Exception(f"Cannot found contract {name}'s metadata")
|
|
|