Skip to content

Commit

Permalink
GITBOOK-230: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
brunopgalvao authored and gitbook-bot committed Nov 13, 2024
1 parent a992360 commit ec78edc
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,27 @@ ink! allows you to write smart contracts using Rust. That means you get all the

The ink! embedded domain-specific language (eDSL) retro-fits your Rust code with powerful features that enhance smart contract development. In doing so, ink! improves the developer ergonomics when it comes to using Rust for writing smart contracts.

Let's create a simple ink! smart contract:
Let's create a simple ink! smart contract using the "flipper" template:

```
pop new contract flipper
pop new contract
```

┌ Pop CLI : Generating new contract "flipper"!
```
┌ Pop CLI : Generate a contract
◇ Smart contract created! Located in the following directory "/flipper"
◇ Select a template type:
│ Examples
└ cd into "flipper" and enjoy hacking! 🚀
◇ Select the contract:
│ Standard
◆ Where should your project be created?
│ ./flipper
```

By default, when we generate an ink! smart contract using the command above, we get a template (the "flipper" template). It serves as a good starting point for contract development.

Pop CLI supports several templates. If you would like to know what templates are available you can run the following command to see a list: `pop new contract --help`
Flipper is a good starting point for those new to ink! smart contract development.

Let's look at our first bit of ink! code.

Expand Down Expand Up @@ -155,7 +161,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fini
└ Unit testing complete
```

Okay, so you contract builds, your contract passes the tests. We can now deploy the contract.
Okay, so you contract builds and passes the tests. We can now deploy the contract to Pop.

### Deploy your contract <a href="#deploy-your-contract-locally" id="deploy-your-contract-locally"></a>

Expand Down

0 comments on commit ec78edc

Please sign in to comment.