Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/xcm precompile update #996

Merged
merged 20 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion precompiles/utils/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<K: Kind, S: Get<u32>> EvmData for BoundedBytesString<K, S> {
writer.write_pointer(
EvmDataWriter::new()
.write(U256::from(length))
.write(value)
.write_raw_bytes(&value)
gitofdeepanshu marked this conversation as resolved.
Show resolved Hide resolved
.build(),
);
}
Expand Down
2 changes: 1 addition & 1 deletion precompiles/utils/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ impl EvmDataWriter {

/// Write arbitrary bytes.
/// Doesn't handle any alignement checks, prefer using `write` instead if possible.
fn write_raw_bytes(mut self, value: &[u8]) -> Self {
pub fn write_raw_bytes(mut self, value: &[u8]) -> Self {
self.data.extend_from_slice(value);
self
}
Expand Down
1 change: 1 addition & 0 deletions precompiles/utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ use sp_std::{marker::PhantomData, vec, vec::Vec};

pub mod bytes;
pub mod data;
pub mod xcm;

pub use data::{Address, Bytes, EvmData, EvmDataReader, EvmDataWriter};
pub use precompile_utils_macro::{generate_function_selector, keccak256};
Expand Down
Loading
Loading