-
Notifications
You must be signed in to change notification settings - Fork 2
/
Program.cs
49 lines (42 loc) · 1.67 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using Nethereum.Contracts;
using Nethereum.JsonRpc.WebSocketStreamingClient;
using Nethereum.RPC.Eth.DTOs;
using System;
using System.Reactive.Linq;
using System.Threading;
using Nethereum.Contracts.Extensions;
using Nethereum.ABI.FunctionEncoding.Attributes;
using System.Numerics;
using Nethereum.JsonRpc.Client.Streaming;
using Nethereum.RPC.Eth.Subscriptions;
using Nethereum.RPC.Reactive.Eth;
using Nethereum.RPC.Reactive.Eth.Subscriptions;
using Nethereum.RPC.Reactive.Extensions;
using Nethereum.JsonRpc.WebSocketClient;
using Nethereum.RPC.Web3;
using Nethereum.Hex.HexTypes;
using System.Threading.Tasks;
using Nethereum.RPC.Reactive.Eth.Transactions;
using System.Collections.Concurrent;
namespace Nethereum.Templates.WebSocketStreaming
{
class Program
{
static async Task Main(string[] args)
{
//please dont use this infuraId think about the children
//
var url = "wss://mainnet.infura.io/ws/v3/206cfadcef274b49a3a15c45c285211c";
// var url = "ws://fullnode.dappnode:8546";
//var example = new ExamplePendingTransactionsWithTransactionsUsingSameClient(url);
///var example = new ExamplePendingTransactionsWithTransactionsUsingClientAndConcurrentQueue(url);
//var example = new ExampleNewHeaderSubscription(url);
//var example = new ExampleNormalRPCCalls(url);
//var example = new ExampleLogsERC20Subscriptions(url);
var example = new ExampleLogsUniswapSwapsSubscription(url);
//var example = new ExampleLogsUniswapSyncSubscription(url);
await example.SubscribeAndRunAsync();
Console.ReadLine();
}
}
}