Function approve

Source
pub fn approve(
    accounts: ApproveAccounts<'_>,
    params: ApproveParams<'_>,
) -> Result<()>
Expand description

Approves a WNS token transfer.

This needs to be called before any attempt to transfer a WNS token. For transfers that do not involve royalties payment, set the price and royalty_fee to 0.

The current implementation “manually” creates the instruction data and invokes the WNS program. This is necessary because there is no WNS crate available.