Telegram Group & Telegram Channel
Semolina Code (Python / TypeScript)
Конкурс закрывается Победитель @fraggdiller 🏆 https://www.oklink.com/ru/arbitrum/tx/0x6d0e1196aef639b2b2f6aa75bab962ab9fe626bfee233e15d0ce61ee129f2940 Получилось прикрутить прокси к ethers.js: import { HttpsProxyAgent } from 'https-proxy-agent'; import…
А вот так прокси добавляются в web3.js
Но тут победитель уже я

Осталось только viem добить и будет опять непонятно с какой либой работать


import { HttpsProxyAgent } from 'https-proxy-agent';
import Web3HttpProvider from 'web3-providers-http';
import Web3 from 'web3';

(async () => {
const proxy = '';
const rpc = '';

const httpProxyAgent = new HttpsProxyAgent(proxy);
const options = {
providerOptions: {
agent: httpProxyAgent,
keepAlive: true,
withCredentials: false,
timeout: 20000,
headers: [
['Access-Control-Allow-Origin', '*'],
['accept', '*/*'],
] as [string, string][]
}
};

const provider = new Web3HttpProvider(rpc, options);
const web3 = new Web3(provider);
console.log(await web3.eth.getChainId());
})();


SemolinaCode | Chat | YouTube | Arbuzers | HowToCode | Prop



tg-me.com/semolina_code_python/88
Create:
Last Update:

А вот так прокси добавляются в web3.js
Но тут победитель уже я

Осталось только viem добить и будет опять непонятно с какой либой работать


import { HttpsProxyAgent } from 'https-proxy-agent';
import Web3HttpProvider from 'web3-providers-http';
import Web3 from 'web3';

(async () => {
const proxy = '';
const rpc = '';

const httpProxyAgent = new HttpsProxyAgent(proxy);
const options = {
providerOptions: {
agent: httpProxyAgent,
keepAlive: true,
withCredentials: false,
timeout: 20000,
headers: [
['Access-Control-Allow-Origin', '*'],
['accept', '*/*'],
] as [string, string][]
}
};

const provider = new Web3HttpProvider(rpc, options);
const web3 = new Web3(provider);
console.log(await web3.eth.getChainId());
})();


SemolinaCode | Chat | YouTube | Arbuzers | HowToCode | Prop

BY Semolina Code (Python / TypeScript)


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/semolina_code_python/88

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Traders also expressed uncertainty about the situation with China Evergrande, as the indebted property company has not provided clarification about a key interest payment.In economic news, the Commerce Department reported an unexpected increase in U.S. new home sales in August.Crude oil prices climbed Friday and front-month WTI oil futures contracts saw gains for a fifth straight week amid tighter supplies. West Texas Intermediate Crude oil futures for November rose $0.68 or 0.9 percent at 73.98 a barrel. WTI Crude futures gained 2.8 percent for the week.

The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.

telegram from us


Telegram Semolina Code (Python / TypeScript)
FROM USA