From 6d92e45114855a64b3ec58bb852052508f3f20da Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Mon, 1 Apr 2024 13:07:43 +0300 Subject: [PATCH] moved UserBuiltinProxy to framework --- .../src/builtin_func_features.rs | 12 ++++-------- framework/base/src/types/interaction/system_proxy.rs | 2 ++ .../interaction/system_proxy}/builtin_func_proxy.rs | 12 ++---------- 3 files changed, 8 insertions(+), 18 deletions(-) rename {contracts/feature-tests/composability/builtin-func-features/src => framework/base/src/types/interaction/system_proxy}/builtin_func_proxy.rs (81%) diff --git a/contracts/feature-tests/composability/builtin-func-features/src/builtin_func_features.rs b/contracts/feature-tests/composability/builtin-func-features/src/builtin_func_features.rs index dd4183bb94..de33932a9e 100644 --- a/contracts/feature-tests/composability/builtin-func-features/src/builtin_func_features.rs +++ b/contracts/feature-tests/composability/builtin-func-features/src/builtin_func_features.rs @@ -1,7 +1,5 @@ #![no_std] -pub mod builtin_func_proxy; - multiversx_sc::imports!(); /// Test contract for investigating async calls. @@ -14,19 +12,17 @@ pub trait BuiltinFuncFeatures { fn call_set_user_name(&self, address: ManagedAddress, name: ManagedBuffer) { self.tx() .to(&address) - .typed(builtin_func_proxy::UserBuiltinProxy) + .typed(system_proxy::UserBuiltinProxy) .set_user_name(name) - .async_call() - .call_and_exit() + .async_call_and_exit() } #[endpoint] fn call_delete_user_name(&self, address: ManagedAddress) { self.tx() .to(&address) - .typed(builtin_func_proxy::UserBuiltinProxy) + .typed(system_proxy::UserBuiltinProxy) .delete_user_name() - .async_call() - .call_and_exit() + .async_call_and_exit() } } diff --git a/framework/base/src/types/interaction/system_proxy.rs b/framework/base/src/types/interaction/system_proxy.rs index 1388554af4..6cbb764ed0 100644 --- a/framework/base/src/types/interaction/system_proxy.rs +++ b/framework/base/src/types/interaction/system_proxy.rs @@ -1,6 +1,8 @@ +mod builtin_func_proxy; mod system_sc_proxy; mod system_sc_proxy_legacy; pub(crate) mod token_properties; +pub use builtin_func_proxy::*; pub use system_sc_proxy::*; pub use token_properties::*; diff --git a/contracts/feature-tests/composability/builtin-func-features/src/builtin_func_proxy.rs b/framework/base/src/types/interaction/system_proxy/builtin_func_proxy.rs similarity index 81% rename from contracts/feature-tests/composability/builtin-func-features/src/builtin_func_proxy.rs rename to framework/base/src/types/interaction/system_proxy/builtin_func_proxy.rs index 8d7d106f66..65501c2fcf 100644 --- a/contracts/feature-tests/composability/builtin-func-features/src/builtin_func_proxy.rs +++ b/framework/base/src/types/interaction/system_proxy/builtin_func_proxy.rs @@ -1,14 +1,6 @@ -// Code generated by the multiversx-sc proxy generator. DO NOT EDIT. - -//////////////////////////////////////////////////// -////////////////// AUTO-GENERATED ////////////////// -//////////////////////////////////////////////////// - -#![allow(dead_code)] -#![allow(clippy::all)] - -use multiversx_sc::proxy_imports::*; +use crate::proxy_imports::*; +/// Proxy describing the user builtin function signatures. pub struct UserBuiltinProxy; impl TxProxyTrait for UserBuiltinProxy