0

I have been searching for hours and hours and days but i cannot find a way to deploy a spl token with a max wallet for each user such as , a wallet can buy only 2% of the supply , not more , is there any way possible to do this

1
  • Wait you can do this to limit snipers from sniping supply? Commented Feb 2 at 23:41

1 Answer 1

1

You can actually do this using token extensions with the transfer hook extension.

In your transfer hook program, you would basically do the following pseudocode:

if amount > max_limit {
  msg!("Transfer exceeds transfer limit");
  return Err(CustomError::TransferNotAllowed.into());
}

That will keep any transfer greater than max_limit from completing successfully. If you wanted to make sure the wallet itself didn't have more than that amount, you do the same check within the transfer hook program.

You can find more on transfer hooks and examples in the documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.