mod.rs 1.41 KB
Newer Older
1
// Copyright 2018-2020 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
//! Environmental interface. (version 3)
16
//!
17
18
//! This is the interface with which a smart contract is able to communicate
//! with the outside world through its sandbox boundaries.
19

20
mod api;
21
mod arithmetic;
22
23
24
25
mod backend;
pub mod call;
mod engine;
mod error;
26
pub mod hash;
27
28
mod types;

29
30
31
#[cfg(test)]
mod tests;

32
33
34
35
36
37
38
39
#[cfg(any(feature = "std", test, doc))]
#[doc(inline)]
pub use self::engine::off_chain::test_api as test;

use self::backend::{
    Env,
    TypedEnv,
};
40
pub use self::{
41
    api::*,
Hero Bird's avatar
Hero Bird committed
42
    backend::ReturnFlags,
43
44
45
    error::{
        EnvError,
        Result,
46
    },
47
48
49
50
51
52
53
54
    hash::{
        Blake2x128,
        Blake2x256,
        CryptoHash,
        HashOutput,
        Keccak256,
        Sha2x256,
    },
55
56
57
58
59
60
61
    types::{
        AccountId,
        Clear,
        DefaultEnvTypes,
        EnvTypes,
        Hash,
        Topics,
62
    },
63
};