ink_env/call/mod.rs
1// Copyright (C) Use Ink (UK) Ltd.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Utilities to call or instantiate contracts on the chain.
16
17mod call_builder;
18mod common;
19mod create_builder;
20mod execution;
21mod selector;
22
23/// Utility types for the cross-contract calling API.
24pub mod utils {
25 pub use super::{
26 common::{
27 ConstructorError,
28 DecodeConstructorError,
29 DecodeMessageResult,
30 ReturnType,
31 Set,
32 Unset,
33 Unwrap,
34 },
35 execution::{
36 ArgsList,
37 Argument,
38 ArgumentList,
39 ArgumentListEnd,
40 EmptyArgumentList,
41 EncodeArgsWith,
42 },
43 };
44}
45
46pub use self::{
47 call_builder::{
48 Call,
49 CallBuilder,
50 CallParams,
51 DelegateCall,
52 build_call,
53 build_call_ink,
54 build_call_sol,
55 },
56 create_builder::{
57 ConstructorReturnType,
58 CreateBuilder,
59 CreateParams,
60 FromAddr,
61 LimitParamsV2,
62 build_create,
63 build_create_ink,
64 build_create_sol,
65 state,
66 },
67 execution::{
68 Execution,
69 ExecutionInput,
70 Executor,
71 },
72 selector::Selector,
73};