- Add a new
./sui-framework/{name}.move
file or find an appropriate.move
. - Add the signature of the function you are adding in
{name}.move
. - Add the rust implementation of the function under
./sui-framework/src/natives
with name{name}.rs
. - Link the move interface with the native function in all_natives
- Write some tests in
{name}_tests.move
and passrun_framework_move_unit_tests
. - Optionally, update the mock move VM value in gas_tests.rs since the sui-framework package will increase the gas metering.
- Optionally, run
cargo insta test
andcargo insta review
since the sui-framework build will change the empty genesis config.
Note: The gas metering for native functions is currently a WIP; use a dummy value for now and please open an issue with move
label.