Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add priority tax reactor #252

Merged
merged 27 commits into from
Jul 25, 2024
Merged

feat: add priority tax reactor #252

merged 27 commits into from
Jul 25, 2024

Conversation

zhongeric
Copy link
Collaborator

Introduces a new reactor type, PriorityOrderReactor, which scales the output amount required to fill an order by the priority fee set in the filling transaction

Copy link
Collaborator

@marktoda marktoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very sick - few small thoughts

src/lib/PriorityFeeLib.sol Outdated Show resolved Hide resolved
src/lib/PriorityFeeLib.sol Outdated Show resolved Hide resolved
src/reactors/PriorityOrderReactor.sol Outdated Show resolved Hide resolved
src/lib/PriorityFeeLib.sol Show resolved Hide resolved
src/lib/PriorityFeeLib.sol Outdated Show resolved Hide resolved
src/lib/PriorityFeeLib.sol Outdated Show resolved Hide resolved
src/lib/PriorityFeeLib.sol Outdated Show resolved Hide resolved
src/lib/PriorityFeeLib.sol Outdated Show resolved Hide resolved
src/lib/PriorityOrderLib.sol Show resolved Hide resolved
src/lib/PriorityOrderLib.sol Show resolved Hide resolved
src/reactors/PriorityOrderReactor.sol Show resolved Hide resolved
Copy link
Collaborator

@marktoda marktoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome!

src/lib/PriorityFeeLib.sol Outdated Show resolved Hide resolved
src/lib/PriorityOrderLib.sol Outdated Show resolved Hide resolved
test/lib/PriorityFeeLib.t.sol Show resolved Hide resolved
marktoda
marktoda previously approved these changes Jul 8, 2024
Copy link
Collaborator

@marktoda marktoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! 🚀

* Add cosigner logic

* Add invalid cosigner and cosignature tests

* Add minPriorityFee

* remove openAuctionStartBlock

* add revert test for filling before cosigner and before auction start block

* remove unused error

* Only validate cosignature if before auctionStartBlock

* add custom revert for txGasprice < block base fee

* add revert test for txgasprice

* remove view modifier

* only call updateCosignerData func if before auctionStartBlock

* move getPriorityFee into separate func

* fix compiler warnings for tests

---------

Co-authored-by: ConjunctiveNormalForm <[email protected]>
zhongeric and others added 3 commits July 12, 2024 11:05
* move cosigner verification logic into validate

* Add cosignerlib

* nit: comments

* Add tests to CosignerLib

* flip and forge fmt
zhongeric and others added 2 commits July 17, 2024 10:41
* revert quickly if invalid nonce

* update gas snaps

* add tests for invalid nonces

* Change revert to OrderAlreadyFilled

* forge fmt

* rm console2
@zhongeric zhongeric merged commit a21d767 into main Jul 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants