This repository was archived by the owner on Apr 23, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventContract.cs
More file actions
41 lines (33 loc) · 1.23 KB
/
EventContract.cs
File metadata and controls
41 lines (33 loc) · 1.23 KB
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
// Copyright (C) 2023 Christopher R Schuchardt
//
// The neo-examples-csharp is free software distributed under the
// MIT software license, see the accompanying file LICENSE in
// the main directory of the project for more details.
using Neo.SmartContract.Framework;
using Neo.SmartContract.Framework.Attributes;
using Neo.SmartContract.Framework.Services;
using System;
using System.ComponentModel;
namespace EventContract;
[DisplayName("EventContract")]
[ManifestExtra("Author", "neo.events")]
[ManifestExtra("Description", "Simple Smart Contract Example")]
[ManifestExtra("Email", "examples@neo.events")]
[ManifestExtra("Website", "https://www.neo.events/")]
[ManifestExtra("Version", "1.0.0")]
[ContractSourceCode("https://github.com/cschuchardt88/neo-examples-csharp")]
[ContractPermission("*", "*")]
public class EventContract : SmartContract
{
public delegate void OnSayHelloDelegate(string message);
[DisplayName("SayHello1")]
public static event OnSayHelloDelegate OnSayHello;
[DisplayName("SayHello2")]
public static event Action<string> SayHello;
public static void Main()
{
OnSayHello("Hello, alice");
SayHello("Hello, bob");
Runtime.Notify("SayHello3", new[] { "Hello, joe" });
}
}