You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 9, 2022. It is now read-only.
/// @title This contract is a proxy to the singleton Storage Market actor (address: f05). Calling one of its methods will result in a cross-actor call being performed. However, in this mock library, no actual call is performed.
7
+
/// @author Zondax AG
8
+
/// @dev Methods prefixed with mock_ will not be available in the real library. These methods are merely used to set mock state. Note that this interface will likely break in the future as we align it
9
+
// with that of the real library!
6
10
contractMarketAPI {
7
11
mapping(string=>uint256) balances;
8
12
mapping(uint64=> MarketTypes.MockDeal) deals;
9
13
10
14
constructor() {
11
-
generate_deal_mocks();
15
+
mock_generate_deals();
12
16
}
13
17
18
+
/// Deposits the received value into the balance held in escrow.
19
+
/// @dev Because this is a mock method, no real balance is being deducted from the caller, nor incremented in the Storage Market actor (f05).
14
20
function add_balance(
15
21
MarketTypes.AddBalanceParams memoryparams
16
22
) publicpayable {
17
23
balances[params.provider_or_client] +=msg.value;
18
24
}
19
25
26
+
/// Attempt to withdraw the specified amount from the balance held in escrow.
27
+
/// If less than the specified amount is available, yields the entire available balance.
28
+
/// @dev This method should be called by an approved address, but the mock does not check that the caller is an approved party.
29
+
/// @dev Because this is a mock method, no real balance is deposited in the designated address, nor decremented from the Storage Market actor (f05).
/// @title This contract is a proxy to a built-in Miner actor. Calling one of its methods will result in a cross-actor call being performed. However, in this mock library, no actual call is performed.
7
7
/// @author Zondax AG
8
-
/// @notice It is mock with specific scenarios based on the parameters used to call its methods. It is meant to serve as the first entry point, and be replaced seamlessly in the future by the real API implementation tath actually calls the filecoin actor.
9
-
/// @dev Most of function calls are currently implemented using some kind of struct for parameters and returns.
8
+
/// @dev Methods prefixed with mock_ will not be available in the real library. These methods are merely used to set mock state. Note that this interface will likely break in the future as we align it
0 commit comments