Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update contracts extrinsic #737

Merged
merged 7 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ jobs:
jsonrpsee_tests,
keystore_tests,
pallet_balances_tests,
pallet_contract_tests,
pallet_transaction_payment_tests,
runtime_api_tests,
tungstenite_client_test,
Expand Down
21 changes: 20 additions & 1 deletion primitives/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ pub type NodeIndex = u64;

/// Merkle Mountain Range operation error.
// https://github.com/paritytech/polkadot-sdk/blob/a190e0e9253562fdca9c1b6e9541a7ea0a50c018/substrate/primitives/merkle-mountain-range/src/lib.rs#L362-L396
#[derive(codec::Encode, codec::Decode, PartialEq, Eq, TypeInfo, RuntimeDebug)]
#[derive(Encode, Decode, PartialEq, Eq, TypeInfo, RuntimeDebug)]
pub enum MmrError {
/// Error during translation of a block number into a leaf index.
InvalidNumericOp,
Expand All @@ -359,3 +359,22 @@ pub enum MmrError {
/// The provided best know block number is invalid.
InvalidBestKnownBlock,
}

/// Defines the required determinism level of a wasm blob when either running or uploading code.
#[derive(Clone, Copy, Encode, Decode, TypeInfo, MaxEncodedLen, RuntimeDebug, PartialEq, Eq)]
pub enum Determinism {
/// 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.
Enforced,
/// Allow calling or uploading an indeterministic code.
///
/// This is only possible when calling into `pallet-contracts` directly via
/// [`crate::Pallet::bare_call`].
///
/// # Note
///
/// **Never** use this mode for on-chain execution.
Relaxed,
}
Loading