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

Implement smartcontract.Convertible for Actor/Invoker assistance #3285

Closed
AnnaShaleva opened this issue Jan 9, 2024 · 0 comments · Fixed by #3297
Closed

Implement smartcontract.Convertible for Actor/Invoker assistance #3285

AnnaShaleva opened this issue Jan 9, 2024 · 0 comments · Fixed by #3297
Labels
enhancement Improving existing functionality I3 Minimal impact S3 Minimally significant smartcontract Smart contracts and associated package U4 Nothing urgent
Milestone

Comments

@AnnaShaleva
Copy link
Member

Currently custom parameters i.e. anything that's beyond the scope of

func NewParameterFromValue(value any) (Parameter, error) {

can't be directly passed to actor.SendCall and other similar Actor/Invoker methods. We need to introduce smartcontract.Convertible interface that should include ToSmartcontractParameter and FromSmartcontractParameter methods and allow NewParameterFromValue properly handle smartcontract.Convertible item. The behaviour should be similar to stackitem.Convertible, the main goal of this issue is to extend the scope of acceptable parameters for actor.SendCall and other similar Actor/Invoker helpers.

@AnnaShaleva AnnaShaleva added smartcontract Smart contracts and associated package I3 Minimal impact U4 Nothing urgent enhancement Improving existing functionality S3 Minimally significant labels Jan 9, 2024
AnnaShaleva added a commit that referenced this issue Jan 23, 2024
Allow to pass Convertible to NewParameterFromValue. Close #3285.

Signed-off-by: Anna Shaleva <[email protected]>
AnnaShaleva added a commit that referenced this issue Jan 23, 2024
Allow to pass Convertible to NewParameterFromValue. Close #3285.

Signed-off-by: Anna Shaleva <[email protected]>
@roman-khimov roman-khimov added this to the v0.106.0 milestone Jan 23, 2024
AnnaShaleva added a commit that referenced this issue Jan 23, 2024
Allow to pass Convertible to NewParameterFromValue. Close #3285.

Signed-off-by: Anna Shaleva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I3 Minimal impact S3 Minimally significant smartcontract Smart contracts and associated package U4 Nothing urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants