(methods: [SelectedMethod[], SelectedMethod[]], abiName: string)
| 432 | } |
| 433 | |
| 434 | export function constructHandlerProps(methods: [SelectedMethod[], SelectedMethod[]], abiName: string): AbiPropType { |
| 435 | const handlers: HandlerPropType[] = []; |
| 436 | const [events, functions] = methods; |
| 437 | |
| 438 | functions.forEach((fn) => { |
| 439 | handlers.push({ |
| 440 | name: generateHandlerName(fn.name, abiName, 'tx'), |
| 441 | argName: 'tx', |
| 442 | argType: `${upperFirst(fn.name)}Transaction`, |
| 443 | }); |
| 444 | }); |
| 445 | |
| 446 | events.forEach((event) => { |
| 447 | handlers.push({ |
| 448 | name: generateHandlerName(event.name, abiName, 'log'), |
| 449 | argName: 'log', |
| 450 | argType: `${upperFirst(event.name)}Log`, |
| 451 | }); |
| 452 | }); |
| 453 | |
| 454 | return { |
| 455 | name: abiName, |
| 456 | handlers: handlers, |
| 457 | }; |
| 458 | } |
| 459 | |
| 460 | export async function generateHandlers( |
| 461 | selectedMethods: [SelectedMethod[], SelectedMethod[]], |
no test coverage detected