Open 0xClandestine opened 1 year ago
There's more improvements to come, just pushing what I had time to document last night.
@0xClandestine hey, thanks for these suggestions! let us know if you plan to open a PR with these changes, otherwise I can add these in. if you have any contributing questions feel free to ask :)
@noot Would be glad to make a PR, will shoot for this weekend.
Hey guys, been watching the project unfold for months and have learned a lot. As a way to give back I thought I'd contribute some improvements for the smart contracts. Since I'm a first time contributor I feel its probably best to start with an issue outlining some of my improvements.
Improvement 1 ⛽
Reasoning:
Improvement 2 ⛽
abi.encodePacked()
rather thanabi.encode()
& unpack the struct from memory before encoding.Reasoning:
swapID
. When usingabi.encodePacked
the returned output is tightly packed rather than including unnecessary padding. However as you may knowabi.encodePacked
is not supported forstructs
; I would suggest unpacking theSwap
before encoding.