FreezeBalanceV2
In Stake2.0, stake an amount of TRX to obtain bandwidth or energy, and obtain equivalent TRON Power(TP) according to the staked amount.
This method will use 30
Compute Units.
Parameters
owner_address
- String, required - Owner address, default hexStringfrozen_balance
- int64, required - TRX stake amount, the unit is sunresource
- String, required - TRX stake type, 'BANDWIDTH' or 'ENERGY'Permission_id
- int32 - Optional, for multi-signature usevisible
- Boolean - Optional. Specifies whether the address is in Base58 format (default: false).
Returns
Transaction object - JSON object: Unsigned transaction, please refer to the Transaction chapter for the fields contained in it. Since the transaction type is FreezeBalanceV2Contract
, the fields contained in raw_data.contract[0].parameter.value
in the transaction are as follows:
owner_address
string
Account address
string
string
Resource type
frozen_balance
int64
stake amount, unit is sun
// Result
{
"visible": true,
"txID": "473bbb59203742c76b1ecbf2e0a5bc3962f37167ece01261d6680c9c8fcbe290",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"resource": "ENERGY",
"frozen_balance": 10000000,
"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g"
},
"type_url": "type.googleapis.com/protocol.FreezeBalanceV2Contract"
},
"type": "FreezeBalanceV2Contract"
}
],
"ref_block_bytes": "5abf",
"ref_block_hash": "137f27cb4608aa7d",
"expiration": 1756821201000,
"timestamp": 1756821142996
},
"raw_data_hex": "0a025abf2208137f27cb4608aa7d40e8c0d0d590335a5a083612560a34747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e63655632436f6e7472616374121e0a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e1080ade204180170d4fbccd59033"
}
curl https://mainnet.tron.validationcloud.io/v1/<YOUR_API_KEY_HERE>/wallet/freezebalancev2 \
-X POST \
-H "Content-Type: application/json" \
-d '
{
"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
"frozen_balance": 10000000,
"resource": "ENERGY",
"visible": true
}
'
Last updated
Was this helpful?