depositEthToVault
or despositERC20toVault
functions, which take vaultId
, assetId
(and also quantized amount
, in the case of an ERC20 deposit). These functions add the relevant amounts to the vaultsBalance
mapping.vaultsBalance
is defined, vaults can be set arbitrarily by the user – since they aren't shared between users, or even between different assetId's that belong to the same userlocktime
. Check out the trade flow for more details as to why. With the lock implemented, the event LogVaultWithdrawalLockSet
is emitted.getVaultBalance
function or get the remaining lock time by calling the getVaultWithdrawalLock
function. Both functions receive the eth_address
, asset_Id
, and vault_id
as parameters.withdrawalFromVault
function. This function verifies that the caller is indeed the owner of the account, that the funds are not locked, and that the balance is sufficient. If all constraints hold, the function passes the user their funds and emits the event LogWithdrawalFromVault
.registerLimitOrder
function, supplying the exchange address
(the specific StarkEx contract address that this order should be executed on), as well as all the relevant parameters for executing such an order, such as:nonce
expiration timestamp
nonce
twice, as it might cause all the parameters of an order to be the same. In such a case, the StarkEx service will not be able to execute.