Skip to content
Merged
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
16 changes: 10 additions & 6 deletions scripts/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ def check_schema(test_data):
with open(example_file, "r") as f:
example = json.load(f)

optional_fields = {"logo"}
ok = True
for key, example_value in example.items():
if key not in test_data:
if key in optional_fields:
continue
print(f"❌ Missing field: '{key}'")
ok = False
continue
Expand Down Expand Up @@ -126,13 +129,14 @@ def main():
else:
print(f"✅ Name is valid: '{name_value.strip()}'")

# --- Check: 'logo' must point to a valid image URL ---
# --- Check: 'logo' must point to a valid image URL (optional) ---
logo = data.get("logo")
if check_logo(logo):
print("✅ Logo is valid")
else:
print(f"❌ Logo {logo} check failed")
sys.exit(1)
if logo is not None:
if check_logo(logo):
print("✅ Logo is valid")
else:
print(f"❌ Logo {logo} check failed")
sys.exit(1)

# --- Check: on-chain keys must match payload keys
secp_chain, bls_chain = get_validator_keys(validator_id, network)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"bls": "90b6b15a708aa6258622911b6cb4467918888f9943cb8141143a41094097578014318678fe56b0d2744fab6d617c93c8",
"website": "https://t.me/Anril44",
"description": "blockchain developer",
"logo": "https://raw.githubusercontent.com/anril44/assets/main/logos/anril-1.jpg",
"x": "https://x.com/AnRil44"
}
Loading