lib.rs 1.91 KB
Newer Older
1
// Copyright 2018-2021 Parity Technologies (UK) Ltd.
2
//
3
4
5
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
6
//
7
//     http://www.apache.org/licenses/LICENSE-2.0
8
//
9
10
11
12
13
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
14

15
#![cfg_attr(not(feature = "std"), no_std)]
16

17
mod chain_extension;
Hero Bird's avatar
Hero Bird committed
18
mod contract;
19
20
21
22
mod cross_calling;
mod dispatcher;
mod env_access;
mod error;
23
mod events;
24
mod traits;
25

26
pub use self::{
27
28
29
30
    chain_extension::{
        ChainExtensionInstance,
        IsResultType,
    },
31
32
33
34
35
36
37
    contract::{
        DispatchMode,
        DispatchUsingMode,
    },
    cross_calling::{
        ForwardCall,
        ForwardCallMut,
38
        NeverReturns,
39
40
41
        ToAccountId,
    },
    dispatcher::{
42
        deny_payment,
43
44
45
        execute_constructor,
        execute_message,
        execute_message_mut,
46
        AcceptsPayments,
47
        ConstructorDispatcher,
48
        EnablesDynamicStorageAllocator,
49
50
        Execute,
        MessageDispatcher,
51
52
    },
    env_access::{
53
        ContractEnv,
54
55
        Env,
        EnvAccess,
56
        StaticEnv,
57
58
59
60
61
    },
    error::{
        DispatchError,
        DispatchResult,
    },
62
63
64
65
    events::{
        BaseEvent,
        EmitEvent,
    },
66
    traits::{
67
        CheckedInkTrait,
68
        Constructor,
69
70
71
        FnInput,
        FnOutput,
        FnSelector,
72
        FnState,
73
        ImpliesReturn,
74
75
        MessageMut,
        MessageRef,
Hero Bird's avatar
Hero Bird committed
76
        True,
77
78
    },
};
79
80
pub use ::static_assertions;
pub use ink_lang_macro::{
81
    blake2x256,
82
    chain_extension,
83
    contract,
84
85
    selector_bytes,
    selector_id,
86
87
88
    test,
    trait_definition,
};