livepeer/livepeerjs

View on GitHub
packages/subgraph/src/mappings/livepeerToken.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function mint has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function mint(event: Mint): void {
  let day = createOrLoadDay(event.block.timestamp.toI32());
  let protocol = Protocol.load("0");
  let amount = convertToDecimal(event.params.amount);
  let totalSupply = protocol.totalSupply.plus(amount);
Severity: Minor
Found in packages/subgraph/src/mappings/livepeerToken.ts - About 1 hr to fix

Function burn has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function burn(event: Burn): void {
  let round = createOrLoadRound(event.block.number);
  let day = createOrLoadDay(event.block.timestamp.toI32());
  let protocol = Protocol.load("0");
  let value = convertToDecimal(event.params.value);
Severity: Minor
Found in packages/subgraph/src/mappings/livepeerToken.ts - About 1 hr to fix

There are no issues that match your filters.

Category
Status