Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
No se pueden obtener resultados de un objeto: el error dice que no sale

Tengo una función que devuelve un objeto. Quiero poder sacar "resultados" de ese objeto, pero tengo dificultades. mi error es

'resultados' no existe en el tipo 'SimulationResponse'. La propiedad 'resultados' no existe en el tipo 'RelayResponseError'

El código está actualmente

 const response = await flashbotsProvider.simulate( simulateTransaction, blockNumber + 1 ); console.log(typeof response); console.log(response.results);

Y si solo console.log(response) , el resultado es:

 object { bundleHash: '0x7765d8cf3063adb1bf9a2e524071a86ddcd3abf96acee689989f0a574073d9ac', coinbaseDiff: BigNumber { _hex: '0x02b959fc8d06f000', _isBigNumber: true }, results: [ { coinbaseDiff: '196287000000000000', ethSentToCoinbase: '0', fromAddress: '0xd612c9fBc4047E1cd50bf0996B8D277d0bF425F9', gasFees: '196287000000000000', gasPrice: '2100000000000', gasUsed: 93470, toAddress: '0x20EE855E43A7af19E407E39E5110c2C1Ee41F64D', txHash: '0x883597fc3df0e70bf78383c381394c6b39ca8f8cfe1885ad4b889f37339874dc', value: '0x' } ], totalGasUsed: 93470, firstRevert: undefined }

¿alguna idea?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

if ("error" en respuesta || respuesta.firstRevert !== indefinido) { console.log( Simulation Error: ${response} ); proceso.salir(1); }

Lo verifiqué si hay un error, y cuando hay un error, puede obtener resultados mediante response.results.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!