Skip to content

Commit

Permalink
moved UserBuiltinProxy to framework
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Apr 1, 2024
1 parent 72e8e22 commit 6d92e45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![no_std]

pub mod builtin_func_proxy;

multiversx_sc::imports!();

/// Test contract for investigating async calls.
Expand All @@ -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()
}
}
2 changes: 2 additions & 0 deletions framework/base/src/types/interaction/system_proxy.rs
Original file line number Diff line number Diff line change
@@ -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::*;
Original file line number Diff line number Diff line change
@@ -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<Env, From, To, Gas> TxProxyTrait<Env, From, To, Gas> for UserBuiltinProxy
Expand Down

0 comments on commit 6d92e45

Please sign in to comment.