Skip to content

Commit

Permalink
create a locked contract and store contract package in installer name…
Browse files Browse the repository at this point in the history
…d keys
  • Loading branch information
jonas089 committed Apr 4, 2024
1 parent b44b3ae commit 61471cc
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions kairos-contracts/deposit-contracts/contract/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use casper_types::{
};
mod constants;
use constants::{
ADMIN_LIST, KAIROS_DEPOSIT_CONTRACT, KAIROS_DEPOSIT_CONTRACT_NAME, KAIROS_DEPOSIT_PURSE,
KAIROS_LAST_PROCESSED_DEPOSIT_COUNTER, RUNTIME_ARG_AMOUNT, RUNTIME_ARG_TEMP_PURSE,
SECURITY_BADGES,
ADMIN_LIST, KAIROS_DEPOSIT_CONTRACT, KAIROS_DEPOSIT_CONTRACT_NAME,
KAIROS_DEPOSIT_CONTRACT_PACKAGE, KAIROS_DEPOSIT_PURSE, KAIROS_LAST_PROCESSED_DEPOSIT_COUNTER,
RUNTIME_ARG_AMOUNT, RUNTIME_ARG_TEMP_PURSE, SECURITY_BADGES,
};
mod utils;
use utils::{get_immediate_caller, get_optional_named_arg_with_user_errors};
Expand Down Expand Up @@ -178,12 +178,11 @@ pub extern "C" fn call() {
last_processed_deposit_counter.into(),
);

let (contract_hash, _) = storage::new_contract(
let (contract_hash, _) = storage::new_locked_contract(
entry_points,
Some(named_keys),
Some(KAIROS_DEPOSIT_CONTRACT.to_string()),
// Some(key) if upgradable
None,
Some(KAIROS_DEPOSIT_CONTRACT_PACKAGE.to_string()),
);
let contract_hash_key = Key::from(contract_hash);
runtime::put_key(KAIROS_DEPOSIT_CONTRACT_NAME, contract_hash_key);
Expand Down

0 comments on commit 61471cc

Please sign in to comment.