---
# System prepended metadata

title: DAY01 Free Online Seminar on Security Topics on MOVE Ecosystem (CN)

---

# DAY01 Free Online Seminar on Security Topics on MOVE Ecosystem (CN)
講師
![](https://i.imgur.com/DIYjoIt.png)
https://www.suss.edu.sg/about-suss/centres/suss-node-for-inclusive-fintech

### 第一天筆記
時間: 2022.12.19(一) 10:00-12:00
地點:Zoom
上課錄影:https://sussblockchain.com/events/security-topics-on-move-ecosystem-online/
***

![](https://i.imgur.com/J7e3UlC.png)

杜絕很多鏈上資產的攻擊，例如 重入攻擊。

==Move特點==
1.沒有動態調用
2.不會混淆別名和可變性
3.強制類型/內存/資源安全
4.魯棒性
5.對整數溢出免疫
6.Move Prover形式化驗證，確保合約的安全性。

使用Move的公鏈
sui
celo(可在移動端使用)
aptos

![](https://i.imgur.com/YLskH2s.png)

![](https://i.imgur.com/Ia3SznS.png)

![](https://i.imgur.com/V1bK9Zd.png)

std >>> 0x0
debug >>> 找到資源
u64 非負整數
==Script只能有一個函式==
雙冒號(::)是調用其他module的資源
ex.
```move=
script{
    use std::debug
    debug::print(&sum)
}
```
撰寫第一個模塊
git clone https://github.com/move-language/move.git
cd move ./scripts/dev_setup.sh –ypt
source ~/.profile
cargo install --path language/tools/move-cli
move –help

Test.move
```move=
    module 0xCAFE::BasicCoin{
        struct Coin has key{
            value: u64,
        }
        public fun mint(account: signer, value: u64){
            move_to(&account, Coin{value})
        }
    }
```
Move.toml
```move=
    [package]
    name = "BasicCoin"
    version = "0.0.0"
```

![](https://i.imgur.com/RfdeEsz.png)

==編譯move >>> move build==
==在一般實作上 module的地址(0xCAFE)是使用者的錢包地址!==

![](https://i.imgur.com/Pm7RlYI.png)


![](https://i.imgur.com/nPXXxEs.png)

==Solidity沒有像是move_to或move_from的方法，只是連接其他智能合約並修改大帳本的資訊。==

==全局存儲==
resources
modules
![](https://i.imgur.com/nQyiWYR.png)

![](https://i.imgur.com/ruF9ggY.png)

==數據類型==
![](https://i.imgur.com/QhUQUob.png)

==向量(Vector)==
![](https://i.imgur.com/0XjlfWB.png)

==簽名者(Signer)==
![](https://i.imgur.com/V3Zn82P.png)

==引用(references)==
![](https://i.imgur.com/5hOEOR0.png)

==Move函數可見性==
![](https://i.imgur.com/o7QI3Cy.png)

==能力(Abilities)==

![](https://i.imgur.com/h3G4HPV.png)
==要聲明一個struct具有某個能力，它在結構體名稱之後，在字段之前用has<ability>聲明。==
![](https://i.imgur.com/mCeMtCo.png)

==泛型(generics)==
![](https://i.imgur.com/9EeTKOa.png)

***

