@cryptokid
MoralisError [Moralis SDK Core Error]: [C0006] Request failed, Bad Request(400): allAddresses cant be enabled on the same topic in multiple streams.
I want to create each stream for each user.
This is my code.
const ERC20_transfer_ABI = [
{
anonymous: false,
inputs: [
{ indexed: true, name: "from", type: "address" },
{ indexed: true, name: "to", type: "address" },
{ indexed: false, name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
]; // valid abi of the event
const filter_ERC20 = {
eq: ["to", publickey.toLowerCase()],
};
const chains = production
? [EvmChain.ETHEREUM, EvmChain.BSC, EvmChain.POLYGON]
: [EvmChain.GOERLI, EvmChain.BSC_TESTNET, EvmChain.MUMBAI];
const options = {
chains: chains, // list of blockchains to monitor
description: `monitor all ERC20 transfers for openbank wallet`, // your description
tag: "ERC20_transfers", // give it a tag
abi: ERC20_transfer_ABI,
includeContractLogs: true,
topic0: ["Transfer(address,address,uint256)"], // topic of the event
advancedOptions: {
topic0: "Transfer(address,address,uint256)",
filter: filter_ERC20,
},
webhookUrl: webhookUrl, // webhook url to receive events,
includeNativeTxs: true,
};
await Moralis.Streams.add(options);
please help me If someone have solution