mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 12:05:42 +00:00
Contracts: Update read_sandbox (#1390)
* Update runtime.rs * Fix * Revert "Update runtime.rs" This reverts commit 808f026a835b1f2707f640799454a50fd3a8be7b. * nit mono-repo fixes
This commit is contained in:
@@ -53,7 +53,7 @@ fn get_latest_version() -> u16 {
|
|||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let out_dir = std::env::var("OUT_DIR")?;
|
let out_dir = std::env::var("OUT_DIR")?;
|
||||||
let path = std::path::Path::new(&out_dir).join("migration_codegen.rs");
|
let path = std::path::Path::new(&out_dir).join("migration_codegen.rs");
|
||||||
let mut f = std::fs::File::create(&path)?;
|
let mut f = std::fs::File::create(path)?;
|
||||||
let version = get_latest_version();
|
let version = get_latest_version();
|
||||||
write!(
|
write!(
|
||||||
f,
|
f,
|
||||||
|
|||||||
@@ -564,7 +564,9 @@ where
|
|||||||
{
|
{
|
||||||
let fixture_path = [
|
let fixture_path = [
|
||||||
// When `CARGO_MANIFEST_DIR` is not set, Rust resolves relative paths from the root folder
|
// When `CARGO_MANIFEST_DIR` is not set, Rust resolves relative paths from the root folder
|
||||||
std::env::var("CARGO_MANIFEST_DIR").as_deref().unwrap_or("frame/contracts"),
|
std::env::var("CARGO_MANIFEST_DIR")
|
||||||
|
.as_deref()
|
||||||
|
.unwrap_or("substrate/frame/contracts"),
|
||||||
"/fixtures/",
|
"/fixtures/",
|
||||||
fixture_name,
|
fixture_name,
|
||||||
".wat",
|
".wat",
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ impl<'a, E: Ext + 'a> Runtime<'a, E> {
|
|||||||
let mut bound_checked = memory
|
let mut bound_checked = memory
|
||||||
.get(ptr..ptr + D::max_encoded_len() as usize)
|
.get(ptr..ptr + D::max_encoded_len() as usize)
|
||||||
.ok_or_else(|| Error::<E::T>::OutOfBounds)?;
|
.ok_or_else(|| Error::<E::T>::OutOfBounds)?;
|
||||||
let decoded = D::decode_all_with_depth_limit(MAX_DECODE_NESTING, &mut bound_checked)
|
let decoded = D::decode_with_depth_limit(MAX_DECODE_NESTING, &mut bound_checked)
|
||||||
.map_err(|_| DispatchError::from(Error::<E::T>::DecodingFailed))?;
|
.map_err(|_| DispatchError::from(Error::<E::T>::DecodingFailed))?;
|
||||||
Ok(decoded)
|
Ok(decoded)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user