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

AIP-039: Access transaction hash within Java contract #39

Open
jennijuju opened this issue Jul 19, 2019 · 1 comment
Open

AIP-039: Access transaction hash within Java contract #39

jennijuju opened this issue Jul 19, 2019 · 1 comment

Comments

@jennijuju
Copy link
Contributor

jennijuju commented Jul 19, 2019


Title: To access transaction hash within Java contracts
Author(s): Jiaying Wang
Type: ASC (Aion Standards and Conventions)
Status: Draft
Creation Date: July 19, 2019
Contact Information: [email protected]

Summary

This is an extended AIP of AIP 007 . Need to access transaction hash during Java contract method execution.

Value Proposition

Transaction hash is a unique identifier which can be used during the execution of Java contract method to save the state.

Motivation

This information is available for Solidity contract on FastVM. Same needs for the Java contract can be expected.

Non-Goals

The scope of this document is to provide access to only transaction hash when a Java contract method being executed.

Success Metrics

User is able to retrieve the transaction hash in the contract.

A constant function must be implemented.

transactionhash function

Returns hash of the transaction.

TBD.

Logic

N/A

Cross Chain Functionality

N/A

Risks & Assumptions

Compatibility notes:
transactionhash is not supported in Ethereum solidity, in case of porting Aion contract on Ethereum, this function will not be available on Ethereum.

Test Cases

N/A

Implementations

Reference Implementation

Dependencies

N/A

Copyright

All AIP’s are public domain. Copyright waiver: https://creativecommons.org/publicdomain/zero/1.0/

@fulldecent
Copy link
Contributor

What are the use cases? A seed for a random number generator?

Will past hashes be accessible? This is possible on Ethereum, up to a limit. There are tradeoffs in setting that limit.

@jennijuju jennijuju changed the title AIP #012: Access transaction hash within Java contract AIP-039: Access transaction hash within Java contract Aug 12, 2019
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

No branches or pull requests

2 participants