BSC testnet, how can i get api key from bsc testnet

Viewed 2826

Did somebody verify as BSC testnet after nov 2021?

-Issue Detail: Mainet I can get api as https://bscscan.com/myapikey However BSC testnet, doesn't support API. https://testnet.bscscan.com/myapikey

[ What I did ] 1.Access API page on testnet. https://testnet.bscscan.com/apidoc However I can't find

2.I did just tried without testnet API However, shows error "Error in plugin @nomiclabs/hardhat-etherscan: testnet is an invalid address."

3.BSC testnet register page is not working as well.

[ What I expected ] Verify contract by hardhat

1 Answers

You don't need an api key for testnet.

Kindly pay attention to contract difference between the test and production network for the token contract address you input. Also notice the cname difference on testnet url (api-testnet).

WBNB-Testnet-Contract-Address: 0xae13d989dac2f0debff460ac112a837c89baa7cd WBNB-Mainnet-Contract-Address: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

Production: https://api.bscscan.com/api?module=contract&action=getabi&address=0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c&apikey=[BSCSCAN_API_KEY]

Test: https://api-testnet.bscscan.com/api?module=contract&action=getabi&address=0xae13d989dac2f0debff460ac112a837c89baa7cd

For more information check out bscscan testnet developer page.

https://testnet.bscscan.com/apidoc

Related