mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +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:
committed by
GitHub
parent
63bd1d8346
commit
bead1becf0
@@ -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