I’m trying to get historical smart contract events back into the database by using Sync and Watch Contract Events. It’s an NFT market contract, and the event topic ‘ItemAdded’ adds ‘EthMarketItems’ to the db.
19 entries are created (sync historical), but when I open ‘EthMarketItems’ in the db dashboad it crashes the view:
When I query the table in JS Console it outputs fine:
I’ve tried multiple times, added the event in Legacy and the new UI, restarted the server, but it keeps crashing the dashboard view.
To reproduce:
Add Sync Contract Event with:
address: 0x2490aA56a1afC3B08ED07369633527950C737c18
abi:
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "item_id",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "token_id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "token_address",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "owner_of",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "askingPrice",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "expiresAt",
"type": "uint256"
}
],
"name": "ItemAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "item_id",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "token_id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "token_address",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "owner_of",
"type": "address"
}
],
"name": "ItemRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "item_id",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "token_id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "token_address",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "royaltiesPaid",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "royaltiesReceiver",
"type": "address"
}
],
"name": "ItemSold",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "token_address",
"type": "address"
},
{
"internalType": "uint256",
"name": "token_id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "askingPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiresAt",
"type": "uint256"
}
],
"name": "addItemToMarket",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token_address",
"type": "address"
},
{
"internalType": "uint256",
"name": "token_id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "buyItem",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "marketItemByTokenId",
"outputs": [
{
"internalType": "bytes32",
"name": "item_id",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "token_id",
"type": "uint256"
},
{
"internalType": "address",
"name": "token_address",
"type": "address"
},
{
"internalType": "address",
"name": "owner_of",
"type": "address"
},
{
"internalType": "uint256",
"name": "askingPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiresAt",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token_address",
"type": "address"
},
{
"internalType": "uint256",
"name": "token_id",
"type": "uint256"
}
],
"name": "removeItemFromMarket",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "unpause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Topic: ItemAdded(bytes32,uint256,address,address,uint256,uint256)
TableName: EthMarketItems
Server https://viuoye7x4y2h.usemoralis.com:2083, I’ll leave ‘broken’ the table there for now if anyone wants to check what’s causing the UI to crash.