Infura API changed to Credit-based Subscription

in blog •  3 months ago 

I am using Infura API in steem2eth swap, but only in the last bit - to send the ETH over to another address.

Recently, the Infura API has changed to credit-based subscription - so for now, I think a Free Plan would work. I've also used the alchemy and Lava API, so the code looks like something like this - to improve the reliability and avoid Single Point of Failure

const getBlockNumber = async() => {
    let result = await getBlockNumber_Alchemy();
    if (result != null) {
        return result;
    }
    result = await getBlockNumber_Lava();
    if (result != null) {
        return result;
    }
    result = await getBlockNumber_Infrua();
    if (result != null) {
        return result;
    }
    return null;
}

image.png

image.png

unnamed.png

image.png

image.png

image.png

Steem to the Moon🚀!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!