Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
ink
Commits
0bca8dca
Unverified
Commit
0bca8dca
authored
Nov 14, 2019
by
Hero Bird
Committed by
GitHub
Nov 14, 2019
Browse files
Improve README readability of some code snippets
parent
ef960aae
Pipeline
#56965
failed with stages
in 1 minute and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
0bca8dca
...
...
@@ -49,11 +49,15 @@ Use the `--force` to ensure you are updated to the most recent `cargo-contract`
To build a single example and generate the contracts Wasm file, navigate to the root of the example smart contract and run:
`cargo contract build`
```
cargo contract build
```
To generate the contract metadata (a.k.a. the contract ABI), run the following command:
`cargo contract generate-metadata`
```
cargo contract generate-metadata
```
You should now have an optimized
`<contract-name>.wasm`
file and an
`metadata.json`
file in the
`target`
folder of the contract.
...
...
@@ -66,7 +70,9 @@ that it can flip from `true` to `false` and vice versa and return the current st
To create your own version of the flipper contract, you first need to initialize a new ink! project in your working directory.
`cargo contract new flipper`
```
cargo contract new flipper
```
Below you can see the code using the
`ink_lang2`
version of ink!.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment