-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathProgram.cs
61 lines (53 loc) · 2.77 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
50
51
52
53
54
55
56
57
58
59
60
61
using Flow.Net.Sdk.Client.Grpc;
using Flow.Net.Sdk.Client.Http;
using Flow.Net.Sdk.Core.Client;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
namespace Flow.Net.Examples
{
internal static class Program
{
private static async Task Main()
{
var flowClients = new List<IFlowClient>
{
// emulator addresses
new FlowHttpClient(new HttpClient(), Sdk.Client.Http.ServerUrl.EmulatorHost),
new FlowGrpcClient(Sdk.Client.Grpc.ServerUrl.EmulatorHost)
};
foreach (var client in flowClients)
{
// Block example
await BlockExamples.BlockExample.RunAsync(client);
await BlockExamples.BlockHeaderExample.RunAsync(client);
// Event example
await EventExamples.GetEventsExample.RunAsync(client);
// Script example
await ScriptExamples.ScriptExample.RunAsync(client);
await ScriptExamples.ExecuteScriptAtLatestBlockWithParametersExample.RunAsync(client);
await ScriptExamples.ExecuteScriptAtLatestBlockExample.RunAsync(client);
await ScriptExamples.ExecuteScriptAtBlockHeightExample.RunAsync(client);
await ScriptExamples.ExecuteScriptAtBlockIdExample.RunAsync(client);
// Collection example
await CollectionExamples.GetCollectionExample.RunAsync(client);
// Transaction examples
await TransactionExamples.GetTransactionExample.RunAsync(client);
await TransactionExamples.SinglePartySingleSignatureExample.RunAsync(client);
await TransactionExamples.SinglePartyMultiSignatureExample.RunAsync(client);
await TransactionExamples.MultiPartySingleSignatureExample.RunAsync(client);
await TransactionExamples.MultiPartyTwoAuthorizersExample.RunAsync(client);
await TransactionExamples.MultiPartyMultiSignatureExample.RunAsync(client);
// Account example
await AccountExamples.CreateAccountExample.RunAsync(client);
await AccountExamples.CreateAccountWithContractExample.RunAsync(client);
await AccountExamples.DeployUpdateDeleteContractExample.RunAsync(client);
await AccountExamples.GetAccountExample.RunAsync(client);
// User signature examples
await UserSignaturesExamples.UserSignatureExample.RunAsync(client);
await UserSignaturesExamples.UserSignatureValidateAnyExample.RunAsync(client);
await UserSignaturesExamples.UserSignatureValidateAllExample.RunAsync(client);
}
}
}
}