feat: add denomination_symbol and display_decimals metadata to Offering#514
Open
Keengfk wants to merge 1 commit into
Open
feat: add denomination_symbol and display_decimals metadata to Offering#514Keengfk wants to merge 1 commit into
Keengfk wants to merge 1 commit into
Conversation
Adds two new fields to the Offering struct so wallets and dashboards can
render amounts correctly without guessing payment-token display semantics.
Changes
-------
* RevoraError: new variant DisplayDecimalsOutOfRange = 51 (wire-stable).
* Offering struct: +denomination_symbol: Symbol, +display_decimals: u32.
* DataKey2: new DenominationMetadata(OfferingId) auxiliary storage key.
* register_offering: two new trailing parameters (denomination_symbol,
display_decimals). Validates display_decimals <= MAX_TOKEN_DECIMALS (18)
before the duplicate-prevention guard, so bad values always return an
error rather than silently no-oping on an existing offering.
* register_offering: writes DenominationMetadata to persistent storage
alongside OfferItem and OfferingRecord.
* ofr_reg2 event payload extended to include denomination_symbol and
display_decimals (both emit_v2_event calls updated).
* get_denomination_metadata: new read-only O(1) helper returning
Option<(Symbol, u32)> keyed on (issuer, namespace, token).
* All 346 existing register_offering / try_register_offering call sites
updated to pass the two new default arguments (&symbol_short!(""), &0).
Tests (src/test.rs)
-------------------
denomination_metadata_stored_and_readable
denomination_metadata_zero_decimals_accepted
denomination_metadata_max_decimals_accepted
denomination_metadata_rejects_display_decimals_over_18 (boundary: 19)
denomination_metadata_rejects_display_decimals_u32_max (boundary: max)
denomination_metadata_returns_none_before_register
denomination_metadata_in_ofr_reg2_event_payload
denomination_metadata_reflected_in_get_offering
denomination_metadata_validation_before_duplicate_guard
Security notes
--------------
* denomination_symbol is informational only; it does not affect payout
math, token transfers, or authorization.
* display_decimals is capped at 18 (MAX_TOKEN_DECIMALS) on-chain. The
relationship display_decimals <= payment_token_decimals is a caller
responsibility documented in the function doc-comment and can be
verified off-chain via get_payment_token_decimals.
* Validation order: supply_cap -> display_decimals -> bps -> duplicate
guard, so all parameter errors are surfaced eagerly.
* Wire value 51 is new and stable; all existing error codes unchanged.
|
@Keengfk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add denomination_symbol and display_decimals to Offering metadata
Problem
Indexers, wallets, and dashboards had no on-chain source of truth for how to display payout
amounts. They were forced to guess display precision and currency labels from the payment token
address, which is unreliable and fragile across different asset types.
Solution
Add two new fields to the Offering struct at registration time:
denomination
Both fields are written to persistent storage and included in the ofr_reg2 event payload, so
indexers get everything they need from a single event with no extra round-trips.
Changes
Core (src/lib.rs)
MAX_TOKEN_DECIMALS) checked before the duplicate-prevention guard
Call sites
with &symbol_short!(""), &0 defaults — no behaviour change for existing tests
Tests (src/test.rs) — 9 new
┌──────┬──────────────────┐
│ Test │ What it verifies │
├───────────────────────────────────────────┼──────────────────┤
│ denomination_metadata_stored_an │ Happy path — symbol and decimals round-trip │
│ d_readable │ through storage │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_zero_deci │
│ mals_accepted │ │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_max_decim │ Boundary: display_decimals = 18 is valid │
│ als_accepted │ │
├───────────────────────────────────────────┼──────────────────────────────────────────────┤
│ denomination_metadata_rejects_displa │
│ lay_decimals_over_18 │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_rejects_disp │
│ lay_decimals_u32_max │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_returns_none │
│ before_register │ unknown offering │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_in_ofr_reg2 │
│ event_payload │ │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_reflected_in │
│ _get_offering │ fields │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_validation_b │
│ ion_before_duplicate_guard │ no-ops on an existing offering │
└────────────────────────────────────┴─────────────────────────────────────────────────────┘
Security notes
or authorization
function doc-comment; enforcing it on-chain would require a cross-contract call that adds gas
and complexity for no security benefit
parameter errors surface eagerly before any state is written
Backward compatibility
Existing on-chain state is unaffected. The new fields default to symbol_short!("") and 0 for
any offering registered before this version. The ofr_reg2 event payload is additive — existing
indexers that only read the first three fields continue to work.
▸ Credits: 0.35 • Time: 15s
feat: add denomination_symbol and display_decimals to Offering metadata
Problem
Indexers, wallets, and dashboards had no on-chain source of truth for how to display payout
amounts. They were forced to guess display precision and currency labels from the payment token
address, which is unreliable and fragile across different asset types.
Solution
Add two new fields to the Offering struct at registration time:
denomination
Both fields are written to persistent storage and included in the ofr_reg2 event payload, so
indexers get everything they need from a single event with no extra round-trips.
Changes
Core (src/lib.rs)
MAX_TOKEN_DECIMALS) checked before the duplicate-prevention guard
Call sites
with &symbol_short!(""), &0 defaults — no behaviour change for existing tests
Tests (src/test.rs) — 9 new
┌──────┬──────────────────┐
│ Test │ What it verifies │
├───────────────────────────────────────────┼──────────────────┤
│ denomination_metadata_stored_an │ Happy path — symbol and decimals round-trip │
│ d_readable │ through storage │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_zero_deci │
│ mals_accepted │ │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_max_decim │ Boundary: display_decimals = 18 is valid │
│ als_accepted │ │
├───────────────────────────────────────────┼──────────────────────────────────────────────┤
│ denomination_metadata_rejects_displa │
│ lay_decimals_over_18 │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_rejects_disp │
│ lay_decimals_u32_max │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_returns_none │
│ before_register │ unknown offering │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_in_ofr_reg2 │
│ event_payload │ │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_reflected_in │
│ _get_offering │ fields │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_validation_b │
│ ion_before_duplicate_guard │ no-ops on an existing offering │
└────────────────────────────────────┴─────────────────────────────────────────────────────┘
Security notes
or authorization
function doc-comment; enforcing it on-chain would require a cross-contract call that adds gas
and complexity for no security benefit
parameter errors surface eagerly before any state is written
Backward compatibility
Existing on-chain state is unaffected. The new fields default to symbol_short!("") and 0 for
any offering registered before this version. The ofr_reg2 event payload is additive — existing
indexers that only read the first three fields continue to work.
▸ Credits: 0.35 • Time: 15s
feat: add denomination_symbol and display_decimals to Offering metadata
Problem
Indexers, wallets, and dashboards had no on-chain source of truth for how to display payout
amounts. They were forced to guess display precision and currency labels from the payment token
address, which is unreliable and fragile across different asset types.
Solution
Add two new fields to the Offering struct at registration time:
denomination
Both fields are written to persistent storage and included in the ofr_reg2 event payload, so
indexers get everything they need from a single event with no extra round-trips.
Changes
Core (src/lib.rs)
MAX_TOKEN_DECIMALS) checked before the duplicate-prevention guard
Call sites
with &symbol_short!(""), &0 defaults — no behaviour change for existing tests
Tests (src/test.rs) — 9 new
┌──────┬──────────────────┐
│ Test │ What it verifies │
├───────────────────────────────────────────┼──────────────────┤
│ denomination_metadata_stored_an │ Happy path — symbol and decimals round-trip │
│ d_readable │ through storage │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_zero_deci │
│ mals_accepted │ │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_max_decim │ Boundary: display_decimals = 18 is valid │
│ als_accepted │ │
├───────────────────────────────────────────┼──────────────────────────────────────────────┤
│ denomination_metadata_rejects_displa │
│ lay_decimals_over_18 │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_rejects_disp │
│ lay_decimals_u32_max │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_returns_none │
│ before_register │ unknown offering │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_in_ofr_reg2 │
│ event_payload │ │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_reflected_in │
│ _get_offering │ fields │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_validation_b │
│ ion_before_duplicate_guard │ no-ops on an existing offering │
└────────────────────────────────────┴─────────────────────────────────────────────────────┘
Security notes
or authorization
function doc-comment; enforcing it on-chain would require a cross-contract call that adds gas
and complexity for no security benefit
parameter errors surface eagerly before any state is written
Backward compatibility
Existing on-chain state is unaffected. The new fields default to symbol_short!("") and 0 for
any offering registered before this version. The ofr_reg2 event payload is additive — existing
indexers that only read the first three fields continue to work.
▸ Credits: 0.35 • Time: 15s
feat: add denomination_symbol and display_decimals to Offering metadata
Problem
Indexers, wallets, and dashboards had no on-chain source of truth for how to display payout
amounts. They were forced to guess display precision and currency labels from the payment token
address, which is unreliable and fragile across different asset types.
Solution
Add two new fields to the Offering struct at registration time:
denomination
Both fields are written to persistent storage and included in the ofr_reg2 event payload, so
indexers get everything they need from a single event with no extra round-trips.
Changes
Core (src/lib.rs)
MAX_TOKEN_DECIMALS) checked before the duplicate-prevention guard
Call sites
with &symbol_short!(""), &0 defaults — no behaviour change for existing tests
Tests (src/test.rs) — 9 new
┌──────┬──────────────────┐
│ Test │ What it verifies │
├───────────────────────────────────────────┼──────────────────┤
│ denomination_metadata_stored_an │ Happy path — symbol and decimals round-trip │
│ d_readable │ through storage │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_zero_deci │
│ mals_accepted │ │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_max_decim │ Boundary: display_decimals = 18 is valid │
│ als_accepted │ │
├───────────────────────────────────────────┼──────────────────────────────────────────────┤
│ denomination_metadata_rejects_displa │
│ lay_decimals_over_18 │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_rejects_disp │
│ lay_decimals_u32_max │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_returns_none │
│ before_register │ unknown offering │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_in_ofr_reg2 │
│ event_payload │ │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_reflected_in │
│ _get_offering │ fields │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_validation_b │
│ ion_before_duplicate_guard │ no-ops on an existing offering │
└────────────────────────────────────┴─────────────────────────────────────────────────────┘
Security notes
or authorization
function doc-comment; enforcing it on-chain would require a cross-contract call that adds gas
and complexity for no security benefit
parameter errors surface eagerly before any state is written
Backward compatibility
Existing on-chain state is unaffected. The new fields default to symbol_short!("") and 0 for
any offering registered before this version. The ofr_reg2 event payload is additive — existing
indexers that only read the first three fields continue to work.
▸ Credits: 0.35 • Time: 15s
feat: add denomination_symbol and display_decimals to Offering metadata
Problem
Indexers, wallets, and dashboards had no on-chain source of truth for how to display payout
amounts. They were forced to guess display precision and currency labels from the payment token
address, which is unreliable and fragile across different asset types.
Solution
Add two new fields to the Offering struct at registration time:
denomination
Both fields are written to persistent storage and included in the ofr_reg2 event payload, so
indexers get everything they need from a single event with no extra round-trips.
Changes
Core (src/lib.rs)
MAX_TOKEN_DECIMALS) checked before the duplicate-prevention guard
Call sites
with &symbol_short!(""), &0 defaults — no behaviour change for existing tests
Tests (src/test.rs) — 9 new
┌──────┬──────────────────┐
│ Test │ What it verifies │
├───────────────────────────────────────────┼──────────────────┤
│ denomination_metadata_stored_an │ Happy path — symbol and decimals round-trip │
│ d_readable │ through storage │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_zero_deci │
│ mals_accepted │ │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_max_decim │ Boundary: display_decimals = 18 is valid │
│ als_accepted │ │
├───────────────────────────────────────────┼──────────────────────────────────────────────┤
│ denomination_metadata_rejects_displa │
│ lay_decimals_over_18 │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_rejects_disp │
│ lay_decimals_u32_max │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_returns_none │
│ before_register │ unknown offering │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_in_ofr_reg2 │
│ event_payload │ │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_reflected_in │
│ _get_offering │ fields │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_validation_b │
│ ion_before_duplicate_guard │ no-ops on an existing offering │
└────────────────────────────────────┴─────────────────────────────────────────────────────┘
Security notes
or authorization
function doc-comment; enforcing it on-chain would require a cross-contract call that adds gas
and complexity for no security benefit
parameter errors surface eagerly before any state is written
Backward compatibility
Existing on-chain state is unaffected. The new fields default to symbol_short!("") and 0 for
any offering registered before this version. The ofr_reg2 event payload is additive — existing
indexers that only read the first three fields continue to work.
▸ Credits: 0.35 • Time: 15s
feat: add denomination_symbol and display_decimals to Offering metadata
Problem
Indexers, wallets, and dashboards had no on-chain source of truth for how to display payout
amounts. They were forced to guess display precision and currency labels from the payment token
address, which is unreliable and fragile across different asset types.
Solution
Add two new fields to the Offering struct at registration time:
denomination
Both fields are written to persistent storage and included in the ofr_reg2 event payload, so
indexers get everything they need from a single event with no extra round-trips.
Changes
Core (src/lib.rs)
MAX_TOKEN_DECIMALS) checked before the duplicate-prevention guard
Call sites
with &symbol_short!(""), &0 defaults — no behaviour change for existing tests
Tests (src/test.rs) — 9 new
┌──────┬──────────────────┐
│ Test │ What it verifies │
├───────────────────────────────────────────┼──────────────────┤
│ denomination_metadata_stored_an │ Happy path — symbol and decimals round-trip │
│ d_readable │ through storage │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_zero_deci │
│ mals_accepted │ │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_max_decim │ Boundary: display_decimals = 18 is valid │
│ als_accepted │ │
├───────────────────────────────────────────┼──────────────────────────────────────────────┤
│ denomination_metadata_rejects_displa │
│ lay_decimals_over_18 │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_rejects_disp │
│ lay_decimals_u32_max │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_returns_none │
│ before_register │ unknown offering │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_in_ofr_reg2 │
│ event_payload │ │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_reflected_in │
│ _get_offering │ fields │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_validation_b │
│ ion_before_duplicate_guard │ no-ops on an existing offering │
└────────────────────────────────────┴─────────────────────────────────────────────────────┘
Security notes
or authorization
function doc-comment; enforcing it on-chain would require a cross-contract call that adds gas
and complexity for no security benefit
parameter errors surface eagerly before any state is written
Backward compatibility
Existing on-chain state is unaffected. The new fields default to symbol_short!("") and 0 for
any offering registered before this version. The ofr_reg2 event payload is additive — existing
indexers that only read the first three fields continue to work.
▸ Credits: 0.35 • Time: 15s
feat: add denomination_symbol and display_decimals to Offering metadata
Problem
Indexers, wallets, and dashboards had no on-chain source of truth for how to display payout
amounts. They were forced to guess display precision and currency labels from the payment token
address, which is unreliable and fragile across different asset types.
Solution
Add two new fields to the Offering struct at registration time:
denomination
Both fields are written to persistent storage and included in the ofr_reg2 event payload, so
indexers get everything they need from a single event with no extra round-trips.
Changes
Core (src/lib.rs)
MAX_TOKEN_DECIMALS) checked before the duplicate-prevention guard
Call sites
with &symbol_short!(""), &0 defaults — no behaviour change for existing tests
Tests (src/test.rs) — 9 new
┌──────┬──────────────────┐
│ Test │ What it verifies │
├───────────────────────────────────────────┼──────────────────┤
│ denomination_metadata_stored_an │ Happy path — symbol and decimals round-trip │
│ d_readable │ through storage │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_zero_deci │
│ mals_accepted │ │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_max_decim │ Boundary: display_decimals = 18 is valid │
│ als_accepted │ │
├───────────────────────────────────────────┼──────────────────────────────────────────────┤
│ denomination_metadata_rejects_displa │
│ lay_decimals_over_18 │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_rejects_disp │
│ lay_decimals_u32_max │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_returns_none │
│ before_register │ unknown offering │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_in_ofr_reg2 │
│ event_payload │ │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_reflected_in │
│ _get_offering │ fields │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_validation_b │
│ ion_before_duplicate_guard │ no-ops on an existing offering │
└────────────────────────────────────┴─────────────────────────────────────────────────────┘
Security notes
or authorization
function doc-comment; enforcing it on-chain would require a cross-contract call that adds gas
and complexity for no security benefit
parameter errors surface eagerly before any state is written
Backward compatibility
Existing on-chain state is unaffected. The new fields default to symbol_short!("") and 0 for
any offering registered before this version. The ofr_reg2 event payload is additive — existing
indexers that only read the first three fields continue to work.
▸ Credits: 0.35 • Time: 15s
feat: add denomination_symbol and display_decimals to Offering metadata
Problem
Indexers, wallets, and dashboards had no on-chain source of truth for how to display payout
amounts. They were forced to guess display precision and currency labels from the payment token
address, which is unreliable and fragile across different asset types.
Solution
Add two new fields to the Offering struct at registration time:
denomination
Both fields are written to persistent storage and included in the ofr_reg2 event payload, so
indexers get everything they need from a single event with no extra round-trips.
Changes
Core (src/lib.rs)
MAX_TOKEN_DECIMALS) checked before the duplicate-prevention guard
Call sites
with &symbol_short!(""), &0 defaults — no behaviour change for existing tests
Tests (src/test.rs) — 9 new
┌──────┬──────────────────┐
│ Test │ What it verifies │
├───────────────────────────────────────────┼──────────────────┤
│ denomination_metadata_stored_an │ Happy path — symbol and decimals round-trip │
│ d_readable │ through storage │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_zero_deci │
│ mals_accepted │ │
├──────────────────────────────────────┼───────────────────────────────────────────────────┤
│ denomination_metadata_max_decim │ Boundary: display_decimals = 18 is valid │
│ als_accepted │ │
├───────────────────────────────────────────┼──────────────────────────────────────────────┤
│ denomination_metadata_rejects_displa │
│ lay_decimals_over_18 │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_rejects_disp │
│ lay_decimals_u32_max │ DisplayDecimalsOutOfRange │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_returns_none │
│ before_register │ unknown offering │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_in_ofr_reg2 │
│ event_payload │ │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_reflected_in │
│ _get_offering │ fields │
├─────────────────────────────────────────┼────────────────────────────────────────────────┤
│ denomination_metadata_validation_b │
│ ion_before_duplicate_guard │ no-ops on an existing offering │
└────────────────────────────────────┴─────────────────────────────────────────────────────┘
Security notes
or authorization
function doc-comment; enforcing it on-chain would require a cross-contract call that adds gas
and complexity for no security benefit
parameter errors surface eagerly before any state is written
Backward compatibility
Existing on-chain state is unaffected. The new fields default to symbol_short!("") and 0 for
any offering registered before this version. The ofr_reg2 event payload is additive — existing
indexers that only read the first three fields continue to work.
closes #475