Post
Share your knowledge.
What's a native function and can we call them directly?
I've come across the term 'native function' in Move but can't find detailed information about it. I heard that they're declared in Move but defined externally, often in Rust. Does that mean they are internal functions that can't be called directly by wallets or other modules?
- Move CLI
- Move
Answers
1Native functions in Move are indeed declared within the language but they don't have a body because they're implemented outside of Move, usually in Rust. Despite this, if the native function is public, you can call it just like any other function. They aren't restricted to internal use only. You can invoke them as long as the necessary permissions and public access are in place.
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.