Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Update token module initGenesisState hook - Closes #7119 #7145

Merged

Conversation

shuse2
Copy link
Collaborator

@shuse2 shuse2 commented Apr 29, 2022

What was the problem?

This PR resolves #7119

How was it solved?

  • Update initGenesisState hook according to the LIP

How was it tested?

  • Added unit tests

@shuse2 shuse2 self-assigned this Apr 29, 2022
@shuse2 shuse2 linked an issue Apr 29, 2022 that may be closed by this pull request
@shuse2 shuse2 requested review from ishantiw and removed request for mitsuaki-u April 29, 2022 13:59
Copy link
Contributor

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

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

Excellent 🚀


// import { getRandomBytes } from '@liskhq/lisk-cryptography';

const oneLisk = BigInt('100000000');
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe oneLiskToBeddows is more accurate?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think oneLSKToBeddows is more accurate, since Lisk a brand and LSK is the token's name. It's also aligned with our functions like convertLSKToBeddows and we can use this function here like const oneLSKToBeddows = convertLSKToBeddows('1');, I think this is more readable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we could use convertLSKToBeddows but LSK or beddow is not the main point here, so ill just update the variable name

Copy link
Contributor

@mehmetegemen mehmetegemen left a comment

Choose a reason for hiding this comment

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

Just few comments, otherwise great job!

framework/src/modules/token/module.ts Outdated Show resolved Hide resolved
framework/src/modules/token/module.ts Outdated Show resolved Hide resolved
framework/src/modules/token/schemas.ts Show resolved Hide resolved

// import { getRandomBytes } from '@liskhq/lisk-cryptography';

const oneLisk = BigInt('100000000');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think oneLSKToBeddows is more accurate, since Lisk a brand and LSK is the token's name. It's also aligned with our functions like convertLSKToBeddows and we can use this function here like const oneLSKToBeddows = convertLSKToBeddows('1');, I think this is more readable.

@shuse2 shuse2 requested a review from mehmetegemen May 6, 2022 08:15
Base automatically changed from 7117-update_token_module to feature/6916-introduce_fungible_token_module May 6, 2022 10:41
@shuse2 shuse2 merged commit 5f4016b into feature/6916-introduce_fungible_token_module May 6, 2022
@shuse2 shuse2 deleted the 7119-update_token_genesis branch May 6, 2022 11:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update initGenesisState hook
3 participants