Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/data_sources/events/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,21 @@ export interface ContractCallInfo {
data: string;
}

const web3HttpOptions = {
providerOptions: {
headers: {
// 'Content-Type': 'application/json',
'Accept-Encoding': 'gzip'
}
} as RequestInit,
};

export class Web3Source {
private readonly _web3Wrapper: Web3Wrapper;
private readonly _web3: any;
constructor(provider: Web3ProviderEngine, wsProvider: string) {
this._web3Wrapper = new Web3Wrapper(provider);
this._web3 = new Web3(wsProvider);
this._web3 = new Web3(new Web3.providers.HttpProvider(wsProvider, web3HttpOptions));

if (BLOCK_RECEIPTS_MODE === 'standard') {
this._web3.eth.extend({
Expand Down
Loading