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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc_error_handler, panic_info_message, core_intrinsics))]

#[cfg(not(feature = "std"))]
mod allocator;

#[cfg(not(feature = "std"))]
#[cfg(not(feature = "wee-alloc"))]
#[global_allocator]
static mut ALLOC: allocator::bump::BumpAllocator = allocator::bump::BumpAllocator {};

#[cfg(all(not(feature = "std"), target_arch = "wasm32"))]
#[allow(unused_variables)]
#[panic_handler]
fn panic(info: &core::panic::PanicInfo) -> ! {
    let msg = format!("{:?}", info.message().unwrap().as_str().unwrap());
    self::vmapi::eosio::check(false, &msg);
    core::arch::wasm32::unreachable();
}

#[cfg(not(feature = "std"))]
extern crate alloc;

use cfg_if::cfg_if;

#[cfg(feature = "std")]
pub use chaintester;

#[cfg(feature = "std")]
pub use chaintester::{
    ChainTester,
};

cfg_if! {
    if #[cfg(feature = "std")] {
        pub use std::{
            borrow,
            boxed,
            format,
            string,
            vec,
            rc,
        };

        /// Collection types.
        pub mod collections {
            pub use self::{
                binary_heap::BinaryHeap,
                btree_map::BTreeMap,
                btree_set::BTreeSet,
                linked_list::LinkedList,
                vec_deque::VecDeque,
                Bound,
            };
            pub use std::collections::*;
        }
    } else {
        pub use alloc::{
            borrow,
            boxed,
            format,
            string,
            vec,
            rc,
        };

        /// Collection types.
        pub mod collections {
            pub use self::{
                BTreeMap,
                BTreeSet,
                BinaryHeap,
                LinkedList,
                VecDeque,
            };
            pub use alloc::collections::*;
            pub use core::ops::Bound;
        }
    }
}


///
pub mod vmapi;
///
pub mod structs;
pub use self::structs::*;

///
pub mod transaction;
pub use self::transaction::{
    TransactionExtension,
    Transaction,
};

///
pub mod serializer;
pub use serializer::{
    Encoder,
    Decoder,
};

///
pub mod db;

///
#[macro_use]
pub mod print;

///
pub mod mi;

///
pub mod mi_not_generic;

///
mod asset;
pub use asset::{
    Asset,
    Symbol,
};

mod privileged;

///
pub mod crypto;
pub use crypto::{
    assert_sha256,
    assert_sha1,
    assert_sha512,
    assert_ripemd160,

    sha256,
    sha1,
    sha512,
    ripemd160,

    recover_key,
    assert_recover_key,
};

pub use self::vmapi::eosio::{
    get_active_producers,
    check_transaction_authorization,
    check_permission_authorization,
    get_permission_last_used,
    get_account_creation_time,

    read_action_data,
    action_data_size,
    require_recipient,
    require_auth,
    has_auth,
    require_auth2,
    is_account,
    send_inline,
    send_context_free_inline,

    publication_time,
    current_receiver,
    check,
    eosio_assert_code,
    eosio_exit,
    current_time,
    is_feature_activated,
    get_sender,

    get_resource_limits,
    set_resource_limits,
    set_proposed_producers,
    set_proposed_producers_ex,
    is_privileged,
    set_privileged,
    set_blockchain_parameters,
    get_blockchain_parameters,
    preactivate_feature,

    send_deferred,
    cancel_deferred,
    read_transaction,
    transaction_size,
    tapos_block_num,
    tapos_block_prefix,
    expiration,
    get_action,
    get_context_free_data,
};

///
#[macro_use]
pub mod name;

pub use name::{
    SAME_PAYER,
    ACTIVE,
    OWNER,
    CODE,
};

///
pub mod action;

pub use action::{
    PermissionLevel,
    Action,
};

///
pub mod utils;
///
pub mod varint;

///
pub mod binary_extension;
pub use binary_extension::BinaryExtension;

///
pub mod intrinsic_abi_types;
pub use intrinsic_abi_types::*;

pub use eosio_macro::{
    contract,
    // chain,
};

#[cfg(feature = "std")]
pub use eosio_scale_info;

#[cfg(feature = "std")]
pub mod abi;