Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
ca9cc06
DebugHandle Weak pointer to TxContext
andrei-marinica Sep 18, 2025
2cb3343
vm - signal error utf-8 lossy
andrei-marinica Dec 29, 2025
57e7c43
ManagedBuffer Display utf8 lossy
andrei-marinica Dec 29, 2025
5162d8d
Merge branch 'master' into weak-handle-context
andrei-marinica Dec 29, 2025
7db86dd
DebugHandle Weak pointer to TxContext LLDB fix
andrei-marinica Dec 29, 2025
292413c
DebugHandle ptr eq optimization
andrei-marinica Dec 29, 2025
acdd326
docs
andrei-marinica Dec 29, 2025
691c929
DebugHandle LLVM dropped TxContext error & tests
andrei-marinica Dec 29, 2025
56954bf
lldb py ignore warning
andrei-marinica Dec 29, 2025
f7cda84
test fix
andrei-marinica Dec 30, 2025
356e455
python formatting
andrei-marinica Dec 30, 2025
147d153
Merge pull request #2260 from multiversx/utf8-lossy
andrei-marinica Dec 30, 2025
fe875bc
Merge pull request #2160 from multiversx/weak-handle-context
andrei-marinica Jan 8, 2026
5b0c3be
reqwest upgrade, using rusttls
andrei-marinica Jan 12, 2026
b2fd0a6
Merge pull request #2266 from multiversx/rusttls
andrei-marinica Jan 13, 2026
7c29692
Merge branch 'master' into rc/v0.65
andrei-marinica Jan 15, 2026
3a5f7c7
Merge pull request #2268 from multiversx/merge-master-rc-65
andrei-marinica Jan 16, 2026
2f10391
vm - removed Shareable/with_shared_mut_ref
andrei-marinica Feb 2, 2026
6cbbf6b
Merge pull request #2277 from multiversx/shareable-remove
andrei-marinica Feb 2, 2026
fb3d79b
Merge branch 'master' into rc-merge-master
andrei-marinica Feb 4, 2026
18fab3e
Merge pull request #2279 from multiversx/rc-merge-master
andrei-marinica Feb 5, 2026
61dacd5
NonZeroBigUint from NonZero
andrei-marinica Feb 5, 2026
c3945e9
NonZeroBigUint try_from u8, u16, u32, u64, usize
andrei-marinica Feb 10, 2026
798aee4
unified syntax - payment compose mechanism
andrei-marinica Feb 10, 2026
fc38510
Payment docs
andrei-marinica Feb 10, 2026
92bdab4
TestPayment type
andrei-marinica Feb 10, 2026
b0ea00c
TestEsdtTransfer moved
andrei-marinica Feb 10, 2026
00fa5f8
TestPayment removed
andrei-marinica Feb 10, 2026
902487a
TestEsdtTransfer deprecated
andrei-marinica Feb 10, 2026
aaac91c
unified syntax - deprecated .esdt and .multi_esdt
andrei-marinica Feb 10, 2026
8539031
composability - NonZeroBigUint usage, proxy fix, test fix
andrei-marinica Feb 10, 2026
6f677b6
test refactor
andrei-marinica Feb 10, 2026
6a817b4
build fix
andrei-marinica Feb 10, 2026
502df8e
clippy fix
andrei-marinica Feb 10, 2026
84cef14
TestTokenIdentifier - renamed/deprecated to_token_identifier, added docs
andrei-marinica Feb 10, 2026
2b01e6b
Payment into_egld_or_esdt_payment fix + test
andrei-marinica Feb 11, 2026
1a62b69
cmp/eq between NonZeroBigUint and BigUint
andrei-marinica Feb 11, 2026
1fa15a1
Payment try_new generic error + test
andrei-marinica Feb 11, 2026
9da3c38
composability interactor partial fix
andrei-marinica Feb 11, 2026
d56b7c0
typo
andrei-marinica Feb 11, 2026
7222c89
comment
andrei-marinica Feb 11, 2026
72e13d8
Payment new generics, TxPayment triple/EsdtTokenPayment compose
andrei-marinica Feb 11, 2026
9619b0f
NonZeroBigUint::one()
andrei-marinica Feb 11, 2026
22cd900
removed as_egld_or_esdt_payment from Payment/EsdtTokenPayment (was un…
andrei-marinica Feb 11, 2026
3736275
deprecated MultiEsdtPayment
andrei-marinica Feb 11, 2026
01580e2
doc fix
andrei-marinica Feb 11, 2026
1a9060d
Merge pull request #2282 from multiversx/test-payment
andrei-marinica Feb 11, 2026
cb67383
Merge pull request #2283 from multiversx/deprecate-MultiEsdtPayment
andrei-marinica Feb 12, 2026
8398765
unified syntax - tx id implementation
andrei-marinica Feb 12, 2026
33e86a7
mandos - id cleanup
andrei-marinica Feb 12, 2026
039c0b9
blackbox trace test, sc query id fix
andrei-marinica Feb 12, 2026
50f016d
test fix
andrei-marinica Feb 12, 2026
dcb4aed
Merge pull request #2284 from multiversx/unified-tx-id
andrei-marinica Feb 12, 2026
66025c3
scenario payments use PaymentVec instead of MultiEgldOrEsdtPayment
andrei-marinica Feb 5, 2026
28f71b0
rename: into_scenario_payments/ScenarioPayments
andrei-marinica Feb 5, 2026
9db14a4
scen-blackbox CLI stub
andrei-marinica Feb 13, 2026
1bb1b2c
scen-blackbox parsing & generator stub
andrei-marinica Feb 13, 2026
9f9acf4
scen-blackbox external steps
andrei-marinica Feb 13, 2026
57b0d2b
scen-blackbox main steps
andrei-marinica Feb 13, 2026
f2201a4
unit test
andrei-marinica Feb 13, 2026
807e0f5
Address/H256 const from_hex, replaced hex-literal
andrei-marinica Feb 13, 2026
09410a4
Merge pull request #2286 from multiversx/address-const-hex
andrei-marinica Feb 13, 2026
c8e2394
Merge branch 'rc/v0.65' into re-mandos2bb
andrei-marinica Feb 13, 2026
a6112bd
IgnoreValue - removed blanket TypeAbiFrom impl
andrei-marinica Feb 13, 2026
2196082
scen-blackbox world() fn, new addresses, Address from_hex
andrei-marinica Feb 13, 2026
5f86715
scen-blackbox const addresses
andrei-marinica Feb 13, 2026
2438da8
scen-blackbox code path const gen
andrei-marinica Feb 13, 2026
66743b2
scen-blackbox moved to meta standalone
andrei-marinica Feb 16, 2026
90dd605
abi - rustMethodName in json
andrei-marinica Feb 16, 2026
5daed5c
scen-blackbox - high level mandos model
andrei-marinica Feb 16, 2026
4e7a527
scen-blackbox - cleaned up dependencies
andrei-marinica Feb 16, 2026
71ca828
scen-blackbox - formatting nonce/balance
andrei-marinica Feb 16, 2026
7d917db
scen-blackbox - fixed placeholder, TypeAbiUniversalInput
andrei-marinica Feb 20, 2026
4902ffb
scen-blackbox - format numbers
andrei-marinica Feb 20, 2026
0b5ea28
TestTokenIdentifier renamed -> TestTokenId
andrei-marinica Feb 20, 2026
f97d8c3
payable-features EGLD blackbox test
andrei-marinica Feb 20, 2026
78c2d94
scen-blackbox - payments
andrei-marinica Feb 20, 2026
d136723
scen-blackbox - token id args
andrei-marinica Feb 20, 2026
b1df91f
scen-blackbox - timestamp/duration + ABI changes
andrei-marinica Feb 20, 2026
0ca1f8e
scen-blackbox - const H256
andrei-marinica Feb 23, 2026
4cd0c0f
codec - multi value unit tests
andrei-marinica Feb 23, 2026
ab91018
codec - multi value new
andrei-marinica Feb 23, 2026
6aa0849
codec - MultiValueVec unit tests
andrei-marinica Feb 23, 2026
beab04b
scen-blackbox - variadic
andrei-marinica Feb 23, 2026
965bd02
scen-blackbox - EGLD_000000 args, TokenId const rename
andrei-marinica Feb 23, 2026
0610f4d
scen-blackbox - expect error
andrei-marinica Feb 23, 2026
244a1f6
scen-blackbox - set state ESDT
andrei-marinica Feb 23, 2026
f587760
scen-blackbox - block info
andrei-marinica Feb 23, 2026
70f8555
clippy fix
andrei-marinica Feb 23, 2026
8c43729
scen-blackbox - refactor
andrei-marinica Feb 23, 2026
62eef10
scen-blackbox - hex arrays
andrei-marinica Feb 23, 2026
458a2c4
scen-blackbox - const ordering
andrei-marinica Feb 23, 2026
727c5b7
scen-blackbox - ConstState refactor
andrei-marinica Feb 23, 2026
f69fc9d
scen-blackbox - ConstState refactor
andrei-marinica Feb 23, 2026
344f4c0
scen-blackbox - ExpectValue formatting
andrei-marinica Feb 23, 2026
66a5696
merge master -> rc/v0.65
andrei-marinica Feb 23, 2026
6f53ba5
scen-blackbox - refactor - code gen split
andrei-marinica Feb 23, 2026
dc95216
abi test fix
andrei-marinica Feb 23, 2026
cb80fcb
Merge pull request #2294 from multiversx/rc-merge-master
andrei-marinica Feb 23, 2026
45dc824
Merge branch 'rc/v0.65' into mandos-payment
andrei-marinica Feb 23, 2026
fa258dd
comment fix
andrei-marinica Feb 23, 2026
81a3552
cargo fmt
andrei-marinica Feb 23, 2026
535d23e
scen-blackbox - const hex rename
andrei-marinica Feb 23, 2026
8686df9
MultiEgldOrEsdtPayment to PaymentVec conversion check
andrei-marinica Feb 23, 2026
dd34ed2
Merge pull request #2285 from multiversx/mandos-payment
andrei-marinica Feb 23, 2026
21b49f1
Merge branch 'rc/v0.65' into re-mandos2bb
andrei-marinica Feb 23, 2026
f14bffd
fix after merge
andrei-marinica Feb 23, 2026
2566883
digital cash test cleanup
andrei-marinica Feb 23, 2026
0cf437d
test cleanup
andrei-marinica Feb 23, 2026
8c7ca28
LLDB formatter fix
andrei-marinica Feb 23, 2026
9f66861
scen-blackbox - escape fix
andrei-marinica Feb 24, 2026
d65d1b9
abi - specific type, bkw compatibility, timestamp/duration specific t…
andrei-marinica Feb 24, 2026
b5d888e
scen-blackbox - set state cleanup
andrei-marinica Feb 24, 2026
7301ecc
scen-blackbox - expect status fix
andrei-marinica Feb 24, 2026
5633104
scen-blackbox - contract path fix
andrei-marinica Feb 24, 2026
7831cce
scen-blackbox - token id fix
andrei-marinica Feb 24, 2026
bbeb3d7
scen-blackbox - escape fix
andrei-marinica Feb 24, 2026
cde5711
scen-blackbox - ValueSubTree fix
andrei-marinica Feb 25, 2026
33ce180
scen-blackbox - formatting grand refactor
andrei-marinica Feb 25, 2026
0004940
scen-blackbox - formatting fix
andrei-marinica Feb 25, 2026
1689587
PaymentMultiValue abi fix
andrei-marinica Feb 25, 2026
d4d7e76
scen-blackbox - set state code
andrei-marinica Feb 25, 2026
97e2869
scen-blackbox - formatting refactor
andrei-marinica Feb 25, 2026
364c9a4
payable features blackbox tweak
andrei-marinica Feb 25, 2026
9d8be35
scen-blackbox - refactor, integration test (payable-features)
andrei-marinica Feb 25, 2026
37f5551
payable-features blackbox from scenarios
andrei-marinica Feb 25, 2026
97fca34
scen-blackbox - IgnoreValue
andrei-marinica Feb 25, 2026
29586a4
ping-pong-egld proxy rename
andrei-marinica Feb 25, 2026
1c8d755
scen-blackbox - .steps.json
andrei-marinica Feb 25, 2026
2accec6
scen-blackbox - timestamp/duration fix
andrei-marinica Feb 25, 2026
22f1f11
scen-blackbox - ping pong egld, OptionalValue::None fix
andrei-marinica Feb 25, 2026
fb83557
scen-blackbox - sorting scenarios
andrei-marinica Feb 25, 2026
3b97eb4
scen-blackbox - abi lookups moved to ContractAbi
andrei-marinica Feb 25, 2026
82f760c
sh tool cleanup
andrei-marinica Feb 25, 2026
584bf43
scen-blackbox - re-generated digital cash and ping-pong
andrei-marinica Feb 25, 2026
38d94ac
comment update
andrei-marinica Feb 25, 2026
1f26d05
scen-blackbox - code formatting
andrei-marinica Feb 25, 2026
02a7419
sh fix
andrei-marinica Feb 25, 2026
dd786f7
test cleanup
andrei-marinica Feb 25, 2026
71aa10a
ping-pong-egld template fix
andrei-marinica Feb 25, 2026
52d1e45
fmt
andrei-marinica Feb 25, 2026
d413ce7
typos
andrei-marinica Feb 25, 2026
eb39a45
Merge pull request #2287 from multiversx/re-mandos2bb
andrei-marinica Feb 25, 2026
5190be7
removed VMAddress alias
andrei-marinica Feb 25, 2026
d1954e6
Merge pull request #2295 from multiversx/remove-vmaddress-alias
andrei-marinica Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
351 changes: 205 additions & 146 deletions Cargo.lock

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions chain/core/src/types/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@ impl Address {
Address(H256::new(bytes))
}

/// Constructs an Address from a hex string at compile time.
/// The hex string can optionally start with "0x" or "0X".
/// The hex string must represent exactly 32 bytes (64 hex characters).
///
/// # Panics
///
/// Panics at compile time if:
/// - The hex string is not exactly 64 characters (excluding optional "0x" prefix)
/// - Any character is not a valid hex digit (0-9, a-f, A-F)
///
/// # Example
///
/// ```
/// # use multiversx_chain_core::types::Address;
/// const ADDR: Address = Address::from_hex("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
/// const ADDR_WITH_PREFIX: Address = Address::from_hex("0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
/// ```
pub const fn from_hex(hex_str: &str) -> Self {
Address(H256::from_hex(hex_str))
}

pub fn generate_mock_address(creator_address: &[u8], creator_nonce: u64) -> Self {
let mut result = [0x00; 32];

Expand Down Expand Up @@ -275,4 +296,35 @@ mod address_tests {
fn test_is_zero() {
assert!(Address::zero().is_zero());
}

#[test]
fn test_from_hex() {
let hex_str = "e32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60";
let addr = Address::from_hex(hex_str);
let expected = [
0xe3, 0x2a, 0xfe, 0xdc, 0x90, 0x4f, 0xe1, 0x93, 0x97, 0x46, 0xad, 0x97, 0x3b, 0xeb,
0x38, 0x35, 0x63, 0xcf, 0x63, 0x64, 0x2b, 0xa6, 0x69, 0xb3, 0x04, 0x0f, 0x9b, 0x94,
0x28, 0xa5, 0xed, 0x60,
];
assert_eq!(addr.as_array(), &expected);
}

#[test]
fn test_from_hex_with_prefix() {
let hex_str = "0xE32AFEDC904FE1939746AD973BEB383563CF63642BA669B3040F9B9428A5ED60";
let addr = Address::from_hex(hex_str);
let expected = [
0xE3, 0x2A, 0xFE, 0xDC, 0x90, 0x4F, 0xE1, 0x93, 0x97, 0x46, 0xAD, 0x97, 0x3B, 0xEB,
0x38, 0x35, 0x63, 0xCF, 0x63, 0x64, 0x2B, 0xA6, 0x69, 0xB3, 0x04, 0x0F, 0x9B, 0x94,
0x28, 0xA5, 0xED, 0x60,
];
assert_eq!(addr.as_array(), &expected);
}

#[test]
fn test_from_hex_const() {
const ADDR: Address =
Address::from_hex("e32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60");
assert!(!ADDR.is_zero());
}
}
87 changes: 87 additions & 0 deletions chain/core/src/types/h256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,62 @@ impl H256 {
pub const fn new(bytes: [u8; 32]) -> Self {
H256(bytes)
}

/// Constructs an H256 from a hex string at compile time.
/// The hex string can optionally start with "0x" or "0X".
/// The hex string must represent exactly 32 bytes (64 hex characters).
///
/// # Panics
///
/// Panics at compile time if:
/// - The hex string is not exactly 64 characters (excluding optional "0x" prefix)
/// - Any character is not a valid hex digit (0-9, a-f, A-F)
///
/// # Example
///
/// ```
/// # use multiversx_chain_core::types::H256;
/// const HASH: H256 = H256::from_hex("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
/// const HASH_WITH_PREFIX: H256 = H256::from_hex("0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
/// ```
pub const fn from_hex(hex_str: &str) -> Self {
let bytes = hex_str.as_bytes();
let mut result = [0u8; 32];

// Skip "0x" prefix if present
let start =
if bytes.len() >= 2 && bytes[0] == b'0' && (bytes[1] == b'x' || bytes[1] == b'X') {
2
} else {
0
};

let hex_len = bytes.len() - start;

// Hex string must be exactly 64 characters (32 bytes * 2)
if hex_len != 64 {
panic!("Hex string must be exactly 64 characters (excluding 0x prefix)");
}

let mut i = 0;
while i < 32 {
let high = Self::hex_char_to_nibble(bytes[start + i * 2]);
let low = Self::hex_char_to_nibble(bytes[start + i * 2 + 1]);
result[i] = (high << 4) | low;
i += 1;
}

H256::new(result)
}

const fn hex_char_to_nibble(c: u8) -> u8 {
match c {
b'0'..=b'9' => c - b'0',
b'a'..=b'f' => c - b'a' + 10,
b'A'..=b'F' => c - b'A' + 10,
_ => panic!("Invalid hex character"),
}
}
}

impl From<[u8; 32]> for H256 {
Expand Down Expand Up @@ -225,4 +281,35 @@ mod h256_tests {
fn test_is_zero() {
assert!(H256::zero().is_zero());
}

#[test]
fn test_from_hex() {
let hex_str = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
let h = H256::from_hex(hex_str);
let expected = [
0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67,
0x89, 0xab, 0xcd, 0xef,
];
assert_eq!(h.0, expected);
}

#[test]
fn test_from_hex_with_prefix() {
let hex_str = "0x0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF";
let h = H256::from_hex(hex_str);
let expected = [
0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB,
0xCD, 0xEF, 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23, 0x45, 0x67,
0x89, 0xAB, 0xCD, 0xEF,
];
assert_eq!(h.0, expected);
}

#[test]
fn test_from_hex_const() {
const H: H256 =
H256::from_hex("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
assert!(!H.is_zero());
}
}
1 change: 0 additions & 1 deletion chain/vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ hex = "0.4"
sha2 = "0.10.6"
sha3 = "0.10.6"
itertools = "0.14.0"
hex-literal = "1.0"
bitflags = "2.9"
colored = "3.0"
rand = { version = "0.9", optional = true }
Expand Down
8 changes: 4 additions & 4 deletions chain/vm/src/blockchain/state/account_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ use num_traits::Zero;
use super::AccountEsdt;
use crate::{
display_util::key_hex,
types::{VMAddress, VMCodeMetadata},
types::{Address, VMCodeMetadata},
};
use std::{collections::HashMap, fmt, fmt::Write};

pub type AccountStorage = HashMap<Vec<u8>, Vec<u8>>;

#[derive(Clone, Debug)]
pub struct AccountData {
pub address: VMAddress,
pub address: Address,
pub nonce: u64,
pub egld_balance: BigUint,
pub esdt: AccountEsdt,
pub storage: AccountStorage,
pub username: Vec<u8>,
pub contract_path: Option<Vec<u8>>,
pub code_metadata: VMCodeMetadata,
pub contract_owner: Option<VMAddress>,
pub contract_owner: Option<Address>,
pub developer_rewards: BigUint,
}

impl AccountData {
pub fn new_empty(address: VMAddress) -> Self {
pub fn new_empty(address: Address) -> Self {
AccountData {
address,
nonce: 0,
Expand Down
18 changes: 9 additions & 9 deletions chain/vm/src/blockchain/state/blockchain_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ use std::{

use crate::{
blockchain::reserved::STORAGE_REWARD_KEY, host::context::BlockchainUpdate,
system_sc::ESDT_SYSTEM_SC_ADDRESS_ARRAY, types::VMAddress,
system_sc::ESDT_SYSTEM_SC_ADDRESS, types::Address,
};

use super::{AccountData, BlockConfig};

#[derive(Clone)]
pub struct BlockchainState {
pub accounts: HashMap<VMAddress, AccountData>,
pub new_addresses: HashMap<(VMAddress, u64), VMAddress>,
pub accounts: HashMap<Address, AccountData>,
pub new_addresses: HashMap<(Address, u64), Address>,
pub block_config: BlockConfig,
pub new_token_identifiers: Vec<String>,
}
Expand All @@ -33,7 +33,7 @@ impl Default for BlockchainState {
};

// pre-populating system SC(s)
state.add_empty_account(ESDT_SYSTEM_SC_ADDRESS_ARRAY.into());
state.add_empty_account(ESDT_SYSTEM_SC_ADDRESS);

state
}
Expand All @@ -44,19 +44,19 @@ impl BlockchainState {
updates.apply(self);
}

pub fn account_exists(&self, address: &VMAddress) -> bool {
pub fn account_exists(&self, address: &Address) -> bool {
self.accounts.contains_key(address)
}

pub fn increase_account_nonce(&mut self, address: &VMAddress) {
pub fn increase_account_nonce(&mut self, address: &Address) {
let account = self
.accounts
.get_mut(address)
.unwrap_or_else(|| panic!("Account not found: {address}"));
account.nonce += 1;
}

pub fn subtract_tx_gas(&mut self, address: &VMAddress, gas_limit: u64, gas_price: u64) {
pub fn subtract_tx_gas(&mut self, address: &Address, gas_limit: u64, gas_price: u64) {
let account = self
.accounts
.get_mut(address)
Expand All @@ -69,7 +69,7 @@ impl BlockchainState {
account.egld_balance -= &gas_cost;
}

pub fn increase_validator_reward(&mut self, address: &VMAddress, amount: &BigUint) {
pub fn increase_validator_reward(&mut self, address: &Address, amount: &BigUint) {
let account = self
.accounts
.get_mut(address)
Expand Down Expand Up @@ -99,7 +99,7 @@ impl BlockchainState {
self.new_token_identifiers = token_identifiers;
}

fn add_empty_account(&mut self, address: VMAddress) {
fn add_empty_account(&mut self, address: Address) {
self.accounts.insert(
address.clone(),
AccountData {
Expand Down
14 changes: 5 additions & 9 deletions chain/vm/src/blockchain/state/blockchain_state_account_util.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{collections::HashMap, fmt::Write};

use crate::{display_util::address_hex, types::VMAddress};
use crate::{display_util::address_hex, types::Address};

use super::{AccountData, BlockchainState};

Expand All @@ -15,7 +15,7 @@ impl BlockchainState {
self.add_account(acct);
}

pub fn update_accounts(&mut self, accounts: HashMap<VMAddress, AccountData>) {
pub fn update_accounts(&mut self, accounts: HashMap<Address, AccountData>) {
self.accounts.extend(accounts);
}

Expand All @@ -29,19 +29,15 @@ impl BlockchainState {

pub fn put_new_address(
&mut self,
creator_address: VMAddress,
creator_address: Address,
creator_nonce: u64,
new_address: VMAddress,
new_address: Address,
) {
self.new_addresses
.insert((creator_address, creator_nonce), new_address);
}

pub fn get_new_address(
&self,
creator_address: VMAddress,
creator_nonce: u64,
) -> Option<VMAddress> {
pub fn get_new_address(&self, creator_address: Address, creator_nonce: u64) -> Option<Address> {
self.new_addresses
.get(&(creator_address, creator_nonce))
.cloned()
Expand Down
4 changes: 2 additions & 2 deletions chain/vm/src/blockchain/state/esdt_instance_metadata.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::types::VMAddress;
use crate::types::Address;

/// Holds the data for a MultiversX standard digital token transaction
#[derive(Clone, Default, Debug)]
pub struct EsdtInstanceMetadata {
pub name: Vec<u8>,
pub creator: Option<VMAddress>,
pub creator: Option<Address>,
pub royalties: u64,
pub hash: Option<Vec<u8>>,
pub uri: Vec<Vec<u8>>,
Expand Down
4 changes: 2 additions & 2 deletions chain/vm/src/builtin_functions/builtin_func_trait.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
host::context::{BlockchainUpdate, TxCache, TxInput, TxResult, TxTokenTransfer},
host::runtime::{RuntimeInstanceCallLambda, RuntimeRef},
types::VMAddress,
types::Address,
};

pub trait BuiltinFunction {
Expand Down Expand Up @@ -33,7 +33,7 @@ pub trait BuiltinFunction {
/// Contains a builtin function call ESDT transfers (if any) and the real recipient of the transfer
/// (can be different from the "to" field.)
pub struct BuiltinFunctionEsdtTransferInfo {
pub real_recipient: VMAddress,
pub real_recipient: Address,
pub transfers: Vec<TxTokenTransfer>,
}

Expand Down
4 changes: 2 additions & 2 deletions chain/vm/src/builtin_functions/general/change_owner_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
chain_core::builtin_func_names::CHANGE_OWNER_BUILTIN_FUNC_NAME,
host::context::{BlockchainUpdate, TxCache, TxInput, TxResult},
host::runtime::{RuntimeInstanceCallLambda, RuntimeRef},
types::VMAddress,
types::Address,
};

use super::super::builtin_func_trait::BuiltinFunction;
Expand Down Expand Up @@ -31,7 +31,7 @@ impl BuiltinFunction for ChangeOwner {
);
}

let new_owner_address = VMAddress::from_slice(&tx_input.args[0]);
let new_owner_address = Address::from_slice(&tx_input.args[0]);
tx_cache.with_account_mut(&tx_input.to, |account| {
account.contract_owner = Some(new_owner_address);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
use crate::{
builtin_functions::BuiltinFunctionEsdtTransferInfo,
host::context::{BlockchainUpdate, TxCache, TxInput, TxResult},
types::VMAddress,
types::Address,
};

use super::{
Expand Down Expand Up @@ -92,7 +92,7 @@ fn try_parse_input(tx_input: &TxInput) -> Result<ParsedTransferBuiltinFunCall, &

let mut arg_index = 0;
let destination_bytes = tx_input.args[arg_index].as_slice();
let destination = VMAddress::from_slice(destination_bytes);
let destination = Address::from_slice(destination_bytes);
arg_index += 1;
let num_payments = top_decode_u64(tx_input.args[arg_index].as_slice()) as usize;
arg_index += 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
chain_core::builtin_func_names::ESDT_NFT_TRANSFER_FUNC_NAME,
host::context::{BlockchainUpdate, TxCache, TxInput, TxLog, TxResult},
host::runtime::{RuntimeInstanceCallLambda, RuntimeRef},
types::VMAddress,
types::Address,
};

use super::{
Expand Down Expand Up @@ -87,7 +87,7 @@ fn try_parse_input(tx_input: &TxInput) -> Result<ParsedTransferBuiltinFunCall, &
let token_identifier = tx_input.args[0].clone();
let nonce_bytes = tx_input.args[1].clone();
let value_bytes = tx_input.args[2].clone();
let destination = VMAddress::from_slice(&tx_input.args[3]);
let destination = Address::from_slice(&tx_input.args[3]);

let func_name = tx_input.func_name_from_arg_index(4);
let args = if tx_input.args.len() > 5 {
Expand Down
Loading