Skip to content

Commit b4cc207

Browse files
chore: Fix Solidity mapping doc formatting (#2475)
1 parent 979a5f9 commit b4cc207

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

crates/ink/macro/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ pub fn selector_bytes(input: TokenStream) -> TokenStream {
214214
///
215215
/// | Rust/ink! type | Solidity ABI type | Notes |
216216
/// | -------------- | ----------------- | ----- |
217-
/// | `&str`, `&mut str`, `Box<str>` | string ||
218-
/// | `&T`, `&mut T`, `Box<T>` | T | e.g. `&i8 ↔ int8` |
219-
/// | `&[T]`, `&mut [T]`, `Box<[T]>` | T[] | e.g. `&[i8]` ↔ `int8[]` |
217+
/// | `&str`, `&mut str`, `Box<str>` | `string` ||
218+
/// | `&T`, `&mut T`, `Box<T>` | `T` | e.g. `&i8 ↔ int8` |
219+
/// | `&[T]`, `&mut [T]`, `Box<[T]>` | `T[]` | e.g. `&[i8]` ↔ `int8[]` |
220220
///
221221
/// See the rustdoc for [`SolEncode`][sol-trait-encode] and
222222
/// [`SolDecode`][sol-trait-decode] for instructions for implementing the traits for

crates/primitives/src/sol/types.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ use crate::types::Address;
4747
/// | Rust/ink! type | Solidity ABI type | Notes |
4848
/// | -------------- | ----------------- | ----- |
4949
/// | `bool` | `bool` ||
50-
/// | `iN` for `N ∈ {8,16,32,64,128}` | `intN` | e.g `i8` <=> `int8` |
51-
/// | `uN` for `N ∈ {8,16,32,64,128}` | `uintN` | e.g `u8` <=> `uint8` |
50+
/// | `iN` for `N ∈ {8,16,32,64,128}` | `intN` | e.g `i8` `int8` |
51+
/// | `uN` for `N ∈ {8,16,32,64,128}` | `uintN` | e.g `u8` `uint8` |
5252
/// | `U256` | `uint256` ||
5353
/// | `String` | `string` ||
5454
/// | `Address` / `H160` | `address` | `Address` is a type alias for the `H160` type used for addresses in `pallet-revive` |
55-
/// | `[T; N]` for `const N: usize` | `T[N]` | e.g. `[i8; 64]` <=> `int8[64]` |
56-
/// | `Vec<T>` | `T[]` | e.g. `Vec<i8>` <=> `int8[]` |
55+
/// | `[T; N]` for `const N: usize` | `T[N]` | e.g. `[i8; 64]` `int8[64]` |
56+
/// | `Vec<T>` | `T[]` | e.g. `Vec<i8>` `int8[]` |
5757
/// | `SolBytes<u8>` | `bytes1` ||
58-
/// | `SolBytes<[u8; N]>` for `1 <= N <= 32` | `bytesN` | e.g. `SolBytes<[u8; 32]>` <=> `bytes32` |
58+
/// | `SolBytes<[u8; N]>` for `1 <= N <= 32` | `bytesN` | e.g. `SolBytes<[u8; 32]>` `bytes32` |
5959
/// | `SolBytes<Vec<u8>>` | `bytes` ||
60-
/// | `(T1, T2, T3, ... T12)` | `(U1, U2, U3, ... U12)` | where `T1` <=> `U1`, ... `T12` <=> `U12` e.g. `(bool, u8, Address)` <=> `(bool, uint8, address)` |
60+
/// | `(T1, T2, T3, ... T12)` | `(U1, U2, U3, ... U12)` | where `T1` `U1`, ... `T12` `U12` e.g. `(bool, u8, Address)` `(bool, uint8, address)` |
6161
///
6262
/// Ref: <https://docs.soliditylang.org/en/latest/abi-spec.html#types>
6363
///
@@ -88,20 +88,20 @@ pub trait SolTypeDecode: Sized + private::Sealed {
8888
/// | Rust/ink! type | Solidity ABI type | Notes |
8989
/// | -------------- | ----------------- | ----- |
9090
/// | `bool` | `bool` ||
91-
/// | `iN` for `N ∈ {8,16,32,64,128}` | `intN` | e.g `i8` <=> `int8` |
92-
/// | `uN` for `N ∈ {8,16,32,64,128}` | `uintN` | e.g `u8` <=> `uint8` |
91+
/// | `iN` for `N ∈ {8,16,32,64,128}` | `intN` | e.g `i8` `int8` |
92+
/// | `uN` for `N ∈ {8,16,32,64,128}` | `uintN` | e.g `u8` `uint8` |
9393
/// | `U256` | `uint256` ||
9494
/// | `String` | `string` ||
9595
/// | `Address` / `H160` | `address` | `Address` is a type alias for the `H160` type used for addresses in `pallet-revive` |
96-
/// | `[T; N]` for `const N: usize` | `T[N]` | e.g. `[i8; 64]` <=> `int8[64]` |
97-
/// | `Vec<T>` | `T[]` | e.g. `Vec<i8>` <=> `int8[]` |
96+
/// | `[T; N]` for `const N: usize` | `T[N]` | e.g. `[i8; 64]` `int8[64]` |
97+
/// | `Vec<T>` | `T[]` | e.g. `Vec<i8>` `int8[]` |
9898
/// | `SolBytes<u8>` | `bytes1` ||
99-
/// | `SolBytes<[u8; N]>` for `1 <= N <= 32` | `bytesN` | e.g. `SolBytes<[u8; 32]>` <=> `bytes32` |
99+
/// | `SolBytes<[u8; N]>` for `1 <= N <= 32` | `bytesN` | e.g. `SolBytes<[u8; 32]>` `bytes32` |
100100
/// | `SolBytes<Vec<u8>>` | `bytes` ||
101-
/// | `(T1, T2, T3, ... T12)` | `(U1, U2, U3, ... U12)` | where `T1` <=> `U1`, ... `T12` <=> `U12` e.g. `(bool, u8, Address)` <=> `(bool, uint8, address)` |
102-
/// | `&str`, `&mut str`, `Box<str>` | string ||
103-
/// | `&T`, `&mut T`, `Box<T>` | T | e.g. `&i8 <=> int8` |
104-
/// | `&[T]`, `&mut [T]`, `Box<[T]>` | T[] | e.g. `&[i8]` <=> `int8[]` |
101+
/// | `(T1, T2, T3, ... T12)` | `(U1, U2, U3, ... U12)` | where `T1` `U1`, ... `T12` `U12` e.g. `(bool, u8, Address)` `(bool, uint8, address)` |
102+
/// | `&str`, `&mut str`, `Box<str>` | `string` ||
103+
/// | `&T`, `&mut T`, `Box<T>` | `T` | e.g. `&i8 int8` |
104+
/// | `&[T]`, `&mut [T]`, `Box<[T]>` | `T[]` | e.g. `&[i8]` `int8[]` |
105105
///
106106
/// Ref: <https://docs.soliditylang.org/en/latest/abi-spec.html#types>
107107
///

0 commit comments

Comments
 (0)