1

See image for the field I'm trying to get the data from, I can decode it myself, but I can't download the entire blockchain so how do I access the "input data" field? Would an API be the way to go? Input Data

I've tried BSCscan, but it doesn't give this field, sadly, as shown in the picture below.

enter image description here

Any other APIs that definitely have "input data"? Thank you :)

2 Answers 2

1

You can use Binance's api for this purpose. Go there: https://docs.bnbchain.org/docs/beaconchain/develop/api-reference/node-rpc/

Scroll to 6. APIs and then look at 6.1 query APIs.

1
  • thanks you :) I got something working in the mean time, but this could help others too! :)
    – Adjam
    Feb 27 at 9:53
0

I tried a few more things and this code:

var Web3 = require('web3');
const web3 = new Web3('https://bsc-dataseed1.binance.org:443');

web3.eth.getTransaction('0x5abc50f76ded7659c135029ed37f603728731ec69007dbb7a75adb615a1bd6d8').then(console.log)

returns a bunch of data including

  input: '0x6d61696e206e65742121',

which is the hex of the message

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.