Account Facet
Changes:
Added InternalTransfer Method
InternalTransfer Methodfunction internalTransfer(address user, uint256 amount) internal {
AccountStorage.Layout storage accountLayout = AccountStorage.layout();
require(
accountLayout.allocatedBalances[user] + amount <= GlobalAppStorage.layout().balanceLimitPerUser,
"AccountFacet: Allocated balance limit reached"
);
require(accountLayout.balances[msg.sender] >= amount, "AccountFacet: Insufficient balance");
accountLayout.balances[msg.sender] -= amount;
accountLayout.allocatedBalances[user] += amount;
}deallocate()
deallocate()require(
accountLayout.allocatedBalances[msg.sender] >= amount,
"AccountFacet: Insufficient allocated Balance"
);Summary of Changes
Last updated
