Skip to content
Prev Previous commit
Next Next commit
Rename RETURN to ReturnType
  • Loading branch information
cmichi committed Oct 12, 2022
commit 52c1aceb699e57c9463f3ca47c7b1e1a896f5fe0
9 changes: 5 additions & 4 deletions crates/e2e/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ where
contract_call: M,
value: E::Balance,
storage_deposit_limit: Option<E::Balance>,
) -> Result<CallResult<C, E, <M as InkMessage>::RETURN>, Error<C, E>>
) -> Result<CallResult<C, E, <M as InkMessage>::ReturnType>, Error<C, E>>
where
M: InkMessage,
<M as InkMessage>::RETURN: scale::Decode,
<M as InkMessage>::ReturnType: scale::Decode,
{
let contract_call: EncodedMessage = contract_call.into();
log_info(&format!("call: {:02X?}", contract_call.0));
Expand Down Expand Up @@ -595,8 +595,9 @@ where
}

let bytes = &dry_run.result.as_ref().unwrap().data;
let value: <M as InkMessage>::RETURN = scale::Decode::decode(&mut bytes.as_ref())
.expect("decoding dry run result to ink! message return type failed");
let value: <M as InkMessage>::ReturnType =
scale::Decode::decode(&mut bytes.as_ref())
.expect("decoding dry run result to ink! message return type failed");

Ok(CallResult {
value,
Expand Down
4 changes: 2 additions & 2 deletions crates/e2e/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub type Signer<C> = PairSigner<C, sr25519::Pair>;
// TODO(#1421) Merge this with `InkMessage` to be just `InkSelector`. Requires forking `smart-bench-macro`.
pub trait InkConstructor: scale::Encode {
/// Return type of the constructor.
type RETURN;
type ReturnType;
/// An ink! selector consists of four bytes.
const SELECTOR: [u8; 4];
/// Path to the contract bundle.
Expand All @@ -98,7 +98,7 @@ pub trait InkConstructor: scale::Encode {
/// Trait for contract messages.
pub trait InkMessage: scale::Encode {
/// Return type of the message.
type RETURN;
type ReturnType;
/// An ink! selector consists of four bytes.
const SELECTOR: [u8; 4];
/// Path to the contract bundle.
Expand Down