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

Mintbase / mintbase-js / 3892301626

pending completion
3892301626

push

github

ruisantiago
Add get store data method

324 of 404 branches covered (80.2%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 3 files covered. (100.0%)

550 of 598 relevant lines covered (91.97%)

3.13 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
  
22
  return {
3✔
23
    contractAddress: marketId,
24
    args: {},
25
    methodName: MARKET_METHOD_NAMES.DEPOSIT_STORAGE,
26
    deposit: utils.format.parseNearAmount(deposit),
27
    gas: GAS,
28
  };
29
};
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