Skip to content

Commit d80d0ba

Browse files
committed
docs: "default" ABI for calls
1 parent 87712b2 commit d80d0ba

File tree

6 files changed

+39
-10
lines changed

6 files changed

+39
-10
lines changed

crates/e2e/src/contract_results.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ impl<E: Environment, EventLog> InstantiationResult<E, EventLog> {
151151
///
152152
/// # Note
153153
///
154-
/// This uses the "default" ABI for the instantiated contract.
154+
/// This uses the "default" ABI for calls for the instantiated contract.
155+
///
156+
/// The "default" ABI for calls is "ink", unless the ABI is set to "sol"
157+
/// in the ink! project's manifest file (i.e. `Cargo.toml`).
155158
pub fn call_builder<Contract>(
156159
&self,
157160
) -> <Contract as ContractCallBuilder>::Type<ink::env::DefaultAbi>

crates/env/src/call/call_builder/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ where
6767
}
6868

6969
/// Returns a new [`CallBuilder`] to build up the parameters to a cross-contract call
70-
/// that uses the "default" ABI.
70+
/// that uses the "default" ABI for calls for the ink! project.
71+
///
72+
/// # Note
73+
///
74+
/// The "default" ABI for calls is "ink", unless the ABI is set to "sol"
75+
/// in the ink! project's manifest file (i.e. `Cargo.toml`).
7176
///
7277
/// # Example
7378
///

crates/env/src/lib.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,22 @@ pub use pallet_revive_uapi::{
145145
ReturnFlags,
146146
};
147147

148+
/// A convenience type alias to the marker type representing the "default" ABI for calls.
149+
///
150+
/// # Note
151+
///
152+
/// The "default" ABI for calls is "ink", unless the ABI is set to "sol"
153+
/// in the ink! project's manifest file (i.e. `Cargo.toml`).
148154
#[cfg(not(ink_abi = "sol"))]
149155
#[doc(hidden)]
150156
pub type DefaultAbi = ink_primitives::abi::Ink;
151157

158+
/// A convenience type alias to the marker type representing the "default" ABI for calls.
159+
///
160+
/// # Note
161+
///
162+
/// The "default" ABI for calls is "ink", unless the ABI is set to "sol"
163+
/// in the ink! project's manifest file (i.e. `Cargo.toml`).
152164
#[cfg(ink_abi = "sol")]
153165
#[doc(hidden)]
154166
pub type DefaultAbi = ink_primitives::abi::Sol;

crates/ink/codegen/src/generator/macros.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
/// Returns the "default" ABI.
15+
/// Returns the "default" ABI for calls.
1616
///
1717
/// # Note
1818
///
19-
/// The "default" ABI is "ink" unless the ABI is specifically set to "sol".
19+
/// The "default" ABI for calls is "ink", unless the ABI is set to "sol"
20+
/// in the ink! project's manifest file (i.e. `Cargo.toml`).
2021
macro_rules! default_abi {
2122
() => {{
2223
if cfg!(ink_abi = "sol") {

crates/ink/src/contract_ref.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,13 @@ use ink_primitives::Address;
124124
/// [`ink::abi::Sol`]).
125125
///
126126
/// If the second argument is not specified, the macro uses the `Environment` type alias.
127-
/// If the third argument is not specified, the macro uses the "default" ABI,
128-
/// which depending on the ABI specified in the project's manifest
129-
/// (see https://use.ink/docs/v6/basics/abi/ for details).
127+
/// If the third argument is not specified, the macro uses the "default" ABI for calls
128+
/// for the ink! project.
129+
///
130+
/// # Note
131+
///
132+
/// The "default" ABI for calls is "ink", unless the ABI is set to "sol"
133+
/// in the ink! project's manifest file (i.e. `Cargo.toml`).
130134
///
131135
/// ```rust
132136
/// use ink::contract_ref;

crates/ink/src/message_builder.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@
3535
///
3636
/// If the second argument is not specified, the macro uses the
3737
/// [`ink_env::DefaultEnvironment`].
38-
/// If the third argument is not specified, the macro uses the "default" ABI,
39-
/// which depending on the ABI specified in the project's manifest
40-
/// (see https://use.ink/docs/v6/basics/abi/ for details).
38+
/// If the third argument is not specified, the macro uses the "default" ABI for calls
39+
/// for the ink! project.
40+
///
41+
/// # Note
42+
///
43+
/// The "default" ABI for calls is "ink", unless the ABI is set to "sol"
44+
/// in the ink! project's manifest file (i.e. `Cargo.toml`).
4145
///
4246
/// ```rust
4347
/// use ink::message_builder;

0 commit comments

Comments
 (0)