Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

token-cli: Unable to use the token cli to transfer tokens that have the transfer-fee and transfer-hook extensions. #7059

Closed
tonton-sol opened this issue Jul 28, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@tonton-sol
Copy link
Contributor

I am trying to test using the transfer-fee extension in conjunction with the transfer-hook extension. The transfer-hook is the provided example program given in this repository. The transfer hook extra account metas account is initialized but empty. I am running this command:

spl-token transfer --expected-fee <EXPECTED_FEE> <TOKEN_MINT_ADDRESS> <TOKEN_AMOUNT> <RECIPIENT_WALLET_ADDRESS>

It fails with error: Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb failed: custom program error: 0x7dc8348c My suspicion is that TransferCheckedWithFee is not correctly resolving the extra account metas.

I have already confirmed that this same transfer-hook program works and successfully transfers a token with only the transfer-hook extension.

Solution: Fix TransferCheckedWithFee to correctly resolve the required extra account metas.

@joncinque
Copy link
Contributor

Thanks for your report! This is indeed an issue.

It looks like we'll need to do a few things to fix this properly.

@joncinque joncinque added the good first issue Good for newcomers label Jul 29, 2024
@tonton-sol
Copy link
Contributor Author

I will start on this!

@joncinque
Copy link
Contributor

Resolved by #7171, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants