Skip to content

Commit

Permalink
Rename metadata file (#1856)
Browse files Browse the repository at this point in the history
* rename metadata file

* rename other places

---------

Co-authored-by: lisa-parity <[email protected]>
Co-authored-by: Hernando Castano <[email protected]>
  • Loading branch information
3 people authored Feb 23, 2023
1 parent 2b26e59 commit 67db074
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions content/md/en/docs/reference/command-line-tools/subxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You can use the following optional flags with the `subxt` command.

| Flag | Description
| ------- | -----------
| -h, --help | Displays usage information.
| -h, --help | Displays usage information.
| -V, --version | Displays version information.

### Subcommands
Expand All @@ -47,7 +47,7 @@ You can use the following subcommands with the `subxt` command-line interface.

| Command | Description
| ------- | -----------
| `codegen` | Generates runtime API client code from metadata.
| `codegen` | Generates runtime API client code from metadata.
| `metadata` | Downloads metadata from a Substrate node for use with `subxt` codegen.

### Output
Expand Down Expand Up @@ -141,8 +141,8 @@ To save the metadata from the local node encoded in bytes to a file, run the fol

To save the metadata from the Rococo network to a JSON file, run the following command:

`subxt metadata --url https://rococo-rpc.polkadot.io:443 > metadata.json`
`subxt metadata --url https://rococo-rpc.polkadot.io:443 > <contract_name>.json`

To query type `125` from the array of types in the metadata and output in JSON, run the following command:

`subxt metadata --format json | jq '.[1].V14.types.types | .[125]'`
`subxt metadata --format json | jq '.[1].V14.types.types | .[125]'`
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ To build the WebAssembly for this smart contract:
- incrementer.contract (code + metadata)
- incrementer.wasm (the contract's code)
- metadata.json (the contract's metadata)
- incrementer.json (the contract's metadata)
```

## Deploy and test the smart contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ To build the WebAssembly for this smart contract:
- flipper.contract (code + metadata)
- flipper.wasm (the contract's code)
- metadata.json (the contract's metadata)
- flipper.json (the contract's metadata)
```

The `.contract` file includes both the business logic and metadata. This is the file that tooling (e.g UIs) expect
when you want to deploy your contract on-chain.

The `metadata.json` file describes all the interfaces that you can use to interact with this contract. This file
The `.json` file describes all the interfaces that you can use to interact with this contract. This file
contains several important sections:

- The `spec` section includes information about the functions—like **constructors** and **messages**—that can be
Expand Down

0 comments on commit 67db074

Please sign in to comment.