<style>
.markdown-body {
max-width: 1280px;
}
</style>
# 區塊鏈知識
**本文章不定期更新, 如果有錯誤請跟我說,謝謝**
ICO 首次公開募股的行為 只是ICO發行的是虛擬貨幣、IPO是發行股票
[ICO是什麼意思?如何參加ICO?買虛擬貨幣ICO有風險嗎?](https://rich01.com/what-is-crypto-ico-risky/)
[OTC場外交易](https://www.ig.com/cn/glossary-trading-terms/otc-definition)
* 返現比例
* 賣家買幣(稱為 C2C)
* 入金 法幣轉 USDT
* 出金 USDT 轉法幣
* 法幣 = 美金 台幣 人民幣
* 數字貨幣 例如 數位人民幣
* 穩定幣 例如USDT 泰達幣
* 幣幣交易 例如USDT買BTC
* 加密kline 綠漲 紅跌 ( 跟台股相反 )
```go=
現貨賬戶:用來充幣(數字貨幣充值),提幣(將幣提現到其他地方),以及用來做幣幣交易(兩種數字貨幣之間的交易)
槓桿賬戶:用來做槓桿
合約賬戶:用來做合約
法幣賬戶:人民幣出入金用這個賬戶,比如你用人民幣購買數字貨幣的話,購買到的數字貨幣就直接衝入到這個賬戶裡面了
不同賬戶的資金功能是不一樣的,你無法用法幣賬戶的幣去做幣幣交易,所以如果你的幣在法幣賬戶,要想做幣幣交易,那該怎麼辦呢?
就需要你透過資金劃轉功能將你的幣從法幣賬戶劃轉到幣幣賬戶去。
所以一般來說數字貨幣裡面的各個賬戶,如果想在裡面之間進行互相轉賬的話,就需要用到資金劃轉功能了。在不同賬戶之間進行資金劃轉是免費的。
```
錢包出金,就是把幣安裡的錢轉到別的交易所(假設是max交易所 USDT 交易)
1. 從max交易所 從 **錢包** 獲取USDT的錢包地址
2. 從幣安交易所,在「提現」介面中輸入錢包地址和金額
3. 去max交易所檢查是否有
[5種幣安充值/入金方法與手續費詳解](https://rich01.com/binance-deposit/)
# k線教學
[炒幣如何看K線?怎麼看走勢圖?](https://www.youtube.com/watch?v=1rvfpfeK-hw)

spot 現貨交易
[MetaMask 小狐狸錢包教學:如何使用、下載、從幣安轉帳進去](https://applealmond.com/posts/128352)
# 區塊鏈組成
[圖解區塊鏈-起源](https://medium.com/change-or-die/%E5%9C%96%E8%A7%A3%E5%8D%80%E5%A1%8A%E9%8F%88-%E8%B5%B7%E6%BA%90%E7%AF%87-57ca494322d3)
[圖解區塊鏈1](https://medium.com/change-or-die/%E5%9C%96%E8%A7%A3%E5%8D%80%E5%A1%8A%E9%8F%88-%E5%8E%9F%E7%90%86%E7%AF%87-%E4%B8%AD-part-1-1d063b3a0437)
[圖解區塊鏈2](https://medium.com/change-or-die/%E5%9C%96%E8%A7%A3%E5%8D%80%E5%A1%8A%E9%8F%88-%E5%8E%9F%E7%90%86%E7%AF%87-%E4%B8%AD-part-2-c13b4a0470ef)
gas limit 一個區塊所能包進去的交易數量
會自動調節
# 共識機制
比特幣和乙太幣, 每1000個區塊後, 會調整共識難度 ( 會導致挖礦難度也提高 )
**硬分岔:改變共識演算法(且所有節點都要更新版本, 更新此規則跟著改。ps:沒更新版本的節點就會不能使用**
例如經典乙太幣, 當年交易所被駭客, 所以就修改共識演算法, 硬分岔成兩條, 新的分岔改為ETH(Ethereum), 原本舊的鏈就改為(Ethereum Classic, ETC)
https://www.gate.io/zh-tw/blog_detail/600/thedao-theft-the-story-of-the-ethereum-hard-fork-explained
**軟分岔:些微改變**
應該是增加一個新flag變數, 某些節點有更新, 看得懂新的flag在幹嘛
沒更新的舊節點, 因為此新flag不在共識演算法檢查範圍內, 就不用改
新舊節點都兼容的一個改版, 大體上是這樣意思
# Hash
比特幣採用的hash演算法是 sha256(SHA-2)
比較新的應該都是用 SHA-3
如果比特幣使用的sha256演算法有碰撞可能
可以硬分岔, 改變共識演算法規則, 就可以讓鏈更加穩定
區塊鍊是用hash來識別唯一性
如果同一個區塊, 但hash值不同代表有可能被竄改
區塊鍊,實際使用Merkle Tree(哈希樹)
要驗證此Root hash是否正確
就把每個區塊的資料, 兩兩hans起來, 最後就得到Root hash
優點快速驗證此hash (只需少量的關鍵hans即可驗證全部資料的正確性)

# 區塊鍊瀏覽器
[乙太坊區塊鍊瀏覽器](https://etherscan.io/)
[比特幣區塊鍊瀏覽器](https://btcscan.org/)
區塊內容
| 欄位 | 內容 | 數值 |
|:------------ |:--------------------------------------------- |:------------------------------ |
| Block Height | 區塊鍊高度, 流水號 從0開始 (0等於創世區塊) | 16738041 |
| Status | 狀態 1:成功 | Finalized |
| Timestamp | 創建區塊時間 | Mar-02-2023 02:53:11 AM +UTC |
| Transactions | 區塊內的交易筆數 | 169 |
| Block Reward | 區塊鍊挖礦獎勵 | 0.0662246242078339 ETH |
| Difficulty | 挖礦難度 | 58,750,003,716,598,352,816,469 |
| Gas Used | 此區塊實際使用的瓦斯數量 (不可超過 gas limit) | 29,930,729(99.77%) |
| Gas Limit | 此區塊瓦斯使用上限(代表能包含的交易總數) | 30,000,000 |
| Extra Data | 智能合約使用的區段 | Text |
[ETH高度16738041的資料](https://etherscan.io/block/16738041)
交易內容
| 欄位 | 內容 | 數值 |
| --------------- |:------------------------------------------------ |:-------------------------------------------- |
| From | 交易來源地址 | 0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5 |
| To | 交易目的地址 | 0x388C818CA8B9251b393131C08a736A67ccB19297 |
| Value | 交易金額 | 0.042089734807192261 ETH |
| Transaction Fee | 手續費 | 0.000520838869624207 ETH |
| Gas Price | 價格,設定越高, 礦工越會來挖你這筆交易,就越快成交 | 23.555645137 Gwei (0.000000023555645137 ETH) |
| Gas Used | 此交易實際使用的瓦斯數量 (不可超過 gas limit) | 22,111 (73.7%) |
| Gas Limit | 瓦斯使用上限 ( Gas Used超過此數值就會交易失敗 ) | 30,000 |
| Gas Fees | Text | Text |
[0xf4a447c7793f646f719e0761d6164c57bbe56fafe8f868a0643d0bb725551850地址的資料](https://etherscan.io/tx/0xf4a447c7793f646f719e0761d6164c57bbe56fafe8f868a0643d0bb725551850)
[試玩 Blockchain Demo:瞭解區塊鏈如何防止攻擊、挖礦電腦都在算什麼](https://medium.com/@astromnhsu/%E8%A9%A6%E7%8E%A9-blockchain-demo-%E5%8D%80%E5%A1%8A%E9%8F%88%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%E6%94%BB%E6%93%8A-%E6%8C%96%E7%A4%A6%E9%9B%BB%E8%85%A6%E9%83%BD%E5%9C%A8%E7%AE%97%E4%BB%80%E9%BA%BC-6171fbc2619a)
---
# 挖礦
挖礦=猜數字
hash猜到0就有挖礦獎勵 (hash出來的結果, 從左邊看, 一開始設定滿足0000就算挖礦成功, 後面會慢慢演變成越多的0000000)
越多0代表挖礦難度越高
所以**bitcoin**調整難易度就是
藉由改變block的nonce的數值
導致hash的最左側數值變成0 (圖中範例目前是要滿足4個0)
就代表挖礦成功
當挖礦成功後 廣播給所有節點
並且獲得 coinBase + 交易的手續費 的獎勵
最後並將結果廣播給所有節點



ps: 我看教學網站的hash左側是一堆0, 但實務上看etherscan, 貌似不是這樣, 挖礦的細節還要去看實務上的改變
比特幣(bitcoin是用hash的前導0的數量, 來看是否挖到礦)
乙太坊是用其他方式來判斷是否挖到礦 todo:待查方法

[blockchain demo網站](https://andersbrownworth.com/blockchain/block)
---
# 手續費算法
一般標準交易的 Gas Limit 為21000
[【新手教學】到底什麼是Gas、Gas Price、Gas Limit](https://zombit.info/%E5%88%B0%E5%BA%95%E4%BB%80%E9%BA%BC%E6%98%AFgas%E3%80%81gas-limit%E3%80%81gas-price%EF%BC%9F/)
# 交易

## 私鑰公鑰

私鑰(2的256次方)(亂數產生) =>使用SPEC256 =>公鑰 =>Hash一次 => 錢包地址
1. 私鑰簽署任何資訊(文字)或是(交易單)
2. 將簽署結果廣播到網路上
3. 讓任何人拿公鑰來驗證 (驗證通過代表是匹配的key)
4. 無法從**公鑰逆推出私鑰**
| 幣種 | 交易確認次數(區塊鏈高度) |
| -------- | ----------- |
| 比特幣 | 至少6次 |
| 以太幣 | 30次 |

當挖礦時候,每個節點雖然會儲存區塊鏈,但每個節點不一定會立即同步資訊(例如歐洲跟中國)
當兩個節點長度不一樣時,以較長的為主(短的會有自動銷毀機制)
**節點設計要追最長的鏈**

# 相關生態網站
[etherscan 看幣的內容](https://etherscan.io/)
# 錢包
1. 錢包有分public key(公鑰) 和 private key(私鑰)
2. 公鑰是錢包地址. 私鑰是要進行支付時的證明,也是證明此錢包的所有權和控制權
3. 分冷熱錢包,冷錢包(實體的設備, 例如USB) 熱錢包(手機APP 網頁交易所)
**交易所錢包,功能上和熱錢包類似,只是比熱錢包更加便於交易,但在安全性上定義不同,
交易所錢包就像是交易所提供的託管帳戶,因此用戶並不擁有此錢包中的加密貨幣私鑰**

[熱錢包、冷錢包差在哪?最安全的加密貨幣錢包是哪一種](https://rich01.com/crypto-hot-wallet-vs-cold-wallet/)
輕錢包
* dapp 和
* 不用同步的就是輕錢包
* 只保存私鑰
測試鏈
[rinkeby](https://www.rinkeby.io/#stats)
# DAPP 去中心化應用
DAPP + 智能合約
---
# 智能合約
OPCODE 基本加減乘除指令
[新手指南丨Token 是什麼?它和 Coin 有什麼區別](https://www.btcc.com/zh-TW/academy/crypto-basics/the-difference-between-token-and-coin)
[Ethereum ERC20 Token Standard 以太坊代幣標準介紹](https://medium.com/hackoin-taiwan/ethereum-erc20-token-standard-%E4%BB%A5%E5%A4%AA%E5%9D%8A%E4%BB%A3%E5%B9%A3%E6%A8%99%E6%BA%96%E4%BB%8B%E7%B4%B9-b7bc58171021)
[快速鑄造自己的智能合約幣(Token)](https://ithelp.ithome.com.tw/articles/10289620)
---
---
[以太坊節點查詢(區塊鏈瀏覽器)](https://etherscan.io/)
[以太坊主網統計](https://ethernodes.org/)
[以太坊狀態](https://ethstats.net/)
節點兩大種類
Parity 和 Geth
區塊鏈兩大應用
Defi NFT
[去中心化金融(DeFi)](https://ethereum.org/zh/defi/)
# 小狐狸錢包
[如何將MetaMask連接到幣安智能鏈?](https://academy.binance.com/zt/articles/connecting-metamask-to-binance-smart-chain)
將小狐狸錢包的地址貼到 水龍頭網站上, 即可領取免費代幣
[BNB測試代幣水龍頭](https://testnet.binance.org/faucet-smart)
**ETH發代幣水龍頭**
[goerli 水龍頭](https://goerlifaucet.com/)
[sepolia 水龍頭](https://sepoliafaucet.com/)
[rinkeby 很多時候offline](https://faucet.rinkeby.io/)
[ephemery 水龍頭
](https://ephemery-faucet.pk910.de/)
**通常都是把自己的錢包地址貼到水龍頭輸入框內, 在按下送出即可獲得免費代幣(通常一天領一次)**
**登入後將錢包地址貼在聊天區域內**
[Kovan testnet][https://gitter.im/kovan-testnet/faucet]
[ETH水龍頭url彙整區](https://goethereumbook.org/zh/faucets/)
**ethscan**
[faucets 水龍頭s](https://www.alchemy.com/faucets)
[mainnet ](https://etherscan.io/)
[testnet sepolia](https://sepolia.etherscan.io/)
[用Go来做以太坊开发](https://goethereumbook.org/zh/)
**AAVE**
https://staging.aave.com/faucet/
---
**BTC發代幣水龍頭**
[比特幣官網測試錢包下載](https://bitcoin.org/zh_CN/download)
[比特币测试网钱包教學](https://codeantenna.com/a/Nlu5kKZCqV)
[比特币测试网钱包](https://www.bitaddress.org)
[bitcoinfaucet水龍頭](https://bitcoinfaucet.uo1.net/)
[bitcoin測試鏈](https://blockstream.info/testnet/)
[bitcoin主鏈1](https://blockstream.info/)
[bitcoin主鏈2](https://btcscan.org/)
[golang 实现区块链(Bitcoin)系列1 - 基本原型](https://learnblockchain.cn/article/577)
[正則表達式檢查](https://tool.oschina.net/regex/)
[chainlist鏈的列表](https://chainlist.org/)
# 區塊鏈攻擊
* 挖礦劫持攻擊 Cryptojacking Attack
* 雙花攻擊 Double Spending Attack
* 供應鏈攻擊 Supply Chain Attack
* 區塊鏈拒絕服務攻擊 BDoS
* 雙花攻擊 Double Spending Attack
*
顧名思義,雙花攻擊 (Double Spend Attack) 是一筆錢 花兩次 的意思。雙花攻擊並不會產生新的幣,而是比較像是把花出去的錢拿回來,普通使用者正常使用區塊鏈網路時,基本上不會遇到被動雙花的情境,但對於攻擊者來說有很多攻擊是可以實現的,目前有常見的幾種手法能夠引發雙花攻擊:
51% 算力攻擊(51% Attack)
最常見的雙花攻擊模式,攻擊者佔有超過全網 50% 的算力,在攻擊者控制算力的這段時間,他可以創造一條長於公鏈的側鏈,再根據 最長鏈共識 使得公鏈中的交易回滾,最終實現雙花。
**51% 算力攻擊實際範例**
```go=
假設區域
歐洲算力49% 亞洲算力51%
我在歐洲發起一個轉帳交易, 轉500ETH給某玩家, 然後拿到等值的法幣或物品
然後同時在亞洲拼命的產生區塊, 區塊數目高於歐洲後, 亞洲的區塊會取代歐洲(因為長度最長的會取代短的 )
所以導致歐洲這筆500ETH轉帳就會被回朔, 但我實際上拿到等值的物品
```
不過現實中比特幣、以太坊都沒被此攻擊過,因為成本太高了,比特幣的 PoW 共識,攻擊者想要在六次確認的時間內追上最長鏈,幾乎不太可能!
種族攻擊(Race attack)
這種攻擊主要通過控制礦工費(gas),來實現雙花攻擊。攻擊者會同時發送兩筆交易,一筆交易發給自己 (增加更高的礦工費),另一筆發給商家。
由於發送給自己的交易中含有較高的手續費,因此有較高機率被優先打包進最長鏈中,而商家看到攻擊者發送的交易,這時可能已被驗證,故提供商品給攻擊者。
芬尼攻擊(Finney attack)
主要通過控制交易過程中區塊確認的時間來實現雙花攻擊,攻擊對象是一個願意接受未確認交易的商家。
攻擊者用第一筆交易挖掘了一個區塊,但將其隱藏,接著用同一個比特幣發起第二筆交易給願意接受未確認交易的商家,再來攻擊者就把他自己之前挖到的區塊廣播出去,這時候發給自己的交易就先於發給商家的交易。對於攻擊者來說,通過控制區塊的廣播時間,就實現了同一筆 token 的雙花,為了降低這種風險,賣方應在放行貨物前等待至少六個區塊的確認。
# 幣種比較
| 名稱 | 詳細名稱 | 最小單位 | 出塊速度 | 交易確認數 | 交易完成時間 |
| ---- | -------- |:---------------------------- |:-------- |:---------- |:------------ |
| BTC | bitcoin | 1 BTC = 0.00000001 (聰)Sat | 10分鐘 | 6個 | 1小時內 |
| ETH | Ethereum | 1 Ether = 10 的 18 次方 GWei | 15秒內 | 12個 | 3分鐘約 |
| USDT | Tether | 1 Ether = 10 的 18 次方 GWei | 15秒內 | 12個 | 5分鐘約 |
BTC 公開金鑰經過 SHA-256 雜湊運算後,再通過 RIPEMD-160 雜湊運算而得,其長度固定為 160 個位元(bits),通常會利用 Base58 將之編碼成一串由英文字母和數字所組成的字串,以方便顯示或散佈,其特徵是皆以「1」或者「3」開頭
# 協議比較
EIP = Ethereum Improvement Proposals = 社群用來改善Ethereum的提案,提案成功就會納入改版的製程

| 協議名稱 | 鏈名稱 | 原生幣 | 出塊速度 | 共識演算法 | 交易所手續費 | 鏈上實際手續費 | |
| -------- |:------------------ | --- |:-------- |:---------- | ------------ | ----------------------- | --- |
| ERC20 | Ethereum鏈(以太鏈) | ETH | Text | | 10~20USDT | 0.0007 ~ 0.008 eth 不等 | |
| ERC721 | Ethereum鏈(以太鏈) | ETH | Text | | | | |
| TRC20 |泰達幣 | | 3秒一個 | 3秒一個 | | 1 | 2 |
[Ethereum 代幣基準 (ERC) 總覽](https://myethlabs.wordpress.com/2018/07/05/ethereum-%E4%BB%A3%E5%B9%A3%E5%9F%BA%E6%BA%96-erc-%E7%B8%BD%E8%A6%BD/)
區塊鏈:以太坊區塊鏈
轉帳手續費(以幣安為例):10 USDT (各交易所不一樣)
最小轉帳數量(以幣安為例):50 USDT (各交易所不一樣)
到帳時間:普通、易堵塞,幾分鐘到幾十分鐘
安全性:普通
轉帳帳號地址開頭:0x
hans 好像搞錯 usdt是泰達幣
# 乙太方1.0 2.0
[刚启动的信标链是什么?对以太坊2.0来说意味着什么?](https://www.tuoluo.cn/article/detail-10035788.html)
# 側鏈和通道狀態
以太坊交易量限制為每秒 15 筆。由於以太坊的受歡迎程度遠遠超過每秒 15 筆交易,這就導致以太坊的交易擁堵,以及 Gas 費的高昂。最終,這也讓許多用戶望而卻步,並限制以太坊目前能夠處理的應用程式類型。所以有三種方式可以解決上述兩個問題
1. Layer 1 區塊鏈(與以太坊競爭)
2. Layer 2 網絡(完全與以太坊互補)
3. 側鏈(部分與以太坊互補)
**側鏈是使用雙向錨定關聯於其父鏈(主鏈)的單獨區塊鏈。換句話說,你可以將資產移至側鏈,並再移回父鏈。(就是將主鏈資產在主鏈和側鏈間來回移動)**
```go=
雙向錨定使得可以在父鏈和子鏈之間以預定的匯率進行資產互換。原始區塊鏈通常成為「主鏈」,其他所有外加的區塊鏈都稱為「側鏈」。區塊鏈平台 Ardor 將其側鏈稱為「子鏈」。
父鏈上的用戶首先必須發送其代幣到一個輸出地址,這些代幣會被鎖定,因此用戶無法在其他地方消費它們。在交易完成之後,會通過跨鏈進行確認,然後等待一段時間,以提高安全性。
在等待期過後,側鏈上會釋放等量的代幣,允許用戶獲取並在此處進行消費。當將資產從側鏈移回主鏈,流程剛好相反。
```

[](https://www.blocktempo.com/difference-between-sidechains-and-state-channels/)
[多鏈、側鏈和 Layer 2,誰才是以太坊擴展方案的未來?](https://blockcast.it/2021/11/25/scaling-ethereum-a-guide-to-the-multi-chain-future-sidechains-and-layer-2-solutions/)
# 其他雜學
[如何取得 polygon 鏈上的 ETH? 最省手續費方法教學](https://matters.news/@erica072/189613-%E5%A6%82%E4%BD%95%E5%8F%96%E5%BE%97-polygon-%E9%8F%88%E4%B8%8A%E7%9A%84-eth-%E6%9C%80%E7%9C%81%E6%89%8B%E7%BA%8C%E8%B2%BB%E6%96%B9%E6%B3%95%E6%95%99%E5%AD%B8-bafyreihxfcwmyzegtmrhdbuuzuxrrwk6lnfzn3kl4izxdkrddca33y2jl4)
# 已發布合約
發佈時的已部署的合約
0xbb6fB7B6Ca2A864776d4eaD564B7Ba98c1AaBABf
```go=
状态 0x1 交易已打包且执行成功
交易哈希 0x16f80ac1066e84eeeacf826ba81680b819a5ad13fb8b107533824cf51818cbb8
区块哈希 0xcb119e25539f71e5d1e77ef5f8de7018dc0a09a44aca16225c7b629c69fbcedc
区块号 5388598
合约地址 0xbb6fb7b6ca2a864776d4ead564b7ba98c1aababf
from 0x8de6b6aa4cda66f94fe7f1b7d252a9d583a23239
to CatToken.(constructor)
gas 2585081 gas
交易成本 2563568 gas
输入 0x608...80033
解码输入 {}
解码输出 -
日志 [
{
"from": "0xbb6fb7b6ca2a864776d4ead564b7ba98c1aababf",
"topic": "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2",
"event": "Initialized",
"args": {
"0": "18446744073709551615",
"version": "18446744073709551615"
}
}
]
```
**ABI**
```go=
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ECDSAInvalidSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "length",
"type": "uint256"
}
],
"name": "ECDSAInvalidSignatureLength",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "ECDSAInvalidSignatureS",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
}
],
"name": "ERC2612ExpiredSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "signer",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "ERC2612InvalidSigner",
"type": "error"
},
{
"inputs": [],
"name": "EnforcedPause",
"type": "error"
},
{
"inputs": [],
"name": "ExpectedPause",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "currentNonce",
"type": "uint256"
}
],
"name": "InvalidAccountNonce",
"type": "error"
},
{
"inputs": [],
"name": "InvalidInitialization",
"type": "error"
},
{
"inputs": [],
"name": "NotInitializing",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "OwnableInvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "OwnableUnauthorizedAccount",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "EIP712DomainChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint64",
"name": "version",
"type": "uint64"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"inputs": [],
"name": "DOMAIN_SEPARATOR",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "burnFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "eip712Domain",
"outputs": [
{
"internalType": "bytes1",
"name": "fields",
"type": "bytes1"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "version",
"type": "string"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "address",
"name": "verifyingContract",
"type": "address"
},
{
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
},
{
"internalType": "uint256[]",
"name": "extensions",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "initialOwner",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "nonces",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "permit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "unpause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
```