Giter Club home page Giter Club logo

move-contracts's Introduction

文档参考地址

参考地址: https://aptos.dev/cli-tools/aptos-cli-tool/use-aptos-cli#move-examples move原生数据结构API文档 :https://mp.weixin.qq.com/s/epwJmR6oXCgtKtSbBqJyAw 教学资料: https://movefuns.atlassian.net/wiki/spaces/MOVEFUNS/pages/491526/Move 钱包源码: https://github.com/leeduckgo/punk-wallet

aptos-cli 安装

aptos-cli使用参考:https://mp.weixin.qq.com/s/2_0wL1KIAdoxYqya-thi6Q

账户初始化

 aptos init

图片

账户资金初始化

$ aptos account fund-with-faucet --account 61f0b0362577500d6c4fb15612ae0fffd39d643ebd53e9d4b32779d47f6ec343

或者

aptos account fund-with-faucet --account default

图片

查看账户的余额和转账

aptos account list --query balance --account 61f0b0362577500d6c4fb15612ae0fffd39d643ebd53e9d4b32779d47f6ec343

或者

aptos account list --query balance --account default

图片

move合约编写

参考文档地址: https://aptos.dev/tutorials/first-move-module 资料文档: https://blog.csdn.net/wallywxy/article/details/127056508

  1. 创建新的move合约
mkdir seaCoin 
cd seaCoin
aptos move init --name seaCoin
  1. 编译并测试
  • 编译
    cd seaCoin
    aptos move compile --named-addresses sea_coin=default
    
  • 测试模块运行
    aptos move test --named-addresses sea_coin=default
    
  1. 验证智能合约:Move Prover 教程

    参考:https://mp.weixin.qq.com/s/_UWiX5nPGLZpmFQF2GE-mQ

    TODO 
    
  2. 注意事项
  • 依赖包本地化

但是 move-stdlib 需要用 https://github.com/aptos-labs/aptos-core/tree/main/aptos-move/framework 这个里面提取出来的, 不能用 https://github.com/diem/diem/tree/latest/language/move-stdlib, 因为这个缺少 Move.toml

其他资源

dApp 实用开发存储指南之 Gist(存储) Move 高阶语法

move-contracts's People

Contributors

ztnozdormu avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.