• metamask源码学习导论


    ()MetaMask Browser Extension

    https://github.com/MetaMask/metamask-extension

    这就是整个metamask的源码所在之处,好好看看

    https://metamask.github.io/metamask-extension/这是源码的类、对象等的详细解释

    1)了解整个代码的学习流程,看:https://github.com/MetaMask/metamask-extension/blob/develop/docs/porting_to_new_environment.md

    Guide to Porting MetaMask to a New Environment

    2)为了能够更好地学习metamask的实现代码,首先我们要先学习stream

    stream-handbook

    英文版:https://github.com/MetaMask/metamask-extension/blob/develop/docs/porting_to_new_environment.md

    中文版:https://github.com/jabez128/stream-handbook

    3)就比如说之前游戏是想说直接将metamask嵌入到游戏中,这样就不用下载插件了,而且不是自己有一个服务器吗,然后可以像将以太坊主网

    一样将这个服务器上的区块链网络设置为上面的一个可选项,更甚至就是玩这个游戏就只有我们这个服务器环境的选择,基本上就是会直接连上我们的服务器

    下面就是如果你要添加一个定制的网络的话,你需要更改的文件有哪一些

    Adding Custom Networks

    To add another network to our dropdown menu, make sure the following files are adjusted properly:

    app/scripts/config.js
    app/scripts/lib/buy-eth-url.js
    ui/app/app.js
    ui/app/components/buy-button-subview.js
    ui/app/components/drop-menu-item.js
    ui/app/components/network.js
    ui/app/components/transaction-list-item.js
    ui/app/config.js
    ui/app/css/lib.css
    ui/lib/account-link.js
    ui/lib/explorer-link.js

    You will need:

    • The network ID
    • An RPC Endpoint url
    • An explorer link
    • CSS for the display icon
  • 相关阅读:
    图片处理中的Dithering技术
    网络I/O模型
    并发编程(二)
    并发编程(一)
    socket编程(二)
    socket编程(一)
    异常处理
    软件开发规范
    面向对象进阶
    多态与封装
  • 原文地址:https://www.cnblogs.com/wanghui-garcia/p/9713937.html
Copyright © 2020-2023  润新知