|
本帖最后由 Achin 于 2025-5-15 02:56 编辑
我想在转账之前,实现类似于IMTOKEN钱包,在转账之前能计算出该笔(转账)交易所需的手续费。应该怎样弄的?
找了一晚上的资料,都无果。来这求助万能的MJJ。
示例里的合约地址,换成TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t,就出现 Smart contract is not exist.
参考了以下的资料,都没能查询USDT的转账手续费:
https://tronweb.network/docu/docs/5.3.2/Interact%20with%20contract#estimateenergy
https://developers.tron.network/docs/set-feelimit
https://developers.tron.network/reference/estimateenergy
- curl -X POST https://nile.trongrid.io/wallet/triggerconstantcontract -d '{
- "owner_address": "TXvMPtq5UDRF1yrwHZT6YWeUhy8wbyeyJN",
- "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
- "function_selector": "transfer(address,uint256)",
- "parameter": "0000000000000000000000002ce5de57373427f799cc0a3dd03b841322514a8c00000000000000000000000000000000000000000000000000038d7ea4c68000",
- "visible": true
- }'
- // 直接返回 智能合约不存在
- {"result":{"code":"CONTRACT_VALIDATE_ERROR","message":"Smart contract is not exist."}}
复制代码 |
|