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

Mintbase / mintbase-js / 4116485634

pending completion
4116485634

push

github

ruisantiago
remove eslint

519 of 722 branches covered (71.88%)

Branch coverage included in aggregate %.

765 of 828 relevant lines covered (92.39%)

4.67 hits per line

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

69.23
/packages/sdk/src/addMinter/addMinter.ts
1
import { mbjs } from '../config/config';
1✔
2
import { GAS, ONE_YOCTO } from '../constants';
1✔
3
import { ERROR_MESSAGES } from '../errorMessages';
1✔
4
import { TOKEN_METHOD_NAMES, NearContractCall, AddMinterArgs, MinterArgsResponse } from '../types';
1✔
5

6
/**
7
 * Add minting access for one id to a contract you own.
8
 * @param addMinterArgs {@link AddMinterArgs}
9
 * @returns contract call to be passed to @mintbase-js/sdk execute method
10
 */  
11
export const addMinter = (
1✔
12
  args: AddMinterArgs,
13
): NearContractCall<MinterArgsResponse>=> {
14
  const { minterId, contractAddress = mbjs.keys.contractAddress } = args;
1!
15

16
  if (contractAddress == null) {
1!
17
    throw new Error(ERROR_MESSAGES.CONTRACT_ADDRESS);
×
18
  }
19
  
20
  return {
1✔
21
    contractAddress: contractAddress || mbjs.keys.contractAddress,
1!
22
    args: {
23
      account_id: minterId,
24
    },
25
    methodName: TOKEN_METHOD_NAMES.ADD_MINTER,
26
    gas: GAS,
27
    deposit: ONE_YOCTO,
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