-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'james/mainline/tx-write-storage-key' (#894) into main
* james/mainline/tx-write-storage-key: Add README.md Move TxWriteData to namada_test_utils crate Add changelog Rename TX_WRITE -> TX_WRITE_WASM for consistency Use ctx.write_bytes instead of ctx.write Rename WriteOp -> TxWriteData and update docstring Update the sole existing test which uses the tx_write test wasm Add namada_core as a dependency to namada_tests Write provided value to storage rather than hardcoded arbitrary value Don't use * import Rename tx_write_storage_key -> tx_write Add namada_core::types::wasm::WriteOp
- Loading branch information
Showing
17 changed files
with
126 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Modify tx_write_storage_key test wasm to be able to modify any arbitrary value | ||
([#894](https://github.com/anoma/namada/pull/894)) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ members = [ | |
"core", | ||
"proof_of_stake", | ||
"shared", | ||
"test_utils", | ||
"tests", | ||
"tx_prelude", | ||
"vm_env", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
authors = ["Heliax AG <[email protected]>"] | ||
edition = "2021" | ||
license = "GPL-3.0" | ||
name = "namada_test_utils" | ||
resolver = "2" | ||
version = "0.12.2" | ||
|
||
[dependencies] | ||
borsh = "0.9.0" | ||
namada_core = { path = "../core" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# test_utils | ||
|
||
Contains helper functionality and fixtures for use in tests. This crate must be wasm-buildable by default as it may be used from within our test wasms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod tx_data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//! Types that are meant to be serialized and used as the data component of a | ||
//! Namada transaction. | ||
use borsh::{BorshDeserialize, BorshSerialize}; | ||
use namada_core::types::storage; | ||
|
||
/// Represents an arbitrary write to storage at the specified key. This should | ||
/// be used alongside the test `tx_write.wasm`. | ||
#[derive( | ||
Clone, | ||
Debug, | ||
PartialEq, | ||
Eq, | ||
PartialOrd, | ||
Ord, | ||
Hash, | ||
BorshSerialize, | ||
BorshDeserialize, | ||
)] | ||
pub struct TxWriteData { | ||
/// The storage key to be written to. | ||
pub key: storage::Key, | ||
/// The bytes to be written. | ||
pub value: Vec<u8>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters