Get operations from transaction with smart-contract for swap - elrond

What I am trying to achieve?
There is a smart-contract for swap between WEGLD and USDC. Address: erd1qqqqqqqqqqqqqpgqeel2kumf0r8ffyhth7pqdujjat9nx0862jpsg2pqaq
To find out the real amount of WEGLD and USCD that was swapped, I am using API to get the operations of the transaction, but sometimes the operations are missing.
Example with operations:
https://api.elrond.com/transactions/d133b4c6388b87191e430b11f499317d791529299cdeae4607f9cab18ff52402
without operations(but it is succeeded):
https://api.elrond.com/transactions/75a5af684d261123b817af89df4f5673ed32b285f2e131fbb45773d5096f6bc4
I was thinking to use gateway: https://docs.elrond.com/sdk-and-tools/rest-api/transactions/#get-transaction
But I don't know how I can extract the real amounts(in and out) from there.
If someone can help me with a solution.

As a solution I used this link
https://api.elrond.com/transactions?withOperations=true&hashes=...
Also my problem seems like was a problem with the API, which now is fixed.

You might also want to check out the DEX sdk for JS if you want to simplify your programative work: https://github.com/ElrondNetwork/elrond-sdk-erdjs-dex
There are a handful of very useful scripts in there that are doing a lot of heavylifting on "decyphering" DEX transaction details.

Related

Which technique for locating many similar Base Pointer Adresses (fast)?

I try to catch some Base Pointer Adresses from a Windows Application which I want to Bot (Its not a game, Its an Online Broker). So, I know how to find Base Pointer Adresses, but I do this with Cheatengine (Find Adresses, set Breakpointes, search for the Output Adresses... and so on) - but this takes very much time for Base Pointers with 6+ Offsets. Maybe there is a much faster technique how to scrape them out of Memory?
And here is my presumption: In This Pic you can see, there are many similar Entrys (Forex Entrys), and they are all similar structured. They have a Adress for Ask-Value and Bid-Value - these are the Pointers I need! The Values are represented as Double. Maybe, I can find multiple Adresses at once, if I find the one from another. I thought on object oriented programing, where many Instances have Adresses nearby to the other. So, is there a way to find multiple at once, and fast?
I tried some stuff with OllyDbg, and didnt find some nearby (But my skills with OllyDbg are not insane, I still dont know all functions of it). Do you guys have a better solution, how I can find them faster? I dont really want to code some stuff in Assembler - but if nececary, I can do this. Would be great if you can help. There are 89 Entrys, and I will need per something like 20 - 30 minutes. Would be awful.
Cheers!
Filthy Frank
Using pointers and offsets is not the correct way to go about this. On the back end they're just using HTTP and an API. You should either use that directly or hook the function that does it and then work with the data right after it is received by the client.

Meaning of IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONISATION

I'm currently developping a miniFilter driver from scratch.
Right now i'm just trying to understand how all of this works, which actions leads to which IRP event etc...
After some tests with the miniSpy filter Driver, I can see those 3 Major operation and can't figure out what is done.
IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION
IRP_MJ_QUERY_INFORMATION
IRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATION
I'm usually using this link : https://msdn.microsoft.com/en-us/library/windows/hardware/ff548630(v=vs.85).aspx
But I can't found ACQUIRE/RELEASE_FOR_SECTION_SYNCHRONIZATION.
Can someone explain me what they mean ?
First of all you might want to check this out.
You can think of the IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION as callback for CreateaFileMapping. It essentially tells you that the FILE_OBJECT in question is about to have section object created for it.
IRP_MJ_QUERY_INFORMATION its the file-system callback for ZwQueryInformationFile. Check that one out for more details on various information classes and what structures are behind each buffer for each class.
IRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATION has no parameters. Consider it as an equivalent of CloseHandle(SectionHandle). Check this.
Hope it clears things out.
Good luck.

Vectored Referencing buffer implementation

I was reading code from one of the projects from github. I came across something called a Vectored Referencing buffer implementation. Can have someone come across this ? What are the practical applications of this. I did a quick google search and wasn't able to find any simple sample implementation for this.
Some insight would be helpful.
http://www.ibm.com/developerworks/library/j-zerocopy/
http://www.linuxjournal.com/article/6345
http://www.seccuris.com/documents/whitepapers/20070517-devsummit-zerocopybpf.pdf
https://github.com/joyent/node/pull/304
I think some more insight on your specific project/usage/etc would allow for a more specific answer.
However, the term is generally used to either change or start an interface/function/routine with the goal that it does not allocate another instance of its input in order to perform its operations.
EDIT: Ok, after reading the new title, I think you are simply talking about pushing buffers into a vector of buffers. This keeps your code clean, you can pass any buffer you need with minimal overhead to any function call, and allows for a better cleanup time if your code isn't managed.
EDIT 2: Do you mean this http://cpansearch.perl.org/src/TYPESTER/Data-MessagePack-Stream-0.07/msgpack-0.5.7/src/msgpack/vrefbuffer.h

Extend and customize a performance monitor

.NET has several built in Perfmons, and I would like to know is it possible to extend one of the built in ones and add custom functionality.
More specifically, I would like to take RateOfCountsPerSecond32 and make it be something such as RateOfCountsPerMinute. Basically I would like to be able to monitor the average number of events that happen in a given time, but longer than a second.
Is extending the right idea? If so does anyone have a quick syntax example of how it can be done? I have read that it can be done but documentation is super poor on the subject. Or is there a better way to go about this entirely, very open to suggestions.
Thanks for any help,

Is midiOutPrepareHeader a quick call?

Does midiOutPrepareHeader, midiInPrepareHeader just setup some data fields, or does it do something that is more time intensive?
I am trying to decide whether to build and destroy the MIDIHDR's as needed, or to maintain a pool of them.
You really have only two ways to tell (without the Windows source):
1) Profile it. Depending on your findings for how long it takes, have a debug-only scoped timer that logs when it suddenly takes longer than what you think is acceptable for your application, or do your pool solution. Though the docs say not to modify the buffer once you call the prepare function, and it seems if you wanted to re-use it you may have to modify it. I'm not familiar enough with the docs to say one way or the other if your proposed solution would work.
2) Step through the assembly and see. Don't be afraid. Get the MSFT public symbols and see if it looks like it's just filling out fields or if it's doing something complicated.

Resources