refactor: add format_max_gas_fee helper for type-safe MaxGasFee serialisation#242
Conversation
…lization - Add public format_max_gas_fee() helper function in btc.rs - Keep UTXOChainMsg enum private for better encapsulation - Update CLI to use helper function instead of manual format string - Improve --message help text with MaxGasFee JSON format example - Ensures serialization format stays consistent between producer and consumer
frolvanya
left a comment
There was a problem hiding this comment.
Thanks for the contribution, sorry we've missed this PR
Co-authored-by: Ivan Frolov <59515280+frolvanya@users.noreply.github.com>
Co-authored-by: Ivan Frolov <59515280+frolvanya@users.noreply.github.com>
Co-authored-by: Ivan Frolov <59515280+frolvanya@users.noreply.github.com>
|
Sorry about slow response. Thx for the suggested changes, they should be ready to go now. |
frolvanya
left a comment
There was a problem hiding this comment.
Let's bump near-bridge-client and bridge-cli version in their toml files. Also, I think we need to have a similar logic for solana-init-transfer and evm-init-transfer, right? Because we can make sol/evm -> utxo (btc/zcash) transfer and we have to specify maxgasfee there as well. For now it's done like this:
bridge-cli testnet solana-init-transfer --token GGP2Ji7vB7sKYAoucUWm5fhvQZQu32kM8KbVzbbV53sT --amount 10000 --recipient btc:tb1qf408ptxk67glau9357mzycfgjjykmxxw9qsusl --message "{\"MaxGasFee\": \"400\"}" --fee 500 --native-fee 0I think it would be nice to fetch gas_fee from api, since it's still available if sender is not near:
https://mainnet.api.bridge.nearone.org/api/v3/transfer-fee?sender=sol:BXss9YNCX2p6VPf2Em54pHXkXnC2FPBeZgbB9fY1cuBR&recipient=btc:tb1qf408ptxk67glau9357mzycfgjjykmxxw9qsusl&token=near:nbtc.bridge.near&amount=10000
|
I pushed the version bumps. I'll create a new issue for the solana-init-transfer and evm-init-transfer maxgasfee API fetching, so we can merge this PR. |
Sounds good, thanks for the contribution! |
For issue #241