({ response })
| 84 | return `${camelCase(name)}:${JSON.stringify(contract.address)}` |
| 85 | }, |
| 86 | async parse({ response }) { |
| 87 | const json = await response.json() |
| 88 | const parsed = await BlockExplorerResponse.safeParseAsync(json) |
| 89 | if (!parsed.success) |
| 90 | throw fromZodError(parsed.error, { prefix: 'Invalid response' }) |
| 91 | if (parsed.data.status === '0') throw new Error(parsed.data.result) |
| 92 | return parsed.data.result |
| 93 | }, |
| 94 | request({ address }) { |
| 95 | if (!address) throw new Error('address is required') |
| 96 | return { |
nothing calls this directly
no test coverage detected