Skip to content

Commit

Permalink
moved builtin_func_names to system_proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Apr 4, 2024
1 parent 99455b5 commit 00689ce
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
5 changes: 3 additions & 2 deletions framework/base/src/api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod blockchain_api;
mod builtin_function_names;
mod call_value_api;
mod composite_api;
mod crypto_api;
Expand All @@ -16,7 +15,6 @@ pub mod uncallable;
mod vm_api;

pub use blockchain_api::*;
pub use builtin_function_names::*;
pub use call_value_api::*;
pub use composite_api::*;
pub use crypto_api::*;
Expand All @@ -30,3 +28,6 @@ pub use print_api::*;
pub use send_api::*;
pub use storage_api::*;
pub use vm_api::VMApi;

// Backwards compatibility.
pub use crate::types::system_proxy::builtin_func_names::*;
17 changes: 9 additions & 8 deletions framework/base/src/contract_base/wrappers/send_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ use core::marker::PhantomData;
use crate::codec::Empty;

use crate::{
api::{
BlockchainApi, BlockchainApiImpl, CallTypeApi, StorageReadApi,
CHANGE_OWNER_BUILTIN_FUNC_NAME, CLAIM_DEVELOPER_REWARDS_FUNC_NAME,
ESDT_LOCAL_BURN_FUNC_NAME, ESDT_LOCAL_MINT_FUNC_NAME, ESDT_NFT_ADD_QUANTITY_FUNC_NAME,
ESDT_NFT_ADD_URI_FUNC_NAME, ESDT_NFT_BURN_FUNC_NAME, ESDT_NFT_CREATE_FUNC_NAME,
ESDT_NFT_UPDATE_ATTRIBUTES_FUNC_NAME,
},
api::{BlockchainApi, BlockchainApiImpl, CallTypeApi, StorageReadApi},
codec,
types::{
system_proxy, BigUint, ContractCall, ContractCallNoPayment, ESDTSystemSCAddress,
system_proxy,
system_proxy::builtin_func_names::{
CHANGE_OWNER_BUILTIN_FUNC_NAME, CLAIM_DEVELOPER_REWARDS_FUNC_NAME,
ESDT_LOCAL_BURN_FUNC_NAME, ESDT_LOCAL_MINT_FUNC_NAME, ESDT_NFT_ADD_QUANTITY_FUNC_NAME,
ESDT_NFT_ADD_URI_FUNC_NAME, ESDT_NFT_BURN_FUNC_NAME, ESDT_NFT_CREATE_FUNC_NAME,
ESDT_NFT_UPDATE_ATTRIBUTES_FUNC_NAME,
},
BigUint, ContractCall, ContractCallNoPayment, ESDTSystemSCAddress,
EgldOrEsdtTokenIdentifier, EsdtTokenPayment, GasLeft, ManagedAddress, ManagedArgBuffer,
ManagedBuffer, ManagedType, ManagedVec, ReturnsRawResult, ToSelf, TokenIdentifier, Tx,
TxScEnv,
Expand Down
1 change: 1 addition & 0 deletions framework/base/src/types/interaction/system_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod builtin_func_proxy;
mod esdt_system_sc_proxy;
mod legacy_system_sc_proxy;
pub(crate) mod token_properties;
pub mod builtin_func_names;

pub use builtin_func_proxy::*;
pub use esdt_system_sc_proxy::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
use self::builtin_func_names::{
CHANGE_OWNER_BUILTIN_FUNC_NAME, CLAIM_DEVELOPER_REWARDS_FUNC_NAME, DELETE_USERNAME_FUNC_NAME,
ESDT_LOCAL_BURN_FUNC_NAME, ESDT_LOCAL_MINT_FUNC_NAME, ESDT_NFT_ADD_QUANTITY_FUNC_NAME,
ESDT_NFT_ADD_URI_FUNC_NAME, ESDT_NFT_BURN_FUNC_NAME, ESDT_NFT_CREATE_FUNC_NAME,
ESDT_NFT_UPDATE_ATTRIBUTES_FUNC_NAME, SET_USERNAME_FUNC_NAME,
};
use crate::proxy_imports::*;

/// Proxy describing the user builtin function signatures.
Expand Down Expand Up @@ -43,7 +49,7 @@ where
name: Arg0,
) -> TxProxyCall<Env, From, To, Gas, ()> {
self.wrapped_tx
.raw_call("SetUserName")
.raw_call(SET_USERNAME_FUNC_NAME)
.argument(&name)
.original_result()
}
Expand All @@ -52,7 +58,7 @@ where
self,
) -> TxProxyCall<Env, From, To, Gas, ()> {
self.wrapped_tx
.raw_call("DeleteUserName")
.raw_call(DELETE_USERNAME_FUNC_NAME)
.original_result()
}
}

0 comments on commit 00689ce

Please sign in to comment.