Skip to content

while calling deposit function, It fails with "Request is not defined' error for sepolia chain. #39

@aslam-shrimali-iverve

Description

@aslam-shrimali-iverve

I have been trying to execute the following command to send tokens from my Sepolia account to eclipse testnet:

node bin/cli.js -k private-key.txt -d 6g8wB6cJbodeYaEb5aD9QYqhdxiS8igfcHpz36oHY7p8 -a 0.002 --sepolia

Error:
Error during deposit: HTTP request failed.
Details: The request is not defined
Version: viem@2.18.4

I think above command execute the following code:

const client = createWalletClient({
      chain: chain,
      transport: http(rpc),
    });


await client.sendTransaction({
      data: data.toString(),
      account,
      to: etherBridgeAddress,
      value: amountWei,
    });

For this scenario, client value is as follows:

{
 formatters: undefined,
 fees: undefined,
 serializers: undefined,
 id: 11155111,
 name: 'Sepolia',
 nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },
 rpcUrls: { default: { http: [Array] } },
 blockExplorers: {
   default: {
     name: 'Etherscan',
     url: 'https://sepolia.etherscan.io',
     apiUrl: 'https://api-sepolia.etherscan.io/api'
   }
 },
 contracts: {
   multicall3: {
     address: '0xca11bde05977b3631167028862be2a173976ca11',
     blockCreated: 751532
   },
   ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' },
   ensUniversalResolver: {
     address: '0xc8Af999e38273D658BE1b921b88A9Ddf005769cC',
     blockCreated: 5317080
   }
 },
 testnet: true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions