telosnetwork / api-telos-net

api.telos.net
MIT License
0 stars 1 forks source link

Investigate and fix sourcify integration #128

Closed rozzaswap closed 2 months ago

rozzaswap commented 3 months ago

A partner has reported being unable to verify their contracts:

We have deployed our contracts to production, but we are unable to verify it, sourcify is showing that the contracts are successfully verified but thats not the case, contract address is : "0xF708e11A7C94abdE8f6217B13e6fE39C8b9cC0a6", Do you know the resons behind it ??

JT investigated, and it seems sourcify has changed their API in some way:

AxiosError: Request failed with status code 404 at settle (file:///nodes/api-prod/node_modules/axios/lib/core/settle.js:19:12) at IncomingMessage.handleStreamEnd (file:///nodes/api-prod/node_modules/axios/lib/adapters/http.js:585:11) at IncomingMessage.emit (events.js:412:35) at IncomingMessage.emit (domain.js:470:12) at endReadableNT (internal/streams/readable.js:1317:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: null }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, */*', 'Content-Type': undefined, 'User-Agent': 'axios/1.6.2', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'get', url: 'https://sourcify.dev/server/files/contracts/any/40?page=0', data: undefined

rozzaswap commented 3 months ago

J.T. | KainosBP | TCD, [18 Jun 2024 at 15:39:21]: I just reverted my change from a couple weeks ago and its still broken.

I can;t look at it more at the moment.

Jesse - Telos | caleosblocks, [18 Jun 2024 at 15:40:50]: I’ll try to tackle it

J.T. | KainosBP | TCD, [18 Jun 2024 at 15:43:43 (18 Jun 2024 at 15:44:03)]: sourcify.mjs.old is my changes with pagination

sourcify.mjs is the original.

poplexity commented 3 months ago

https://docs.sourcify.dev/docs/api/#/