feat: transfer token inside the network#191
Conversation
Time Submission Status
You can submit time with the command. Example: See available commands to help comply with our Guidelines. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds a new ChangesTransfer Feature Implementation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@holdex pr submit-time 4h |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@core/contractsapi/bridge_actions.go`:
- Around line 81-89: The Transfer handler currently only checks non-empty
recipient and parseable amount; update it to validate recipient format and
require amount > 0 before proceeding: after parsing amount with
apd.NewFromString(amount) check that the resulting decimal is positive (compare
to zero) and return a clear error (e.g., "amount must be > 0") if not, and
validate the recipient string against your canonical address format (use the
project's address validation helper or implement checks for length/hex/prefix)
and return a descriptive error (e.g., "invalid recipient address format") if it
fails; keep the existing parse step (apd.NewFromString) and return wrapped
errors using fmt.Errorf to preserve context.
In `@docs/api-reference.md`:
- Around line 2616-2628: Update the Transfer docs to explicitly state that
Client.Transfer (func (c *Client) Transfer) is not implemented for custom
transports and currently returns a runtime error when used with a custom
transport; also replace the multiple action-name examples with one canonical set
of bridgeIdentifier examples (e.g. "eth_truf" and "eth_usdc" for mainnet,
"sepolia" for dev/test) and remove alternative/generated action names to avoid
confusion, and add a short note near the signature that callers must use
supported bridgeIdentifier values and handle the runtime error when using custom
transports.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ea9449ea-eb4c-473a-97ce-2869eeb987dd
📒 Files selected for processing (7)
core/contractsapi/bridge_actions.gocore/tnclient/actions_transport.gocore/tnclient/client.gocore/types/stream.gocore/types/tsn_client.godocs/api-reference.mdtests/integration/bridge_actions_test.go
resolves: https://github.com/truflation/website/issues/3849
Summary by CodeRabbit
Release Notes
New Features
Documentation
Tests