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

Mintbase / mintbase-js / 3641052425

pending completion
3641052425

push

github

Sérgio
merge

173 of 224 branches covered (77.23%)

Branch coverage included in aggregate %.

417 of 444 relevant lines covered (93.92%)

3.07 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_TESTNET_MARKET_CONTRACT_ADDRESS } from '../constants';
1✔
3
import { NearContractCall } from '../execute';
4

5
export type DepositStorageArgs = {
6
    listAmount?: number;
7
    marketAddress?: 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 { marketAddress = MB_TESTNET_MARKET_CONTRACT_ADDRESS, listAmount = 1 } = args;
3!
19
  
20
  const deposit = (0.01 * listAmount).toString();
3✔
21
  return {
3✔
22
    contractAddress: marketAddress,
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