implement transient storage

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-06-05 17:34:17 +02:00
parent 9e9227d740
commit 39d78179d4
9 changed files with 112 additions and 30 deletions
+13
View File
@@ -614,3 +614,16 @@ fn bitwise_byte() {
assert_eq!(expected, received)
}
}
#[test]
fn transient_storage() {
let expected = U256::MAX;
let (state, output) = assert_success(&Contract::storage_transient(expected), false);
let received = U256::abi_decode(&output.data, true).unwrap();
assert_eq!(expected, received);
assert!(state
.accounts()
.values()
.all(|account| account.storage.is_empty()));
}