current position：Home>How to build index based on wave field event log
How to build index based on wave field event log
2022-02-03 23:02:13 【Q & A of Denglian community】
We store the structure data in the event log of the wave field , Now I want to query , Whether the event log can be indexed , For example, one of the fields in the data we save is called name, Can it be based on name Build an index to query data .
Take the answer 1：
There are two ways :
- It is a direct query on the chain , Give... In an event name Combined with the index indexed, Use filter Filter .
- Listen to all events and save them in the offline database , use SQL Statement query .
2 Relatively speaking, the cost is higher , But the performance will be better , More flexible .
Other answers 1：
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
The sidebar is recommended
- Truss deployment contract
- What are the advantages and disadvantages of embark and truss?
- The environment chooses Web3 but cannot discover the network
- Construction of Ethernet private chain
- The ledger is getting bigger and bigger. Can the node store it?
- Ethereum distributed storage
- Smart contract function call problem
- web3. JS calls the return value of the smart contract function through sendtransaction
- truffle init/unbox RequesrError
- POST https://ipfs.infura.io:5001/api/v0/add?stream -channels=true net::ERR_ CONNECTION_ TIMED_ Out as shown in the figure
guess what you like
Lite sever installation
Unable to play function
Practical application of blockchain
Contract deployment issues
Uniswap docking addliquidity displays false transaction mined but execution failed
Uniswap docking ethtokenswapinput displays false transaction mined but execution failed
Solid structure variable
How can multi node blockchain achieve high availability
How to obtain the public variables of the structure in the contract in web3js through the "public variable automatic creation getter()" mentioned in the solidity document
- The problem of obtaining the variable value in the structure state in the contract by web3js
- I want to transfer the token from the contract address to another address. How do you write this
- May I ask you a question about the duplicate name of erc20 token?
- May I ask you about the problem of solid code audit?
- Can the wallet address be traded at the private chain node at will?
- The mongodb database of EOS blockchain node is a separate host. Can this push the node's data to an independent database host
- The problem of keystore storage directory
- Deploy two smart contracts and how to call the functions in one JS
- I successfully created a local development chain to visit https://substrate-ui.parity.io When, it shows that I am not connected to the node.
- Event filtering in web3js
- Information for learning ring signature
- At present, can smart contracts only be implemented on the web? Use ether js。 If you want to make a good web page into a mobile app or wechat applet, is there any way
- The send transactions' from 'field must be defined appears when calling the contract method (including parameters)!
- Erc20 transfer to contract address
- Store the data on the chain according to the structure format. The read string type data can be returned in the original format, while uint type data is BN type,
- Running on win10 -- Practice Guide: an error occurred when building a zero knowledge proof DAPP demo
- How smart contracts receive and transfer usdt (erc20)
- Local simulation test open source code
- Why is the transfer authorization unsuccessful
- How to find the page displayed after DAPP is opened in the open source code
- How can the results of smart contract execution be saved on the blockchain? I use truss + ganache
- Does one contract create a new transaction when calling another contract?
- Cannot structure property 'body' of 'undefined' as it is undefined
- I want to develop a blockchain project in wechat applet. How do I start?
- When I use metamask to connect the private chain, I report an error networkcontroller - unknown RPC type
- I found a magical thing. After getting started, the private chain deletes the data file stored in the whole block. Why can I find data on the chain
- There are three interface calls in the figure below the filecoin block browser. Which RPC interfaces are they???
- What is the storage mode of IPFs
- The problem of parameters in info printed by geth? How to create a new contract?
- How to choose the smart contract token standard (erc20, erc777, erc1155)
- Please teach me how to use openzeppelin to deploy smart contracts and learn to make a red envelope
- ERROR: 1.13.4 is required to build Fabric and you are using . Please update go
- Unable to get metamask account
- I don't know what the problem is
- There is a strange phenomenon in metamask wallet. The transferred eth automatically generates a transaction. Why?
- For cross-border e-commerce, since the transaction data volume is about 2 million orders per day, how to store it using blockchain technology?
- During the construction of DAPP project in pet shop, an error is reported when the truss test command is executed
- Why are blockchain applications, these dapps, all on the web side, without Android and IOS?
- How to set IPFs friendly name