EOS deposit
Last updated
Was this helpful?
Last updated
Was this helpful?
For EOS, the deposit actions are inline actions, which is pushed by Postman with users' signature on MYKEY's backend. Those inline actions can be displayed in the transaction details on the blockchain browser.
Below are the introduction to how to identify the MYKEY actions for exchanges and dapps.
The official tool 'history-tool' is recommended, which store all action traces into database. It doesn't distinguish between ordinary transactions and contract transactions.
Comparing to mongo plugin, history-tool has a better efficiency. It support PostgreSQL/RocksDB.
Here is the compiling and installation steps(fill-pg as an example):
1.code repository
Caution: The current version(0.2.0) has two tables(action_trace_authorization和action_trace_auth_sequence) with massive data which we won't use. If you comment the source code before compiling, you could reduce the amount of data by more than half.
2. compile:
3. lack of .so file
After compiling, add fill-pg to your PATH. If it lacks of .so, you can run lddfill-pg to identify which file is missing.
4. start
Please add parameter '--fpg-create' for the first start.
5. pg maintenance
Table action_trace will be huge. Assume the aps is 500, then more than 40 millions rows will be added per day. It is highly recommended to partition the table by block_num. Oldest partitions could be dropped when history data is cleared.
In the action_trace table, actions are processed in block_num order. You can filter the targeted token from act_account, and identify the actions with exchanges address as "to".
Due to the existence of micro fork, the transaction can be determined to be successful when the block_num is lower than the irreversible block. (pg will repair micro-forked transactions)
If the transaction id is already known, you could use /v0/search/transactions to get all actions and other details for this transaction.
Identify the transaction action and extract the data:
refer the link: . The compiling process is slow.
Deploying and maintaining history-tool plugin is too heavy for most dapps. It's recommended to use the graphql API to query/listen actions from dfuse.
For example, account mykeyhulu511 transfer 0.2826 EOS to account nowwearegoin, the transaction id is: