neutron-org / neutron

Smart Contract platform secured by Cosmos Hub
https://neutron.org
Apache License 2.0
104 stars 79 forks source link

Chore: split dex execution from banking operations #NTRN-353 #611

Open jcompagni10 opened 1 week ago

jcompagni10 commented 1 week ago

TASK https://hadronlabs.atlassian.net/browse/NTRN-353

This PR creates an execute method for each dex operation which performs all the core logic except event emission and banking operations. This makes performing simulations (which do not want banking operations) much simpler.
It is a prerequisite for this PR: https://github.com/neutron-org/neutron/pull/543/files It also begins a larger process of breaking down all of the core.go methods into more manageable (and readable) functions.

This PR also splits each of the dex messages into its own dedicated file for better readability and easier refactoring in the future.

This PR does not change any logic. It is largely just moving code around with a couple of small changes to event handling so that the ExecuteXX functions do not emit events.

Integration Tests

https://github.com/neutron-org/neutron-tests/actions/runs/9864070258