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

update types for maxSupply to int64 and initialSupply to uint64 #59

Merged
merged 3 commits into from
Sep 7, 2022

Conversation

lukelee-sl
Copy link
Member

Signed-off-by: lukelee-sl [email protected]

Description:
Update the types for maxSupply and initialSupply to match the types in the protobuf specification.

Related issue(s):

Fixes #56

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@lukelee-sl lukelee-sl self-assigned this Sep 6, 2022
Nana-EC
Nana-EC previously approved these changes Sep 6, 2022
Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

LG

@@ -395,7 +395,7 @@ interface IHederaTokenService {
/// @return tokenAddress the created token's address
function createFungibleToken(
HederaToken memory token,
uint initialTotalSupply,
uint64 initialTotalSupply,
uint decimals
Copy link
Contributor

Choose a reason for hiding this comment

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

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 makes sense to me to fix it all while I'm here. There should be no difference in the services code except the hash that is generated.

Copy link
Collaborator

@dimitar-dinev dimitar-dinev Sep 7, 2022

Choose a reason for hiding this comment

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

Alongside the hash update in services, I think we can also delete the initSupply and decimals checks in TokenCreatePrecompile, since they will no longer be needed after this type fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

@dimitar-dinev I believe we might want to keep the checks as the we will still be supporting the old version of these types.

Signed-off-by: lukelee-sl <[email protected]>
@lukelee-sl lukelee-sl merged commit bed45d4 into main Sep 7, 2022
@lukelee-sl lukelee-sl deleted the 56-update-type-maxSupply branch September 7, 2022 17:14
@Nana-EC Nana-EC added this to the 0.2.0 milestone Oct 11, 2022
@Nana-EC Nana-EC added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Oct 12, 2022
georg-getz pushed a commit to georg-getz/hedera-smart-contracts that referenced this pull request Dec 12, 2022
…graph#59)

* update types for maxSupply to int64 and initialSupply to uint64

Signed-off-by: lukelee-sl <[email protected]>

* update approveNFT and getApproved to match signature in HederaTokenService and services code

Signed-off-by: lukelee-sl <[email protected]>

* update decimals to uint32

Signed-off-by: lukelee-sl <[email protected]>

Signed-off-by: lukelee-sl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[hts-precompile]uint32 for maxSupply and uint for initialSupply in IHederaTokenService
4 participants