sun_dance
sun_dance

Reputation: 281

How to get bitcoin balance in smart contract

I am making a smart contract and want to know the bitcoin balance of a metamask address.How can I do this? Since BTC is not ERC-20.

Upvotes: 0

Views: 160

Answers (1)

lapadets
lapadets

Reputation: 1095

Have you considered using a block explorer (something like blockstream.info)

All you need to know is the address you want to query.

I assume want to do automate this, and in this case you can search for an api - http://blockchain.info/api You will have to implement the API, but that's the only way as far as I know from a smart contract running on Etherium.

Upvotes: 2

Related Questions