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

Support contract initcode #3625

Merged
merged 5 commits into from Apr 22, 2022
Merged

Support contract initcode #3625

merged 5 commits into from Apr 22, 2022

Conversation

xin-hedera
Copy link
Collaborator

@xin-hedera xin-hedera commented Apr 21, 2022

Description:

This PR adds support of contract initcode.

  • Parse ContractCreateTransactionBody.initcode
  • Show contract bytecode from initcode in REST api response if exists otherwise from contract bytecode file

Related issue(s):

Fixes #3607
Fixes #3622

Notes for reviewer:

Checklist

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

Signed-off-by: Xin Li <xin.li@hedera.com>
Signed-off-by: Xin Li <xin.li@hedera.com>
Signed-off-by: Xin Li <xin.li@hedera.com>
Signed-off-by: Xin Li <xin.li@hedera.com>
@xin-hedera xin-hedera added this to the 0.56.0 milestone Apr 21, 2022
@xin-hedera xin-hedera self-assigned this Apr 21, 2022
@xin-hedera xin-hedera added P1 parser Area: File parsing rest Area: REST API enhancement Type: New feature labels Apr 21, 2022
@xin-hedera xin-hedera marked this pull request as ready for review April 21, 2022 18:04
@xin-hedera xin-hedera requested a review from a team April 21, 2022 18:04
Comment on lines -230 to -233
if (contractCreateResult.hasEvmAddress()) {
contract.setEvmAddress(DomainUtils.toBytes(contractCreateResult.getEvmAddress().getValue()));
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there won't be an evm address since the method is only used to process contract entities in CreatedContractIDs in protobuf pre services 0.23

steven-sheehy
steven-sheehy previously approved these changes Apr 21, 2022
Copy link
Member

@steven-sheehy steven-sheehy left a comment

Choose a reason for hiding this comment

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

LGTM

Nana-EC
Nana-EC previously approved these changes Apr 21, 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.

LGTM

Signed-off-by: Xin Li <xin.li@hedera.com>
@xin-hedera xin-hedera dismissed stale reviews from Nana-EC and steven-sheehy via 22159f6 April 22, 2022 14:35
@sonarcloud
Copy link

sonarcloud bot commented Apr 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@xin-hedera xin-hedera merged commit 6dbb023 into main Apr 22, 2022
@xin-hedera xin-hedera deleted the 03607-add-contract-initcode branch April 22, 2022 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature P1 parser Area: File parsing rest Area: REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HIP-410 Support contract.initcode in REST API HIP-410 Add initcode to contract
3 participants