const Moralis = require(“moralis”);
Moralis.default.start({
apiKey: process.env.MORALIS_KEY,
});
const stream = async () => {
let options = {
chains: [
0x1, 0x5, 0xaa36a7, 0x38, 0x89, 0xfa, 0xa86a, 0x19, 0x7e4, 0xa4b1,
0x2105,
],
description: “Listen to Transfer”,
tag: “transfers”,
includeContractLogs: false,
includeNativeTxs: true,
webhookUrl: “” ,
};
}
let userAdresses = “0xb887F4575BcF268e16ccf00C1Fe68D30730ab676”;
const newStream = await Moralis.default.Streams.add(options);
const { id } = newStream.toJSON();
let data = await Moralis.default.Streams.addAddress({
address: userAdresses,
id,
});
};