I want to listen to new comming BSC transactions,
I have also followed the instruction of Moralis:
Moralis.start({
serverUrl: 'xxxxxxx',
appId: 'xxxxxx',
});
const query = new Moralis.Query("BscTransactions");
query.equalTo("to_address", '0xxxxxxxxxxxxxxxxx');
const subscription = await query.subscribe();
subscription.on("create", function (data) {
console.log(data.attributes);
});
but results are not expected, for example:
{
block_timestamp: 2021-12-08T07:33:06.000Z,
hash: ‘0xbe3750f9279f4f8d77140d10997b4e0d96294ec2b55fadfb285622fd09962718’,
nonce: 3279,
block_hash: ‘0x8499b081bb78b4ee68a512f11d7f4d16d04e8607148ca44e807e5e2998e06927’,
block_number: 13292197,
transaction_index: 421,
from_address: ‘0x8b4894e04251d0bcb434fd078760b763f25bac57’,
to_address: ‘0x10ed43c718714eb63d5aa57b78b54704e256024e’,
value: ‘0’,
gas_price: 5000000000,
gas: 208408,
input: ‘0x38ed1739’,
confirmed: false,
createdAt: 2021-12-08T07:51:50.618Z,
updatedAt: 2021-12-08T07:51:50.618Z
}
block_timestamp: 2021-12-08 07:33:06
but
createdAt: 2021-12-08 07:51:50
=> 20 minutes delays