openbrush_contracts/lib.rs
1// Copyright (c) 2012-2022 Supercolony
2//
3// Permission is hereby granted, free of charge, to any person obtaining
4// a copy of this software and associated documentation files (the"Software"),
5// to deal in the Software without restriction, including
6// without limitation the rights to use, copy, modify, merge, publish,
7// distribute, sublicense, and/or sell copies of the Software, and to
8// permit persons to whom the Software is furnished to do so, subject to
9// the following conditions:
10//
11// The above copyright notice and this permission notice shall be
12// included in all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22#![cfg_attr(not(feature = "std"), no_std, no_main)]
23#![feature(min_specialization)]
24
25mod access;
26mod finance;
27mod governance;
28mod security;
29mod token;
30mod upgradeability;
31
32pub mod traits;
33
34// Modules with implementation of traits above
35#[cfg(feature = "access_control")]
36pub use access::access_control;
37#[cfg(feature = "ownable")]
38pub use access::ownable;
39#[cfg(feature = "payment_splitter")]
40pub use finance::payment_splitter;
41#[cfg(feature = "timelock_controller")]
42pub use governance::timelock_controller;
43#[cfg(feature = "pausable")]
44pub use security::pausable;
45#[cfg(feature = "reentrancy_guard")]
46pub use security::reentrancy_guard;
47#[cfg(feature = "psp22")]
48pub use token::psp22;
49#[cfg(feature = "psp22_pallet")]
50pub use token::psp22_pallet;
51#[cfg(feature = "psp34")]
52pub use token::psp34;
53#[cfg(feature = "psp37")]
54pub use token::psp37;
55#[cfg(feature = "diamond")]
56pub use upgradeability::diamond;
57#[cfg(feature = "proxy")]
58pub use upgradeability::proxy;