metamask源码学习导论

时间:2022-02-02 09:34:49

()MetaMask Browser Extension

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

metamask源码学习导论

这就是整个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嵌入到游戏中,这样就不用下载插件了,而且不是自己有一个服务器吗,然后可以像将以太坊主网

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

metamask源码学习导论的更多相关文章

  1. metamask源码学习-ui/index.js

    The UI-即上图左下角metamask-ui部分,即其图形化界面 The MetaMask UI is essentially just a website that can be configu ...

  2. metamask源码学习-inpage.js

    The most confusing part about porting MetaMask to a new platform is the way we provide the Web3 API ...

  3. metamask源码学习-controller-transaction

    ()metamask-extension/app/scripts/controllers/transactions Transaction Controller is an aggregate of ...

  4. metamask源码学习-contentscript.js

    When a new site is visited, the WebExtension creates a new ContentScript in that page's context, whi ...

  5. metamask源码学习-background.js

    这个就是浏览器后台所进行操作的地方了,它就是页面也区块链进行交互的中间部分. metamask-background描述了为web扩展单例的文件app/scripts/background.js.该上 ...

  6. metamask源码学习-metamask-controller.js

    The MetaMask Controller——The central metamask controller. Aggregates other controllers and exports a ...

  7. metamask源码学习-controllers-network

    https://github.com/MetaMask/metamask-extension/tree/master/app/scripts/controllers/network metamask- ...

  8. Java集合专题总结(1):HashMap 和 HashTable 源码学习和面试总结

    2017年的秋招彻底结束了,感觉Java上面的最常见的集合相关的问题就是hash--系列和一些常用并发集合和队列,堆等结合算法一起考察,不完全统计,本人经历:先后百度.唯品会.58同城.新浪微博.趣分 ...

  9. jQuery源码学习感想

    还记得去年(2015)九月份的时候,作为一个大四的学生去参加美团霸面,结果被美团技术总监教育了一番,那次问了我很多jQuery源码的知识点,以前虽然喜欢研究框架,但水平还不足够来研究jQuery源码, ...

随机推荐

  1. Asp.Net Web API 2第十课——使用OWIN自承载Web API

    详情请查看http://aehyok.com/Blog/Detail/71.html 个人网站地址:aehyok.com QQ 技术群号:206058845,验证码为:aehyok 本文文章链接:ht ...

  2. Spring Bean配置

    Spring 是什么 •Spring 为简化企业级应用开发而生. 使用 Spring 可以使简单的 JavaBean 实现以前只有 EJB 才能实现的功能. •Spring 是一个 IOC(DI) 和 ...

  3. bootstrap中实现外层DIV自适应,内层DIV宽度固定且居中的布局

    <!DOCTYPE html><html> <head> <link rel="stylesheet" href="css/bo ...

  4. shell和vim的配色

    shell的默认配色 mac,需要用iTerm2, 选自带的solarized即可 debian ,选择自带的 solarized dark vim配色 git clone git://github. ...

  5. 关闭&OpenCurlyDoubleQuote;编辑窗体”后, 主窗体的DatagridView刷新数据的问题

    问题:在关闭一个窗体2后,要刷新窗体1内的datagridview的数据,直接窗体1.datagridview.datasource=dt 是没用的. 解决办法如下: 在主窗体里 创建编辑窗体时 加上 ...

  6. Resty 一款极简的restful轻量级的web框架

    https://github.com/Dreampie/Resty Resty 一款极简的restful轻量级的web框架 开发文档 如果你还不是很了解restful,或者认为restful只是一种规 ...

  7. 【百度地图API】如何制作班级地理通讯录?LBS通讯录

    原文:[百度地图API]如何制作班级地理通讯录?LBS通讯录 摘要:班级通讯录必备的功能,比如人员列表,人员地理位置标注,展示复杂信息窗口,公交和驾车等.一般班级人员都不会超过300个,因为可以高效地 ...

  8. Python拉勾爬虫——以深圳地区数据分析师为例

    拉勾因其结构化的数据比较多因此过去常常被爬,所以在其多次改版之下变得难爬.不过只要清楚它的原理,依然比较好爬.其机制主要就是AJAX异步加载JSON数据,所以至少在搜索页面里翻页url不会变化,而且数 ...

  9. Singular value decomposition

    SVD is a factorization of a real or complex matrix. It has many useful applications in signal proces ...

  10. Eclipse识别不了jsp中的&dollar;&lbrace;pageContxt&period;request&period;contextPath &rcub;

    按计划这周系统学下Struts,但是搭完框架后jsp页面识别不了${pageContxt.request.contextPath } So这篇就记录一下我是怎么解决这个问题的 不管是tomcat7.0 ...