docs(bridge): native withdraw sets tx.value to the scaled amount#239
Open
poszu wants to merge 1 commit into
Open
docs(bridge): native withdraw sets tx.value to the scaled amount#239poszu wants to merge 1 commit into
poszu wants to merge 1 commit into
Conversation
Native-token withdrawals now move the coin via tx.value instead of being burned internally, so the guidance "set tx.value to 0 even for native" is wrong. Update the bridge-from-pod guide (warning hint + TS/Rust examples) and the native-bridge decimal-scaling section: for the native token tx.value must equal the amount scaled up to Pod's 18 decimals; ERC20 withdrawals still send zero value. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Companion to podnetwork/pod#1479, which changes native-token bridge withdrawals to move the coin via
tx.value(standard EVM value path) instead of burning it internally. The existing docs tell users to "settx.valueto0, even for native token withdrawals" — that's now incorrect and would make every native withdraw revert.Changes
doc/api-reference/guides/bridge-from-pod.mdtx.value=amountscaled up to Pod's 18 decimals (e.g. 1 USDC →amount=1e6,tx.value=1e18); ERC20 →tx.value=0.valuefrom the token + its Ethereum decimals (native → scaled, ERC20 → 0), and the Rust example now passes.value(value).doc/protocol/native-bridge.mdtx.value(= amount scaled to 18 dec), subject to the usualnative >= tx.value + gascheck, so you can't bridge your whole balance and leave nothing for gas.amountremains in the destination chain's decimals (unchanged) — only thetx.valueguidance changes.🤖 Generated with Claude Code