jito-labs/mev-bot

The endpoint can only be paired with an `https.Agent`. You have, instead, supplied an `http.Agent` through `httpAgent`

Opened this issue · 10 comments

When I run yarn start, I'm facing this error:

/Users/rajdeep/dev/jito-mev-bot/node_modules/jito-ts/node_modules/@solana/web3.js/lib/index.cjs.js:6192
          throw new Error('The endpoint `' + url + '` can only be paired with an `https.Agent`. You have, instead, supplied an ' + '`http.Agent` through `httpAgent`.');
                ^

Error: The endpoint `https://frankfurt.mainnet.rpc.jito.wtf` can only be paired with an `https.Agent`. You have, instead, supplied an `http.Agent` through `httpAgent`.
    at createRpcClient (/Users/rajdeep/dev/jito-mev-bot/node_modules/jito-ts/node_modules/@solana/web3.js/lib/index.cjs.js:6192:17)
    at new Connection (/Users/rajdeep/dev/jito-mev-bot/node_modules/jito-ts/node_modules/@solana/web3.js/lib/index.cjs.js:7132:23)
    at new JitoRpcConnection (/Users/rajdeep/dev/jito-mev-bot/node_modules/jito-ts/dist/sdk/rpc/connection.js:258:9)
    at file:///Users/rajdeep/dev/jito-mev-bot/build/src/clients/rpc.js:122:18
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)

read the error again pls.. you will figure it out

I meet the same problem, it seems like mev-bot misunderstood the url of https to http

I meet the same problem

I meet the same broblem

Anyone got the solution?

zzxn commented

Anyone got the solution?

Just delete the code that checks agent type...

read the error again pls.. you will figure it out

Please tell me how to solve it

read the error again pls.. you will figure it out

Please tell me how to solve it

change the endpoint https: to http:
that should do it.

Please can someone help me tu run this ?

easy,just comment out the agent

like this:

if (RPC_REQUESTS_PER_SECOND > 0) {
connection = new Connection(RPC_URL, {
commitment: 'processed',
fetch: coalesceFetch(),
disableRetryOnRateLimit: true,
// httpAgent: keepaliveAgent,
});
} else {
connection = new Connection(RPC_URL, {
// httpAgent: keepaliveAgent,
disableRetryOnRateLimit: true,
commitment: 'processed',
});
}