Skip to content

Commit

Permalink
vault proxy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Mar 27, 2024
1 parent f4c6c0c commit cd55795
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Code generated by the multiversx-sc proxy generator. DO NOT EDIT.

////////////////////////////////////////////////////
////////////////// AUTO-GENERATED //////////////////
////////////////////////////////////////////////////

#![allow(dead_code)]
#![allow(clippy::all)]

use multiversx_sc::proxy_imports::*;
Expand Down Expand Up @@ -67,7 +70,7 @@ where
>(
self,
opt_arg_to_echo: Arg0,
) -> TxProxyUpgrade<Env, From, To, Gas, MultiValue2<Box<str>, OptionalValue<ManagedBuffer<Env::Api>>>> {
) -> TxProxyUpgrade<Env, From, To, Gas, MultiValue2<&'static str, OptionalValue<ManagedBuffer<Env::Api>>>> {
self.wrapped_tx
.raw_upgrade()
.argument(&opt_arg_to_echo)
Expand Down
11 changes: 5 additions & 6 deletions framework/base/src/abi/type_abi_impl_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,23 @@ impl TypeAbi for String {
}
}

impl TypeAbi for &str {
impl TypeAbi for &'static str {
fn type_name() -> TypeName {
TypeName::type_name()
String::type_name()
}

fn type_name_rust() -> TypeName {
// we need to convert to an owned type
"Box<str>".into()
"&'static str".into()
}
}

impl TypeAbi for Box<str> {
fn type_name() -> TypeName {
TypeName::type_name()
String::type_name()
}

fn type_name_rust() -> TypeName {
TypeName::type_name_rust()
"Box<str>".into()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fn write_upgrade_constructor_content(file: &mut File, inputs: Vec<InputAbi>) {
writeln!(
file,
" self.wrapped_tx
.raw_upgrade()"
.raw_upgrade()"
)
.unwrap();
for input in inputs.iter() {
Expand Down

0 comments on commit cd55795

Please sign in to comment.