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

Mintbase / mintbase-js / 9775811200

03 Jul 2024 10:01AM CUT coverage: 77.176% (+1.9%) from 75.281%
9775811200

Pull #515

github

bh2smith
Merge branch 'beta' into near-api-js
Pull Request #515: Update near-api-js to v3

880 of 1319 branches covered (66.72%)

Branch coverage included in aggregate %.

1159 of 1323 relevant lines covered (87.6%)

14.42 hits per line

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

62.5
/packages/sdk/src/ftDepositStorage/ftDepositStorage.ts
1
import { mbjs } from '../config/config';
3✔
2
import { GAS_CONSTANTS, FT_STORAGE_DEPOSIT } from '../constants';
3✔
3
import { ERROR_MESSAGES } from '../errorMessages';
3✔
4
import { NearContractCall, FT_METHOD_NAMES, FtDepositStorageArgs, FtDepositStorageArgsResponse } from '../types';
3✔
5

6

7
/**
8
 * Transfers one or more tokens to specified recipients.
9
 * @param transferArguments {@link TransferArgs}
10
 * @returns contract call to be passed to @mintbase-js/sdk execute method
11
 */
12
export const ftDepositStorage = ({
3✔
13
  ftContractAddress,
14
  accountId,
15
}: FtDepositStorageArgs): NearContractCall<FtDepositStorageArgsResponse> => {
16

17
  if (ftContractAddress === null) {
3!
18
    throw new Error(ERROR_MESSAGES.FT_CONTRACT_ADDRESS);
×
19
  }
20

21
  return {
3✔
22
    contractAddress: ftContractAddress,
23
    methodName: FT_METHOD_NAMES.STORAGE_DEPOSIT,
24
    args: accountId ? { account_id: accountId } : null,
2!
25
    deposit: FT_STORAGE_DEPOSIT,
26
    gas: GAS_CONSTANTS.DEFAULT_GAS,
27
  };
28
};
29

30
export const usdcDepositStorage = (
3✔
31
  { accountId }: {accountId: string},
32
): NearContractCall<FtDepositStorageArgsResponse> =>
33
  ftDepositStorage({ accountId, ftContractAddress: mbjs.keys.ftAddresses.usdc });
×
34

35
export const usdtDepositStorage = (
3✔
36
  { accountId }: {accountId: string},
37
): NearContractCall<FtDepositStorageArgsResponse> =>
38
  ftDepositStorage({ accountId, ftContractAddress: mbjs.keys.ftAddresses.usdt });
×
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