Skip to content

Commit

Permalink
[ink_e2e] update Determinism enum to match Substrate definition (#…
Browse files Browse the repository at this point in the history
…1781)

* `[ink_e2e]` update `Determinism` enum to match Substrate definition

* fmt

* Fix multi_contract_caller example for new deposit behaviour

* Reenable examples-test step
  • Loading branch information
ascjones authored May 18, 2023
1 parent 731150d commit 49bd8d3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
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
2 changes: 1 addition & 1 deletion integration-tests/multi-contract-caller/accumulator/lib.rs
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

0 comments on commit 49bd8d3

Please sign in to comment.