LIT-Protocol / js-sdk

The Lit Protocol SDK provides developers with a framework for implementing Lit functionality into their own applications.
https://developer.litprotocol.com
MIT License
105 stars 65 forks source link

fix: updated sepolia rpc #582

Closed anshss closed 3 months ago

anshss commented 3 months ago

Description

Replacement for Sepolia's RPC url with one from https://www.publicnode.com/ Earlier one isn't functional

Type of change

How Has This Been Tested?

Can try to send a transaction,

    let rpc = LIT_CHAINS["sepolia"].rpcUrls[0];

    const provider = new ethers.providers.JsonRpcProvider(
        rpc
    );
    const signer = new ethers.Wallet(privateKey1, provider);

    const unsignedTransaction = {
        to: "0x291B0E3aA139b2bC9Ebd92168575b5c6bAD5236C",
        value: 2,
        gasLimit: "50000",
        gasPrice: (await signer.getGasPrice()).toHexString(),
        nonce: await signer.getTransactionCount(
            signer.getAddress()
        ),
    };

    const tx = await signer.sendTransaction(unsignedTransaction);
    const receipt = tx.wait();
    console.log(tx)

Checklist:

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.