File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
cmd/crates/soroban-test/tests/it/integration Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,22 @@ fn run_command(
8282 modified_args. push ( key_xdr. to_string ( ) ) ;
8383 skip_next = true ;
8484 }
85+ "--manifest-path" => {
86+ // this defaults to the hello_world manifest path in fixtures/test-wasms
87+ let hello_world_manifest_path = get_repo_root ( )
88+ . join ( "cmd" )
89+ . join ( "crates" )
90+ . join ( "soroban-test" )
91+ . join ( "tests" )
92+ . join ( "fixtures" )
93+ . join ( "test-wasms" )
94+ . join ( "hello_world" )
95+ . join ( "Cargo.toml" ) ;
96+ modified_args. push ( arg. to_string ( ) ) ;
97+ modified_args. push ( hello_world_manifest_path. display ( ) . to_string ( ) ) ;
98+ skip_next = true ;
99+ }
100+
85101 "<DURABILITY>" => {
86102 modified_args. push ( "persistent" . to_string ( ) ) ;
87103 skip_next = false ;
Original file line number Diff line number Diff line change 1+ ---
2+ title : Add meta data to contract WASM on build
3+ hide_table_of_contents : true
4+ description : Include meta data in the contract WASM byte code on build
5+ custom_edit_url : https://github.com/stellar/stellar-cli/edit/main/cookbook/contract-build-meta.mdx
6+ ---
7+
8+ To build a smart contract, use the ` stellar contract build ` command. The ` --meta ` option will allow you to add additional meta data entries to the ` contractmetav0 ` custom section of the resulting WASM file at build time.
9+
10+ ``` bash cookbooktest.ignore
11+ export SHA=$( git rev-parse HEAD)
12+ ```
13+
14+ ``` bash
15+ stellar contract build \
16+ --manifest-path ./cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml \
17+ --meta source_repo=https://github.com/stellar/stellar-cli \
18+ --meta commit_sha=$SHA
19+ ```
20+
21+ You can then use ` stellar contract info meta ` to see the meta data:
22+
23+ ``` bash
24+ stellar contract info meta \
25+ --wasm target/wasm32v1-none/release/test_hello_world.wasm
26+ ```
27+
28+ ``` bash cookbooktest.ignore
29+ Contract meta:
30+ • rsver: 1.91.0 (Rust version)
31+ • rssdkver: 23.0.1#510d3feb724c2b01d7e7ab7652f03b9f8efc3f35 (Soroban SDK version and its commit hash)
32+ • cliver: 23.1.4#v20.0.0-646-g70895dd66fb7dbf2f4c2a81cf38546512ba4198e-dirty
33+ • source_repo: https://github.com/stellar/stellar-cli
34+ • commit_sha: c6f881689d3f4936cb3262089eb70142e9ca9c91
35+ ```
You can’t perform that action at this time.
0 commit comments