mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
sdk/contract_id: Use From for instantiation.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user