Upwork is looking for a Looking for a Solidity Smart Contract developer with experience...

    I'm trying to optimize the gas cost for a swap smart contract. The goal is to make a swap using assembly however the issue is that it doesn't work. The code is from this repository:

    https://github.com/libevm/subway/blob/master/contracts/src/Sandwich.sol…

    If you try running the code on remix it won't execute properly. I'm trying to figure out how the transfer and swap functions are done in assembly as you can see in lines 86 and lines 119.

    I'm looking for someone to explain how they work and fix it. the calldata you must use to execute the fallback() function is this:

    0x892db5aaa81a35a0bff89ffbae83d121e6cb989dcb34011dd5262e86edfa0aaa97ac284470549c54000000000000000006f05b59d3b20000000000000000000012b2146f19bd8ca400

    The smart contract will then extract the different parameters from it using assembly. Check it out and let me know.

    Remember the goal is to understand how the lines 86 and 119 work so I can optimize them properly and fix it. The contract is simply executing a simple swap() from uniswap v2 contracts