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

cowprotocol / cow-sdk / 14001954831

21 Mar 2025 10:26PM UTC coverage: 73.659% (-3.4%) from 77.101%
14001954831

Pull #253

github

anxolin
chore: improve signatures
Pull Request #253: feat(bridging): get quote + post cross-chain swap

392 of 552 branches covered (71.01%)

Branch coverage included in aggregate %.

41 of 126 new or added lines in 16 files covered. (32.54%)

23 existing lines in 5 files now uncovered.

844 of 1126 relevant lines covered (74.96%)

16.39 hits per line

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

0.0
/src/bridging/BridgingSdk/getErc20Decimals.ts
1
import { Provider } from '@ethersproject/providers'
2
import { Contract } from '@ethersproject/contracts'
3
import { Signer } from '@ethersproject/abstract-signer'
4
import { GetErc20Decimals } from '../types'
5
import { TargetChainId } from '../../chains'
6

NEW
7
const ERC20_DECIMALS_OF_ABI = ['function decimals() external view returns (uint8)'] as const
×
8

9
export function factoryGetErc20Decimals(provider: Signer | Provider): GetErc20Decimals {
NEW
10
  return (_chainId: TargetChainId, tokenAddress: string) => {
×
NEW
11
    const contract = new Contract(tokenAddress, ERC20_DECIMALS_OF_ABI, provider)
×
NEW
12
    return contract.decimals()
×
13
  }
14
}
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