TACT function where the user sends amount_sent and specifies amount_to_lock. The contract should:
Lock exactly amount_to_lock in state
Refund the surplus (amount_sent – amount_to_lock) to the sender after covering all fees (incl. storage rent)
Reference:
nativeReserve(msg.amount, ReserveExact | ReserveAddOriginalBalance | ReserveBounceIfActionFail);
message(MessageParameters {
to: sender(),
value: 0,
bounce: false,
mode: SendRemainingBalance,
});