Skip to content

Conversation

@darthsiroftardis
Copy link
Contributor

CHANGELOG:

  • Added a new record to global state that stores the transaction hash of the installer
  • Added a new Key variant called Install

.metered_write_gs_unsafe(contract_package_key, contract_package)?;
let current_blocktime = self.context.get_block_info().block_time();

self.context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only valid for VM1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i think it might make sense to add it for VM2 as another PR?

let contract_key = Key::Hash(smart_contract_addr);
state.metered_write(contract_key, StoredValue::Contract(contract))?;
let cl_value =
CLValue::from_t(transaction_hash).map_err(InstallContractError::CLValueError)?;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we write the record for VM2 here @zajko

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, missed that - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants