FundLockBase

View Source: contracts/fund-lock/FundLockBase.sol

↗ Extends: FundLockStorage ↘ Derived Contracts: FundLockTrade, FundLockUser

FundLockBase

Base contract, which functionality could be used by several contracts inside the FundLock group.

Functions

  • _deposit(address tokenAddress, uint256 value)

  • _withdraw(address tokenAddress, uint256 value)

_deposit

Internal function used by {FundLockUser.deposit()}. Does general depositing logic: check if the asset is Ether, validates amount and token, performs token transfer to FundLock, updates {balanceSheetS} storage and fires {FundLockDeposit} event.

function _deposit(address tokenAddress, uint256 value) internal nonpayable
returns(bool)

Arguments

NameTypeDescription

tokenAddress

address

- address of the token to deposit

value

uint256

- the amount of token to deposit

_withdraw

Marking funds that need to be withdrawn by the client. This function does NOT do any transfers. It only marks funds by creating Funds structs and mapping them to user and token addresses. Also changes balanceSheet and emits event. Created for security purposes.

function _withdraw(address tokenAddress, uint256 value) internal nonpayable
returns(bool)

Arguments

NameTypeDescription

tokenAddress

address

- address of the token to be marked for withdrawal

value

uint256

- amount of the token to be marked for withdrawal

Last updated