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

rusk: add transaction metadata available to contracts #3341

Open
herr-seppia opened this issue Jan 10, 2025 · 0 comments · May be fixed by #3342
Open

rusk: add transaction metadata available to contracts #3341

herr-seppia opened this issue Jan 10, 2025 · 0 comments · May be fixed by #3342
Assignees
Labels
module:rusk Issues related to rusk module type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)

Comments

@herr-seppia
Copy link
Member

herr-seppia commented Jan 10, 2025

Summary

Right now, when a contract receive funds (using transfer::deposit function) it's not possible to know where the funds came from.
This lead to a smartcontract to not be able to reject tx based on transaction models

Possible solution design or implementation

  1. Add host function to query the ongoing transaction model
  2. Add host funciton to query the moonlight sender

Second option would help other scenario, since it can be used to do additional assumptions that right now require dedicated signatures

Additional context

This requires a change in piecrust to allow setting metadata for an existing session

@herr-seppia herr-seppia self-assigned this Jan 10, 2025
herr-seppia added a commit to dusk-network/piecrust that referenced this issue Jan 10, 2025
herr-seppia added a commit to dusk-network/piecrust that referenced this issue Jan 10, 2025
herr-seppia added a commit that referenced this issue Jan 10, 2025
@herr-seppia herr-seppia linked a pull request Jan 10, 2025 that will close this issue
herr-seppia added a commit to dusk-network/piecrust that referenced this issue Jan 15, 2025
herr-seppia added a commit to dusk-network/piecrust that referenced this issue Jan 15, 2025
herr-seppia added a commit that referenced this issue Jan 15, 2025
@HDauven HDauven linked a pull request Jan 15, 2025 that will close this issue
@HDauven HDauven added type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) module:rusk Issues related to rusk module labels Jan 15, 2025
herr-seppia added a commit that referenced this issue Jan 15, 2025
herr-seppia added a commit that referenced this issue Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:rusk Issues related to rusk module type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants