Skip to content

Commit c76b7ff

Browse files
committed
feat: reallocate
1 parent 01edac2 commit c76b7ff

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

common/src/vault.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,19 @@ pub enum Event {
556556
DepositRejectedZeroAmount { sender: AccountId },
557557
}
558558

559+
// simple delta enum to describe per-market actions.
560+
//
561+
// + Supply: forward-supply idle assets to a market (no withdrawals executed).
562+
// - Withdraw: ONLY creates a supply-withdrawal request in the market; does not execute it.
563+
//
564+
// Amounts are U128 for clean JSON ABI; conversion to u128 happens internally.
565+
#[derive(Debug, Clone)]
566+
#[near(serializers = [borsh, json])]
567+
pub enum AllocationDelta {
568+
Supply { market: AccountId, amount: U128 },
569+
Withdraw { market: AccountId, amount: U128 },
570+
}
571+
559572
#[cfg(test)]
560573
mod tests {
561574
use super::*;

0 commit comments

Comments
 (0)