({ response })
| 78 | name, |
| 79 | getCacheKey, |
| 80 | async parse({ response }) { |
| 81 | const json = await response.json() |
| 82 | const parsed = await GetAbiResponse.safeParseAsync(json) |
| 83 | if (!parsed.success) |
| 84 | throw fromZodError(parsed.error, { prefix: 'Invalid response' }) |
| 85 | if (parsed.data.status === '0') throw new Error(parsed.data.result) |
| 86 | return parsed.data.result |
| 87 | }, |
| 88 | async request(contract) { |
| 89 | if (!contract.address) throw new Error('address is required') |
| 90 |
nothing calls this directly
no test coverage detected