当前位置:网站首页>The metamask method is used to obtain account information
The metamask method is used to obtain account information
2022-07-02 20:23:00 【JackieDYH】
MetaMask file
Get account information
async function getAccount() {
// Authorize access to accounts
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
const myAccount = accounts[0];
console.log(myAccount,1);
// Returns the balance of the account at the specified address
const balance = await ethereum.request({ method: 'eth_getBalance',params:[myAccount,"latest"],"id":1});
console.log(balance,2);
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.


边栏推荐
- B端电商-订单逆向流程
- Motivation! Big Liangshan boy a remporté le prix Zhibo! Un article de remerciement pour les internautes qui pleurent
- CRM客户关系管理系统
- Driverless learning (4): Bayesian filtering
- An analysis of the past and present life of the meta universe
- Workplace four quadrant rule: time management four quadrant and workplace communication four quadrant "suggestions collection"
- AcWing 903. Expensive bride price solution (the shortest path - building map, Dijkstra)
- c语言链表--待补充
- AcWing 1129. Heat wave solution (shortest path SPFA)
- After eight years of test experience and interview with 28K company, hematemesis sorted out high-frequency interview questions and answers
猜你喜欢

sql-labs
![[real case] trap of program design - beware of large data](/img/bd/d72cc5ce23756cea873c9ced6b642a.jpg)
[real case] trap of program design - beware of large data

Basic concept of database, installation and configuration of database, basic use of MySQL, operation of database in the project

After eight years of test experience and interview with 28K company, hematemesis sorted out high-frequency interview questions and answers

Implementation of online shopping mall system based on SSM

【每日一题】241. 为运算表达式设计优先级

KT148A语音芯片ic的用户端自己更换语音的方法,上位机

Why do I have a passion for process?

Jetson XAVIER NX上ResUnet-TensorRT8.2速度与显存记录表(后续不断补充)

Kt148a voice chip IC software reference code c language, first-line serial port
随机推荐
Is it safe to open an account for online stock speculation? I'm a novice, please guide me
Codeforces round 651 (Div. 2) (a thinking, B thinking, C game, D dichotomy, e thinking)
AcWing 1128. Messenger solution (shortest path Floyd)
想请教一下,我在东莞,到哪里开户比较好?手机开户是安全么?
Overview of browser caching mechanism
GCC: Graph Contrastive Coding for Graph Neural NetworkPre-Training
蓝牙芯片ble是什么,以及该如何选型,后续技术发展的路径是什么
【Hot100】22. bracket-generating
[cloud native topic -49]:kubesphere cloud Governance - operation - step by step deployment of microservice based business applications - basic processes and steps
Function, function, efficiency, function, utility, efficacy
ROS learning (10): ROS records multiple topic scripts
[Chongqing Guangdong education] reference materials for labor education of college students in Nanjing University
Want to ask, is there any discount for opening an account now? Is it safe to open an account online?
分享几个图床网址,便于大家分享图片
疫情封控65天,我的居家办公心得分享 | 社区征文
After writing 100000 lines of code, I sent a long article roast rust
esp32c3 crash分析
什么叫在线开户?现在网上开户安全么?
功能、作用、效能、功用、效用、功效
「 工业缺陷检测深度学习方法」最新2022研究综述