• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Mintbase / mintbase-js / 3782209270

pending completion
3782209270

push

github

Sérgio
📝Docs fixes and improvements

184 of 258 branches covered (71.32%)

Branch coverage included in aggregate %.

460 of 503 relevant lines covered (91.45%)

3.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/packages/sdk/src/depositStorage/depositStorage.ts
1
import { utils } from 'near-api-js';
1✔
2
import { GAS, MARKET_METHOD_NAMES, MB_MARKET_ADDRESS, MB_TESTNET_MARKET_CONTRACT_ADDRESS } from '../constants';
1✔
3
import { NearContractCall } from '../execute';
4

5
export type DepositStorageArgs = {
6
    listAmount?: number;
7
    marketId?: string;
8
  };
9

10

11
/**
12
 * Deposits 0.01 * listAmount of near to the market contract to be consumed for listing purposes
13
 * @param depositStorageArguments {@link DepositStorageArgs}
14
 * @returns contract call to be passed to @mintbase-js/sdk execute method
15
 */
16
export const depositStorage = (args: DepositStorageArgs): NearContractCall => {
1✔
17
    
18
  const { marketId = MB_MARKET_ADDRESS, listAmount = 1 } = args;
3!
19
  
20
  const deposit = (0.01 * listAmount).toString();
3✔
21
  return {
3✔
22
    contractAddress: marketId,
23
    args: {},
24
    methodName: MARKET_METHOD_NAMES.DEPOSIT_STORAGE,
25
    deposit: utils.format.parseNearAmount(deposit),
26
    gas: GAS,
27
  };
28
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc