mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-23 20:26:19 +00:00
seal: Fail instantiate if new contract is below subsistence threshold (#6719)
* seal: Fail instantiate if new contract is below subsistence threshold We need each contract that exists to be above the subsistence threshold in order to keep up the guarantuee that we always leave a tombstone behind with the exception of a contract that called `ext_terminate`. * Fixup executor test * Bump runtime
This commit is contained in:
1 parent
63bd1d8346
commit
bead1becf0
6 files changed
+23
-15
No files matched your search
@@ -591,6 +591,8 @@ fn deploying_wasm_contract_should_work() {
|
||||
&charlie(),
|
||||
);
|
||||
|
||||
let subsistence = pallet_contracts::Config::<Runtime>::subsistence_threshold_uncached();
|
||||
|
||||
let b = construct_block(
|
||||
&mut new_test_ext(compact_code_unwrap(), false),
|
||||
1,
|
||||
@@ -610,7 +612,7 @@ fn deploying_wasm_contract_should_work() {
|
||||
signed: Some((charlie(), signed_extra(1, 0))),
|
||||
function: Call::Contracts(
|
||||
pallet_contracts::Call::instantiate::<Runtime>(
|
||||
1 * DOLLARS,
|
||||
1 * DOLLARS + subsistence,
|
||||
500_000_000,
|
||||
transfer_ch,
|
||||
Vec::new()
|
||||
|
||||
Reference in new issue
Block a user