Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 80 additions & 80 deletions .source/index.ts

Large diffs are not rendered by default.

105 changes: 64 additions & 41 deletions content/docs/devs/firstMoveContract.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,53 @@ This tutorial uses the **Movement CLI**, but the commands are identical for the

---

## Step 1: Initialize the CLI
## Step 1: Scaffold the Project

First, let's set up the structure for your Move module.

### Initialize the Move Project

Open your command prompt or terminal and navigate to the directory where you want to create your project. Then, run the following command:

```bash
movement move init --name hello_blockchain
```

This command creates the necessary folders and files for your Move project:

```
Move.toml
sources/
scripts/
tests/
```

- **Move.toml**: Configuration file for your Move project.
- **sources/**: Directory where you'll write your Move modules.
- **scripts/**: Directory for transaction scripts (optional).
- **tests/**: Directory for writing unit tests.

---

## Step 2: Initialize the CLI

If you are using Aptos CLI - ensure that you are using version 3.5 or lower. You can replace all `movement` commands with `aptos` in the following steps.

Open your command prompt or terminal and navigate to the directory where you want to create your project. Then, initialize the CLI with the following command:
Now, initialize the CLI with the following command:

```bash
movement init
```

<Callout type="info">

**Alternative:** You can also use the following command to skip the interactive prompts:

```bash
movement init --network custom --rest-url https://testnet.movementnetwork.xyz/v1 --faucet-url https://faucet.testnet.movementnetwork.xyz/
```

</Callout>

### CLI Prompts

Expand All @@ -41,8 +78,8 @@ movement init

You will be promted for the following details from our [Network EndPoints](/devs/networkEndpoints)

- RPC/Rest Endpoint: https://testnet.bardock.movementnetwork.xyz/v1
- Faucet Endpoint: https://faucet.testnet.bardock.movementnetwork.xyz/
- RPC/Rest Endpoint: https://testnet.movementnetwork.xyz/v1
- Faucet Endpoint: https://faucet.testnet.movementnetwork.xyz/

1. **Enter Private Key**

Expand Down Expand Up @@ -76,11 +113,9 @@ Note that Bardock Explorer is available here: https://explorer.movementnetwork.x

---

## Step 3: Fund Your Account (If Needed)


## Step 2: Fund Your Account

Before deploying contracts, you'll need testnet tokens.
If the faucet failed to automatically fund your account during initialization, you'll need to manually request testnet tokens.

1. **Copy Your Account Address**

Expand All @@ -96,7 +131,7 @@ Before deploying contracts, you'll need testnet tokens.

---

## Step 3: Explore the Configuration
## Step 4: Explore the Configuration

Your project directory now contains a hidden `.movement` folder with a `config.yaml` file:

Expand All @@ -115,8 +150,8 @@ profiles:
private_key: "YOUR_PRIVATE_KEY"
public_key: "YOUR_PUBLIC_KEY"
account: "YOUR_ACCOUNT_ADDRESS"
rest_url: "https://testnet.bardock.movementnetwork.xyz/v1"
faucet_url: "https://faucet.testnet.bardock.movementnetwork.xyz/"
rest_url: "https://testnet.movementnetwork.xyz/v1"
faucet_url: "https://faucet.testnet.movementnetwork.xyz/"
```

<Callout type="warning">
Expand All @@ -127,34 +162,6 @@ profiles:

---

## Step 4: Scaffold the Project

Now, let's set up the structure for your Move module.

### Initialize the Move Project

Run the following command:

```bash
movement move init --name hello_blockchain
```

This command creates the necessary folders and files for your Move project:

```
Move.toml
Sources/
Scripts/
Tests/
```

- **Move.toml**: Configuration file for your Move project.
- **Sources/**: Directory where you'll write your Move modules.
- **Scripts/**: Directory for transaction scripts (optional).
- **Tests/**: Directory for writing unit tests.

---

## Step 5: Write Your First Module

### Create the Module File
Expand Down Expand Up @@ -343,6 +350,22 @@ If you didn't edit `Move.toml`:
movement move publish --named-addresses hello_blockchain=default
```

### Optimizing Package Size (Optional)

To reduce gas costs and package size, you can publish without including artifacts:

```bash
movement move publish --named-addresses hello_blockchain=default --included-artifacts none
```

The `--included-artifacts` option controls what gets included in your package:
- **`none`**: Most compact, includes only bytecode (lowest gas cost)
- **`sparse`**: Minimal artifacts needed to reconstruct source (default, ~2x size of `none`)
- **`all`**: All available artifacts (~3-4x size of `none`)

Using `none` significantly reduces deployment costs but means you cannot reconstruct the source package from the blockchain.
This option is particularly useful for deployment of smart contracts without deploying the entire codebase.

### Confirm Deployment Cost

You'll be prompted to confirm the transaction and spend a small amount of testnet tokens:
Expand Down Expand Up @@ -391,9 +414,9 @@ Congratulations! You've successfully deployed your first Move module on the Move

In this tutorial, you've:

- Installed and initialized the Movement CLI.
- Funded your testnet account.
- Scaffolded a new Move project.
- Initialized the Movement CLI.
- Funded your testnet account.
- Written and compiled a Move module.
- Ran unit tests to ensure functionality.
- Deployed your module to the testnet.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/devs/fullnode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ curl https://full.devnet.movementinfra.xyz/v1
```

```bash tab="Testnet"
curl https://testnet.bardock.movementnetwork.xyz/v1
curl https://testnet.movementnetwork.xyz/v1
```

```bash tab="Mainnet"
Expand Down
4 changes: 2 additions & 2 deletions content/docs/devs/interactonchain/tsSdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Configure the SDK to connect to the Movement Bardock Testnet (Please refer to [N
```javascript
const config = new AptosConfig({
network: Network.CUSTOM,
fullnode: 'https://testnet.bardock.movementnetwork.xyz/v1',
faucet: 'https://faucet.testnet.bardock.movementnetwork.xyz/',
fullnode: 'https://testnet.movementnetwork.xyz/v1',
faucet: 'https://faucet.testnet.movementnetwork.xyz/',
});

// Initialize the Aptos client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export const WalletProvider = ({ children }: PropsWithChildren) => {
];
const config = new AptosConfig({
network: Network.TESTNET,
fullnode: 'https://testnet.bardock.movementnetwork.xyz/v1',
faucet: 'https://faucet.testnet.bardock.movementnetwork.xyz/'
fullnode: 'https://testnet.movementnetwork.xyz/v1',
faucet: 'https://faucet.testnet.movementnetwork.xyz/'
})

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import { Aptos, AptosConfig, Network } from '@aptos-labs/ts-sdk';
```typescript
const config = new AptosConfig({
network: Network.TESTNET,
fullnode: 'https://testnet.bardock.movementnetwork.xyz/v1',
faucet: 'https://faucet.testnet.bardock.movementnetwork.xyz/'
fullnode: 'https://testnet.movementnetwork.xyz/v1',
faucet: 'https://faucet.testnet.movementnetwork.xyz/'
})
const aptos = new Aptos(config);
```
Expand Down
4 changes: 2 additions & 2 deletions content/docs/devs/tutorials/deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ profiles:
private_key: "0xYOUR_PRIVATE_KEY"
public_key: "0xYOUR_PRIVATE_KEY"
account: "account_address"
rest_url: "https://testnet.bardock.movementnetwork.xyz/v1"
faucet_url: "https://faucet.testnet.bardock.movementnetwork.xyz/"
rest_url: "https://testnet.movementnetwork.xyz/v1"
faucet_url: "https://faucet.testnet.movementnetwork.xyz/"
```


Expand Down
2 changes: 1 addition & 1 deletion content/docs/general/nodes/full-node/run/deploy/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ full_node_networks:
seeds:
9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F:
addresses:
- "/dns/testnet.movementnetwork.xyz/tcp/6182/noise-ik/9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F/handshake/0"
- "/dns/consensus.testnet.movementnetwork.xyz/tcp/6182/noise-ik/9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F/handshake/0"
role: "Upstream"

api:
Expand Down
2 changes: 1 addition & 1 deletion content/docs/general/nodes/full-node/run/deploy/source.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Follow the steps below:
seeds:
9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F:
addresses:
- "/dns/testnet.movementnetwork.xyz/tcp/6182/noise-ik/9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F/handshake/0"
- "/dns/consensus.testnet.movementnetwork.xyz/tcp/6182/noise-ik/9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F/handshake/0"
role: "Upstream"
```

Expand Down