feat: added ft_transfer_call support in tokens subcommand#576
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new near tokens ... send-ft-call flow to support NEP-141 ft_transfer_call, so users no longer need to go through the generic near contract call-function as-transaction path for common FT transfer-call use cases (e.g., bridging).
Changes:
- Introduces
FtTransferCallargs type and a newtokens send-ft-callcommand that builds anft_transfer_calltransaction. - Adds interactive/CLI parameter flow for amount, memo, gas/deposit, and
msg(direct string or file-based input). - Reuses existing FT balance lookup helper by making it accessible to the new command.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/types/ft_properties.rs |
Adds FtTransferCall struct for (de)serializing ft_transfer_call arguments. |
src/commands/tokens/send_ft_call/mod.rs |
Implements prepopulated transaction creation for ft_transfer_call (including optional storage deposit registration). |
src/commands/tokens/send_ft_call/amount_ft.rs |
Implements interactive/CLI parameter gathering (amount, memo, gas/deposit, and msg via args/file) and post-transaction messaging. |
src/commands/tokens/send_ft/mod.rs |
Exposes get_ft_balance_for_account for reuse by send-ft-call. |
src/commands/tokens/mod.rs |
Registers the new send-ft-call subcommand in tokens actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
frol
left a comment
There was a problem hiding this comment.
@race-of-sloths score 5
Looks helpful to me
|
@frolvanya Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: executed
Your contribution is much appreciated with a final score of 5! @frol received 25 Sloth Points for reviewing and scoring this pull request. Another weekly streak completed, well done @frolvanya! To keep your weekly streak and get another bonus make pull request next week! Looking forward to see you in race-of-sloths What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
msg-argsmsg-filecloses #575