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

Change GetScriptContainer returns #2312

Merged
merged 14 commits into from
Feb 9, 2021
Merged

Change GetScriptContainer returns #2312

merged 14 commits into from
Feb 9, 2021

Conversation

shargon
Copy link
Member

@shargon shargon commented Feb 8, 2021

Now there is no way for create a SHA256 of the current Tx

@shargon shargon requested a review from erikzhang February 8, 2021 14:57
@erikzhang
Copy link
Member

Do we need System_Runtime_GetScriptContainer anymore?

Base automatically changed from native-stdlib to master February 8, 2021 18:57
@shargon
Copy link
Member Author

shargon commented Feb 9, 2021

Maybe we want to get the current transaction hash

@shargon
Copy link
Member Author

shargon commented Feb 9, 2021

Maybe we can detect the Interop in certains syscalls and call GetHashData if it's a IVerificable object?

@erikzhang
Copy link
Member

Maybe we want to get the current transaction hash

public StackItem ToStackItem(ReferenceCounter referenceCounter)
{
return new Array(referenceCounter, new StackItem[]
{
// Computed properties
Hash.ToArray(),
// Transaction properties
(int)Version,
Nonce,
Sender.ToArray(),
SystemFee,
NetworkFee,
ValidUntilBlock,
Script,
});
}

Maybe we can return this?

@shargon shargon changed the title Add SCriptContainer.GetHashData Change GetScriptContainer returns Feb 9, 2021
erikzhang
erikzhang previously approved these changes Feb 9, 2021
@erikzhang
Copy link
Member

Please fix the UT.

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

Successfully merging this pull request may close these issues.

3 participants