sdk/contract_id: Use From for instantiation.

This commit is contained in:
parazyd
2022-11-06 11:35:26 +01:00
parent c3b4b48820
commit 4b0a57cdc8
2 changed files with 11 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ fn run_contract() -> Result<()> {
// Load the wasm binary into memory and create an execution runtime
// ================================================================
let wasm_bytes = std::fs::read("contract.wasm")?;
let contract_id = ContractId::new(pallas::Base::from(1));
let contract_id = ContractId::from(pallas::Base::from(1));
let mut runtime = Runtime::new(&wasm_bytes, blockchain.clone(), contract_id)?;
// Deploy function to initialize the smart contract state.