Eloise1988 / CRYPTOBALANCE

A library for importing ones balances, networth, staking, rewards, lending & farming rates, dex volume & fees, uniswap new pairs into Google spreadsheets
MIT License
151 stars 23 forks source link

Polygon's MATIC network #6

Closed m3knight closed 3 years ago

m3knight commented 3 years ago

1st, thanks so much for your work. It's been invaluable.

Trying to get it to pull balances off the MATIC network but can't figure it out.

Eloise1988 commented 3 years ago

I'll add it. From what I see https://coinmarketcap.com/currencies/polygon/, it's an ERC20.

You can request the balance using it's contract address in place of ticker. Here's how it would work =CRYPTOBALANCE("0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0","holder's address")

Screen Shot 2021-05-18 at 17 47 59 Screen Shot 2021-05-18 at 17 47 45
m3knight commented 3 years ago

While it is an ERC20 on the ethereum mainnet, it's also also it's own L2 chain. Since you are able to pull BNB smart chain I figured this would be doable as well?

For instance, using the wallet address 0x7988cf76751664eF4506E55e7c53184FdB37662B

Ethereum mainnet shows nothing https://etherscan.io/address/0x7988cf76751664eF4506E55e7c53184FdB37662B

But on Matic network there's a small balance https://explorer-mainnet.maticvigil.com/address/0x7988cf76751664eF4506E55e7c53184FdB37662B/transactions

Eloise1988 commented 3 years ago

@m3knight You can now retrieve the amount =CRYPTOBALANCE("MATIC","Holder's address")

Let me know if you are still having issues