MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / commit

Method commit

fendermint/testing/contract-test/src/lib.rs:225–248  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

223 }
224
225 pub async fn commit(&mut self) -> Result<()> {
226 let exec_state = self.take_exec_state().await;
227
228 let (
229 state_root,
230 FvmUpdatableParams {
231 app_version,
232 base_fee,
233 circ_supply,
234 power_scale,
235 },
236 _,
237 ) = exec_state.commit().context("failed to commit FVM")?;
238
239 self.state_params.state_root = state_root;
240 self.state_params.app_version = app_version;
241 self.state_params.base_fee = base_fee;
242 self.state_params.circ_supply = circ_supply;
243 self.state_params.power_scale = power_scale;
244
245 eprintln!("self.state_params: {:?}", self.state_params);
246
247 Ok(())
248 }
249
250 pub fn state_params(&self) -> FvmStateParams {
251 self.state_params.clone()

Callers 2

initMethod · 0.45
test_applying_upgradesFunction · 0.45

Calls 2

contextMethod · 0.80
take_exec_stateMethod · 0.45

Tested by 1

test_applying_upgradesFunction · 0.36