Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
share
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengjun
share
Commits
4d6bb5c4
Commit
4d6bb5c4
authored
Aug 02, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Move语言.md
parent
218f0a80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
Move语言.md
Move语言.md
+3
-5
No files found.
Move语言.md
View file @
4d6bb5c4
# Mov
e语言和MoveVM虚拟机
# Mov
e语言和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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment