( eventFragments: Record<string, EventFragment>, functionFragments: Record<string, FunctionFragment>, dataSources: T, address: string | undefined, extractor: ManifestExtractor<T> )
| 318 | }; |
| 319 | |
| 320 | export function filterExistingMethods<T>( |
| 321 | eventFragments: Record<string, EventFragment>, |
| 322 | functionFragments: Record<string, FunctionFragment>, |
| 323 | dataSources: T, |
| 324 | address: string | undefined, |
| 325 | extractor: ManifestExtractor<T> |
| 326 | ): [Record<string, EventFragment>, Record<string, FunctionFragment>] { |
| 327 | const {existingEvents, existingFunctions} = extractor(dataSources, address && address.toLowerCase()); |
| 328 | |
| 329 | return [ |
| 330 | filterExistingFragments<EventFragment>(eventFragments, existingEvents), |
| 331 | filterExistingFragments<FunctionFragment>(functionFragments, existingFunctions), |
| 332 | ]; |
| 333 | } |
| 334 | |
| 335 | export const yamlExtractor: ManifestExtractor<EthereumDs[]> = (dataSources, casedInputAddress) => { |
| 336 | const existingEvents: string[] = []; |
no test coverage detected