Skip to content

Change GetScriptContainer returns#2312

Merged
shargon merged 14 commits intomasterfrom
shargon-patch-1
Feb 9, 2021
Merged

Change GetScriptContainer returns#2312
shargon merged 14 commits intomasterfrom
shargon-patch-1

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