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

🧑‍💻 New decimal-aware price system - Part 5: Convert instantiator functions from using Self to &self #265

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

JuaniRios
Copy link
Contributor

@JuaniRios JuaniRios commented Apr 26, 2024

Main info on #260

  • Since our price mechanism now has to call storage for the decimals, we need our price functions to be called not from the type, but from the type instance. i.e inst.calculate... and not Instantiator::calculate

  • I took the liberty of converting all our functions also to using the instance (&self instead of Self), since usually the types are quite longer and doing inst. is easier.

@JuaniRios JuaniRios changed the title fix auction tests ⚗️ New decimal-aware price system - Part 4: Add evaluation test for different CT decimals Apr 26, 2024
@JuaniRios JuaniRios changed the title ⚗️ New decimal-aware price system - Part 4: Add evaluation test for different CT decimals ✅ New decimal-aware price system - Part 5: Fix auction tests Apr 26, 2024
@JuaniRios JuaniRios self-assigned this Apr 26, 2024
@JuaniRios JuaniRios changed the title ✅ New decimal-aware price system - Part 5: Fix auction tests ✅ New decimal-aware price system - Part 5: Convert instantiator functions Apr 26, 2024
@JuaniRios JuaniRios changed the title ✅ New decimal-aware price system - Part 5: Convert instantiator functions 🧑‍💻 New decimal-aware price system - Part 5: Convert instantiator functions Apr 26, 2024
@JuaniRios JuaniRios changed the title 🧑‍💻 New decimal-aware price system - Part 5: Convert instantiator functions 🧑‍💻 New decimal-aware price system - Part 5: Convert instantiator functions from using Self to &self Apr 26, 2024
@JuaniRios JuaniRios changed the title 🧑‍💻 New decimal-aware price system - Part 5: Convert instantiator functions from using Self to &self 🧑‍💻 New decimal-aware price system - Part 5: Convert instantiator functions from using Self to &self Apr 26, 2024
Copy link
Collaborator

@vstam1 vstam1 left a comment

Choose a reason for hiding this comment

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

I do not completely like the &self reference in each function, especially functions that do not need it like get_ed, but we can take a look at better structuring the instantiator after MVP

@JuaniRios JuaniRios force-pushed the 04-26-test_different_ct_decimals_on_evaluating branch from 41dfe8a to 74ff58b Compare April 29, 2024 11:04
@JuaniRios JuaniRios force-pushed the 04-26-test_different_ct_decimals_on_evaluating branch from 74ff58b to 090c818 Compare April 29, 2024 11:06
@JuaniRios JuaniRios force-pushed the 04-26-test_different_ct_decimals_on_evaluating branch from 090c818 to fc2bb4d Compare April 29, 2024 11:12
@JuaniRios JuaniRios force-pushed the 04-26-test_different_ct_decimals_on_evaluating branch from fc2bb4d to 213ef1c Compare April 29, 2024 11:16
@JuaniRios JuaniRios force-pushed the 04-26-test_different_ct_decimals_on_evaluating branch from 213ef1c to aec82ca Compare April 29, 2024 12:26
@JuaniRios JuaniRios force-pushed the 04-26-fix_auction_tests branch 3 times, most recently from 0716af9 to 37bc816 Compare April 29, 2024 13:02
Copy link
Contributor Author

JuaniRios commented Apr 30, 2024

Merge activity

  • Apr 30, 9:52 AM EDT: @JuaniRios started a stack merge that includes this pull request via Graphite.
  • Apr 30, 9:59 AM EDT: Graphite rebased this pull request as part of a merge.
  • Apr 30, 10:00 AM EDT: @JuaniRios merged this pull request with Graphite.

@JuaniRios JuaniRios force-pushed the 04-26-test_different_ct_decimals_on_evaluating branch from 84e08a5 to 7382bee Compare April 30, 2024 13:55
Base automatically changed from 04-26-test_different_ct_decimals_on_evaluating to main April 30, 2024 13:58
@JuaniRios JuaniRios merged commit ef9a3ee into main Apr 30, 2024
@JuaniRios JuaniRios deleted the 04-26-fix_auction_tests branch April 30, 2024 14:00
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.

2 participants