Have the script listen to multiple endpoints ( configuration sets ). IPFS does not distinguish between various chains.