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

Make face_value_currency required & Manage token contract versions #561

Merged
merged 3 commits into from
Nov 26, 2023

Conversation

YoshihitoAso
Copy link
Member

@YoshihitoAso YoshihitoAso commented Nov 24, 2023

Related to: #552

  • When issuing a new bond, it is mandatory to enter the face value, but the currency code for the face value was an optional item. This difference is not relevant, so I made both items mandatory.
  • Also, for tokens deployed as old contracts, I changed the specification to return the default value of the currency code.

Close: #562

  • Added version item as a token attribute.

@YoshihitoAso YoshihitoAso changed the title Make face_value_currency required Make face_value_currency required Nov 24, 2023
@YoshihitoAso YoshihitoAso marked this pull request as ready for review November 24, 2023 10:45
@YoshihitoAso YoshihitoAso self-assigned this Nov 24, 2023
@YoshihitoAso YoshihitoAso marked this pull request as draft November 24, 2023 11:40
@YoshihitoAso YoshihitoAso marked this pull request as ready for review November 24, 2023 15:48
@YoshihitoAso YoshihitoAso changed the title Make face_value_currency required Make face_value_currency required & Manage token contract versions Nov 25, 2023
Comment on lines +29 to +35
class IbetStraightBondContractVersion(StrEnum):
V_22_12 = "22_12"
V_23_12 = "23_12"


class IbetShareContractVersion(StrEnum):
V_22_12 = "22_12"
Copy link
Member Author

Choose a reason for hiding this comment

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

It defines the possible versions of each token.

Comment on lines +30 to +31
# Set default value
op.get_bind().execute(update(Token).values(version=TokenVersion.V_22_12))
Copy link
Member Author

Choose a reason for hiding this comment

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

All existing data is set to v22.12.

Copy link
Member

@purplesmoke05 purplesmoke05 left a comment

Choose a reason for hiding this comment

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

LGTM

@YoshihitoAso YoshihitoAso merged commit 23e93a3 into dev-23.12 Nov 26, 2023
4 checks passed
@YoshihitoAso YoshihitoAso deleted the fix/currency-code-required branch November 26, 2023 23:26
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.

[FEATURE] Manage token contract versions
2 participants