algokittens / algoNFTs

40 stars 17 forks source link

Update algoexplorer API endpoints #13

Closed thecryptomie closed 2 years ago

thecryptomie commented 2 years ago

The API endpoints listing in the lib/settings.py module need to be updated to reflect changes made by algoexplorer.

At the end of Feb 2022, the original endpoints were deprecated and are no longer in service. When trying to batch mint some NFTs, this results in an 404 that gets obscured by nested try/except statements in the algosdk.

MWE 1: Failure

from algosdk.v2client import algod
algod_address = "https://api.testnet.algoexplorer.io"
algod_client = algod.AlgodClient('', algod_address, headers={'User-Agent': 'DoYouLoveMe?'})
params = algod_client.suggested_params()

MWE 2: Success

from algosdk.v2client import algod
algod_address = "https://node.algoexplorerapi.io"
algod_client = algod.AlgodClient('', algod_address, headers={'User-Agent': 'DoYouLoveMe?'})
params = algod_client.suggested_params()
algokittens commented 2 years ago

This has now been fixed, thanks for the heads up!