We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aptos-labs/aptos-npm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
develop_smart_contract.md•1.58 kB
# How to Manage a Move Smart Contract Development
The following doc outlines the guidelines on how to set up and manage a smart contract development on Aptos.
### Create Package
1. Make sure you have the correct Move package folder structure
project-folder/
├── contract/
│ ├── sources // all Move modules should live here
│ ├── Move.toml
│ ├── .gitignore // put files and folder to ignore like build/
2. Update Move.toml
```rust
[package]
name = "<name-of-your-package>"
version = "<version-of-your-package>"
[addresses]
<names-address> = "_"
[dev-addresses]
<names-address> = "0x123"
[dependencies.AptosFramework]
git = "https://github.com/aptos-labs/aptos-framework.git"
rev = "mainnet"
subdir = "aptos-framework"
```
**IMPORTANT:** Always use "_" as the address in the [addresses] section. Only use actual addresses in the [dev-addresses] section. This allows proper address resolution during compilation and deployment.
3. Write your Move smart contract modules
### Compiling
Once you have a package set up, you can compile your Move code by doing:
```bash
aptos move compile --dev
```
### Testing
Unit testing for Move adds three new annotations to the Move source language:
#[test] #[test_only], and #[expected_failure]
Run Unit Tests:
```bash
aptos move test --dev
```
### Deployment
After writing and testing the contract, deploy it to the Aptos network so any client can communicate and integrate with the contract.
Follow the [deploy_smart_contract](./deploy_smart_contract.md) resource on how to deploy a smart contract.