abstract_cw20/logo.rs
1use cosmwasm_schema::cw_serde;
2use cosmwasm_std::Binary;
3
4/// This is used for uploading logo data, or setting it in InstantiateData
5#[cw_serde]
6
7pub enum Logo {
8 /// A reference to an externally hosted logo. Must be a valid HTTP or HTTPS URL.
9 Url(String),
10 /// Logo content stored on the blockchain. Enforce maximum size of 5KB on all variants
11 Embedded(EmbeddedLogo),
12}
13
14/// This is used to store the logo on the blockchain in an accepted format.
15/// Enforce maximum size of 5KB on all variants.
16#[cw_serde]
17
18pub enum EmbeddedLogo {
19 /// Store the Logo as an SVG file. The content must conform to the spec
20 /// at https://en.wikipedia.org/wiki/Scalable_Vector_Graphics
21 /// (The contract should do some light-weight sanity-check validation)
22 Svg(Binary),
23 /// Store the Logo as a PNG file. This will likely only support up to 64x64 or so
24 /// within the 5KB limit.
25 Png(Binary),
26}
27
28/// This is used to display logo info, provide a link or inform there is one
29/// that can be downloaded from the blockchain itself
30#[cw_serde]
31
32pub enum LogoInfo {
33 /// A reference to an externally hosted logo. Must be a valid HTTP or HTTPS URL.
34 Url(String),
35 /// There is an embedded logo on the chain, make another call to download it.
36 Embedded,
37}