stellar / rs-soroban-sdk

Rust SDK for Soroban contracts.
Apache License 2.0
118 stars 66 forks source link

Fix contract-meta warning #1282

Closed leighmcculloch closed 3 months ago

leighmcculloch commented 3 months ago

What

Change the format of the variable that contractmeta is written into so that the name is all uppercase.

Why

Each contract meta is written into a static variable that the compiler picks up and appends to a custom section. The names of the variables need to be unique so they're given a name with a common prefix and a suffix that is the hex encoded version of the key. The hex encoding used lower case alpha characters, which results in a warning because static variables are customarily all upper case.

This change should have no material impact as the variables are not intended for any programmatic use and exist only to inject the data into the custom section.

Related conversation: