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

REX: implement rexmaturity ACTION to allow modifying maturity buckets length of time #132

Open
Tracked by #80 ...
DenisCarriere opened this issue May 1, 2024 · 1 comment

Comments

@DenisCarriere
Copy link
Contributor

DenisCarriere commented May 1, 2024

Purpose

Introduce the rexmaturity ACTION to enable modification of the REX maturity buckets length of time (in days).

Feedback provided by

rexmaturity ACTION Specification

/**
 * Facilitates the modification of REX maturity buckets
 *
 * @param num_of_maturity_buckets - used to calculate maturity time of purchase REX tokens from end of the day UTC.
 * @param sell_matured_rex - if true, matured REX is sold immediately.
 * @param buy_rex_to_savings - if true, buying REX is moved immediately to REX savings.
 */
[[eosio::action]]
void rexmaturity(const std::optional<uint32_t> num_of_maturity_buckets,
  const std::optional<bool> sell_matured_rex,
  const std::optional<bool> buy_rex_to_savings );

rexmaturity SINGLETON TABLE specification

struct rex_maturity {
  uint32_t num_of_maturity_buckets = 5;
  bool sell_matured_rex = false;
  bool buy_rex_to_savings = false;
};

Preconditions

  • Default value num_of_maturity_buckets=5 (4 days)
  • num_of_maturity_buckets cannot exceed >30 (will cause limitations in RAM consumption due to bucket creation)

References

Note: changes should be pushed to Antelope Reference contracts https://github.com/AntelopeIO/reference-contracts

@DenisCarriere DenisCarriere changed the title Implement "rexmaturity" ACTION (to modifying maturity buckets length of time) Implement rexmaturity ACTION (to modifying maturity buckets length of time) May 1, 2024
@DenisCarriere DenisCarriere changed the title Implement rexmaturity ACTION (to modifying maturity buckets length of time) REX: implement rexmaturity ACTION to allow modifying maturity buckets length of time May 2, 2024
DenisCarriere added a commit to AntelopeIO/reference-contracts that referenced this issue May 3, 2024
@DenisCarriere
Copy link
Contributor Author

Implemented via AntelopeIO/reference-contracts@b694722

Just missing some additional unit tests for this functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants