Skip to content

Commit

Permalink
editorial
Browse files Browse the repository at this point in the history
  • Loading branch information
briwylde08 committed Dec 2, 2024
1 parent 52d2e92 commit cdc22f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions docs/build/guides/testing/unit-tests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fn test() {
assert_eq!(client.increment(), 3);
}
```

Ref: https://github.com/stellar/soroban-examples/blob/main/increment/src/test.rs

:::tip
Expand All @@ -42,6 +43,7 @@ The Env created at the beginning of the test is not a simulation of the Soroban
It's a simple test, but it's a complete test. There's a full environment setup, used, and torn down in the test, and it happens fast. The Rust test harness runs all the tests for a contract in parallel and each will have its own isolated contract environment.

Most tests, even integration tests and fuzz tests, will look very similar to this unit test. They'll do four things:

1. Create an environment, the `Env`.
2. Register the contract(s) to be tested.
3. Invoke functions using a client.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 50
title: 5. Move from Testnet to Mainnet
description: Move from Testnet to Miannet.
description: Move from Testnet to Mainnet
pagination_next: build/apps/dapp-frontend
---

Expand All @@ -17,7 +17,7 @@ import { getPlatform } from "@site/src/helpers/getPlatform";

## Moving a Contract from Testnet to Mainnet

This guide outlines the process for securely deploying Soroban smart contracts from testnet to mainnet using GitHub Actions and Github Attestation for source code validation.
This guide outlines the process for securely deploying Stellar smart contracts from Testnet to Mainnet using GitHub Actions and Github Attestation for source code validation.

## Steps to Deploy

Expand Down Expand Up @@ -57,9 +57,9 @@ jobs:
- Trigger the workflow by pushing a new tag (e.g., `v1.0`).
- The workflow will:
- Compile the contract to WASM.
- Compile the contract to Wasm.
- Publish a GitHub release with build artifacts.
- Generate a GitHub attestation, linking the WASM to the source code.
- Generate a GitHub attestation, linking the Wasm to the source code.

```bash
stellar contract build \
Expand All @@ -70,16 +70,16 @@ jobs:

### 3. Deploy to Mainnet

- Retrieve the compiled WASM from the GitHub release.
- Deploy the WASM to the Stellar mainnet using the Soroban CLI:
- Retrieve the compiled Wasm from the GitHub release.
- Deploy the Wasm to the Stellar Mainnet using the Stellar CLI:

```bash
stellar contract deploy --source-acount <source-account> --wasm <path-to-wasm> --network mainnet
```

### 4. Verify Contract Authenticity

Use the GitHub API to confirm the WASM's source: Retrieve attestation via: `https://api.github.com/repos/<user_name>/<repo_name>/attestations/sha256:<wasm_hash>` Ensure the source code and commit hash match the deployed contract.
Use the GitHub API to confirm the Wasm's source: Retrieve attestation via: `https://api.github.com/repos/<user_name>/<repo_name>/attestations/sha256:<wasm_hash>` Ensure the source code and commit hash match the deployed contract.

## Up next

Expand Down

0 comments on commit cdc22f2

Please sign in to comment.