EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.28k stars 3.6k forks source link

How can the recipient be configured to access history as well?? version 1.4.1 #6226

Open suannilian opened 5 years ago

suannilian commented 5 years ago

config filter as follow: filter-on = eosio.token::

transfer only from side can get history,transaction id 7a6d553a,How can both sides get the history

eos@iZrj93guk5gq208e9hwllqZ:~/eos$ cleos -u http://127.0.0.1:8887 get actions shihuajin111

seq when contract::action => receiver trx id... args

================================================================================================================

0 2018-11-04T07:04:18.500 eosio.token::transfer => eosio.token 938d07c2... {"from":"shihuajin111","to":"shishi111111","quantity":"0.000...

1 2018-11-04T07:23:17.000 eosio.token::transfer => eosio.token c2fe769f... {"from":"shihuajin111","to":"shishi111111","quantity":"0.000...

2 2018-11-04T07:31:26.000 eosio.token::transfer => eosio.token 4de18dff... {"from":"shihuajin111","to":"shishi111111","quantity":"0.000...

3 2018-11-04T07:31:26.000 eosio.token::transfer => shihuajin111 4de18dff... {"from":"shihuajin111","to":"shishi111111","quantity":"0.000...

4 2018-11-04T07:31:26.000 eosio.token::transfer => shishi111111 4de18dff... {"from":"shihuajin111","to":"shishi111111","quantity":"0.000...

? 5 2018-11-04T07:41:00.500 eosio.token::transfer => eosio.token 7a6d553a... {"from":"shihuajin111","to":"shishi111111","quantity":"0.000... eos@iZrj93guk5gq208e9hwllqZ:~/eos$ cleos -u http://127.0.0.1:8887 get actions shishi111111

seq when contract::action => receiver trx id... args

================================================================================================================

0 2018-11-04T07:31:26.000 eosio.token::transfer => shishi111111 4de18dff... {"from":"shihuajin111","to":"shishi111111","quantity":"0.000...

acoutts commented 5 years ago

The history plugin does not support wildcard filtering on receiver as outlined in config.ini: # Track actions which match receiver:action:actor. Actor may be blank to include all. Action and Actor both blank allows all from Recieiver. Receiver may not be blank. (eosio::history_plugin)

You're better off probably using the mongodb plugin and querying that instead.

taokayan commented 5 years ago

I guess you need to modify the history plugin to decode all "transfer" actions, assuming all "transfer" actions have the same structure. see how "on_system_action" is implemented in history_plugin.cpp