Passing am Option parameter has a payload. #61
-
Please how do we pass an Option parameter has a payload? |
Beta Was this translation helpful? Give feedback.
Answered by
gregnazario
Mar 13, 2024
Replies: 1 comment 5 replies
-
i believe you can use MoveOption in an entry function payload. i dont see any examples of |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Options as Entry function parameters
Depends on the SDK etc. Let's take this example entry function:
TS SDK
There are two ways to encode it, either typed, or the easy mode, where it'll figure it out for you.
Easy mode: SDK will figure it out for you
The SDK will use the ABI, either provided or retrieved from on-chain to infer and try to
determine the proper encoding.
Here's for a
Some(5)
option: