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

[ink_e2e] update Determinism enum to match Substrate definition #1781

Merged
merged 5 commits into from
May 18, 2023
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
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ codecov:

#### stage: examples

.examples-test:
examples-test:
stage: examples
<<: *docker-env
<<: *test-refs
Expand Down
8 changes: 4 additions & 4 deletions crates/e2e/src/xts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub enum Determinism {
///
/// Dispatchables always use this mode in order to make on-chain execution
/// deterministic.
Deterministic,
Enforced,
/// Allow calling or uploading an indeterministic code.
///
/// This is only possible when calling into `pallet-contracts` directly via
Expand All @@ -138,7 +138,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 +372,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 +404,7 @@ where
UploadCode::<E> {
code,
storage_deposit_limit,
determinism: Determinism::Deterministic,
determinism: Determinism::Enforced,
},
)
.unvalidated();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub mod accumulator {

impl Accumulator {
/// Initializes the value to the initial value.
#[ink(constructor)]
#[ink(constructor, payable)]
pub fn new(init_value: i32) -> Self {
Self { value: init_value }
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/multi-contract-caller/adder/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod adder {

impl Adder {
/// Creates a new `adder` from the given `accumulator`.
#[ink(constructor)]
#[ink(constructor, payable)]
pub fn new(accumulator: AccumulatorRef) -> Self {
Self { accumulator }
}
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/multi-contract-caller/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mod multi_contract_caller {
impl MultiContractCaller {
/// Instantiate a `multi_contract_caller` contract with the given sub-contract
/// codes.
#[ink(constructor)]
#[ink(constructor, payable)]
pub fn new(
init_value: i32,
version: u32,
Expand Down Expand Up @@ -155,7 +155,7 @@ mod multi_contract_caller {
"multi_contract_caller",
&ink_e2e::alice(),
constructor,
0,
10_000_000_000_000,
None,
)
.await
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/multi-contract-caller/subber/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod subber {

impl Subber {
/// Creates a new `subber` from the given `accumulator`.
#[ink(constructor)]
#[ink(constructor, payable)]
pub fn new(accumulator: AccumulatorRef) -> Self {
Self { accumulator }
}
Expand Down