Skip to content

Commit a7c2a63

Browse files
committed
Make withdraw_funds_from_object public
1 parent 1297889 commit a7c2a63

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

crates/sui-framework/packages/sui-framework/sources/balance.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public fun redeem_funds<T>(withdrawal: sui::funds_accumulator::Withdrawal<Balanc
110110
}
111111

112112
/// Create a `Withdrawal<Balance<T>>` from an object to withdraw funds from it.
113-
public(package) fun withdraw_funds_from_object<T>(
113+
public fun withdraw_funds_from_object<T>(
114114
obj: &mut UID,
115115
value: u64,
116116
): Withdrawal<Balance<T>> {

sui-execution/latest/sui-move-natives/src/funds_accumulator.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ pub fn withdraw_from_accumulator_address(
139139
};
140140

141141
let obj_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut()?;
142+
143+
if !obj_runtime.protocol_config.enable_accumulators() {
144+
return Ok(NativeResult::err(cost, E_ADDRESS_BALANCE_NOT_ENABLED));
145+
}
146+
142147
obj_runtime.emit_accumulator_event(
143148
accumulator,
144149
MoveAccumulatorAction::Split,

0 commit comments

Comments
 (0)