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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! The smart contract level events for Casper.
//!
//! ```rust
//! use casper_event_standard::Event;
//!
//! // Turn a struct into an event.
//! #[derive(Event)]
//! struct Transfer {
//! amount: U256,
//! from: Key,
//! to: Key
//! }
//!
//! // Register event schemas.
//! fn init_events() {
//! let schemas = Schemas::new()
//! .with::<Transfer>();
//! casper_event_standard::init(schemas);
//! }
//!
//! // Emit event.
//! fn emit_transfer(transfer: Transfer) {
//! casper_event_standard::emit(transfer);
//! }
//! ```
pub extern crate alloc;
pub use casper_types;
use String;
use bytesrepr;
/// Macro that derives [`CLTyped`], [`FromBytes`], [`ToBytes`] and [`EventInstance`].
///
/// [`CLTyped`]: casper_types::CLTyped
/// [`FromBytes`]: casper_types::bytesrepr::FromBytes
/// [`ToBytes`]: casper_types::bytesrepr::ToBytes
pub use Event;
pub use CLType2;
pub use ;
pub use ;
/// The key under which the events are stored.
pub const EVENTS_DICT: &str = "__events";
/// The key under which the events length is stored.
pub const EVENTS_LENGTH: &str = "__events_length";
/// The key under which the event schemas are stored.
pub const EVENTS_SCHEMA: &str = "__events_schema";
/// Helper trait, used for the schema generation.
/// Extracts full name of the event including `event_` prefix.