Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[ink_e2e] update Determinism enum to match Substrate definition
  • Loading branch information
ascjones committed May 18, 2023
commit 8a4b8c1ac69f4e02faa48200e1da331542af2432
15 changes: 7 additions & 8 deletions crates/e2e/src/xts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,11 @@ pub struct Transfer<E: Environment, C: subxt::Config> {
)]
#[encode_as_type(crate_path = "subxt::ext::scale_encode")]
pub enum Determinism {
/// The execution should be deterministic and hence no indeterministic instructions
/// are allowed.
/// The execution should be deterministic and hence no indeterministic instructions are
/// allowed.
///
/// Dispatchables always use this mode in order to make on-chain execution
/// deterministic.
Deterministic,
/// Dispatchables always use this mode in order to make on-chain execution deterministic.
Enforced,
/// Allow calling or uploading an indeterministic code.
///
/// This is only possible when calling into `pallet-contracts` directly via
Expand All @@ -138,7 +137,7 @@ pub enum Determinism {
/// # Note
///
/// **Never** use this mode for on-chain execution.
AllowIndeterminism,
Relaxed,
}

/// A raw call to `pallet-contracts`'s `upload`.
Expand Down Expand Up @@ -372,7 +371,7 @@ where
origin: subxt::tx::Signer::account_id(signer).clone(),
code,
storage_deposit_limit,
determinism: Determinism::Deterministic,
determinism: Determinism::Enforced,
};
let func = "ContractsApi_upload_code";
let params = rpc_params![func, Bytes(scale::Encode::encode(&call_request))];
Expand Down Expand Up @@ -404,7 +403,7 @@ where
UploadCode::<E> {
code,
storage_deposit_limit,
determinism: Determinism::Deterministic,
determinism: Determinism::Enforced,
},
)
.unvalidated();
Expand Down