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

cowprotocol / cow-sdk / 5878972708

16 Aug 2023 12:48PM UTC coverage: 81.541% (+8.6%) from 72.93%
5878972708

Pull #140

github

mfw78
docs: sdk maintainer typedoc
Pull Request #140: Composable cow

171 of 227 branches covered (75.33%)

Branch coverage included in aggregate %.

194 of 194 new or added lines in 6 files covered. (100.0%)

337 of 396 relevant lines covered (85.1%)

18.27 hits per line

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

0.0
/src/composable/extensible.ts
1
import { providers } from 'ethers'
2
import {
3
  COMPOSABLE_COW_CONTRACT_ADDRESS,
4
  EXTENSIBLE_FALLBACK_HANDLER_CONTRACT_ADDRESS,
5
  SupportedChainId,
6
} from '../common'
7
import { ExtensibleFallbackHandler__factory } from './generated'
8

9
export function isExtensibleFallbackHandler(handler: string, chainId: SupportedChainId): boolean {
10
  return handler === EXTENSIBLE_FALLBACK_HANDLER_CONTRACT_ADDRESS[chainId]
×
11
}
12

13
export function isComposableCow(handler: string, chainId: SupportedChainId): boolean {
14
  return handler === COMPOSABLE_COW_CONTRACT_ADDRESS[chainId]
×
15
}
16

17
export async function getDomainVerifier(
18
  safe: string,
19
  domain: string,
20
  chainId: SupportedChainId,
21
  provider: providers.Provider
22
): Promise<string> {
23
  const contract = ExtensibleFallbackHandler__factory.connect(
×
24
    EXTENSIBLE_FALLBACK_HANDLER_CONTRACT_ADDRESS[chainId],
25
    provider
26
  )
27
  return await contract.callStatic.domainVerifiers(safe, domain)
×
28
}
29

30
export function createSetDomainVerifierTx(domain: string, verifier: string): string {
31
  return ExtensibleFallbackHandler__factory.createInterface().encodeFunctionData('setDomainVerifier', [
×
32
    domain,
33
    verifier,
34
  ])
35
}
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