feat(tron): adding FreezeBalanceV2 message support
What changed, and why it matters
This commit adds support for a new Tron blockchain operation called FreezeBalanceV2, which lets users stake TRX tokens to gain Energy or Bandwidth. The change only updates message definitions, generated code, test fixtures, and translation strings. There is no actual signing or user-interface logic in this commit, and nothing in the diff suggests a security vulnerability.
No security action required. Review the subsequent commit that implements parsing, user confirmation, and signing for FreezeBalanceV2 to assess actual security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit introduces protobuf definitions and generated bindings for TronFreezeBalanceV2Contract across the Trezor firmware, Python trezorlib, and Rust trezor-client. It adds a new MessageType (2207), a TronResourceCode enum (BANDWIDTH/ENERGY), a new raw contract type (FreezeBalanceV2Contract = 54), and translation keys words__staking_for/words__staking_from. The commit message explicitly states ‘Mostly generated code. Main changes in subsequent commit.’ No parsing, validation, display, or signing implementation is present in this patch.
Changed components
common/protob/messages-tron.protocommon/protob/messages.protocore/src/trezor/messages.pycore/src/trezor/enumspython/src/trezorlib/messages.pyrust/trezor-client/src/protos/generated/messages_tron.rsrust/trezor-client/src/messages/generated.rscore/translationsInspect captured patch +623 / −45
diff --git a/common/protob/messages-tron.proto b/common/protob/messages-tron.proto
index 3df13f33..5ca25396 100644
--- a/common/protob/messages-tron.proto
+++ b/common/protob/messages-tron.proto
@@ -47,6 +47,7 @@ message TronSignTx {
* Response: Device ready to receive contract details
* @next TronTransferContract
* @next TronTriggerSmartContract
+ * @next TronFreezeBalanceV2Contract
*/
message TronContractRequest {
}
@@ -68,13 +69,32 @@ message TronTransferContract {
* Request: Fill in TriggerSmartContract details. TRC-10 not supported.
* @next TronSignature
*/
- //https://github.com/tronprotocol/protocol/blob/37bb922a9967bbbef1e84de1c9e5cda56a2d7998/core/contract/smart_contract.proto#L74
+// https://github.com/tronprotocol/protocol/blob/37bb922a9967bbbef1e84de1c9e5cda56a2d7998/core/contract/smart_contract.proto#L74
message TronTriggerSmartContract {
required bytes owner_address = 1; // Sender account, signs transaction
required bytes contract_address = 2; // Target smart contract address
required bytes data = 4; // ABI-encoded function call data
}
+/**
+ * Request: Freeze(Stake) TRX for Energy or Bandwidth (FreezeBalanceV2Contract. FreezeBalanceContract deprecated)
+ * @next TronSignature
+ */
+// https://github.com/tronprotocol/protocol/blob/37bb922a9967bbbef1e84de1c9e5cda56a2d7998/core/contract/balance_contract.proto#L84-L88
+message TronFreezeBalanceV2Contract {
+ required bytes owner_address = 1; // Account whose TRX has to be frozen
+ required uint64 frozen_balance = 2; // Amount to be frozen (in SUN)
+ optional TronResourceCode resource = 3 [default = BANDWIDTH]; // Resource obtained against freezing. Optional with default required in proto2
+
+ // https://github.com/tronprotocol/protocol/blob/37bb922a9967bbbef1e84de1c9e5cda56a2d7998/core/contract/common.proto#L9C1-L13C2
+ // Staking can not happen just for TRON_POWER:
+ // https://developers.tron.network/reference/freezebalancev2-1
+ enum TronResourceCode {
+ BANDWIDTH = 0;
+ ENERGY = 1;
+ }
+}
+
/**
* Response: signature for transaction
* @end
@@ -110,6 +130,7 @@ message TronRawTransaction {
enum TronRawContractType {
TransferContract = 1;
TriggerSmartContract = 31;
+ FreezeBalanceV2Contract = 54;
}
required TronRawContractType type = 1;
diff --git a/common/protob/messages.proto b/common/protob/messages.proto
index 8df88b38..94f0c52f 100644
--- a/common/protob/messages.proto
+++ b/common/protob/messages.proto
@@ -357,6 +357,7 @@ enum MessageType {
MessageType_TronContractRequest = 2204 [(wire_out) = true];
MessageType_TronTransferContract = 2205 [(wire_in) = true];
MessageType_TronTriggerSmartContract = 2206 [(wire_in) = true];
+ MessageType_TronFreezeBalanceV2Contract = 2207 [(wire_in) = true];
// Benchmark
MessageType_BenchmarkListNames = 9100 [(bitcoin_only) = true];
diff --git a/common/tests/fixtures/tron/sign_tx.json b/common/tests/fixtures/tron/sign_tx.json
index acdc234b..081f54c1 100644
--- a/common/tests/fixtures/tron/sign_tx.json
+++ b/common/tests/fixtures/tron/sign_tx.json
@@ -265,8 +265,97 @@
"result": {
"signature": "f99e2f704c78b07d49fcfa4cc7cd032635807f9a1f09b57adc2232cac38d0d42428008bd9953944e0276123ee6851a266078df9c68e5c4db158be05377dadd7b1C"
}
- }
- ,
+ },
+ {
+ "name": "Stake_for_Energy",
+ "parameters": {
+ "address_n": "m/44'/195'/0'/0/0",
+ "tx": {
+ "ref_block_bytes": "a8a8",
+ "ref_block_hash": "c75f97d5331c50f7",
+ "expiration": 1770386202000,
+ "timestamp": 1770386142000
+ },
+ "contract": {
+ "_message_type": "TronFreezeBalanceV2Contract",
+ "owner_address": "41f59b1e8c74ed1a925eef999c9f6f2dac11c11a9f",
+ "frozen_balance": 50000000,
+ "resource": "ENERGY"
+ },
+ "raw_data_hex": "0a02a8a82208c75f97d5331c50f74090bbf699c3335a5a083612560a34747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e63655632436f6e7472616374121e0a1541f59b1e8c74ed1a925eef999c9f6f2dac11c11a9f1080e1eb17180170b0e6f299c333",
+ "raw": {
+ "visible": false,
+ "txID": "c7e2509e21914cf31874df6b91a38a88c882e2db87d2dd192fde817d48681416",
+ "raw_data_hex": "0a02a8a82208c75f97d5331c50f74090bbf699c3335a5a083612560a34747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e63655632436f6e7472616374121e0a1541f59b1e8c74ed1a925eef999c9f6f2dac11c11a9f1080e1eb17180170b0e6f299c333",
+ "raw_data": {
+ "contract": [
+ {
+ "parameter": {
+ "value": {
+ "owner_address": "41f59b1e8c74ed1a925eef999c9f6f2dac11c11a9f",
+ "frozen_balance": 50000000,
+ "resource": "ENERGY"
+ },
+ "type_url": "type.googleapis.com/protocol.FreezeBalanceV2Contract"
+ },
+ "type": "FreezeBalanceV2Contract"
+ }
+ ],
+ "ref_block_bytes": "a8a8",
+ "ref_block_hash": "c75f97d5331c50f7",
+ "expiration": 1770386202000,
+ "timestamp": 1770386142000
+ }
+ }
+ },
+ "result": {
+ "signature": "f8aca83d3b81c707443d51194953140ffe40249ac1dcee84f373f7386f3aed2b4a4dda0a1d79e708c2ce2d4a8aa3817f9dcab6a741eb0996a6f36c4e826da0491c"
+ }
+ },
+ {
+ "name": "Stake_for_Bandwidth",
+ "parameters": {
+ "address_n": "m/44'/195'/0'/0/0",
+ "tx": {
+ "ref_block_bytes": "650a",
+ "ref_block_hash": "7280317008fe2c62",
+ "expiration": 1770532344000,
+ "timestamp": 1770532284000
+ },
+ "contract": {
+ "_message_type": "TronFreezeBalanceV2Contract",
+ "owner_address": "41f59b1e8c74ed1a925eef999c9f6f2dac11c11a9f",
+ "frozen_balance": 9223372036854740
+ },
+ "raw_data_hex": "0a02650a22087280317008fe2c6240c0a1cedfc3335a5c083612580a34747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e63655632436f6e747261637412200a1541f59b1e8c74ed1a925eef999c9f6f2dac11c11a9f10d4a78dafba93b11070e0cccadfc333",
+ "raw": {
+ "visible": false,
+ "txID": "e0229b67d2306e303c879316fceb0648041b3bf2321873e850c0f0745ecea880",
+ "raw_data_hex": "0a02650a22087280317008fe2c6240c0a1cedfc3335a5c083612580a34747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e63655632436f6e747261637412200a1541f59b1e8c74ed1a925eef999c9f6f2dac11c11a9f10d4a78dafba93b11070e0cccadfc333",
+ "raw_data": {
+ "contract": [
+ {
+ "parameter": {
+ "value": {
+ "owner_address": "41f59b1e8c74ed1a925eef999c9f6f2dac11c11a9f",
+ "frozen_balance": 9223372036854740
+ },
+ "type_url": "type.googleapis.com/protocol.FreezeBalanceV2Contract"
+ },
+ "type": "FreezeBalanceV2Contract"
+ }
+ ],
+ "ref_block_bytes": "650a",
+ "ref_block_hash": "7280317008fe2c62",
+ "expiration": 1770532344000,
+ "timestamp": 1770532284000
+ }
+ }
+ },
+ "result": {
+ "signature": "4ca823d3dc1d2ede21b670f38749dab4bce80320e48e26d6b8e22221739599193801af9780936f0aef58e0e8187985b7d3dd64e16a8971c3d5c21e35baee7bac1c"
+ }
+ },
{
"name": "TriggerSmartContract_USDD_transfer",
"parameters": {
diff --git a/core/embed/rust/librust_qstr.h b/core/embed/rust/librust_qstr.h
index d0142cc8..9f30f611 100644
--- a/core/embed/rust/librust_qstr.h
+++ b/core/embed/rust/librust_qstr.h
@@ -1044,6 +1044,8 @@ static void _librust_qstrs(void) {
MP_QSTR_words__show_next;
MP_QSTR_words__sign;
MP_QSTR_words__signer;
+ MP_QSTR_words__staking_for;
+ MP_QSTR_words__staking_from;
MP_QSTR_words__swap;
MP_QSTR_words__title_check;
MP_QSTR_words__title_done;
diff --git a/core/embed/rust/src/translations/generated/translated_string.rs b/core/embed/rust/src/translations/generated/translated_string.rs
index b8669c7f..1a6bdb16 100644
--- a/core/embed/rust/src/translations/generated/translated_string.rs
+++ b/core/embed/rust/src/translations/generated/translated_string.rs
@@ -1567,6 +1567,8 @@ pub enum TranslatedString {
ethereum__eip_7702 = 1177, // {"Bolt": "Authorize the following contract as an EIP-7702 on your account", "Caesar": "Authorize the following contract as an EIP-7702 on your account", "Delizia": "Authorize the following contract as an EIP-7702 on your account?", "Eckhart": "Authorize the following contract as an EIP-7702 on your account?"}
words__confirm_all = 1178, // "Confirm all"
words__show_next = 1179, // "Show next"
+ words__staking_for = 1180, // "Staking for"
+ words__staking_from = 1181, // "Staking from"
}
impl TranslatedString {
@@ -2754,6 +2756,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -3939,6 +3943,8 @@ impl TranslatedString {
21651,
21662,
21671,
+ 21682,
+ 21694,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -5123,6 +5129,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -6308,6 +6316,8 @@ impl TranslatedString {
21651,
21662,
21671,
+ 21682,
+ 21694,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -7492,6 +7502,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -8677,6 +8689,8 @@ impl TranslatedString {
21651,
21662,
21671,
+ 21682,
+ 21694,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -9861,6 +9875,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -11046,6 +11062,8 @@ impl TranslatedString {
21651,
21662,
21671,
+ 21682,
+ 21694,
];
} else if #[cfg(feature = "layout_caesar")] {
@@ -12231,6 +12249,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -13416,6 +13436,8 @@ impl TranslatedString {
18764,
18775,
18784,
+ 18795,
+ 18807,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -14600,6 +14622,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -15785,6 +15809,8 @@ impl TranslatedString {
18764,
18775,
18784,
+ 18795,
+ 18807,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -16969,6 +16995,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -18154,6 +18182,8 @@ impl TranslatedString {
18764,
18775,
18784,
+ 18795,
+ 18807,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -19338,6 +19368,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -20523,6 +20555,8 @@ impl TranslatedString {
18764,
18775,
18784,
+ 18795,
+ 18807,
];
} else if #[cfg(feature = "layout_delizia")] {
@@ -21708,6 +21742,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account?",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -22893,6 +22929,8 @@ impl TranslatedString {
20653,
20664,
20673,
+ 20684,
+ 20696,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -24077,6 +24115,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account?",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -25262,6 +25302,8 @@ impl TranslatedString {
20653,
20664,
20673,
+ 20684,
+ 20696,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -26446,6 +26488,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account?",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -27631,6 +27675,8 @@ impl TranslatedString {
20653,
20664,
20673,
+ 20684,
+ 20696,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -28815,6 +28861,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account?",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -30000,6 +30048,8 @@ impl TranslatedString {
20653,
20664,
20673,
+ 20684,
+ 20696,
];
} else if #[cfg(feature = "layout_eckhart")] {
@@ -31185,6 +31235,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account?",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -32370,6 +32422,8 @@ impl TranslatedString {
21408,
21419,
21428,
+ 21439,
+ 21451,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -33554,6 +33608,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account?",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -34739,6 +34795,8 @@ impl TranslatedString {
21408,
21419,
21428,
+ 21439,
+ 21451,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -35923,6 +35981,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account?",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -37108,6 +37168,8 @@ impl TranslatedString {
21408,
21419,
21428,
+ 21439,
+ 21451,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -38292,6 +38354,8 @@ impl TranslatedString {
"Authorize the following contract as an EIP-7702 on your account?",
"Confirm all",
"Show next",
+ "Staking for",
+ "Staking from",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -39477,6 +39541,8 @@ impl TranslatedString {
21408,
21419,
21428,
+ 21439,
+ 21451,
];
}
@@ -41019,6 +41085,8 @@ impl TranslatedString {
(Qstr::MP_QSTR_words__show_next, Self::words__show_next),
(Qstr::MP_QSTR_words__sign, Self::words__sign),
(Qstr::MP_QSTR_words__signer, Self::words__signer),
+ (Qstr::MP_QSTR_words__staking_for, Self::words__staking_for),
+ (Qstr::MP_QSTR_words__staking_from, Self::words__staking_from),
(Qstr::MP_QSTR_words__swap, Self::words__swap),
(Qstr::MP_QSTR_words__title_check, Self::words__title_check),
(Qstr::MP_QSTR_words__title_done, Self::words__title_done),
diff --git a/core/embed/upymod/qstrdefsport.h b/core/embed/upymod/qstrdefsport.h
index 4bb8f163..85e6aaa6 100644
--- a/core/embed/upymod/qstrdefsport.h
+++ b/core/embed/upymod/qstrdefsport.h
@@ -495,6 +495,7 @@ Q(StellarSignerType)
Q(TezosBallotType)
Q(TezosContractType)
Q(TronRawContractType)
+Q(TronResourceCode)
Q(account_path_check)
Q(actions)
Q(add_resident_credential)
@@ -799,6 +800,7 @@ Q(trezor.enums.StellarSignerType)
Q(trezor.enums.TezosBallotType)
Q(trezor.enums.TezosContractType)
Q(trezor.enums.TronRawContractType)
+Q(trezor.enums.TronResourceCode)
Q(tron)
Q(tx_ct_key)
Q(tx_ecdh)
diff --git a/core/mocks/trezortranslate_keys.pyi b/core/mocks/trezortranslate_keys.pyi
index 03adc48b..5fcac7ed 100644
--- a/core/mocks/trezortranslate_keys.pyi
+++ b/core/mocks/trezortranslate_keys.pyi
@@ -1115,6 +1115,8 @@ class TR:
words__show_next: str = "Show next"
words__sign: str = "Sign"
words__signer: str = "Signer"
+ words__staking_for: str = "Staking for"
+ words__staking_from: str = "Staking from"
words__swap: str = "Swap"
words__title_check: str = "Check"
words__title_done: str = "Done"
diff --git a/core/src/trezor/enums/MessageType.py b/core/src/trezor/enums/MessageType.py
index c2627cb5..b907258f 100644
--- a/core/src/trezor/enums/MessageType.py
+++ b/core/src/trezor/enums/MessageType.py
@@ -277,3 +277,4 @@ if not utils.BITCOIN_ONLY:
TronContractRequest = 2204
TronTransferContract = 2205
TronTriggerSmartContract = 2206
+ TronFreezeBalanceV2Contract = 2207
diff --git a/core/src/trezor/enums/TronRawContractType.py b/core/src/trezor/enums/TronRawContractType.py
index fbe72683..4ca60a14 100644
--- a/core/src/trezor/enums/TronRawContractType.py
+++ b/core/src/trezor/enums/TronRawContractType.py
@@ -4,3 +4,4 @@
TransferContract = 1
TriggerSmartContract = 31
+FreezeBalanceV2Contract = 54
diff --git a/core/src/trezor/enums/TronResourceCode.py b/core/src/trezor/enums/TronResourceCode.py
new file mode 100644
index 00000000..e27aed11
--- /dev/null
+++ b/core/src/trezor/enums/TronResourceCode.py
@@ -0,0 +1,6 @@
+# Automatically generated by pb2py
+# fmt: off
+# isort:skip_file
+
+BANDWIDTH = 0
+ENERGY = 1
diff --git a/core/src/trezor/enums/__init__.py b/core/src/trezor/enums/__init__.py
index 227e3127..a836a283 100644
--- a/core/src/trezor/enums/__init__.py
+++ b/core/src/trezor/enums/__init__.py
@@ -371,9 +371,14 @@ if TYPE_CHECKING:
QrCode = 3
NFC = 4
+ class TronResourceCode(IntEnum):
+ BANDWIDTH = 0
+ ENERGY = 1
+
class TronRawContractType(IntEnum):
TransferContract = 1
TriggerSmartContract = 31
+ FreezeBalanceV2Contract = 54
class MessageType(IntEnum):
Initialize = 0
@@ -642,6 +647,7 @@ if TYPE_CHECKING:
TronContractRequest = 2204
TronTransferContract = 2205
TronTriggerSmartContract = 2206
+ TronFreezeBalanceV2Contract = 2207
BenchmarkListNames = 9100
BenchmarkNames = 9101
BenchmarkRun = 9102
diff --git a/core/src/trezor/messages.py b/core/src/trezor/messages.py
index b7456dbb..45ccd020 100644
--- a/core/src/trezor/messages.py
+++ b/core/src/trezor/messages.py
@@ -70,6 +70,7 @@ if TYPE_CHECKING:
from trezor.enums import ThpMessageType # noqa: F401
from trezor.enums import ThpPairingMethod # noqa: F401
from trezor.enums import TronRawContractType # noqa: F401
+ from trezor.enums import TronResourceCode # noqa: F401
from trezor.enums import WordRequestType # noqa: F401
class BenchmarkListNames(protobuf.MessageType):
@@ -6920,6 +6921,24 @@ if TYPE_CHECKING:
def is_type_of(cls, msg: Any) -> TypeGuard["TronTriggerSmartContract"]:
return isinstance(msg, cls)
+ class TronFreezeBalanceV2Contract(protobuf.MessageType):
+ owner_address: "AnyBytes"
+ frozen_balance: "int"
+ resource: "TronResourceCode"
+
+ def __init__(
+ self,
+ *,
+ owner_address: "AnyBytes",
+ frozen_balance: "int",
+ resource: "TronResourceCode | None" = None,
+ ) -> None:
+ pass
+
+ @classmethod
+ def is_type_of(cls, msg: Any) -> TypeGuard["TronFreezeBalanceV2Contract"]:
+ return isinstance(msg, cls)
+
class TronSignature(protobuf.MessageType):
signature: "AnyBytes"
diff --git a/core/translations/en.json b/core/translations/en.json
index ea37401c..c7b9f3b7 100644
--- a/core/translations/en.json
+++ b/core/translations/en.json
@@ -2532,6 +2532,8 @@
"words__show_next": "Show next",
"words__sign": "Sign",
"words__signer": "Signer",
+ "words__staking_for": "Staking for",
+ "words__staking_from": "Staking from",
"words__swap": "Swap",
"words__title_check": "Check",
"words__title_done": "Done",
diff --git a/core/translations/order.json b/core/translations/order.json
index 31b6d3dc..b40e670e 100644
--- a/core/translations/order.json
+++ b/core/translations/order.json
@@ -1178,5 +1178,7 @@
"1176": "ethereum__eip_7702_title",
"1177": "ethereum__eip_7702",
"1178": "words__confirm_all",
- "1179": "words__show_next"
+ "1179": "words__show_next",
+ "1180": "words__staking_for",
+ "1181": "words__staking_from"
}
diff --git a/core/translations/signatures.json b/core/translations/signatures.json
index 4e0d317e..a9f564ba 100644
--- a/core/translations/signatures.json
+++ b/core/translations/signatures.json
@@ -1,8 +1,8 @@
{
"current": {
- "merkle_root": "cd99a3720e1bc7b6e8d2a054995e6203ea2cd6dbb3b8d173566405fad8465362",
- "datetime": "2026-02-12T17:20:33.526586+00:00",
- "commit": "3e178be4bf2feda07246488a8f04fc48ecec2614"
+ "merkle_root": "41dfe8705fea0dabcb37b9ad569ecbbc1774c18bfddee22e547ce4ea4ba6c3ab",
+ "datetime": "2026-02-16T07:29:05.670431+00:00",
+ "commit": "f15209dd0f913af4a2627239eca146a2038ab494"
},
"history": [
{
diff --git a/python/src/trezorlib/messages.py b/python/src/trezorlib/messages.py
index 8184e580..40b7004d 100644
--- a/python/src/trezorlib/messages.py
+++ b/python/src/trezorlib/messages.py
@@ -424,9 +424,15 @@ class ThpPairingMethod(IntEnum):
NFC = 4
+class TronResourceCode(IntEnum):
+ BANDWIDTH = 0
+ ENERGY = 1
+
+
class TronRawContractType(IntEnum):
TransferContract = 1
TriggerSmartContract = 31
+ FreezeBalanceV2Contract = 54
class MessageType(IntEnum):
@@ -696,6 +702,7 @@ class MessageType(IntEnum):
TronContractRequest = 2204
TronTransferContract = 2205
TronTriggerSmartContract = 2206
+ TronFreezeBalanceV2Contract = 2207
BenchmarkListNames = 9100
BenchmarkNames = 9101
BenchmarkRun = 9102
@@ -8726,6 +8733,26 @@ class TronTriggerSmartContract(protobuf.MessageType):
self.data = data
+class TronFreezeBalanceV2Contract(protobuf.MessageType):
+ MESSAGE_WIRE_TYPE = 2207
+ FIELDS = {
+ 1: protobuf.Field("owner_address", "bytes", repeated=False, required=True),
+ 2: protobuf.Field("frozen_balance", "uint64", repeated=False, required=True),
+ 3: protobuf.Field("resource", "TronResourceCode", repeated=False, required=False, default=TronResourceCode.BANDWIDTH),
+ }
+
+ def __init__(
+ self,
+ *,
+ owner_address: "bytes",
+ frozen_balance: "int",
+ resource: Optional["TronResourceCode"] = TronResourceCode.BANDWIDTH,
+ ) -> None:
+ self.owner_address = owner_address
+ self.frozen_balance = frozen_balance
+ self.resource = resource
+
+
class TronSignature(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 2203
FIELDS = {
diff --git a/rust/trezor-client/src/messages/generated.rs b/rust/trezor-client/src/messages/generated.rs
index 9a7020c0..ef0e9447 100644
--- a/rust/trezor-client/src/messages/generated.rs
+++ b/rust/trezor-client/src/messages/generated.rs
@@ -319,6 +319,7 @@ trezor_message_impl! {
TronContractRequest => MessageType_TronContractRequest,
TronTransferContract => MessageType_TronTransferContract,
TronTriggerSmartContract => MessageType_TronTriggerSmartContract,
+ TronFreezeBalanceV2Contract => MessageType_TronFreezeBalanceV2Contract,
}
#[cfg(feature = "webauthn")]
diff --git a/rust/trezor-client/src/protos/generated/messages.rs b/rust/trezor-client/src/protos/generated/messages.rs
index 72a7d6bf..fed2fa8d 100644
--- a/rust/trezor-client/src/protos/generated/messages.rs
+++ b/rust/trezor-client/src/protos/generated/messages.rs
@@ -559,6 +559,8 @@ pub enum MessageType {
MessageType_TronTransferContract = 2205,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_TronTriggerSmartContract)
MessageType_TronTriggerSmartContract = 2206,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_TronFreezeBalanceV2Contract)
+ MessageType_TronFreezeBalanceV2Contract = 2207,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BenchmarkListNames)
MessageType_BenchmarkListNames = 9100,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BenchmarkNames)
@@ -848,6 +850,7 @@ impl ::protobuf::Enum for MessageType {
2204 => ::std::option::Option::Some(MessageType::MessageType_TronContractRequest),
2205 => ::std::option::Option::Some(MessageType::MessageType_TronTransferContract),
2206 => ::std::option::Option::Some(MessageType::MessageType_TronTriggerSmartContract),
+ 2207 => ::std::option::Option::Some(MessageType::MessageType_TronFreezeBalanceV2Contract),
9100 => ::std::option::Option::Some(MessageType::MessageType_BenchmarkListNames),
9101 => ::std::option::Option::Some(MessageType::MessageType_BenchmarkNames),
9102 => ::std::option::Option::Some(MessageType::MessageType_BenchmarkRun),
@@ -1126,6 +1129,7 @@ impl ::protobuf::Enum for MessageType {
"MessageType_TronContractRequest" => ::std::option::Option::Some(MessageType::MessageType_TronContractRequest),
"MessageType_TronTransferContract" => ::std::option::Option::Some(MessageType::MessageType_TronTransferContract),
"MessageType_TronTriggerSmartContract" => ::std::option::Option::Some(MessageType::MessageType_TronTriggerSmartContract),
+ "MessageType_TronFreezeBalanceV2Contract" => ::std::option::Option::Some(MessageType::MessageType_TronFreezeBalanceV2Contract),
"MessageType_BenchmarkListNames" => ::std::option::Option::Some(MessageType::MessageType_BenchmarkListNames),
"MessageType_BenchmarkNames" => ::std::option::Option::Some(MessageType::MessageType_BenchmarkNames),
"MessageType_BenchmarkRun" => ::std::option::Option::Some(MessageType::MessageType_BenchmarkRun),
@@ -1403,6 +1407,7 @@ impl ::protobuf::Enum for MessageType {
MessageType::MessageType_TronContractRequest,
MessageType::MessageType_TronTransferContract,
MessageType::MessageType_TronTriggerSmartContract,
+ MessageType::MessageType_TronFreezeBalanceV2Contract,
MessageType::MessageType_BenchmarkListNames,
MessageType::MessageType_BenchmarkNames,
MessageType::MessageType_BenchmarkRun,
@@ -1686,12 +1691,13 @@ impl ::protobuf::EnumFull for MessageType {
MessageType::MessageType_TronContractRequest => 263,
MessageType::MessageType_TronTransferContract => 264,
MessageType::MessageType_TronTriggerSmartContract => 265,
- MessageType::MessageType_BenchmarkListNames => 266,
- MessageType::MessageType_BenchmarkNames => 267,
- MessageType::MessageType_BenchmarkRun => 268,
- MessageType::MessageType_BenchmarkResult => 269,
- MessageType::MessageType_TelemetryGet => 270,
- MessageType::MessageType_Telemetry => 271,
+ MessageType::MessageType_TronFreezeBalanceV2Contract => 266,
+ MessageType::MessageType_BenchmarkListNames => 267,
+ MessageType::MessageType_BenchmarkNames => 268,
+ MessageType::MessageType_BenchmarkRun => 269,
+ MessageType::MessageType_BenchmarkResult => 270,
+ MessageType::MessageType_TelemetryGet => 271,
+ MessageType::MessageType_Telemetry => 272,
};
Self::enum_descriptor().value_by_index(index)
}
@@ -1710,7 +1716,7 @@ impl MessageType {
}
static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xfb^\
+ \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xaf_\
\n\x0bMessageType\x12(\n\x16MessageType_Initialize\x10\0\x1a\x0c\x80\xa6\
\x1d\x01\xb0\xb5\x18\x01\x90\xb5\x18\x01\x12\x1e\n\x10MessageType_Ping\
\x10\x01\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12%\n\x13MessageType_S\
@@ -2015,18 +2021,20 @@ static file_descriptor_proto_data: &'static [u8] = b"\
_TronContractRequest\x10\x9c\x11\x1a\x04\x98\xb5\x18\x01\x12+\n\x20Messa\
geType_TronTransferContract\x10\x9d\x11\x1a\x04\x90\xb5\x18\x01\x12/\n$M\
essageType_TronTriggerSmartContract\x10\x9e\x11\x1a\x04\x90\xb5\x18\x01\
- \x12)\n\x1eMessageType_BenchmarkListNames\x10\x8cG\x1a\x04\x80\xa6\x1d\
- \x01\x12%\n\x1aMessageType_BenchmarkNames\x10\x8dG\x1a\x04\x80\xa6\x1d\
- \x01\x12#\n\x18MessageType_BenchmarkRun\x10\x8eG\x1a\x04\x80\xa6\x1d\x01\
- \x12&\n\x1bMessageType_BenchmarkResult\x10\x8fG\x1a\x04\x80\xa6\x1d\x01\
- \x12'\n\x18MessageType_TelemetryGet\x10\xcc\x08\x1a\x08\x80\xa6\x1d\x01\
- \x90\xb5\x18\x01\x12$\n\x15MessageType_Telemetry\x10\xcd\x08\x1a\x08\x80\
- \xa6\x1d\x01\x98\xb5\x18\x01\x1a\x08\xc8\xf3\x18\x01\xd0\xf3\x18\x01\"\
- \x04\x08Z\x10\\\"\x04\x08G\x10J\"\x04\x08r\x10z\"\x05\x08{\x10\x95\x01\"\
- \x06\x08\xdb\x01\x10\xdb\x01\"\x06\x08\xe0\x01\x10\xe0\x01\"\x06\x08\xac\
- \x02\x10\xb0\x02\"\x06\x08\xb5\x02\x10\xb8\x02\"\x06\x08\xbc\x05\x10\xc5\
- \x05\"\x06\x08\xe9\x07\x10\xf7\x07\"\x06\x08\xfa\x07\x10\xcb\x08B8\n#com\
- .satoshilabs.trezor.lib.protobufB\rTrezorMessage\x80\xa6\x1d\x01\
+ \x122\n'MessageType_TronFreezeBalanceV2Contract\x10\x9f\x11\x1a\x04\x90\
+ \xb5\x18\x01\x12)\n\x1eMessageType_BenchmarkListNames\x10\x8cG\x1a\x04\
+ \x80\xa6\x1d\x01\x12%\n\x1aMessageType_BenchmarkNames\x10\x8dG\x1a\x04\
+ \x80\xa6\x1d\x01\x12#\n\x18MessageType_BenchmarkRun\x10\x8eG\x1a\x04\x80\
+ \xa6\x1d\x01\x12&\n\x1bMessageType_BenchmarkResult\x10\x8fG\x1a\x04\x80\
+ \xa6\x1d\x01\x12'\n\x18MessageType_TelemetryGet\x10\xcc\x08\x1a\x08\x80\
+ \xa6\x1d\x01\x90\xb5\x18\x01\x12$\n\x15MessageType_Telemetry\x10\xcd\x08\
+ \x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x1a\x08\xc8\xf3\x18\x01\xd0\xf3\
+ \x18\x01\"\x04\x08Z\x10\\\"\x04\x08G\x10J\"\x04\x08r\x10z\"\x05\x08{\x10\
+ \x95\x01\"\x06\x08\xdb\x01\x10\xdb\x01\"\x06\x08\xe0\x01\x10\xe0\x01\"\
+ \x06\x08\xac\x02\x10\xb0\x02\"\x06\x08\xb5\x02\x10\xb8\x02\"\x06\x08\xbc\
+ \x05\x10\xc5\x05\"\x06\x08\xe9\x07\x10\xf7\x07\"\x06\x08\xfa\x07\x10\xcb\
+ \x08B8\n#com.satoshilabs.trezor.lib.protobufB\rTrezorMessage\x80\xa6\x1d\
+ \x01\
";
/// `FileDescriptorProto` object which was a source for this generated file
diff --git a/rust/trezor-client/src/protos/generated/messages_tron.rs b/rust/trezor-client/src/protos/generated/messages_tron.rs
index 9aa286e6..d95b4817 100644
--- a/rust/trezor-client/src/protos/generated/messages_tron.rs
+++ b/rust/trezor-client/src/protos/generated/messages_tron.rs
@@ -1484,6 +1484,312 @@ impl ::protobuf::reflect::ProtobufValue for TronTriggerSmartContract {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
+// @@protoc_insertion_point(message:hw.trezor.messages.tron.TronFreezeBalanceV2Contract)
+#[derive(PartialEq,Clone,Default,Debug)]
+pub struct TronFreezeBalanceV2Contract {
+ // message fields
+ // @@protoc_insertion_point(field:hw.trezor.messages.tron.TronFreezeBalanceV2Contract.owner_address)
+ pub owner_address: ::std::option::Option<::std::vec::Vec<u8>>,
+ // @@protoc_insertion_point(field:hw.trezor.messages.tron.TronFreezeBalanceV2Contract.frozen_balance)
+ pub frozen_balance: ::std::option::Option<u64>,
+ // @@protoc_insertion_point(field:hw.trezor.messages.tron.TronFreezeBalanceV2Contract.resource)
+ pub resource: ::std::option::Option<::protobuf::EnumOrUnknown<tron_freeze_balance_v2contract::TronResourceCode>>,
+ // special fields
+ // @@protoc_insertion_point(special_field:hw.trezor.messages.tron.TronFreezeBalanceV2Contract.special_fields)
+ pub special_fields: ::protobuf::SpecialFields,
+}
+
+impl<'a> ::std::default::Default for &'a TronFreezeBalanceV2Contract {
+ fn default() -> &'a TronFreezeBalanceV2Contract {
+ <TronFreezeBalanceV2Contract as ::protobuf::Message>::default_instance()
+ }
+}
+
+impl TronFreezeBalanceV2Contract {
+ pub fn new() -> TronFreezeBalanceV2Contract {
+ ::std::default::Default::default()
+ }
+
+ // required bytes owner_address = 1;
+
+ pub fn owner_address(&self) -> &[u8] {
+ match self.owner_address.as_ref() {
+ Some(v) => v,
+ None => &[],
+ }
+ }
+
+ pub fn clear_owner_address(&mut self) {
+ self.owner_address = ::std::option::Option::None;
+ }
+
+ pub fn has_owner_address(&self) -> bool {
+ self.owner_address.is_some()
+ }
+
+ // Param is passed by value, moved
+ pub fn set_owner_address(&mut self, v: ::std::vec::Vec<u8>) {
+ self.owner_address = ::std::option::Option::Some(v);
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_owner_address(&mut self) -> &mut ::std::vec::Vec<u8> {
+ if self.owner_address.is_none() {
+ self.owner_address = ::std::option::Option::Some(::std::vec::Vec::new());
+ }
+ self.owner_address.as_mut().unwrap()
+ }
+
+ // Take field
+ pub fn take_owner_address(&mut self) -> ::std::vec::Vec<u8> {
+ self.owner_address.take().unwrap_or_else(|| ::std::vec::Vec::new())
+ }
+
+ // required uint64 frozen_balance = 2;
+
+ pub fn frozen_balance(&self) -> u64 {
+ self.frozen_balance.unwrap_or(0)
+ }
+
+ pub fn clear_frozen_balance(&mut self) {
+ self.frozen_balance = ::std::option::Option::None;
+ }
+
+ pub fn has_frozen_balance(&self) -> bool {
+ self.frozen_balance.is_some()
+ }
+
+ // Param is passed by value, moved
+ pub fn set_frozen_balance(&mut self, v: u64) {
+ self.frozen_balance = ::std::option::Option::Some(v);
+ }
+
+ // optional .hw.trezor.messages.tron.TronFreezeBalanceV2Contract.TronResourceCode resource = 3;
+
+ pub fn resource(&self) -> tron_freeze_balance_v2contract::TronResourceCode {
+ match self.resource {
+ Some(e) => e.enum_value_or(tron_freeze_balance_v2contract::TronResourceCode::BANDWIDTH),
+ None => tron_freeze_balance_v2contract::TronResourceCode::BANDWIDTH,
+ }
+ }
+
+ pub fn clear_resource(&mut self) {
+ self.resource = ::std::option::Option::None;
+ }
+
+ pub fn has_resource(&self) -> bool {
+ self.resource.is_some()
+ }
+
+ // Param is passed by value, moved
+ pub fn set_resource(&mut self, v: tron_freeze_balance_v2contract::TronResourceCode) {
+ self.resource = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
+ }
+
+ fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
+ let mut fields = ::std::vec::Vec::with_capacity(3);
+ let mut oneofs = ::std::vec::Vec::with_capacity(0);
+ fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
+ "owner_address",
+ |m: &TronFreezeBalanceV2Contract| { &m.owner_address },
+ |m: &mut TronFreezeBalanceV2Contract| { &mut m.owner_address },
+ ));
+ fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
+ "frozen_balance",
+ |m: &TronFreezeBalanceV2Contract| { &m.frozen_balance },
+ |m: &mut TronFreezeBalanceV2Contract| { &mut m.frozen_balance },
+ ));
+ fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
+ "resource",
+ |m: &TronFreezeBalanceV2Contract| { &m.resource },
+ |m: &mut TronFreezeBalanceV2Contract| { &mut m.resource },
+ ));
+ ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TronFreezeBalanceV2Contract>(
+ "TronFreezeBalanceV2Contract",
+ fields,
+ oneofs,
+ )
+ }
+}
+
+impl ::protobuf::Message for TronFreezeBalanceV2Contract {
+ const NAME: &'static str = "TronFreezeBalanceV2Contract";
+
+ fn is_initialized(&self) -> bool {
+ if self.owner_address.is_none() {
+ return false;
+ }
+ if self.frozen_balance.is_none() {
+ return false;
+ }
+ true
+ }
+
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
+ while let Some(tag) = is.read_raw_tag_or_eof()? {
+ match tag {
+ 10 => {
+ self.owner_address = ::std::option::Option::Some(is.read_bytes()?);
+ },
+ 16 => {
+ self.frozen_balance = ::std::option::Option::Some(is.read_uint64()?);
+ },
+ 24 => {
+ self.resource = ::std::option::Option::Some(is.read_enum_or_unknown()?);
+ },
+ tag => {
+ ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
+ },
+ };
+ }
+ ::std::result::Result::Ok(())
+ }
+
+ // Compute sizes of nested messages
+ #[allow(unused_variables)]
+ fn compute_size(&self) -> u64 {
+ let mut my_size = 0;
+ if let Some(v) = self.owner_address.as_ref() {
+ my_size += ::protobuf::rt::bytes_size(1, &v);
+ }
+ if let Some(v) = self.frozen_balance {
+ my_size += ::protobuf::rt::uint64_size(2, v);
+ }
+ if let Some(v) = self.resource {
+ my_size += ::protobuf::rt::int32_size(3, v.value());
+ }
+ my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
+ self.special_fields.cached_size().set(my_size as u32);
+ my_size
+ }
+
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
+ if let Some(v) = self.owner_address.as_ref() {
+ os.write_bytes(1, v)?;
+ }
+ if let Some(v) = self.frozen_balance {
+ os.write_uint64(2, v)?;
+ }
+ if let Some(v) = self.resource {
+ os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?;
+ }
+ os.write_unknown_fields(self.special_fields.unknown_fields())?;
+ ::std::result::Result::Ok(())
+ }
+
+ fn special_fields(&self) -> &::protobuf::SpecialFields {
+ &self.special_fields
+ }
+
+ fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
+ &mut self.special_fields
+ }
+
+ fn new() -> TronFreezeBalanceV2Contract {
+ TronFreezeBalanceV2Contract::new()
+ }
+
+ fn clear(&mut self) {
+ self.owner_address = ::std::option::Option::None;
+ self.frozen_balance = ::std::option::Option::None;
+ self.resource = ::std::option::Option::None;
+ self.special_fields.clear();
+ }
+
+ fn default_instance() -> &'static TronFreezeBalanceV2Contract {
+ static instance: TronFreezeBalanceV2Contract = TronFreezeBalanceV2Contract {
+ owner_address: ::std::option::Option::None,
+ frozen_balance: ::std::option::Option::None,
+ resource: ::std::option::Option::None,
+ special_fields: ::protobuf::SpecialFields::new(),
+ };
+ &instance
+ }
+}
+
+impl ::protobuf::MessageFull for TronFreezeBalanceV2Contract {
+ fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
+ static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
+ descriptor.get(|| file_descriptor().message_by_package_relative_name("TronFreezeBalanceV2Contract").unwrap()).clone()
+ }
+}
+
+impl ::std::fmt::Display for TronFreezeBalanceV2Contract {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+ ::protobuf::text_format::fmt(self, f)
+ }
+}
+
+impl ::protobuf::reflect::ProtobufValue for TronFreezeBalanceV2Contract {
+ type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
+}
+
+/// Nested message and enums of message `TronFreezeBalanceV2Contract`
+pub mod tron_freeze_balance_v2contract {
+ #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
+ // @@protoc_insertion_point(enum:hw.trezor.messages.tron.TronFreezeBalanceV2Contract.TronResourceCode)
+ pub enum TronResourceCode {
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.tron.TronFreezeBalanceV2Contract.TronResourceCode.BANDWIDTH)
+ BANDWIDTH = 0,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.tron.TronFreezeBalanceV2Contract.TronResourceCode.ENERGY)
+ ENERGY = 1,
+ }
+
+ impl ::protobuf::Enum for TronResourceCode {
+ const NAME: &'static str = "TronResourceCode";
+
+ fn value(&self) -> i32 {
+ *self as i32
+ }
+
+ fn from_i32(value: i32) -> ::std::option::Option<TronResourceCode> {
+ match value {
+ 0 => ::std::option::Option::Some(TronResourceCode::BANDWIDTH),
+ 1 => ::std::option::Option::Some(TronResourceCode::ENERGY),
+ _ => ::std::option::Option::None
+ }
+ }
+
+ fn from_str(str: &str) -> ::std::option::Option<TronResourceCode> {
+ match str {
+ "BANDWIDTH" => ::std::option::Option::Some(TronResourceCode::BANDWIDTH),
+ "ENERGY" => ::std::option::Option::Some(TronResourceCode::ENERGY),
+ _ => ::std::option::Option::None
+ }
+ }
+
+ const VALUES: &'static [TronResourceCode] = &[
+ TronResourceCode::BANDWIDTH,
+ TronResourceCode::ENERGY,
+ ];
+ }
+
+ impl ::protobuf::EnumFull for TronResourceCode {
+ fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
+ static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
+ descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("TronFreezeBalanceV2Contract.TronResourceCode").unwrap()).clone()
+ }
+
+ fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
+ let index = *self as usize;
+ Self::enum_descriptor().value_by_index(index)
+ }
+ }
+
+ impl ::std::default::Default for TronResourceCode {
+ fn default() -> Self {
+ TronResourceCode::BANDWIDTH
+ }
+ }
+
+ impl TronResourceCode {
+ pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
+ ::protobuf::reflect::GeneratedEnumDescriptorData::new::<TronResourceCode>("TronFreezeBalanceV2Contract.TronResourceCode")
+ }
+ }
+}
+
// @@protoc_insertion_point(message:hw.trezor.messages.tron.TronSignature)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TronSignature {
@@ -2461,6 +2767,8 @@ pub mod tron_raw_transaction {
TransferContract = 1,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.tron.TronRawTransaction.TronRawContract.TronRawContractType.TriggerSmartContract)
TriggerSmartContract = 31,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.tron.TronRawTransaction.TronRawContract.TronRawContractType.FreezeBalanceV2Contract)
+ FreezeBalanceV2Contract = 54,
}
impl ::protobuf::Enum for TronRawContractType {
@@ -2474,6 +2782,7 @@ pub mod tron_raw_transaction {
match value {
1 => ::std::option::Option::Some(TronRawContractType::TransferContract),
31 => ::std::option::Option::Some(TronRawContractType::TriggerSmartContract),
+ 54 => ::std::option::Option::Some(TronRawContractType::FreezeBalanceV2Contract),
_ => ::std::option::Option::None
}
}
@@ -2482,6 +2791,7 @@ pub mod tron_raw_transaction {
match str {
"TransferContract" => ::std::option::Option::Some(TronRawContractType::TransferContract),
"TriggerSmartContract" => ::std::option::Option::Some(TronRawContractType::TriggerSmartContract),
+ "FreezeBalanceV2Contract" => ::std::option::Option::Some(TronRawContractType::FreezeBalanceV2Contract),
_ => ::std::option::Option::None
}
}
@@ -2489,6 +2799,7 @@ pub mod tron_raw_transaction {
const VALUES: &'static [TronRawContractType] = &[
TronRawContractType::TransferContract,
TronRawContractType::TriggerSmartContract,
+ TronRawContractType::FreezeBalanceV2Contract,
];
}
@@ -2502,6 +2813,7 @@ pub mod tron_raw_transaction {
let index = match self {
TronRawContractType::TransferContract => 0,
TronRawContractType::TriggerSmartContract => 1,
+ TronRawContractType::FreezeBalanceV2Contract => 2,
};
Self::enum_descriptor().value_by_index(index)
}
@@ -2540,23 +2852,29 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x06amount\"~\n\x18TronTriggerSmartContract\x12#\n\rowner_address\x18\
\x01\x20\x02(\x0cR\x0cownerAddress\x12)\n\x10contract_address\x18\x02\
\x20\x02(\x0cR\x0fcontractAddress\x12\x12\n\x04data\x18\x04\x20\x02(\x0c\
- R\x04data\"-\n\rTronSignature\x12\x1c\n\tsignature\x18\x01\x20\x02(\x0cR\
- \tsignature\"\x9b\x05\n\x12TronRawTransaction\x12&\n\x0fref_block_bytes\
- \x18\x01\x20\x02(\x0cR\rrefBlockBytes\x12$\n\x0eref_block_hash\x18\x04\
- \x20\x02(\x0cR\x0crefBlockHash\x12\x1e\n\nexpiration\x18\x08\x20\x02(\
- \x04R\nexpiration\x12\x12\n\x04data\x18\n\x20\x01(\x0cR\x04data\x12W\n\
- \x08contract\x18\x0b\x20\x03(\x0b2;.hw.trezor.messages.tron.TronRawTrans\
- action.TronRawContractR\x08contract\x12\x1c\n\ttimestamp\x18\x0e\x20\x02\
- (\x04R\ttimestamp\x12\x1b\n\tfee_limit\x18\x12\x20\x01(\x04R\x08feeLimit\
- \x1a\xee\x02\n\x0fTronRawContract\x12c\n\x04type\x18\x01\x20\x02(\x0e2O.\
- hw.trezor.messages.tron.TronRawTransaction.TronRawContract.TronRawContra\
- ctTypeR\x04type\x12j\n\tparameter\x18\x02\x20\x02(\x0b2L.hw.trezor.messa\
- ges.tron.TronRawTransaction.TronRawContract.TronRawParameterR\tparameter\
- \x1aC\n\x10TronRawParameter\x12\x19\n\x08type_url\x18\x01\x20\x02(\tR\
- \x07typeUrl\x12\x14\n\x05value\x18\x02\x20\x02(\x0cR\x05value\"E\n\x13Tr\
- onRawContractType\x12\x14\n\x10TransferContract\x10\x01\x12\x18\n\x14Tri\
- ggerSmartContract\x10\x1fB8\n#com.satoshilabs.trezor.lib.protobufB\x11Tr\
- ezorMessageTron\
+ R\x04data\"\x86\x02\n\x1bTronFreezeBalanceV2Contract\x12#\n\rowner_addre\
+ ss\x18\x01\x20\x02(\x0cR\x0cownerAddress\x12%\n\x0efrozen_balance\x18\
+ \x02\x20\x02(\x04R\rfrozenBalance\x12l\n\x08resource\x18\x03\x20\x01(\
+ \x0e2E.hw.trezor.messages.tron.TronFreezeBalanceV2Contract.TronResourceC\
+ ode:\tBANDWIDTHR\x08resource\"-\n\x10TronResourceCode\x12\r\n\tBANDWIDTH\
+ \x10\0\x12\n\n\x06ENERGY\x10\x01\"-\n\rTronSignature\x12\x1c\n\tsignatur\
+ e\x18\x01\x20\x02(\x0cR\tsignature\"\xb8\x05\n\x12TronRawTransaction\x12\
+ &\n\x0fref_block_bytes\x18\x01\x20\x02(\x0cR\rrefBlockBytes\x12$\n\x0ere\
+ f_block_hash\x18\x04\x20\x02(\x0cR\x0crefBlockHash\x12\x1e\n\nexpiration\
+ \x18\x08\x20\x02(\x04R\nexpiration\x12\x12\n\x04data\x18\n\x20\x01(\x0cR\
+ \x04data\x12W\n\x08contract\x18\x0b\x20\x03(\x0b2;.hw.trezor.messages.tr\
+ on.TronRawTransaction.TronRawContractR\x08contract\x12\x1c\n\ttimestamp\
+ \x18\x0e\x20\x02(\x04R\ttimestamp\x12\x1b\n\tfee_limit\x18\x12\x20\x01(\
+ \x04R\x08feeLimit\x1a\x8b\x03\n\x0fTronRawContract\x12c\n\x04type\x18\
+ \x01\x20\x02(\x0e2O.hw.trezor.messages.tron.TronRawTransaction.TronRawCo\
+ ntract.TronRawContractTypeR\x04type\x12j\n\tparameter\x18\x02\x20\x02(\
+ \x0b2L.hw.trezor.messages.tron.TronRawTransaction.TronRawContract.TronRa\
+ wParameterR\tparameter\x1aC\n\x10TronRawParameter\x12\x19\n\x08type_url\
+ \x18\x01\x20\x02(\tR\x07typeUrl\x12\x14\n\x05value\x18\x02\x20\x02(\x0cR\
+ \x05value\"b\n\x13TronRawContractType\x12\x14\n\x10TransferContract\x10\
+ \x01\x12\x18\n\x14TriggerSmartContract\x10\x1f\x12\x1b\n\x17FreezeBalanc\
+ eV2Contract\x106B8\n#com.satoshilabs.trezor.lib.protobufB\x11TrezorMessa\
+ geTron\
";
/// `FileDescriptorProto` object which was a source for this generated file
@@ -2574,18 +2892,20 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
file_descriptor.get(|| {
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
let mut deps = ::std::vec::Vec::with_capacity(0);
- let mut messages = ::std::vec::Vec::with_capacity(10);
+ let mut messages = ::std::vec::Vec::with_capacity(11);
messages.push(TronGetAddress::generated_message_descriptor_data());
messages.push(TronAddress::generated_message_descriptor_data());
messages.push(TronSignTx::generated_message_descriptor_data());
messages.push(TronContractRequest::generated_message_descriptor_data());
messages.push(TronTransferContract::generated_message_descriptor_data());
messages.push(TronTriggerSmartContract::generated_message_descriptor_data());
+ messages.push(TronFreezeBalanceV2Contract::generated_message_descriptor_data());
messages.push(TronSignature::generated_message_descriptor_data());
messages.push(TronRawTransaction::generated_message_descriptor_data());
messages.push(tron_raw_transaction::TronRawContract::generated_message_descriptor_data());
messages.push(tron_raw_transaction::tron_raw_contract::TronRawParameter::generated_message_descriptor_data());
- let mut enums = ::std::vec::Vec::with_capacity(1);
+ let mut enums = ::std::vec::Vec::with_capacity(2);
+ enums.push(tron_freeze_balance_v2contract::TronResourceCode::generated_enum_descriptor_data());
enums.push(tron_raw_transaction::tron_raw_contract::TronRawContractType::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.