Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
13839ce
Add a simple direct storage access module
pepyakin Dec 16, 2019
34e363f
WIP
pepyakin Dec 17, 2019
f528e8d
Completely migrate to the transactional system.
pepyakin Dec 18, 2019
3b2d311
Format
pepyakin Dec 18, 2019
f83e656
Fix wasm compilation
pepyakin Dec 18, 2019
4d7b8fb
Get rid of account_db module
pepyakin Dec 18, 2019
4d59704
Make deposit event eager
pepyakin Dec 19, 2019
4c9f607
Make restore_to eager
pepyakin Dec 19, 2019
86c8b32
It almost compiles.
pepyakin Jun 11, 2020
125ba66
Make it compile.
pepyakin Jun 11, 2020
5b2c571
Make the tests compile
pepyakin Jun 11, 2020
3a6edb4
Get rid of account_db
pepyakin Jun 11, 2020
57aa37c
Drop the result.
pepyakin Jun 11, 2020
73dce0c
Backport the book keeping.
pepyakin Jun 11, 2020
571ea1f
Fix all remaining tests.
pepyakin Jun 11, 2020
f68bff9
Make it compile for std
pepyakin Jun 12, 2020
d3d2351
Remove a stale TODO marker
pepyakin Jun 17, 2020
a2ff223
Remove another stale TODO
pepyakin Jun 17, 2020
0b4b7ac
Add proof for `terminate`
pepyakin Jun 17, 2020
9755c6d
Remove a stale comment.
pepyakin Jun 17, 2020
164a767
Make restoration diverging.
pepyakin Jun 17, 2020
b21f66f
Remove redudnant trait: `ComputeDispatchFee`
pepyakin Jun 19, 2020
04ca866
Update frame/contracts/src/exec.rs
pepyakin Jun 19, 2020
cefce04
Introduce proper errors into the storage module.
pepyakin Jun 19, 2020
d767cb9
Adds comments for contract storage module.
pepyakin Jun 19, 2020
4166768
Inline `ExecutionContext::terminate`.
pepyakin Jun 19, 2020
e54d6a9
Restore_to should not let sacrifice itself if the contract present on…
pepyakin Jun 19, 2020
92b9706
Inline `transfer` function
pepyakin Jun 19, 2020
d34fad6
Update doc - add "if succeeded"
pepyakin Jun 19, 2020
4e58ce5
Adapt to TransactionOutcome changes
athei Jun 23, 2020
f9e4674
Updates the docs for `ext_restore_to`
pepyakin Jun 23, 2020
8893488
Add a proper assert.
pepyakin Jun 23, 2020
68a56dc
Update frame/contracts/src/wasm/runtime.rs
pepyakin Jun 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a proper assert.
  • Loading branch information
pepyakin committed Jun 23, 2020
commit 88934889233190b4e9a0148b7d08a1f194571672
14 changes: 7 additions & 7 deletions frame/contracts/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,13 +671,13 @@ where
type T = T;

fn get_storage(&self, key: &StorageKey) -> Option<Vec<u8>> {
match self.ctx.self_trie_id {
Some(ref trie_id) => storage::read_contract_storage(trie_id, key),
// TODO: My current understanding is that `self.ctx.self_trie_id` can be `None` only
// for the top-level account, i.e. EOA. As such, it cannot issue any reads to the
// storage, because it has no. Furthermore, EOA cannot have contract storage.
None => unimplemented!(),
}
let trie_id = self.ctx.self_trie_id.as_ref().expect(
"`ctx.self_trie_id` points to an alive contract within the `CallContext`;\
it cannot be `None`;\
expect can't fail;\
qed",
);
storage::read_contract_storage(trie_id, key)
}

fn set_storage(&mut self, key: StorageKey, value: Option<Vec<u8>>) {
Expand Down