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

Mintbase / mintbase-js / 3876219377

pending completion
3876219377

push

github

GitHub
Add Owned Stores by OwnerId method in data package (#256)

321 of 401 branches covered (80.05%)

Branch coverage included in aggregate %.

520 of 568 relevant lines covered (91.55%)

3.17 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