I am using Mongo Db Plugin to save actions and transactions. I need latest 10 actions. I didn't found any C# library for mongodb queries. So, I am using this C# code:

MongoClient client = new MongoClient(MongoDBPathFromConfig);
IMongoDatabase db = client.GetDatabase("EOS");
var collection = db.GetCollection<TransactionTrace>("action_traces");
var sort = Builders<TransactionTrace>.Sort.Descending("_id");
var filter = Builders<TransactionTrace>.Filter.Empty;
List<TransactionTrace> actionList = collection.Find(filter).Sort(sort).Limit(10).ToList();

How to get the account_action_seq which is generally returned from eosjs like libraries when we find actions? I need this sequence so that I can set pos and offset to search for more actions. Please help.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.