📜 [專欄新文章] Solidity Weekly #20
✍️ mingderwang
📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium
Metamask “Privacy Mode”
前一陣子,Metamask 與其他幾家 Ether 數位錢包公司,為了安全起見,決定改變叫用帳號的流程。舊的 Ðapp 網站需要改寫,才能搭配使用,這裏來做個介紹。
Breaking Change: No Accounts Exposed by Default,這篇文章有做完整的說明,從 2018 年 11 月 6日起,Metamask plugin 錢包與 Status,Mist,以及 ImToken 計畫一起提供一個新而且更安全的方法 (EIP-1102),來讀取錢包帳號的資料,例如它的 balance,交易歷史,以及一些敏感資料,未來錢包的 “Privacy Mode” 將預設為開啟。也就是在使用舊有的 Ðapp 網頁, Metamask “Privacy Mode” 必須是關閉,才能跟以前一樣使用,直接可讀取 Metamask 裡的帳號資料,進行交易。
對程式設計師而言,簡單講就是要叫用一個新的 ethereum.enable() function,它會 return 一個 Promise。如果 user 同意讓 Ðapp 使用他的帳號, 就會回傳 provider 結果,否則回傳 Error。這個 ethereum 物件,是 Metamask 在啟動時,會加到瀏覽器的 window 裡的,所以程式範例如下(僅供參考, 它還可以寫得更好);
import Web3 from ‘web3’
let web3;
if (typeof web3 !== ‘undefined’ && window.ethereum) {
const ethereum = window.ethereum;
ethereum.enable().then((account) => {
const defaultAccount = account[0]
console.log(defaultAccount);}).error(console.log);
web3 = new Web3(web3.currentProvider);// orweb3 = new Web3(ethereum);
} else {console.log('maybe user does not install metamask');
// set the provider you want from Web3.providers
web3 = new Web3(new Web3.providers.HttpProvider(“http://localhost:8545"));
}
v4.14.0 版以後的 Metamask,provider 的 window.ethereum 就開始支援 enable() function,只是預設值是關閉的。
如上圖,新版 MetaMask v5.0.x 設定裡也已經可以看到 Privacy Mode 的開關。目前版本的預設是關著的。以後新版將會預設成開。有些舊 ÐApp 網站沒搭配著修改,就無法使用。但為了相容起見,user 關掉 Privacy Mode,還是能正常使用,但這樣對使用者來講就不安全了。
這個標準定義在 EIP-1102,想深入了解底層的開發者可以參考。
相關 Links:
EIP-1102: How to prepare your dapp
Tutorial — How To Connect A JavaScript Front-End To A Smart Contract On Ethereum
Solidity Weekly #20 was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.
👏 歡迎轉載分享鼓掌
「javascript then」的推薦目錄:
- 關於javascript then 在 Taipei Ethereum Meetup Facebook 的精選貼文
- 關於javascript then 在 陳星合 Facebook 的最佳貼文
- 關於javascript then 在 矽谷阿雅 Anya Cheng Facebook 的精選貼文
- 關於javascript then 在 鐵人賽:使用Promise 處理非同步| 卡斯伯Blog - 前端,沒有極限 的評價
- 關於javascript then 在 What does the function then() mean in JavaScript? - Stack ... 的評價
- 關於javascript then 在 Promise Chaining in JavaScript 的評價
- 關於javascript then 在 axios/axios: Promise based HTTP client for the browser and ... 的評價
- 關於javascript then 在 JavaScript Tutorial In Hindi #39 - YouTube 的評價
javascript then 在 陳星合 Facebook 的最佳貼文
麻煩大家幫忙
留下優秀的一家人
他們來自波多黎各
父母親都是名校約翰霍普金大學的電腦碩士
(Master Degree in Computer Science - Johns Hopkins University at Laurel, MD)
他們著五個孩子,到全世界學習
Diego 17歲 Paula 13 歲 Alonzo 12 歲
Felizi 8 歲 Matteo 6 歲
八月,他們到了台灣
發覺這是一個非常適合的生活環境
有好的醫療、中文學習環境、電腦產業、和超好吃的水果
九月,Diego , Paula, Alonzo進入惠文高中寄讀
他們來了之後,學校形成一個很棒的英語學習情境
台灣學生都被迫用英文跟他們互動
星期五與台北歌德學院簽訂德國「PASCH夥伴學校」時
他們三個和學校弦樂社一起合奏卡農(見影片)
非常非常有教養的一家人
然而他們11月就必須離開台灣
因為他們來台灣的第五天
得到美國總公司的通知
他們收掉波多黎各的公司
爸爸Tommy失業了
所以這幾天,他在台中接一個英文家教
但經濟仍是問題
如果台中的朋友可以提供11月4日前的短期英文、西班牙文家教工作
或是提供長期電腦工程師的工作
麻煩和Tommy聯絡
以下是他的聯絡方式及完整資歷
(願意幫他們申請工作簽證更好)
他們很願意把台灣當成第二個家
PS
覺得政府說要把英文變成第二語言
最棒的方式是吸引國外的學生進入我們的校園
在人才即國力的年代
讓優秀的國際人才留在台灣
如果在台灣就有很好的英語學習環境
我們就不用一窩蜂跑到國外
聯絡TOMMY IRIZARRY-SIKES
Contact Information
Postal: Lane 400, Unit 11, Section 2, Nantun Road, Nantun District, Taichung City, Taiwan 408
Email: tirizar@gmail.com
Phone number: 0908 979 417
LinkedIn Profile: http://pr.linkedin.com/pub/tommy-irizarry/25/16/815
孩子的影片
Diego violin in a quartet:
https://youtu.be/ArkvU8Czmk8?t=37s
Diego violin Doble de Bach:
https://youtu.be/LYvnKwEueyA
Diego plays piano Clair de Lune:
https://youtu.be/CWCQMo5XJEY?t=14s
You can see some other videos in this YouTube channel:
https://www.youtube.com/user/tirizar/videos?reload=9
履歷
Summary of qualifications
Software developer for private industries and government agencies. Proficient web developer using classic ASP code, standard html, CSS and SQL Server for data storage. Web server administrator and SharePoint Power User.
Android developer
Certified Ethical Hacker
Programming / Markup languages: HTML, XML, ASP, PHP, CSS, JavaScript/AJAX/JQuery, experience with Java, C++ and C.
Mobile development: Java, Android, Android Studio.
Technologies / Tools: IIS 6.0/7.5, SQL Server, Dreamweaver, Fireworks, Microsoft SharePoint 2007/2010, Microsoft Office suite including InfoPath, Access, Excel, Google Analytics, Google AdSense, Facebook Advertising, Microsoft SharePoint Designer, Inquisite Surveys.
Experience
Since November 2016-current
Enterprise Iron
Principal consultant – Web Developer
Worked on the redesign efforts of the secure site for an international financial client. Applied responsive design principles using the Bootstrap framework while creating modular, reusable components of the code. Analyzed web page dependencies and identified legacy unused pages in the system.
Since November 2015-current
e-Nabler Corporation
Android developer – Professional Services Contract
Developed Java code for the eMobilePOS and Tupyx apps for their Android versions.
Since October 2013-November 2014 TEK Systems
Web Developer / Web Master for the Department of Veterans Affairs in DC
Continued supporting Veteran’s Affairs IT systems, including managing SharePoint 2010 systems and supporting databases. We identified issues with several databases including the management of IIS and SharePoint logs which were consuming many recourses and in a couple of occasions made the systems unavailable.
Enabled and configured space monitoring tools in the SharePoint server farms.
Since November 2011-September 2013 Centuria Corporation
Web Developer / Web Master for the Department of Veterans Affairs in DC
Developed a training registration web site that has been tweaked and used multiple times for different registration purposes, including new telephone system training, and scheduling software upgrades of encryption on laptops and upgrades to Apple Mac OS. The system uses a web front end and a SQL back end.
Performed a routine web server maintenance tasks including monitoring traffic logs, identifying and archiving sites no longer in use, evaluating tools to assist in the management of the web server.
Administered and migrated the FTP server from Windows 2003 Server / IIS 6 into Windows 2008 R2 Server / IIS 7.5. Configured new sites to support general operations within the VA Intranet.
Maintained and enhanced legacy sites, modifying forms and reports in needs to be updated. This includes modification and creation of site in the Enterprise Content Management System used at the VA.
Assisted other team members in various tasks including the creating or modification of surveys in the Inquisite system, and also the migration of some surveys into SharePoint, the modification of an Access application.
December 2001 – August 2011
Systems & System Software Solutions
Web Developer / Web Master for the Department of Veterans Affairs in DC
Mr. Irizarry developed a web based application for the State Home Per Diem Office, which manages millions of dollars in payments to the state homes, to replace an Access database. The Access database was converted to MS SQL Server database and all data was migrated successfully. He created a web based interface using the standard VA intranet look and feel. He also developed a custom interface for each of the 3 roles (CBO, VAMC and VISN). Tools were built for the administrator to view current reports, view missing reports lists, and configure many parameters in the application. The VAMC report form was heavily automated using jQuery to perform auto calculations, increasing data validation and saving time to the users. After the application was launched users commented frequently about how user friendly is the new interface and about the time savings. Tasks that will take 2 hours to be completed now take 15 minutes. We have close to 12,000 reports in the system.
There were various requests to the IT office for a web based training registration system of different types. Mr. Irizarry developed a registration system which was later used for the following projects: Take your child to work day, New Telephone system training registration, Laptop Hard Drive encryption software upgrade among others.
Developed an alternate cascading style sheet for SharePoint 2007, converting the out of the box look and feel to the Department of Veterans Affairs standard website look and feel.
After one of the VA’s laptops was stolen Mr. Irizarry worked to develop a Risk Assessment web based application. He created an Excel template which management will upload to an FTP server with information and details about remote employee access and the sensibility of the data accessed by those users. He also created VB Scripts to validate those Excel files an upload that information into an MS SQL database. Reports for upper management in Central Office were then created which prompted management to enforce stronger security measures, like hard drives encryption. In total more than 500,000 records were processed for the reports.
Administration of IIS 6.0 web server and MS SQL Server databases used in our websites.
Wrote migration scripts to move IIS 6.0 sites into a new IIS 7.5 server
Designed, developed and maintained multi-tier applications for the Veterans Health Administration. Most of the sites access a MS-SQL Server database, use cascade style sheets and ASP server side processing. The sites were developed using Adobe/Macromedia tools like Fireworks, and Dreamweaver.
Installed BlackBerry wireless email devices and trained users on the basic device usage.
Web developer for the Department of Veterans Affairs. Redesigned and modified web pages to make them compliant with the Section 508 guidelines. Tested validation tools that verify if web pages are “Section 508” compliant. Section 508 are guidelines that must be followed by all government agencies and points to which government resources must be make accessible to people with disabilities, i.e. blind, deaf, etc.
November 1999 - December 2001
Compaq Computer Corporation
Consulting Associate II
Design and develop the XOOB (Xevo out of the box) Web user interface. XOOB uses COM+, ASP, XML, XSL and JavaScript to provide a web user interface to the Xevo Workbench Platform based on the role associated with the user. Development was done using Visual Studio tools, IIS and XMLSpy.
Develop Active Server Pages for the Helpdesk solution for the PrimusASP project.
Design and code an ActiveX component that serves as the bridge between the Compaq ASP Framework and the Infranet billing system for Primus. Supported integration with other components of our framework.
Design, code and troubleshoot software for the Primus ASP (Application Service Provider) project. Software includes a DLL and various VB programs that run as NT Services, which are key components of the Compaq ASP framework.
June 1998 – October 1999
National Security Agency
Computer Scientist
Mr. Irizarry worked for as a software developer for the TOKENEER project. TOKENEER is a test platform for the integration of smart cards, biometrics (fingerprint, hand, iris and facial recognition) and a public key infrastructure. Development was done on Windows NT workstations using Visual C++ and Visual SourceSafe for source control. Mr. Irizarry used an SDK to capture and match fingerprints against a database of fingerprints. He also created software to created some statistics of “False Accepts and False Reject Rates” of the fingerprint. He also worked with other team members to identify which fingerprints characteristics could affect those rates. He then added error detection functions to the fingerprint recognition software to identify corrupted files of fingerprint images
Conducted research for methods to add security services to an off-the-shelf computer.
Developed C code to process fax data on an UltraSparc/SunOS station.
Wrote software to generate a daily report of traffic load in a telephone switch by analyzing the switch logs.
Education
Certifications:
Certified Ethical Hacker – 03/28/2014
Master Degree in Computer Science - May, 2001 Johns Hopkin
javascript then 在 矽谷阿雅 Anya Cheng Facebook 的精選貼文
Momo: (瞪)怎麼不陪我玩!?😾怎麼又在讀這什麼鬼?!好啦,那我先睡一下⋯ 😼Momo: hey, why are you not playing with me?! 😾What are you reading?! Okay, I am going to take a nap then...😼
#新的程式語言課又開始了 #加州大學柏克萊校區 #JavaScript #好不容易上完Java和NodeJS了
#OhNo老師感覺很嚴格 #Java和JavaScript完全不同
javascript then 在 What does the function then() mean in JavaScript? - Stack ... 的推薦與評價
... <看更多>
相關內容
javascript then 在 Promise Chaining in JavaScript 的推薦與評價
Returning a Promise ... When you return a value in the then() method, the then() method returns a new Promise that immediately resolves to the return value. ... <看更多>
javascript then 在 鐵人賽:使用Promise 處理非同步| 卡斯伯Blog - 前端,沒有極限 的推薦與評價
JavaScript 中有很多非同步的事件,而這些事件我們很常使用callback,在一層包一層後就會出現知名的callback 地獄,而Promise 就是為了解決此問題而生 ... ... <看更多>