Skip to main content
Account
struct AccountStorage {
    mapping(address => Account) accounts;
}

addQuoteToken

addQuoteToken
function addQuoteToken(
    AccountStorage storage self, 
    address user, 
    uint256 amountInAtoms
) internal
Increases the quote token balance of a specified user by a given amount in the account storage.

addBaseToken

addBaseToken
function addBaseToken(
    AccountStorage storage self, 
    address user, 
    uint256 amountInAtoms
) internal
Increases the base token balance of a specified user by a given amount in the account storage.

removeQuoteToken

removeQuoteToken
function removeQuoteToken(
    AccountStorage storage self, 
    address user, 
    uint256 amountInAtoms
) internal
Decreases the quote token balance of a specified user by a given amount in the account storage.

removeBaseToken

removeBaseToken
function removeBaseToken(
    AccountStorage storage self, 
    address user, 
    uint256 amountInAtoms
) internal
Decreases the base token balance of a specified user by a given amount in the account storage.

getQuoteTokenBalance

getQuoteTokenBalance
function getQuoteTokenBalance(
    AccountStorage storage self, 
    address user
) internal view returns (uint256)
Retrieves the current quote token balance of a specified user from the account storage.

getBaseTokenBalance

getBaseTokenBalance
function getBaseTokenBalance(
    AccountStorage storage self, 
    address user
) internal view returns (uint256)
Retrieves the current base token balance of a specified user from the account storage.
I