Commit 4d6bb5c4 authored by pengjun's avatar pengjun

Update Move语言.md

parent 218f0a80
# Move语言和MoveVM虚拟机
# Move语言和MoveVM虚拟机
# Move语言和MoveVM虚拟机
## 1. Move语言
### 1.1 What is Move
Move语言是Libra项目推出的智能合约语言,和传统的智能合约语言类似,Move语言主要用来编写Libra交易的执行逻辑
Move语言是Libra项目推出的智能合约语言,由rust编写而成,和传统的智能合约语言类似,Move语言主要用来编写Libra交易的执行逻辑
### 1.2 Why Move
Libra旨在建立一个简单的全球货币和金融基础设施,基于此,Move语言和其他智能合约对资产的描述和处理有很大不同。
......@@ -32,8 +32,6 @@ Move把所有的变量或者实例分成两种:
* Unrestricted Value: 诸如u64或钱包地址等等的变量信息,可以被正常的复制和转移
* Resource: 即之前所说的资产(Assert),不能被复制,只能被转移,并且只能被转移一次,且不能被隐式丢弃
move语言这种强资产类型定义,保证了libra上的资产安全
#### 1.3.2 两个程序模型
Move把代码分成两类:
* Module:类似智能合约,可以定义内容的转移,销毁,发布等业务逻辑
......@@ -72,7 +70,7 @@ copy:变量的复制
3. 内建函数
"create_account"
"release"
"freeze"
"freeze" //'&mut t -> &t' coerce a mutable reference to an immutable reference
"get_txn_gas_unit_price"
"get_txn_max_gas_units"
"get_txn_public_key"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment