File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed
stellar-registry-cli/src/commands Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,16 @@ impl Cmd {
6363 args. extend ( spec?. meta . iter ( ) . filter_map ( |entry| match entry {
6464 ScMetaEntry :: ScMetaV0 ( ScMetaV0 { key, val } ) => {
6565 let key_str = key. to_string ( ) ;
66- // TODO add source repository when registry contract supports it
67- if key_str == "wasm_name" || key_str == "version" {
68- Some ( format ! ( "--{key_str}={val}" ) )
69- } else {
70- None
66+ match key_str. as_str ( ) {
67+ "name" => {
68+ Some ( format ! ( "--wasm_name={val}" ) )
69+ }
70+ "binver" => {
71+ Some ( format ! ( "--version={val}" ) )
72+ }
73+ _ => {
74+ None
75+ }
7176 }
7277 }
7378 } ) ) ;
Original file line number Diff line number Diff line change @@ -86,9 +86,9 @@ Contract metadata is set when running `stellar scaffold build` and adds the foll
8686
8787| Metadata | Cargo.toml Key (under ` package ` ) | Description |
8888| ------------| ----------------| --------------------------------------------------|
89- | ` wasm_name ` | ` name ` | The name of the contract |
90- | ` version ` | ` version ` | The version of the contract |
91- | ` authors ` | ` authors ` | The author(s) of the contract, often with an email |
89+ | ` name ` | ` name ` | The name of the contract |
90+ | ` binver ` | ` version ` | The version of the WASM bytecode of the contract |
91+ | ` authors ` | ` authors ` | The author(s) of the contract, often with an email |
9292| ` home_domain ` | ` homepage ` | The relevant domain to relate to this contract |
9393| ` source_repo ` | ` repository ` | The source repository URL for the contract |
9494
Original file line number Diff line number Diff line change @@ -118,17 +118,16 @@ impl Command {
118118 } ) ;
119119 cmd. package = Some ( p. name . clone ( ) ) ;
120120 if !p. name . is_empty ( ) {
121- cmd. meta . push ( ( "wasm_name " . to_string ( ) , p. name . clone ( ) ) ) ;
121+ cmd. meta . push ( ( "name " . to_string ( ) , p. name . clone ( ) ) ) ;
122122 }
123123 if !p. version . to_string ( ) . is_empty ( ) {
124124 cmd. meta
125- . push ( ( "version " . to_string ( ) , p. version . to_string ( ) ) ) ;
125+ . push ( ( "binver " . to_string ( ) , p. version . to_string ( ) ) ) ;
126126 }
127127 if p. homepage . is_some ( ) {
128128 cmd. meta
129129 . push ( ( "home_domain" . to_string ( ) , p. homepage . clone ( ) . unwrap ( ) ) ) ;
130130 }
131- // TODO: 'authors' is deprecated; should we use a metadata field instead?
132131 if !p. authors . is_empty ( ) {
133132 cmd. meta . push ( ( "authors" . to_string ( ) , p. authors . join ( ", " ) ) ) ;
134133 }
You can’t perform that action at this time.
0 commit comments