process_and_upload_protocol_metadata

Documentation for eth_defi.vault.protocol_metadata.process_and_upload_protocol_metadata function.

process_and_upload_protocol_metadata(slug, bucket_name, endpoint_url, access_key_id, secret_access_key, public_url, key_prefix='')

Process and upload a single protocol’s metadata and logos to R2.

Reads the YAML metadata file, builds the JSON with logo URLs, and uploads the JSON and any available logo files to R2.

Parameters
  • slug (str) – Protocol slug (e.g., “euler”, “lagoon-finance”)

  • bucket_name (str) – R2 bucket name

  • endpoint_url (str) – R2 API endpoint URL

  • access_key_id (str) – R2 access key ID

  • secret_access_key (str) – R2 secret access key

  • public_url (str) – Public base URL for constructing logo URLs in metadata

  • key_prefix (str) – Optional prefix for R2 keys (e.g., “test-” for testing)

Returns

The processed VaultProtocolMetadata dict

Return type

eth_defi.vault.protocol_metadata.VaultProtocolMetadata