如何使用Python Flask获取元掩码帐户?
我正在学习使用Python构建DAPP。我将Flask用作web脚本部分,将Ganache用作本地区块链 目前,我正在使用此方法获取Python中的帐户如何使用Python Flask获取元掩码帐户?,python,flask,blockchain,metamask,Python,Flask,Blockchain,Metamask,我正在学习使用Python构建DAPP。我将Flask用作web脚本部分,将Ganache用作本地区块链 目前,我正在使用此方法获取Python中的帐户 ganacheURL = "HTTP://127.0.0.1:7545" web3 = Web3(Web3.HTTPProvider(ganacheURL)) web3.eth.defaultAccount = web3.eth.accounts[0] #First account in Ganache 我在连接到Ga
ganacheURL = "HTTP://127.0.0.1:7545"
web3 = Web3(Web3.HTTPProvider(ganacheURL))
web3.eth.defaultAccount = web3.eth.accounts[0] #First account in Ganache
我在连接到Ganache的Metamask中使用自定义RPC。
我想知道是否可以使用Python从Metamask获取当前帐户地址。如果可能的话,请告诉我
比如:
currentAccountAddresss = getCurrentMetamaskAccount() #Fetches Current Metamask account
每当我在metamask中选择另一个帐户时,此地址都应该更改。
任何形式的帮助都将不胜感激