I am using IPFS to store data [As per suggestion from an answer in ethereum stackexchange ,I couldnt find link to the question:( ]. The hash of file stored in ipfs is inserted into the data field of a transaction. But I couldnt find a way to access these datafields . Tried fetching transaction by using the transactionhash , but the retrieved result does not have a data field . Is there any function similar to eth.filter in web3 v1.0 ?.
function(req,res){
console.log(req.body)
web3.eth.getAccounts(function(e,accounts){
web3.eth.personal.unlockAccount(accounts[0],req.body.pass, 1000000);
web3.eth.sendTransaction({
from:accounts[0],
to:req.body.address,
data: req.body.id
}, function(error, hash){
console.log(error)
console.log(hash)
});
})
}
Running the above code returns a transaction hash . req.body.id is fetched from an api endpoint which returns hash of the uploaded file . To list all transactions , I tried to use web3.eth.filter but it returned an error :
TypeError: web3.eth.filter is not a function
Then I console logged web3.eth and couldnt find any filter function in the log .Is there any function to list all the transactions from/to an address ?