AIP
AIP copied to clipboard
AIP-039: Access transaction hash within Java contract
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
Dependencies
N/A
Copyright
All AIP’s are public domain. Copyright waiver: https://creativecommons.org/publicdomain/zero/1.0/
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.