Skip to content

Add: add runtime.transaction#859

Merged
Jim8y merged 4 commits intoneo-project:masterfrom
Jim8y:runtime-transaction
Jan 17, 2024
Merged

Add: add runtime.transaction#859
Jim8y merged 4 commits intoneo-project:masterfrom
Jim8y:runtime-transaction

Conversation

@Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Jan 15, 2024

Closes #858

Comment on lines +37 to +41
public static extern Transaction Transaction
{
[Syscall("System.Runtime.GetScriptContainer")]
get;
}
Copy link
Member

@cschuchardt88 cschuchardt88 Jan 16, 2024

Choose a reason for hiding this comment

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

Why dont you just change ScriptContainer return type to Transaction. It will alway be Transaction and its like that in neo-go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Delete in the future maybe, but I don't want just remove it.

Copy link
Member

Choose a reason for hiding this comment

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

But they can alway call GetScriptContainer syscall and there is no reason to keep it like that? mark as obsolete than?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But they can alway call GetScriptContainer syscall and there is no reason to keep it like that? mark as obsolete than?

Mark it then, I just don't like the idea of change exiting interface arbitrarily.

Copy link
Member

Choose a reason for hiding this comment

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

In fact it could return a block if you deploy a consensus wallet

Choose a reason for hiding this comment

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

How can you make your code executed in a block context?

Copy link
Member

Choose a reason for hiding this comment

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

@shargon What is the Trigger? Cause the only other place you can invoke something other than at the Application trigger is, Verification. Other than that contracts don't get loaded in another triggers. All code in other triggers pass in null

Copy link
Member

@shargon shargon Jan 17, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can it be triggered in contract?

@Jim8y Jim8y merged commit 47fe67e into neo-project:master Jan 17, 2024
@Jim8y Jim8y deleted the runtime-transaction branch January 17, 2024 08:53
Jim8y added a commit that referenced this pull request Aug 3, 2025
* add runtime.transaction
* add Obsolete to ScriptContainer
---------
Co-authored-by: Shargon <shargon@gmail.com>
Jim8y added a commit that referenced this pull request Aug 18, 2025
* add runtime.transaction

* add Obsolete to ScriptContainer

---------

Co-authored-by: Shargon <shargon@gmail.com>
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.

Make Runtime.ScriptContainer return a Transaction object

4 participants