tronwb 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +201 -0
  3. package/dist/TronWeb.js +3 -0
  4. package/dist/TronWeb.js.LICENSE.txt +12 -0
  5. package/dist/TronWeb.js.map +1 -0
  6. package/dist/TronWeb.node.js +2 -0
  7. package/dist/TronWeb.node.js.map +1 -0
  8. package/kj9btptx.cjs +1 -0
  9. package/lib/commonjs/index.d.ts +64 -0
  10. package/lib/commonjs/index.js +37 -0
  11. package/lib/commonjs/index.js.map +1 -0
  12. package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.d.ts +127 -0
  13. package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.js +1771 -0
  14. package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.js.map +1 -0
  15. package/lib/commonjs/lib/TransactionBuilder/helper.d.ts +28 -0
  16. package/lib/commonjs/lib/TransactionBuilder/helper.js +122 -0
  17. package/lib/commonjs/lib/TransactionBuilder/helper.js.map +1 -0
  18. package/lib/commonjs/lib/contract/index.d.ts +29 -0
  19. package/lib/commonjs/lib/contract/index.js +124 -0
  20. package/lib/commonjs/lib/contract/index.js.map +1 -0
  21. package/lib/commonjs/lib/contract/method.d.ts +50 -0
  22. package/lib/commonjs/lib/contract/method.js +238 -0
  23. package/lib/commonjs/lib/contract/method.js.map +1 -0
  24. package/lib/commonjs/lib/event.d.ts +85 -0
  25. package/lib/commonjs/lib/event.js +137 -0
  26. package/lib/commonjs/lib/event.js.map +1 -0
  27. package/lib/commonjs/lib/plugin.d.ts +28 -0
  28. package/lib/commonjs/lib/plugin.js +84 -0
  29. package/lib/commonjs/lib/plugin.js.map +1 -0
  30. package/lib/commonjs/lib/providers/HttpProvider.d.ts +15 -0
  31. package/lib/commonjs/lib/providers/HttpProvider.js +63 -0
  32. package/lib/commonjs/lib/providers/HttpProvider.js.map +1 -0
  33. package/lib/commonjs/lib/providers/index.d.ts +6 -0
  34. package/lib/commonjs/lib/providers/index.js +8 -0
  35. package/lib/commonjs/lib/providers/index.js.map +1 -0
  36. package/lib/commonjs/lib/trx.d.ts +315 -0
  37. package/lib/commonjs/lib/trx.js +965 -0
  38. package/lib/commonjs/lib/trx.js.map +1 -0
  39. package/lib/commonjs/package.json +1 -0
  40. package/lib/commonjs/paramValidator/index.d.ts +19 -0
  41. package/lib/commonjs/paramValidator/index.js +110 -0
  42. package/lib/commonjs/paramValidator/index.js.map +1 -0
  43. package/lib/commonjs/protocol/core/Tron_pb.cjs +7524 -0
  44. package/lib/commonjs/protocol/core/contract/account_contract_pb.cjs +961 -0
  45. package/lib/commonjs/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
  46. package/lib/commonjs/protocol/core/contract/balance_contract_pb.cjs +3826 -0
  47. package/lib/commonjs/protocol/core/contract/common_pb.cjs +34 -0
  48. package/lib/commonjs/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
  49. package/lib/commonjs/protocol/core/contract/proposal_contract_pb.cjs +675 -0
  50. package/lib/commonjs/protocol/core/contract/smart_contract_pb.cjs +2960 -0
  51. package/lib/commonjs/protocol/core/contract/storage_contract_pb.cjs +848 -0
  52. package/lib/commonjs/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
  53. package/lib/commonjs/protocol/core/contract/witness_contract_pb.cjs +956 -0
  54. package/lib/commonjs/tronweb.d.ts +111 -0
  55. package/lib/commonjs/tronweb.js +365 -0
  56. package/lib/commonjs/tronweb.js.map +1 -0
  57. package/lib/commonjs/types/ABI.d.ts +59 -0
  58. package/lib/commonjs/types/ABI.js +3 -0
  59. package/lib/commonjs/types/ABI.js.map +1 -0
  60. package/lib/commonjs/types/APIResponse.d.ts +31 -0
  61. package/lib/commonjs/types/APIResponse.js +3 -0
  62. package/lib/commonjs/types/APIResponse.js.map +1 -0
  63. package/lib/commonjs/types/Contract.d.ts +287 -0
  64. package/lib/commonjs/types/Contract.js +63 -0
  65. package/lib/commonjs/types/Contract.js.map +1 -0
  66. package/lib/commonjs/types/Providers.d.ts +8 -0
  67. package/lib/commonjs/types/Providers.js +3 -0
  68. package/lib/commonjs/types/Providers.js.map +1 -0
  69. package/lib/commonjs/types/Transaction.d.ts +65 -0
  70. package/lib/commonjs/types/Transaction.js +3 -0
  71. package/lib/commonjs/types/Transaction.js.map +1 -0
  72. package/lib/commonjs/types/TransactionBuilder.d.ts +270 -0
  73. package/lib/commonjs/types/TransactionBuilder.js +3 -0
  74. package/lib/commonjs/types/TransactionBuilder.js.map +1 -0
  75. package/lib/commonjs/types/TronWeb.d.ts +20 -0
  76. package/lib/commonjs/types/TronWeb.js +3 -0
  77. package/lib/commonjs/types/TronWeb.js.map +1 -0
  78. package/lib/commonjs/types/Trx.d.ts +263 -0
  79. package/lib/commonjs/types/Trx.js +42 -0
  80. package/lib/commonjs/types/Trx.js.map +1 -0
  81. package/lib/commonjs/types/UtilsTypes.d.ts +23 -0
  82. package/lib/commonjs/types/UtilsTypes.js +3 -0
  83. package/lib/commonjs/types/UtilsTypes.js.map +1 -0
  84. package/lib/commonjs/types/index.d.ts +9 -0
  85. package/lib/commonjs/types/index.js +13 -0
  86. package/lib/commonjs/types/index.js.map +1 -0
  87. package/lib/commonjs/utils/abi.d.ts +5 -0
  88. package/lib/commonjs/utils/abi.js +251 -0
  89. package/lib/commonjs/utils/abi.js.map +1 -0
  90. package/lib/commonjs/utils/accounts.d.ts +22 -0
  91. package/lib/commonjs/utils/accounts.js +51 -0
  92. package/lib/commonjs/utils/accounts.js.map +1 -0
  93. package/lib/commonjs/utils/address.d.ts +12 -0
  94. package/lib/commonjs/utils/address.js +91 -0
  95. package/lib/commonjs/utils/address.js.map +1 -0
  96. package/lib/commonjs/utils/base58.d.ts +3 -0
  97. package/lib/commonjs/utils/base58.js +68 -0
  98. package/lib/commonjs/utils/base58.js.map +1 -0
  99. package/lib/commonjs/utils/base64.d.ts +10 -0
  100. package/lib/commonjs/utils/base64.js +173 -0
  101. package/lib/commonjs/utils/base64.js.map +1 -0
  102. package/lib/commonjs/utils/bytes.d.ts +7 -0
  103. package/lib/commonjs/utils/bytes.js +61 -0
  104. package/lib/commonjs/utils/bytes.js.map +1 -0
  105. package/lib/commonjs/utils/code.d.ts +12 -0
  106. package/lib/commonjs/utils/code.js +166 -0
  107. package/lib/commonjs/utils/code.js.map +1 -0
  108. package/lib/commonjs/utils/crypto.d.ts +25 -0
  109. package/lib/commonjs/utils/crypto.js +222 -0
  110. package/lib/commonjs/utils/crypto.js.map +1 -0
  111. package/lib/commonjs/utils/ethersUtils.d.ts +14 -0
  112. package/lib/commonjs/utils/ethersUtils.js +39 -0
  113. package/lib/commonjs/utils/ethersUtils.js.map +1 -0
  114. package/lib/commonjs/utils/fragments.d.ts +465 -0
  115. package/lib/commonjs/utils/fragments.js +1342 -0
  116. package/lib/commonjs/utils/fragments.js.map +1 -0
  117. package/lib/commonjs/utils/help.d.ts +8 -0
  118. package/lib/commonjs/utils/help.js +61 -0
  119. package/lib/commonjs/utils/help.js.map +1 -0
  120. package/lib/commonjs/utils/index.d.ts +56 -0
  121. package/lib/commonjs/utils/index.js +43 -0
  122. package/lib/commonjs/utils/index.js.map +1 -0
  123. package/lib/commonjs/utils/interface.d.ts +381 -0
  124. package/lib/commonjs/utils/interface.js +1121 -0
  125. package/lib/commonjs/utils/interface.js.map +1 -0
  126. package/lib/commonjs/utils/message.d.ts +4 -0
  127. package/lib/commonjs/utils/message.js +38 -0
  128. package/lib/commonjs/utils/message.js.map +1 -0
  129. package/lib/commonjs/utils/transaction.d.ts +17 -0
  130. package/lib/commonjs/utils/transaction.js +678 -0
  131. package/lib/commonjs/utils/transaction.js.map +1 -0
  132. package/lib/commonjs/utils/typedData.d.ts +148 -0
  133. package/lib/commonjs/utils/typedData.js +498 -0
  134. package/lib/commonjs/utils/typedData.js.map +1 -0
  135. package/lib/commonjs/utils/validations.d.ts +22 -0
  136. package/lib/commonjs/utils/validations.js +128 -0
  137. package/lib/commonjs/utils/validations.js.map +1 -0
  138. package/lib/esm/index.d.ts +64 -0
  139. package/lib/esm/index.js +33 -0
  140. package/lib/esm/index.js.map +1 -0
  141. package/lib/esm/lib/TransactionBuilder/TransactionBuilder.d.ts +127 -0
  142. package/lib/esm/lib/TransactionBuilder/TransactionBuilder.js +1767 -0
  143. package/lib/esm/lib/TransactionBuilder/TransactionBuilder.js.map +1 -0
  144. package/lib/esm/lib/TransactionBuilder/helper.d.ts +28 -0
  145. package/lib/esm/lib/TransactionBuilder/helper.js +112 -0
  146. package/lib/esm/lib/TransactionBuilder/helper.js.map +1 -0
  147. package/lib/esm/lib/contract/index.d.ts +29 -0
  148. package/lib/esm/lib/contract/index.js +118 -0
  149. package/lib/esm/lib/contract/index.js.map +1 -0
  150. package/lib/esm/lib/contract/method.d.ts +50 -0
  151. package/lib/esm/lib/contract/method.js +233 -0
  152. package/lib/esm/lib/contract/method.js.map +1 -0
  153. package/lib/esm/lib/event.d.ts +85 -0
  154. package/lib/esm/lib/event.js +132 -0
  155. package/lib/esm/lib/event.js.map +1 -0
  156. package/lib/esm/lib/plugin.d.ts +28 -0
  157. package/lib/esm/lib/plugin.js +79 -0
  158. package/lib/esm/lib/plugin.js.map +1 -0
  159. package/lib/esm/lib/providers/HttpProvider.d.ts +15 -0
  160. package/lib/esm/lib/providers/HttpProvider.js +59 -0
  161. package/lib/esm/lib/providers/HttpProvider.js.map +1 -0
  162. package/lib/esm/lib/providers/index.d.ts +6 -0
  163. package/lib/esm/lib/providers/index.js +4 -0
  164. package/lib/esm/lib/providers/index.js.map +1 -0
  165. package/lib/esm/lib/trx.d.ts +315 -0
  166. package/lib/esm/lib/trx.js +960 -0
  167. package/lib/esm/lib/trx.js.map +1 -0
  168. package/lib/esm/package.json +1 -0
  169. package/lib/esm/paramValidator/index.d.ts +19 -0
  170. package/lib/esm/paramValidator/index.js +106 -0
  171. package/lib/esm/paramValidator/index.js.map +1 -0
  172. package/lib/esm/protocol/core/Tron_pb.cjs +7524 -0
  173. package/lib/esm/protocol/core/contract/account_contract_pb.cjs +961 -0
  174. package/lib/esm/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
  175. package/lib/esm/protocol/core/contract/balance_contract_pb.cjs +3826 -0
  176. package/lib/esm/protocol/core/contract/common_pb.cjs +34 -0
  177. package/lib/esm/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
  178. package/lib/esm/protocol/core/contract/proposal_contract_pb.cjs +675 -0
  179. package/lib/esm/protocol/core/contract/smart_contract_pb.cjs +2960 -0
  180. package/lib/esm/protocol/core/contract/storage_contract_pb.cjs +848 -0
  181. package/lib/esm/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
  182. package/lib/esm/protocol/core/contract/witness_contract_pb.cjs +956 -0
  183. package/lib/esm/tronweb.d.ts +111 -0
  184. package/lib/esm/tronweb.js +360 -0
  185. package/lib/esm/tronweb.js.map +1 -0
  186. package/lib/esm/types/ABI.d.ts +59 -0
  187. package/lib/esm/types/ABI.js +2 -0
  188. package/lib/esm/types/ABI.js.map +1 -0
  189. package/lib/esm/types/APIResponse.d.ts +31 -0
  190. package/lib/esm/types/APIResponse.js +2 -0
  191. package/lib/esm/types/APIResponse.js.map +1 -0
  192. package/lib/esm/types/Contract.d.ts +287 -0
  193. package/lib/esm/types/Contract.js +60 -0
  194. package/lib/esm/types/Contract.js.map +1 -0
  195. package/lib/esm/types/Providers.d.ts +8 -0
  196. package/lib/esm/types/Providers.js +2 -0
  197. package/lib/esm/types/Providers.js.map +1 -0
  198. package/lib/esm/types/Transaction.d.ts +65 -0
  199. package/lib/esm/types/Transaction.js +2 -0
  200. package/lib/esm/types/Transaction.js.map +1 -0
  201. package/lib/esm/types/TransactionBuilder.d.ts +270 -0
  202. package/lib/esm/types/TransactionBuilder.js +2 -0
  203. package/lib/esm/types/TransactionBuilder.js.map +1 -0
  204. package/lib/esm/types/TronWeb.d.ts +20 -0
  205. package/lib/esm/types/TronWeb.js +2 -0
  206. package/lib/esm/types/TronWeb.js.map +1 -0
  207. package/lib/esm/types/Trx.d.ts +263 -0
  208. package/lib/esm/types/Trx.js +39 -0
  209. package/lib/esm/types/Trx.js.map +1 -0
  210. package/lib/esm/types/UtilsTypes.d.ts +23 -0
  211. package/lib/esm/types/UtilsTypes.js +2 -0
  212. package/lib/esm/types/UtilsTypes.js.map +1 -0
  213. package/lib/esm/types/index.d.ts +9 -0
  214. package/lib/esm/types/index.js +10 -0
  215. package/lib/esm/types/index.js.map +1 -0
  216. package/lib/esm/utils/abi.d.ts +5 -0
  217. package/lib/esm/utils/abi.js +245 -0
  218. package/lib/esm/utils/abi.js.map +1 -0
  219. package/lib/esm/utils/accounts.d.ts +22 -0
  220. package/lib/esm/utils/accounts.js +46 -0
  221. package/lib/esm/utils/accounts.js.map +1 -0
  222. package/lib/esm/utils/address.d.ts +12 -0
  223. package/lib/esm/utils/address.js +82 -0
  224. package/lib/esm/utils/address.js.map +1 -0
  225. package/lib/esm/utils/base58.d.ts +3 -0
  226. package/lib/esm/utils/base58.js +64 -0
  227. package/lib/esm/utils/base58.js.map +1 -0
  228. package/lib/esm/utils/base64.d.ts +10 -0
  229. package/lib/esm/utils/base64.js +169 -0
  230. package/lib/esm/utils/base64.js.map +1 -0
  231. package/lib/esm/utils/bytes.d.ts +7 -0
  232. package/lib/esm/utils/bytes.js +53 -0
  233. package/lib/esm/utils/bytes.js.map +1 -0
  234. package/lib/esm/utils/code.d.ts +12 -0
  235. package/lib/esm/utils/code.js +149 -0
  236. package/lib/esm/utils/code.js.map +1 -0
  237. package/lib/esm/utils/crypto.d.ts +25 -0
  238. package/lib/esm/utils/crypto.js +198 -0
  239. package/lib/esm/utils/crypto.js.map +1 -0
  240. package/lib/esm/utils/ethersUtils.d.ts +14 -0
  241. package/lib/esm/utils/ethersUtils.js +17 -0
  242. package/lib/esm/utils/ethersUtils.js.map +1 -0
  243. package/lib/esm/utils/fragments.d.ts +465 -0
  244. package/lib/esm/utils/fragments.js +1330 -0
  245. package/lib/esm/utils/fragments.js.map +1 -0
  246. package/lib/esm/utils/help.d.ts +8 -0
  247. package/lib/esm/utils/help.js +51 -0
  248. package/lib/esm/utils/help.js.map +1 -0
  249. package/lib/esm/utils/index.d.ts +56 -0
  250. package/lib/esm/utils/index.js +40 -0
  251. package/lib/esm/utils/index.js.map +1 -0
  252. package/lib/esm/utils/interface.d.ts +381 -0
  253. package/lib/esm/utils/interface.js +1112 -0
  254. package/lib/esm/utils/interface.js.map +1 -0
  255. package/lib/esm/utils/message.d.ts +4 -0
  256. package/lib/esm/utils/message.js +32 -0
  257. package/lib/esm/utils/message.js.map +1 -0
  258. package/lib/esm/utils/transaction.d.ts +17 -0
  259. package/lib/esm/utils/transaction.js +669 -0
  260. package/lib/esm/utils/transaction.js.map +1 -0
  261. package/lib/esm/utils/typedData.d.ts +148 -0
  262. package/lib/esm/utils/typedData.js +493 -0
  263. package/lib/esm/utils/typedData.js.map +1 -0
  264. package/lib/esm/utils/validations.d.ts +22 -0
  265. package/lib/esm/utils/validations.js +108 -0
  266. package/lib/esm/utils/validations.js.map +1 -0
  267. package/package.json +110 -0
  268. package/src/index.ts +42 -0
  269. package/src/lib/TransactionBuilder/TransactionBuilder.ts +2272 -0
  270. package/src/lib/TransactionBuilder/helper.ts +139 -0
  271. package/src/lib/contract/index.ts +151 -0
  272. package/src/lib/contract/method.ts +336 -0
  273. package/src/lib/event.ts +248 -0
  274. package/src/lib/plugin.ts +102 -0
  275. package/src/lib/providers/HttpProvider.ts +66 -0
  276. package/src/lib/providers/index.ts +6 -0
  277. package/src/lib/trx.ts +1463 -0
  278. package/src/paramValidator/index.ts +136 -0
  279. package/src/protocol/core/Tron_pb.cjs +7524 -0
  280. package/src/protocol/core/contract/account_contract_pb.cjs +961 -0
  281. package/src/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
  282. package/src/protocol/core/contract/balance_contract_pb.cjs +3826 -0
  283. package/src/protocol/core/contract/common_pb.cjs +34 -0
  284. package/src/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
  285. package/src/protocol/core/contract/proposal_contract_pb.cjs +675 -0
  286. package/src/protocol/core/contract/smart_contract_pb.cjs +2960 -0
  287. package/src/protocol/core/contract/storage_contract_pb.cjs +848 -0
  288. package/src/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
  289. package/src/protocol/core/contract/witness_contract_pb.cjs +956 -0
  290. package/src/tronweb.ts +437 -0
  291. package/src/types/ABI.ts +82 -0
  292. package/src/types/APIResponse.ts +34 -0
  293. package/src/types/Contract.ts +352 -0
  294. package/src/types/Providers.ts +7 -0
  295. package/src/types/Transaction.ts +70 -0
  296. package/src/types/TransactionBuilder.ts +281 -0
  297. package/src/types/TronWeb.ts +23 -0
  298. package/src/types/Trx.ts +285 -0
  299. package/src/types/UtilsTypes.ts +25 -0
  300. package/src/types/index.ts +9 -0
  301. package/src/types/interface.d.ts +1 -0
  302. package/src/utils/abi.ts +257 -0
  303. package/src/utils/accounts.ts +60 -0
  304. package/src/utils/address.ts +89 -0
  305. package/src/utils/base58.ts +78 -0
  306. package/src/utils/base64.ts +200 -0
  307. package/src/utils/bytes.ts +68 -0
  308. package/src/utils/code.ts +172 -0
  309. package/src/utils/crypto.ts +264 -0
  310. package/src/utils/ethersUtils.ts +60 -0
  311. package/src/utils/fragments.ts +1738 -0
  312. package/src/utils/help.ts +59 -0
  313. package/src/utils/index.ts +42 -0
  314. package/src/utils/interface.ts +1362 -0
  315. package/src/utils/message.ts +38 -0
  316. package/src/utils/transaction.ts +991 -0
  317. package/src/utils/typedData.ts +688 -0
  318. package/src/utils/validations.ts +130 -0
@@ -0,0 +1,2960 @@
1
+ // source: core/contract/smart_contract.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('@tronweb3/google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ function () {
22
+ return this;
23
+ }.call(null) ||
24
+ Function('return this')();
25
+
26
+ var core_Tron_pb = require('../../core/Tron_pb.cjs');
27
+ goog.object.extend(proto, core_Tron_pb);
28
+ goog.exportSymbol('TronWebProto.ClearABIContract', null, global);
29
+ goog.exportSymbol('TronWebProto.ContractState', null, global);
30
+ goog.exportSymbol('TronWebProto.CreateSmartContract', null, global);
31
+ goog.exportSymbol('TronWebProto.SmartContract', null, global);
32
+ goog.exportSymbol('TronWebProto.SmartContract.ABI', null, global);
33
+ goog.exportSymbol('TronWebProto.SmartContract.ABI.Entry', null, global);
34
+ goog.exportSymbol('TronWebProto.SmartContract.ABI.Entry.EntryType', null, global);
35
+ goog.exportSymbol('TronWebProto.SmartContract.ABI.Entry.Param', null, global);
36
+ goog.exportSymbol('TronWebProto.SmartContract.ABI.Entry.StateMutabilityType', null, global);
37
+ goog.exportSymbol('TronWebProto.SmartContractDataWrapper', null, global);
38
+ goog.exportSymbol('TronWebProto.TriggerSmartContract', null, global);
39
+ goog.exportSymbol('TronWebProto.UpdateEnergyLimitContract', null, global);
40
+ goog.exportSymbol('TronWebProto.UpdateSettingContract', null, global);
41
+ /**
42
+ * Generated by JsPbCodeGenerator.
43
+ * @param {Array=} opt_data Optional initial data array, typically from a
44
+ * server response, or constructed directly in Javascript. The array is used
45
+ * in place and becomes part of the constructed object. It is not cloned.
46
+ * If no data is provided, the constructed object will be empty, but still
47
+ * valid.
48
+ * @extends {jspb.Message}
49
+ * @constructor
50
+ */
51
+ TronWebProto.SmartContract = function (opt_data) {
52
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
53
+ };
54
+ goog.inherits(TronWebProto.SmartContract, jspb.Message);
55
+ if (goog.DEBUG && !COMPILED) {
56
+ /**
57
+ * @public
58
+ * @override
59
+ */
60
+ TronWebProto.SmartContract.displayName = 'TronWebProto.SmartContract';
61
+ }
62
+ /**
63
+ * Generated by JsPbCodeGenerator.
64
+ * @param {Array=} opt_data Optional initial data array, typically from a
65
+ * server response, or constructed directly in Javascript. The array is used
66
+ * in place and becomes part of the constructed object. It is not cloned.
67
+ * If no data is provided, the constructed object will be empty, but still
68
+ * valid.
69
+ * @extends {jspb.Message}
70
+ * @constructor
71
+ */
72
+ TronWebProto.SmartContract.ABI = function (opt_data) {
73
+ jspb.Message.initialize(this, opt_data, 0, -1, TronWebProto.SmartContract.ABI.repeatedFields_, null);
74
+ };
75
+ goog.inherits(TronWebProto.SmartContract.ABI, jspb.Message);
76
+ if (goog.DEBUG && !COMPILED) {
77
+ /**
78
+ * @public
79
+ * @override
80
+ */
81
+ TronWebProto.SmartContract.ABI.displayName = 'TronWebProto.SmartContract.ABI';
82
+ }
83
+ /**
84
+ * Generated by JsPbCodeGenerator.
85
+ * @param {Array=} opt_data Optional initial data array, typically from a
86
+ * server response, or constructed directly in Javascript. The array is used
87
+ * in place and becomes part of the constructed object. It is not cloned.
88
+ * If no data is provided, the constructed object will be empty, but still
89
+ * valid.
90
+ * @extends {jspb.Message}
91
+ * @constructor
92
+ */
93
+ TronWebProto.SmartContract.ABI.Entry = function (opt_data) {
94
+ jspb.Message.initialize(this, opt_data, 0, -1, TronWebProto.SmartContract.ABI.Entry.repeatedFields_, null);
95
+ };
96
+ goog.inherits(TronWebProto.SmartContract.ABI.Entry, jspb.Message);
97
+ if (goog.DEBUG && !COMPILED) {
98
+ /**
99
+ * @public
100
+ * @override
101
+ */
102
+ TronWebProto.SmartContract.ABI.Entry.displayName = 'TronWebProto.SmartContract.ABI.Entry';
103
+ }
104
+ /**
105
+ * Generated by JsPbCodeGenerator.
106
+ * @param {Array=} opt_data Optional initial data array, typically from a
107
+ * server response, or constructed directly in Javascript. The array is used
108
+ * in place and becomes part of the constructed object. It is not cloned.
109
+ * If no data is provided, the constructed object will be empty, but still
110
+ * valid.
111
+ * @extends {jspb.Message}
112
+ * @constructor
113
+ */
114
+ TronWebProto.SmartContract.ABI.Entry.Param = function (opt_data) {
115
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
116
+ };
117
+ goog.inherits(TronWebProto.SmartContract.ABI.Entry.Param, jspb.Message);
118
+ if (goog.DEBUG && !COMPILED) {
119
+ /**
120
+ * @public
121
+ * @override
122
+ */
123
+ TronWebProto.SmartContract.ABI.Entry.Param.displayName = 'TronWebProto.SmartContract.ABI.Entry.Param';
124
+ }
125
+ /**
126
+ * Generated by JsPbCodeGenerator.
127
+ * @param {Array=} opt_data Optional initial data array, typically from a
128
+ * server response, or constructed directly in Javascript. The array is used
129
+ * in place and becomes part of the constructed object. It is not cloned.
130
+ * If no data is provided, the constructed object will be empty, but still
131
+ * valid.
132
+ * @extends {jspb.Message}
133
+ * @constructor
134
+ */
135
+ TronWebProto.ContractState = function (opt_data) {
136
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
137
+ };
138
+ goog.inherits(TronWebProto.ContractState, jspb.Message);
139
+ if (goog.DEBUG && !COMPILED) {
140
+ /**
141
+ * @public
142
+ * @override
143
+ */
144
+ TronWebProto.ContractState.displayName = 'TronWebProto.ContractState';
145
+ }
146
+ /**
147
+ * Generated by JsPbCodeGenerator.
148
+ * @param {Array=} opt_data Optional initial data array, typically from a
149
+ * server response, or constructed directly in Javascript. The array is used
150
+ * in place and becomes part of the constructed object. It is not cloned.
151
+ * If no data is provided, the constructed object will be empty, but still
152
+ * valid.
153
+ * @extends {jspb.Message}
154
+ * @constructor
155
+ */
156
+ TronWebProto.CreateSmartContract = function (opt_data) {
157
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
158
+ };
159
+ goog.inherits(TronWebProto.CreateSmartContract, jspb.Message);
160
+ if (goog.DEBUG && !COMPILED) {
161
+ /**
162
+ * @public
163
+ * @override
164
+ */
165
+ TronWebProto.CreateSmartContract.displayName = 'TronWebProto.CreateSmartContract';
166
+ }
167
+ /**
168
+ * Generated by JsPbCodeGenerator.
169
+ * @param {Array=} opt_data Optional initial data array, typically from a
170
+ * server response, or constructed directly in Javascript. The array is used
171
+ * in place and becomes part of the constructed object. It is not cloned.
172
+ * If no data is provided, the constructed object will be empty, but still
173
+ * valid.
174
+ * @extends {jspb.Message}
175
+ * @constructor
176
+ */
177
+ TronWebProto.TriggerSmartContract = function (opt_data) {
178
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
179
+ };
180
+ goog.inherits(TronWebProto.TriggerSmartContract, jspb.Message);
181
+ if (goog.DEBUG && !COMPILED) {
182
+ /**
183
+ * @public
184
+ * @override
185
+ */
186
+ TronWebProto.TriggerSmartContract.displayName = 'TronWebProto.TriggerSmartContract';
187
+ }
188
+ /**
189
+ * Generated by JsPbCodeGenerator.
190
+ * @param {Array=} opt_data Optional initial data array, typically from a
191
+ * server response, or constructed directly in Javascript. The array is used
192
+ * in place and becomes part of the constructed object. It is not cloned.
193
+ * If no data is provided, the constructed object will be empty, but still
194
+ * valid.
195
+ * @extends {jspb.Message}
196
+ * @constructor
197
+ */
198
+ TronWebProto.ClearABIContract = function (opt_data) {
199
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
200
+ };
201
+ goog.inherits(TronWebProto.ClearABIContract, jspb.Message);
202
+ if (goog.DEBUG && !COMPILED) {
203
+ /**
204
+ * @public
205
+ * @override
206
+ */
207
+ TronWebProto.ClearABIContract.displayName = 'TronWebProto.ClearABIContract';
208
+ }
209
+ /**
210
+ * Generated by JsPbCodeGenerator.
211
+ * @param {Array=} opt_data Optional initial data array, typically from a
212
+ * server response, or constructed directly in Javascript. The array is used
213
+ * in place and becomes part of the constructed object. It is not cloned.
214
+ * If no data is provided, the constructed object will be empty, but still
215
+ * valid.
216
+ * @extends {jspb.Message}
217
+ * @constructor
218
+ */
219
+ TronWebProto.UpdateSettingContract = function (opt_data) {
220
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
221
+ };
222
+ goog.inherits(TronWebProto.UpdateSettingContract, jspb.Message);
223
+ if (goog.DEBUG && !COMPILED) {
224
+ /**
225
+ * @public
226
+ * @override
227
+ */
228
+ TronWebProto.UpdateSettingContract.displayName = 'TronWebProto.UpdateSettingContract';
229
+ }
230
+ /**
231
+ * Generated by JsPbCodeGenerator.
232
+ * @param {Array=} opt_data Optional initial data array, typically from a
233
+ * server response, or constructed directly in Javascript. The array is used
234
+ * in place and becomes part of the constructed object. It is not cloned.
235
+ * If no data is provided, the constructed object will be empty, but still
236
+ * valid.
237
+ * @extends {jspb.Message}
238
+ * @constructor
239
+ */
240
+ TronWebProto.UpdateEnergyLimitContract = function (opt_data) {
241
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
242
+ };
243
+ goog.inherits(TronWebProto.UpdateEnergyLimitContract, jspb.Message);
244
+ if (goog.DEBUG && !COMPILED) {
245
+ /**
246
+ * @public
247
+ * @override
248
+ */
249
+ TronWebProto.UpdateEnergyLimitContract.displayName = 'TronWebProto.UpdateEnergyLimitContract';
250
+ }
251
+ /**
252
+ * Generated by JsPbCodeGenerator.
253
+ * @param {Array=} opt_data Optional initial data array, typically from a
254
+ * server response, or constructed directly in Javascript. The array is used
255
+ * in place and becomes part of the constructed object. It is not cloned.
256
+ * If no data is provided, the constructed object will be empty, but still
257
+ * valid.
258
+ * @extends {jspb.Message}
259
+ * @constructor
260
+ */
261
+ TronWebProto.SmartContractDataWrapper = function (opt_data) {
262
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
263
+ };
264
+ goog.inherits(TronWebProto.SmartContractDataWrapper, jspb.Message);
265
+ if (goog.DEBUG && !COMPILED) {
266
+ /**
267
+ * @public
268
+ * @override
269
+ */
270
+ TronWebProto.SmartContractDataWrapper.displayName = 'TronWebProto.SmartContractDataWrapper';
271
+ }
272
+
273
+ if (jspb.Message.GENERATE_TO_OBJECT) {
274
+ /**
275
+ * Creates an object representation of this proto.
276
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
277
+ * Optional fields that are not set will be set to undefined.
278
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
279
+ * For the list of reserved names please see:
280
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
281
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
282
+ * JSPB instance for transitional soy proto support:
283
+ * http://goto/soy-param-migration
284
+ * @return {!Object}
285
+ */
286
+ TronWebProto.SmartContract.prototype.toObject = function (opt_includeInstance) {
287
+ return TronWebProto.SmartContract.toObject(opt_includeInstance, this);
288
+ };
289
+
290
+ /**
291
+ * Static version of the {@see toObject} method.
292
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
293
+ * the JSPB instance for transitional soy proto support:
294
+ * http://goto/soy-param-migration
295
+ * @param {!TronWebProto.SmartContract} msg The msg instance to transform.
296
+ * @return {!Object}
297
+ * @suppress {unusedLocalVariables} f is only used for nested messages
298
+ */
299
+ TronWebProto.SmartContract.toObject = function (includeInstance, msg) {
300
+ var f,
301
+ obj = {
302
+ originAddress: msg.getOriginAddress_asB64(),
303
+ contractAddress: msg.getContractAddress_asB64(),
304
+ abi: (f = msg.getAbi()) && TronWebProto.SmartContract.ABI.toObject(includeInstance, f),
305
+ bytecode: msg.getBytecode_asB64(),
306
+ callValue: jspb.Message.getFieldWithDefault(msg, 5, 0),
307
+ consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 6, 0),
308
+ name: jspb.Message.getFieldWithDefault(msg, 7, ''),
309
+ originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 8, 0),
310
+ codeHash: msg.getCodeHash_asB64(),
311
+ trxHash: msg.getTrxHash_asB64(),
312
+ version: jspb.Message.getFieldWithDefault(msg, 11, 0),
313
+ };
314
+
315
+ if (includeInstance) {
316
+ obj.$jspbMessageInstance = msg;
317
+ }
318
+ return obj;
319
+ };
320
+ }
321
+
322
+ /**
323
+ * Deserializes binary data (in protobuf wire format).
324
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
325
+ * @return {!TronWebProto.SmartContract}
326
+ */
327
+ TronWebProto.SmartContract.deserializeBinary = function (bytes) {
328
+ var reader = new jspb.BinaryReader(bytes);
329
+ var msg = new TronWebProto.SmartContract();
330
+ return TronWebProto.SmartContract.deserializeBinaryFromReader(msg, reader);
331
+ };
332
+
333
+ /**
334
+ * Deserializes binary data (in protobuf wire format) from the
335
+ * given reader into the given message object.
336
+ * @param {!TronWebProto.SmartContract} msg The message object to deserialize into.
337
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
338
+ * @return {!TronWebProto.SmartContract}
339
+ */
340
+ TronWebProto.SmartContract.deserializeBinaryFromReader = function (msg, reader) {
341
+ while (reader.nextField()) {
342
+ if (reader.isEndGroup()) {
343
+ break;
344
+ }
345
+ var field = reader.getFieldNumber();
346
+ switch (field) {
347
+ case 1:
348
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
349
+ msg.setOriginAddress(value);
350
+ break;
351
+ case 2:
352
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
353
+ msg.setContractAddress(value);
354
+ break;
355
+ case 3:
356
+ var value = new TronWebProto.SmartContract.ABI();
357
+ reader.readMessage(value, TronWebProto.SmartContract.ABI.deserializeBinaryFromReader);
358
+ msg.setAbi(value);
359
+ break;
360
+ case 4:
361
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
362
+ msg.setBytecode(value);
363
+ break;
364
+ case 5:
365
+ var value = /** @type {number} */ (reader.readInt64());
366
+ msg.setCallValue(value);
367
+ break;
368
+ case 6:
369
+ var value = /** @type {number} */ (reader.readInt64());
370
+ msg.setConsumeUserResourcePercent(value);
371
+ break;
372
+ case 7:
373
+ var value = /** @type {string} */ (reader.readString());
374
+ msg.setName(value);
375
+ break;
376
+ case 8:
377
+ var value = /** @type {number} */ (reader.readInt64());
378
+ msg.setOriginEnergyLimit(value);
379
+ break;
380
+ case 9:
381
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
382
+ msg.setCodeHash(value);
383
+ break;
384
+ case 10:
385
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
386
+ msg.setTrxHash(value);
387
+ break;
388
+ case 11:
389
+ var value = /** @type {number} */ (reader.readInt32());
390
+ msg.setVersion(value);
391
+ break;
392
+ default:
393
+ reader.skipField();
394
+ break;
395
+ }
396
+ }
397
+ return msg;
398
+ };
399
+
400
+ /**
401
+ * Serializes the message to binary data (in protobuf wire format).
402
+ * @return {!Uint8Array}
403
+ */
404
+ TronWebProto.SmartContract.prototype.serializeBinary = function () {
405
+ var writer = new jspb.BinaryWriter();
406
+ TronWebProto.SmartContract.serializeBinaryToWriter(this, writer);
407
+ return writer.getResultBuffer();
408
+ };
409
+
410
+ /**
411
+ * Serializes the given message to binary data (in protobuf wire
412
+ * format), writing to the given BinaryWriter.
413
+ * @param {!TronWebProto.SmartContract} message
414
+ * @param {!jspb.BinaryWriter} writer
415
+ * @suppress {unusedLocalVariables} f is only used for nested messages
416
+ */
417
+ TronWebProto.SmartContract.serializeBinaryToWriter = function (message, writer) {
418
+ var f = undefined;
419
+ f = message.getOriginAddress_asU8();
420
+ if (f.length > 0) {
421
+ writer.writeBytes(1, f);
422
+ }
423
+ f = message.getContractAddress_asU8();
424
+ if (f.length > 0) {
425
+ writer.writeBytes(2, f);
426
+ }
427
+ f = message.getAbi();
428
+ if (f != null) {
429
+ writer.writeMessage(3, f, TronWebProto.SmartContract.ABI.serializeBinaryToWriter);
430
+ }
431
+ f = message.getBytecode_asU8();
432
+ if (f.length > 0) {
433
+ writer.writeBytes(4, f);
434
+ }
435
+ f = message.getCallValue();
436
+ if (f !== 0) {
437
+ writer.writeInt64(5, f);
438
+ }
439
+ f = message.getConsumeUserResourcePercent();
440
+ if (f !== 0) {
441
+ writer.writeInt64(6, f);
442
+ }
443
+ f = message.getName();
444
+ if (f.length > 0) {
445
+ writer.writeString(7, f);
446
+ }
447
+ f = message.getOriginEnergyLimit();
448
+ if (f !== 0) {
449
+ writer.writeInt64(8, f);
450
+ }
451
+ f = message.getCodeHash_asU8();
452
+ if (f.length > 0) {
453
+ writer.writeBytes(9, f);
454
+ }
455
+ f = message.getTrxHash_asU8();
456
+ if (f.length > 0) {
457
+ writer.writeBytes(10, f);
458
+ }
459
+ f = message.getVersion();
460
+ if (f !== 0) {
461
+ writer.writeInt32(11, f);
462
+ }
463
+ };
464
+
465
+ /**
466
+ * List of repeated fields within this message type.
467
+ * @private {!Array<number>}
468
+ * @const
469
+ */
470
+ TronWebProto.SmartContract.ABI.repeatedFields_ = [1];
471
+
472
+ if (jspb.Message.GENERATE_TO_OBJECT) {
473
+ /**
474
+ * Creates an object representation of this proto.
475
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
476
+ * Optional fields that are not set will be set to undefined.
477
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
478
+ * For the list of reserved names please see:
479
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
480
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
481
+ * JSPB instance for transitional soy proto support:
482
+ * http://goto/soy-param-migration
483
+ * @return {!Object}
484
+ */
485
+ TronWebProto.SmartContract.ABI.prototype.toObject = function (opt_includeInstance) {
486
+ return TronWebProto.SmartContract.ABI.toObject(opt_includeInstance, this);
487
+ };
488
+
489
+ /**
490
+ * Static version of the {@see toObject} method.
491
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
492
+ * the JSPB instance for transitional soy proto support:
493
+ * http://goto/soy-param-migration
494
+ * @param {!TronWebProto.SmartContract.ABI} msg The msg instance to transform.
495
+ * @return {!Object}
496
+ * @suppress {unusedLocalVariables} f is only used for nested messages
497
+ */
498
+ TronWebProto.SmartContract.ABI.toObject = function (includeInstance, msg) {
499
+ var f,
500
+ obj = {
501
+ entrysList: jspb.Message.toObjectList(
502
+ msg.getEntrysList(),
503
+ TronWebProto.SmartContract.ABI.Entry.toObject,
504
+ includeInstance
505
+ ),
506
+ };
507
+
508
+ if (includeInstance) {
509
+ obj.$jspbMessageInstance = msg;
510
+ }
511
+ return obj;
512
+ };
513
+ }
514
+
515
+ /**
516
+ * Deserializes binary data (in protobuf wire format).
517
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
518
+ * @return {!TronWebProto.SmartContract.ABI}
519
+ */
520
+ TronWebProto.SmartContract.ABI.deserializeBinary = function (bytes) {
521
+ var reader = new jspb.BinaryReader(bytes);
522
+ var msg = new TronWebProto.SmartContract.ABI();
523
+ return TronWebProto.SmartContract.ABI.deserializeBinaryFromReader(msg, reader);
524
+ };
525
+
526
+ /**
527
+ * Deserializes binary data (in protobuf wire format) from the
528
+ * given reader into the given message object.
529
+ * @param {!TronWebProto.SmartContract.ABI} msg The message object to deserialize into.
530
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
531
+ * @return {!TronWebProto.SmartContract.ABI}
532
+ */
533
+ TronWebProto.SmartContract.ABI.deserializeBinaryFromReader = function (msg, reader) {
534
+ while (reader.nextField()) {
535
+ if (reader.isEndGroup()) {
536
+ break;
537
+ }
538
+ var field = reader.getFieldNumber();
539
+ switch (field) {
540
+ case 1:
541
+ var value = new TronWebProto.SmartContract.ABI.Entry();
542
+ reader.readMessage(value, TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader);
543
+ msg.addEntrys(value);
544
+ break;
545
+ default:
546
+ reader.skipField();
547
+ break;
548
+ }
549
+ }
550
+ return msg;
551
+ };
552
+
553
+ /**
554
+ * Serializes the message to binary data (in protobuf wire format).
555
+ * @return {!Uint8Array}
556
+ */
557
+ TronWebProto.SmartContract.ABI.prototype.serializeBinary = function () {
558
+ var writer = new jspb.BinaryWriter();
559
+ TronWebProto.SmartContract.ABI.serializeBinaryToWriter(this, writer);
560
+ return writer.getResultBuffer();
561
+ };
562
+
563
+ /**
564
+ * Serializes the given message to binary data (in protobuf wire
565
+ * format), writing to the given BinaryWriter.
566
+ * @param {!TronWebProto.SmartContract.ABI} message
567
+ * @param {!jspb.BinaryWriter} writer
568
+ * @suppress {unusedLocalVariables} f is only used for nested messages
569
+ */
570
+ TronWebProto.SmartContract.ABI.serializeBinaryToWriter = function (message, writer) {
571
+ var f = undefined;
572
+ f = message.getEntrysList();
573
+ if (f.length > 0) {
574
+ writer.writeRepeatedMessage(1, f, TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter);
575
+ }
576
+ };
577
+
578
+ /**
579
+ * List of repeated fields within this message type.
580
+ * @private {!Array<number>}
581
+ * @const
582
+ */
583
+ TronWebProto.SmartContract.ABI.Entry.repeatedFields_ = [4, 5];
584
+
585
+ if (jspb.Message.GENERATE_TO_OBJECT) {
586
+ /**
587
+ * Creates an object representation of this proto.
588
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
589
+ * Optional fields that are not set will be set to undefined.
590
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
591
+ * For the list of reserved names please see:
592
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
593
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
594
+ * JSPB instance for transitional soy proto support:
595
+ * http://goto/soy-param-migration
596
+ * @return {!Object}
597
+ */
598
+ TronWebProto.SmartContract.ABI.Entry.prototype.toObject = function (opt_includeInstance) {
599
+ return TronWebProto.SmartContract.ABI.Entry.toObject(opt_includeInstance, this);
600
+ };
601
+
602
+ /**
603
+ * Static version of the {@see toObject} method.
604
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
605
+ * the JSPB instance for transitional soy proto support:
606
+ * http://goto/soy-param-migration
607
+ * @param {!TronWebProto.SmartContract.ABI.Entry} msg The msg instance to transform.
608
+ * @return {!Object}
609
+ * @suppress {unusedLocalVariables} f is only used for nested messages
610
+ */
611
+ TronWebProto.SmartContract.ABI.Entry.toObject = function (includeInstance, msg) {
612
+ var f,
613
+ obj = {
614
+ anonymous: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
615
+ constant: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
616
+ name: jspb.Message.getFieldWithDefault(msg, 3, ''),
617
+ inputsList: jspb.Message.toObjectList(
618
+ msg.getInputsList(),
619
+ TronWebProto.SmartContract.ABI.Entry.Param.toObject,
620
+ includeInstance
621
+ ),
622
+ outputsList: jspb.Message.toObjectList(
623
+ msg.getOutputsList(),
624
+ TronWebProto.SmartContract.ABI.Entry.Param.toObject,
625
+ includeInstance
626
+ ),
627
+ type: jspb.Message.getFieldWithDefault(msg, 6, 0),
628
+ payable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
629
+ statemutability: jspb.Message.getFieldWithDefault(msg, 8, 0),
630
+ };
631
+
632
+ if (includeInstance) {
633
+ obj.$jspbMessageInstance = msg;
634
+ }
635
+ return obj;
636
+ };
637
+ }
638
+
639
+ /**
640
+ * Deserializes binary data (in protobuf wire format).
641
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
642
+ * @return {!TronWebProto.SmartContract.ABI.Entry}
643
+ */
644
+ TronWebProto.SmartContract.ABI.Entry.deserializeBinary = function (bytes) {
645
+ var reader = new jspb.BinaryReader(bytes);
646
+ var msg = new TronWebProto.SmartContract.ABI.Entry();
647
+ return TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader(msg, reader);
648
+ };
649
+
650
+ /**
651
+ * Deserializes binary data (in protobuf wire format) from the
652
+ * given reader into the given message object.
653
+ * @param {!TronWebProto.SmartContract.ABI.Entry} msg The message object to deserialize into.
654
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
655
+ * @return {!TronWebProto.SmartContract.ABI.Entry}
656
+ */
657
+ TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader = function (msg, reader) {
658
+ while (reader.nextField()) {
659
+ if (reader.isEndGroup()) {
660
+ break;
661
+ }
662
+ var field = reader.getFieldNumber();
663
+ switch (field) {
664
+ case 1:
665
+ var value = /** @type {boolean} */ (reader.readBool());
666
+ msg.setAnonymous(value);
667
+ break;
668
+ case 2:
669
+ var value = /** @type {boolean} */ (reader.readBool());
670
+ msg.setConstant(value);
671
+ break;
672
+ case 3:
673
+ var value = /** @type {string} */ (reader.readString());
674
+ msg.setName(value);
675
+ break;
676
+ case 4:
677
+ var value = new TronWebProto.SmartContract.ABI.Entry.Param();
678
+ reader.readMessage(value, TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader);
679
+ msg.addInputs(value);
680
+ break;
681
+ case 5:
682
+ var value = new TronWebProto.SmartContract.ABI.Entry.Param();
683
+ reader.readMessage(value, TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader);
684
+ msg.addOutputs(value);
685
+ break;
686
+ case 6:
687
+ var value = /** @type {!TronWebProto.SmartContract.ABI.Entry.EntryType} */ (reader.readEnum());
688
+ msg.setType(value);
689
+ break;
690
+ case 7:
691
+ var value = /** @type {boolean} */ (reader.readBool());
692
+ msg.setPayable(value);
693
+ break;
694
+ case 8:
695
+ var value = /** @type {!TronWebProto.SmartContract.ABI.Entry.StateMutabilityType} */ (reader.readEnum());
696
+ msg.setStatemutability(value);
697
+ break;
698
+ default:
699
+ reader.skipField();
700
+ break;
701
+ }
702
+ }
703
+ return msg;
704
+ };
705
+
706
+ /**
707
+ * Serializes the message to binary data (in protobuf wire format).
708
+ * @return {!Uint8Array}
709
+ */
710
+ TronWebProto.SmartContract.ABI.Entry.prototype.serializeBinary = function () {
711
+ var writer = new jspb.BinaryWriter();
712
+ TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter(this, writer);
713
+ return writer.getResultBuffer();
714
+ };
715
+
716
+ /**
717
+ * Serializes the given message to binary data (in protobuf wire
718
+ * format), writing to the given BinaryWriter.
719
+ * @param {!TronWebProto.SmartContract.ABI.Entry} message
720
+ * @param {!jspb.BinaryWriter} writer
721
+ * @suppress {unusedLocalVariables} f is only used for nested messages
722
+ */
723
+ TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter = function (message, writer) {
724
+ var f = undefined;
725
+ f = message.getAnonymous();
726
+ if (f) {
727
+ writer.writeBool(1, f);
728
+ }
729
+ f = message.getConstant();
730
+ if (f) {
731
+ writer.writeBool(2, f);
732
+ }
733
+ f = message.getName();
734
+ if (f.length > 0) {
735
+ writer.writeString(3, f);
736
+ }
737
+ f = message.getInputsList();
738
+ if (f.length > 0) {
739
+ writer.writeRepeatedMessage(4, f, TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter);
740
+ }
741
+ f = message.getOutputsList();
742
+ if (f.length > 0) {
743
+ writer.writeRepeatedMessage(5, f, TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter);
744
+ }
745
+ f = message.getType();
746
+ if (f !== 0.0) {
747
+ writer.writeEnum(6, f);
748
+ }
749
+ f = message.getPayable();
750
+ if (f) {
751
+ writer.writeBool(7, f);
752
+ }
753
+ f = message.getStatemutability();
754
+ if (f !== 0.0) {
755
+ writer.writeEnum(8, f);
756
+ }
757
+ };
758
+
759
+ /**
760
+ * @enum {number}
761
+ */
762
+ TronWebProto.SmartContract.ABI.Entry.EntryType = {
763
+ UNKNOWNENTRYTYPE: 0,
764
+ CONSTRUCTOR: 1,
765
+ FUNCTION: 2,
766
+ EVENT: 3,
767
+ FALLBACK: 4,
768
+ RECEIVE: 5,
769
+ ERROR: 6,
770
+ };
771
+
772
+ /**
773
+ * @enum {number}
774
+ */
775
+ TronWebProto.SmartContract.ABI.Entry.StateMutabilityType = {
776
+ UNKNOWNMUTABILITYTYPE: 0,
777
+ PURE: 1,
778
+ VIEW: 2,
779
+ NONPAYABLE: 3,
780
+ PAYABLE: 4,
781
+ };
782
+
783
+ if (jspb.Message.GENERATE_TO_OBJECT) {
784
+ /**
785
+ * Creates an object representation of this proto.
786
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
787
+ * Optional fields that are not set will be set to undefined.
788
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
789
+ * For the list of reserved names please see:
790
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
791
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
792
+ * JSPB instance for transitional soy proto support:
793
+ * http://goto/soy-param-migration
794
+ * @return {!Object}
795
+ */
796
+ TronWebProto.SmartContract.ABI.Entry.Param.prototype.toObject = function (opt_includeInstance) {
797
+ return TronWebProto.SmartContract.ABI.Entry.Param.toObject(opt_includeInstance, this);
798
+ };
799
+
800
+ /**
801
+ * Static version of the {@see toObject} method.
802
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
803
+ * the JSPB instance for transitional soy proto support:
804
+ * http://goto/soy-param-migration
805
+ * @param {!TronWebProto.SmartContract.ABI.Entry.Param} msg The msg instance to transform.
806
+ * @return {!Object}
807
+ * @suppress {unusedLocalVariables} f is only used for nested messages
808
+ */
809
+ TronWebProto.SmartContract.ABI.Entry.Param.toObject = function (includeInstance, msg) {
810
+ var f,
811
+ obj = {
812
+ indexed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
813
+ name: jspb.Message.getFieldWithDefault(msg, 2, ''),
814
+ type: jspb.Message.getFieldWithDefault(msg, 3, ''),
815
+ };
816
+
817
+ if (includeInstance) {
818
+ obj.$jspbMessageInstance = msg;
819
+ }
820
+ return obj;
821
+ };
822
+ }
823
+
824
+ /**
825
+ * Deserializes binary data (in protobuf wire format).
826
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
827
+ * @return {!TronWebProto.SmartContract.ABI.Entry.Param}
828
+ */
829
+ TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinary = function (bytes) {
830
+ var reader = new jspb.BinaryReader(bytes);
831
+ var msg = new TronWebProto.SmartContract.ABI.Entry.Param();
832
+ return TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(msg, reader);
833
+ };
834
+
835
+ /**
836
+ * Deserializes binary data (in protobuf wire format) from the
837
+ * given reader into the given message object.
838
+ * @param {!TronWebProto.SmartContract.ABI.Entry.Param} msg The message object to deserialize into.
839
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
840
+ * @return {!TronWebProto.SmartContract.ABI.Entry.Param}
841
+ */
842
+ TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader = function (msg, reader) {
843
+ while (reader.nextField()) {
844
+ if (reader.isEndGroup()) {
845
+ break;
846
+ }
847
+ var field = reader.getFieldNumber();
848
+ switch (field) {
849
+ case 1:
850
+ var value = /** @type {boolean} */ (reader.readBool());
851
+ msg.setIndexed(value);
852
+ break;
853
+ case 2:
854
+ var value = /** @type {string} */ (reader.readString());
855
+ msg.setName(value);
856
+ break;
857
+ case 3:
858
+ var value = /** @type {string} */ (reader.readString());
859
+ msg.setType(value);
860
+ break;
861
+ default:
862
+ reader.skipField();
863
+ break;
864
+ }
865
+ }
866
+ return msg;
867
+ };
868
+
869
+ /**
870
+ * Serializes the message to binary data (in protobuf wire format).
871
+ * @return {!Uint8Array}
872
+ */
873
+ TronWebProto.SmartContract.ABI.Entry.Param.prototype.serializeBinary = function () {
874
+ var writer = new jspb.BinaryWriter();
875
+ TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this, writer);
876
+ return writer.getResultBuffer();
877
+ };
878
+
879
+ /**
880
+ * Serializes the given message to binary data (in protobuf wire
881
+ * format), writing to the given BinaryWriter.
882
+ * @param {!TronWebProto.SmartContract.ABI.Entry.Param} message
883
+ * @param {!jspb.BinaryWriter} writer
884
+ * @suppress {unusedLocalVariables} f is only used for nested messages
885
+ */
886
+ TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter = function (message, writer) {
887
+ var f = undefined;
888
+ f = message.getIndexed();
889
+ if (f) {
890
+ writer.writeBool(1, f);
891
+ }
892
+ f = message.getName();
893
+ if (f.length > 0) {
894
+ writer.writeString(2, f);
895
+ }
896
+ f = message.getType();
897
+ if (f.length > 0) {
898
+ writer.writeString(3, f);
899
+ }
900
+ };
901
+
902
+ /**
903
+ * optional bool indexed = 1;
904
+ * @return {boolean}
905
+ */
906
+ TronWebProto.SmartContract.ABI.Entry.Param.prototype.getIndexed = function () {
907
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
908
+ };
909
+
910
+ /**
911
+ * @param {boolean} value
912
+ * @return {!TronWebProto.SmartContract.ABI.Entry.Param} returns this
913
+ */
914
+ TronWebProto.SmartContract.ABI.Entry.Param.prototype.setIndexed = function (value) {
915
+ return jspb.Message.setProto3BooleanField(this, 1, value);
916
+ };
917
+
918
+ /**
919
+ * optional string name = 2;
920
+ * @return {string}
921
+ */
922
+ TronWebProto.SmartContract.ABI.Entry.Param.prototype.getName = function () {
923
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ''));
924
+ };
925
+
926
+ /**
927
+ * @param {string} value
928
+ * @return {!TronWebProto.SmartContract.ABI.Entry.Param} returns this
929
+ */
930
+ TronWebProto.SmartContract.ABI.Entry.Param.prototype.setName = function (value) {
931
+ return jspb.Message.setProto3StringField(this, 2, value);
932
+ };
933
+
934
+ /**
935
+ * optional string type = 3;
936
+ * @return {string}
937
+ */
938
+ TronWebProto.SmartContract.ABI.Entry.Param.prototype.getType = function () {
939
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ''));
940
+ };
941
+
942
+ /**
943
+ * @param {string} value
944
+ * @return {!TronWebProto.SmartContract.ABI.Entry.Param} returns this
945
+ */
946
+ TronWebProto.SmartContract.ABI.Entry.Param.prototype.setType = function (value) {
947
+ return jspb.Message.setProto3StringField(this, 3, value);
948
+ };
949
+
950
+ /**
951
+ * optional bool anonymous = 1;
952
+ * @return {boolean}
953
+ */
954
+ TronWebProto.SmartContract.ABI.Entry.prototype.getAnonymous = function () {
955
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
956
+ };
957
+
958
+ /**
959
+ * @param {boolean} value
960
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
961
+ */
962
+ TronWebProto.SmartContract.ABI.Entry.prototype.setAnonymous = function (value) {
963
+ return jspb.Message.setProto3BooleanField(this, 1, value);
964
+ };
965
+
966
+ /**
967
+ * optional bool constant = 2;
968
+ * @return {boolean}
969
+ */
970
+ TronWebProto.SmartContract.ABI.Entry.prototype.getConstant = function () {
971
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
972
+ };
973
+
974
+ /**
975
+ * @param {boolean} value
976
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
977
+ */
978
+ TronWebProto.SmartContract.ABI.Entry.prototype.setConstant = function (value) {
979
+ return jspb.Message.setProto3BooleanField(this, 2, value);
980
+ };
981
+
982
+ /**
983
+ * optional string name = 3;
984
+ * @return {string}
985
+ */
986
+ TronWebProto.SmartContract.ABI.Entry.prototype.getName = function () {
987
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ''));
988
+ };
989
+
990
+ /**
991
+ * @param {string} value
992
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
993
+ */
994
+ TronWebProto.SmartContract.ABI.Entry.prototype.setName = function (value) {
995
+ return jspb.Message.setProto3StringField(this, 3, value);
996
+ };
997
+
998
+ /**
999
+ * repeated Param inputs = 4;
1000
+ * @return {!Array<!TronWebProto.SmartContract.ABI.Entry.Param>}
1001
+ */
1002
+ TronWebProto.SmartContract.ABI.Entry.prototype.getInputsList = function () {
1003
+ return /** @type{!Array<!TronWebProto.SmartContract.ABI.Entry.Param>} */ (
1004
+ jspb.Message.getRepeatedWrapperField(this, TronWebProto.SmartContract.ABI.Entry.Param, 4)
1005
+ );
1006
+ };
1007
+
1008
+ /**
1009
+ * @param {!Array<!TronWebProto.SmartContract.ABI.Entry.Param>} value
1010
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
1011
+ */
1012
+ TronWebProto.SmartContract.ABI.Entry.prototype.setInputsList = function (value) {
1013
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
1014
+ };
1015
+
1016
+ /**
1017
+ * @param {!TronWebProto.SmartContract.ABI.Entry.Param=} opt_value
1018
+ * @param {number=} opt_index
1019
+ * @return {!TronWebProto.SmartContract.ABI.Entry.Param}
1020
+ */
1021
+ TronWebProto.SmartContract.ABI.Entry.prototype.addInputs = function (opt_value, opt_index) {
1022
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, TronWebProto.SmartContract.ABI.Entry.Param, opt_index);
1023
+ };
1024
+
1025
+ /**
1026
+ * Clears the list making it empty but non-null.
1027
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
1028
+ */
1029
+ TronWebProto.SmartContract.ABI.Entry.prototype.clearInputsList = function () {
1030
+ return this.setInputsList([]);
1031
+ };
1032
+
1033
+ /**
1034
+ * repeated Param outputs = 5;
1035
+ * @return {!Array<!TronWebProto.SmartContract.ABI.Entry.Param>}
1036
+ */
1037
+ TronWebProto.SmartContract.ABI.Entry.prototype.getOutputsList = function () {
1038
+ return /** @type{!Array<!TronWebProto.SmartContract.ABI.Entry.Param>} */ (
1039
+ jspb.Message.getRepeatedWrapperField(this, TronWebProto.SmartContract.ABI.Entry.Param, 5)
1040
+ );
1041
+ };
1042
+
1043
+ /**
1044
+ * @param {!Array<!TronWebProto.SmartContract.ABI.Entry.Param>} value
1045
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
1046
+ */
1047
+ TronWebProto.SmartContract.ABI.Entry.prototype.setOutputsList = function (value) {
1048
+ return jspb.Message.setRepeatedWrapperField(this, 5, value);
1049
+ };
1050
+
1051
+ /**
1052
+ * @param {!TronWebProto.SmartContract.ABI.Entry.Param=} opt_value
1053
+ * @param {number=} opt_index
1054
+ * @return {!TronWebProto.SmartContract.ABI.Entry.Param}
1055
+ */
1056
+ TronWebProto.SmartContract.ABI.Entry.prototype.addOutputs = function (opt_value, opt_index) {
1057
+ return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, TronWebProto.SmartContract.ABI.Entry.Param, opt_index);
1058
+ };
1059
+
1060
+ /**
1061
+ * Clears the list making it empty but non-null.
1062
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
1063
+ */
1064
+ TronWebProto.SmartContract.ABI.Entry.prototype.clearOutputsList = function () {
1065
+ return this.setOutputsList([]);
1066
+ };
1067
+
1068
+ /**
1069
+ * optional EntryType type = 6;
1070
+ * @return {!TronWebProto.SmartContract.ABI.Entry.EntryType}
1071
+ */
1072
+ TronWebProto.SmartContract.ABI.Entry.prototype.getType = function () {
1073
+ return /** @type {!TronWebProto.SmartContract.ABI.Entry.EntryType} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
1074
+ };
1075
+
1076
+ /**
1077
+ * @param {!TronWebProto.SmartContract.ABI.Entry.EntryType} value
1078
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
1079
+ */
1080
+ TronWebProto.SmartContract.ABI.Entry.prototype.setType = function (value) {
1081
+ return jspb.Message.setProto3EnumField(this, 6, value);
1082
+ };
1083
+
1084
+ /**
1085
+ * optional bool payable = 7;
1086
+ * @return {boolean}
1087
+ */
1088
+ TronWebProto.SmartContract.ABI.Entry.prototype.getPayable = function () {
1089
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
1090
+ };
1091
+
1092
+ /**
1093
+ * @param {boolean} value
1094
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
1095
+ */
1096
+ TronWebProto.SmartContract.ABI.Entry.prototype.setPayable = function (value) {
1097
+ return jspb.Message.setProto3BooleanField(this, 7, value);
1098
+ };
1099
+
1100
+ /**
1101
+ * optional StateMutabilityType stateMutability = 8;
1102
+ * @return {!TronWebProto.SmartContract.ABI.Entry.StateMutabilityType}
1103
+ */
1104
+ TronWebProto.SmartContract.ABI.Entry.prototype.getStatemutability = function () {
1105
+ return /** @type {!TronWebProto.SmartContract.ABI.Entry.StateMutabilityType} */ (
1106
+ jspb.Message.getFieldWithDefault(this, 8, 0)
1107
+ );
1108
+ };
1109
+
1110
+ /**
1111
+ * @param {!TronWebProto.SmartContract.ABI.Entry.StateMutabilityType} value
1112
+ * @return {!TronWebProto.SmartContract.ABI.Entry} returns this
1113
+ */
1114
+ TronWebProto.SmartContract.ABI.Entry.prototype.setStatemutability = function (value) {
1115
+ return jspb.Message.setProto3EnumField(this, 8, value);
1116
+ };
1117
+
1118
+ /**
1119
+ * repeated Entry entrys = 1;
1120
+ * @return {!Array<!TronWebProto.SmartContract.ABI.Entry>}
1121
+ */
1122
+ TronWebProto.SmartContract.ABI.prototype.getEntrysList = function () {
1123
+ return /** @type{!Array<!TronWebProto.SmartContract.ABI.Entry>} */ (
1124
+ jspb.Message.getRepeatedWrapperField(this, TronWebProto.SmartContract.ABI.Entry, 1)
1125
+ );
1126
+ };
1127
+
1128
+ /**
1129
+ * @param {!Array<!TronWebProto.SmartContract.ABI.Entry>} value
1130
+ * @return {!TronWebProto.SmartContract.ABI} returns this
1131
+ */
1132
+ TronWebProto.SmartContract.ABI.prototype.setEntrysList = function (value) {
1133
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1134
+ };
1135
+
1136
+ /**
1137
+ * @param {!TronWebProto.SmartContract.ABI.Entry=} opt_value
1138
+ * @param {number=} opt_index
1139
+ * @return {!TronWebProto.SmartContract.ABI.Entry}
1140
+ */
1141
+ TronWebProto.SmartContract.ABI.prototype.addEntrys = function (opt_value, opt_index) {
1142
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, TronWebProto.SmartContract.ABI.Entry, opt_index);
1143
+ };
1144
+
1145
+ /**
1146
+ * Clears the list making it empty but non-null.
1147
+ * @return {!TronWebProto.SmartContract.ABI} returns this
1148
+ */
1149
+ TronWebProto.SmartContract.ABI.prototype.clearEntrysList = function () {
1150
+ return this.setEntrysList([]);
1151
+ };
1152
+
1153
+ /**
1154
+ * optional bytes origin_address = 1;
1155
+ * @return {!(string|Uint8Array)}
1156
+ */
1157
+ TronWebProto.SmartContract.prototype.getOriginAddress = function () {
1158
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ''));
1159
+ };
1160
+
1161
+ /**
1162
+ * optional bytes origin_address = 1;
1163
+ * This is a type-conversion wrapper around `getOriginAddress()`
1164
+ * @return {string}
1165
+ */
1166
+ TronWebProto.SmartContract.prototype.getOriginAddress_asB64 = function () {
1167
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOriginAddress()));
1168
+ };
1169
+
1170
+ /**
1171
+ * optional bytes origin_address = 1;
1172
+ * Note that Uint8Array is not supported on all browsers.
1173
+ * @see http://caniuse.com/Uint8Array
1174
+ * This is a type-conversion wrapper around `getOriginAddress()`
1175
+ * @return {!Uint8Array}
1176
+ */
1177
+ TronWebProto.SmartContract.prototype.getOriginAddress_asU8 = function () {
1178
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOriginAddress()));
1179
+ };
1180
+
1181
+ /**
1182
+ * @param {!(string|Uint8Array)} value
1183
+ * @return {!TronWebProto.SmartContract} returns this
1184
+ */
1185
+ TronWebProto.SmartContract.prototype.setOriginAddress = function (value) {
1186
+ return jspb.Message.setProto3BytesField(this, 1, value);
1187
+ };
1188
+
1189
+ /**
1190
+ * optional bytes contract_address = 2;
1191
+ * @return {!(string|Uint8Array)}
1192
+ */
1193
+ TronWebProto.SmartContract.prototype.getContractAddress = function () {
1194
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ''));
1195
+ };
1196
+
1197
+ /**
1198
+ * optional bytes contract_address = 2;
1199
+ * This is a type-conversion wrapper around `getContractAddress()`
1200
+ * @return {string}
1201
+ */
1202
+ TronWebProto.SmartContract.prototype.getContractAddress_asB64 = function () {
1203
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getContractAddress()));
1204
+ };
1205
+
1206
+ /**
1207
+ * optional bytes contract_address = 2;
1208
+ * Note that Uint8Array is not supported on all browsers.
1209
+ * @see http://caniuse.com/Uint8Array
1210
+ * This is a type-conversion wrapper around `getContractAddress()`
1211
+ * @return {!Uint8Array}
1212
+ */
1213
+ TronWebProto.SmartContract.prototype.getContractAddress_asU8 = function () {
1214
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getContractAddress()));
1215
+ };
1216
+
1217
+ /**
1218
+ * @param {!(string|Uint8Array)} value
1219
+ * @return {!TronWebProto.SmartContract} returns this
1220
+ */
1221
+ TronWebProto.SmartContract.prototype.setContractAddress = function (value) {
1222
+ return jspb.Message.setProto3BytesField(this, 2, value);
1223
+ };
1224
+
1225
+ /**
1226
+ * optional ABI abi = 3;
1227
+ * @return {?TronWebProto.SmartContract.ABI}
1228
+ */
1229
+ TronWebProto.SmartContract.prototype.getAbi = function () {
1230
+ return /** @type{?TronWebProto.SmartContract.ABI} */ (jspb.Message.getWrapperField(this, TronWebProto.SmartContract.ABI, 3));
1231
+ };
1232
+
1233
+ /**
1234
+ * @param {?TronWebProto.SmartContract.ABI|undefined} value
1235
+ * @return {!TronWebProto.SmartContract} returns this
1236
+ */
1237
+ TronWebProto.SmartContract.prototype.setAbi = function (value) {
1238
+ return jspb.Message.setWrapperField(this, 3, value);
1239
+ };
1240
+
1241
+ /**
1242
+ * Clears the message field making it undefined.
1243
+ * @return {!TronWebProto.SmartContract} returns this
1244
+ */
1245
+ TronWebProto.SmartContract.prototype.clearAbi = function () {
1246
+ return this.setAbi(undefined);
1247
+ };
1248
+
1249
+ /**
1250
+ * Returns whether this field is set.
1251
+ * @return {boolean}
1252
+ */
1253
+ TronWebProto.SmartContract.prototype.hasAbi = function () {
1254
+ return jspb.Message.getField(this, 3) != null;
1255
+ };
1256
+
1257
+ /**
1258
+ * optional bytes bytecode = 4;
1259
+ * @return {!(string|Uint8Array)}
1260
+ */
1261
+ TronWebProto.SmartContract.prototype.getBytecode = function () {
1262
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ''));
1263
+ };
1264
+
1265
+ /**
1266
+ * optional bytes bytecode = 4;
1267
+ * This is a type-conversion wrapper around `getBytecode()`
1268
+ * @return {string}
1269
+ */
1270
+ TronWebProto.SmartContract.prototype.getBytecode_asB64 = function () {
1271
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBytecode()));
1272
+ };
1273
+
1274
+ /**
1275
+ * optional bytes bytecode = 4;
1276
+ * Note that Uint8Array is not supported on all browsers.
1277
+ * @see http://caniuse.com/Uint8Array
1278
+ * This is a type-conversion wrapper around `getBytecode()`
1279
+ * @return {!Uint8Array}
1280
+ */
1281
+ TronWebProto.SmartContract.prototype.getBytecode_asU8 = function () {
1282
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBytecode()));
1283
+ };
1284
+
1285
+ /**
1286
+ * @param {!(string|Uint8Array)} value
1287
+ * @return {!TronWebProto.SmartContract} returns this
1288
+ */
1289
+ TronWebProto.SmartContract.prototype.setBytecode = function (value) {
1290
+ return jspb.Message.setProto3BytesField(this, 4, value);
1291
+ };
1292
+
1293
+ /**
1294
+ * optional int64 call_value = 5;
1295
+ * @return {number}
1296
+ */
1297
+ TronWebProto.SmartContract.prototype.getCallValue = function () {
1298
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1299
+ };
1300
+
1301
+ /**
1302
+ * @param {number} value
1303
+ * @return {!TronWebProto.SmartContract} returns this
1304
+ */
1305
+ TronWebProto.SmartContract.prototype.setCallValue = function (value) {
1306
+ return jspb.Message.setProto3IntField(this, 5, value);
1307
+ };
1308
+
1309
+ /**
1310
+ * optional int64 consume_user_resource_percent = 6;
1311
+ * @return {number}
1312
+ */
1313
+ TronWebProto.SmartContract.prototype.getConsumeUserResourcePercent = function () {
1314
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
1315
+ };
1316
+
1317
+ /**
1318
+ * @param {number} value
1319
+ * @return {!TronWebProto.SmartContract} returns this
1320
+ */
1321
+ TronWebProto.SmartContract.prototype.setConsumeUserResourcePercent = function (value) {
1322
+ return jspb.Message.setProto3IntField(this, 6, value);
1323
+ };
1324
+
1325
+ /**
1326
+ * optional string name = 7;
1327
+ * @return {string}
1328
+ */
1329
+ TronWebProto.SmartContract.prototype.getName = function () {
1330
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ''));
1331
+ };
1332
+
1333
+ /**
1334
+ * @param {string} value
1335
+ * @return {!TronWebProto.SmartContract} returns this
1336
+ */
1337
+ TronWebProto.SmartContract.prototype.setName = function (value) {
1338
+ return jspb.Message.setProto3StringField(this, 7, value);
1339
+ };
1340
+
1341
+ /**
1342
+ * optional int64 origin_energy_limit = 8;
1343
+ * @return {number}
1344
+ */
1345
+ TronWebProto.SmartContract.prototype.getOriginEnergyLimit = function () {
1346
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1347
+ };
1348
+
1349
+ /**
1350
+ * @param {number} value
1351
+ * @return {!TronWebProto.SmartContract} returns this
1352
+ */
1353
+ TronWebProto.SmartContract.prototype.setOriginEnergyLimit = function (value) {
1354
+ return jspb.Message.setProto3IntField(this, 8, value);
1355
+ };
1356
+
1357
+ /**
1358
+ * optional bytes code_hash = 9;
1359
+ * @return {!(string|Uint8Array)}
1360
+ */
1361
+ TronWebProto.SmartContract.prototype.getCodeHash = function () {
1362
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, ''));
1363
+ };
1364
+
1365
+ /**
1366
+ * optional bytes code_hash = 9;
1367
+ * This is a type-conversion wrapper around `getCodeHash()`
1368
+ * @return {string}
1369
+ */
1370
+ TronWebProto.SmartContract.prototype.getCodeHash_asB64 = function () {
1371
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCodeHash()));
1372
+ };
1373
+
1374
+ /**
1375
+ * optional bytes code_hash = 9;
1376
+ * Note that Uint8Array is not supported on all browsers.
1377
+ * @see http://caniuse.com/Uint8Array
1378
+ * This is a type-conversion wrapper around `getCodeHash()`
1379
+ * @return {!Uint8Array}
1380
+ */
1381
+ TronWebProto.SmartContract.prototype.getCodeHash_asU8 = function () {
1382
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getCodeHash()));
1383
+ };
1384
+
1385
+ /**
1386
+ * @param {!(string|Uint8Array)} value
1387
+ * @return {!TronWebProto.SmartContract} returns this
1388
+ */
1389
+ TronWebProto.SmartContract.prototype.setCodeHash = function (value) {
1390
+ return jspb.Message.setProto3BytesField(this, 9, value);
1391
+ };
1392
+
1393
+ /**
1394
+ * optional bytes trx_hash = 10;
1395
+ * @return {!(string|Uint8Array)}
1396
+ */
1397
+ TronWebProto.SmartContract.prototype.getTrxHash = function () {
1398
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, ''));
1399
+ };
1400
+
1401
+ /**
1402
+ * optional bytes trx_hash = 10;
1403
+ * This is a type-conversion wrapper around `getTrxHash()`
1404
+ * @return {string}
1405
+ */
1406
+ TronWebProto.SmartContract.prototype.getTrxHash_asB64 = function () {
1407
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getTrxHash()));
1408
+ };
1409
+
1410
+ /**
1411
+ * optional bytes trx_hash = 10;
1412
+ * Note that Uint8Array is not supported on all browsers.
1413
+ * @see http://caniuse.com/Uint8Array
1414
+ * This is a type-conversion wrapper around `getTrxHash()`
1415
+ * @return {!Uint8Array}
1416
+ */
1417
+ TronWebProto.SmartContract.prototype.getTrxHash_asU8 = function () {
1418
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getTrxHash()));
1419
+ };
1420
+
1421
+ /**
1422
+ * @param {!(string|Uint8Array)} value
1423
+ * @return {!TronWebProto.SmartContract} returns this
1424
+ */
1425
+ TronWebProto.SmartContract.prototype.setTrxHash = function (value) {
1426
+ return jspb.Message.setProto3BytesField(this, 10, value);
1427
+ };
1428
+
1429
+ /**
1430
+ * optional int32 version = 11;
1431
+ * @return {number}
1432
+ */
1433
+ TronWebProto.SmartContract.prototype.getVersion = function () {
1434
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
1435
+ };
1436
+
1437
+ /**
1438
+ * @param {number} value
1439
+ * @return {!TronWebProto.SmartContract} returns this
1440
+ */
1441
+ TronWebProto.SmartContract.prototype.setVersion = function (value) {
1442
+ return jspb.Message.setProto3IntField(this, 11, value);
1443
+ };
1444
+
1445
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1446
+ /**
1447
+ * Creates an object representation of this proto.
1448
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1449
+ * Optional fields that are not set will be set to undefined.
1450
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1451
+ * For the list of reserved names please see:
1452
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1453
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1454
+ * JSPB instance for transitional soy proto support:
1455
+ * http://goto/soy-param-migration
1456
+ * @return {!Object}
1457
+ */
1458
+ TronWebProto.ContractState.prototype.toObject = function (opt_includeInstance) {
1459
+ return TronWebProto.ContractState.toObject(opt_includeInstance, this);
1460
+ };
1461
+
1462
+ /**
1463
+ * Static version of the {@see toObject} method.
1464
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1465
+ * the JSPB instance for transitional soy proto support:
1466
+ * http://goto/soy-param-migration
1467
+ * @param {!TronWebProto.ContractState} msg The msg instance to transform.
1468
+ * @return {!Object}
1469
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1470
+ */
1471
+ TronWebProto.ContractState.toObject = function (includeInstance, msg) {
1472
+ var f,
1473
+ obj = {
1474
+ energyUsage: jspb.Message.getFieldWithDefault(msg, 1, 0),
1475
+ energyFactor: jspb.Message.getFieldWithDefault(msg, 2, 0),
1476
+ updateCycle: jspb.Message.getFieldWithDefault(msg, 3, 0),
1477
+ };
1478
+
1479
+ if (includeInstance) {
1480
+ obj.$jspbMessageInstance = msg;
1481
+ }
1482
+ return obj;
1483
+ };
1484
+ }
1485
+
1486
+ /**
1487
+ * Deserializes binary data (in protobuf wire format).
1488
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1489
+ * @return {!TronWebProto.ContractState}
1490
+ */
1491
+ TronWebProto.ContractState.deserializeBinary = function (bytes) {
1492
+ var reader = new jspb.BinaryReader(bytes);
1493
+ var msg = new TronWebProto.ContractState();
1494
+ return TronWebProto.ContractState.deserializeBinaryFromReader(msg, reader);
1495
+ };
1496
+
1497
+ /**
1498
+ * Deserializes binary data (in protobuf wire format) from the
1499
+ * given reader into the given message object.
1500
+ * @param {!TronWebProto.ContractState} msg The message object to deserialize into.
1501
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1502
+ * @return {!TronWebProto.ContractState}
1503
+ */
1504
+ TronWebProto.ContractState.deserializeBinaryFromReader = function (msg, reader) {
1505
+ while (reader.nextField()) {
1506
+ if (reader.isEndGroup()) {
1507
+ break;
1508
+ }
1509
+ var field = reader.getFieldNumber();
1510
+ switch (field) {
1511
+ case 1:
1512
+ var value = /** @type {number} */ (reader.readInt64());
1513
+ msg.setEnergyUsage(value);
1514
+ break;
1515
+ case 2:
1516
+ var value = /** @type {number} */ (reader.readInt64());
1517
+ msg.setEnergyFactor(value);
1518
+ break;
1519
+ case 3:
1520
+ var value = /** @type {number} */ (reader.readInt64());
1521
+ msg.setUpdateCycle(value);
1522
+ break;
1523
+ default:
1524
+ reader.skipField();
1525
+ break;
1526
+ }
1527
+ }
1528
+ return msg;
1529
+ };
1530
+
1531
+ /**
1532
+ * Serializes the message to binary data (in protobuf wire format).
1533
+ * @return {!Uint8Array}
1534
+ */
1535
+ TronWebProto.ContractState.prototype.serializeBinary = function () {
1536
+ var writer = new jspb.BinaryWriter();
1537
+ TronWebProto.ContractState.serializeBinaryToWriter(this, writer);
1538
+ return writer.getResultBuffer();
1539
+ };
1540
+
1541
+ /**
1542
+ * Serializes the given message to binary data (in protobuf wire
1543
+ * format), writing to the given BinaryWriter.
1544
+ * @param {!TronWebProto.ContractState} message
1545
+ * @param {!jspb.BinaryWriter} writer
1546
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1547
+ */
1548
+ TronWebProto.ContractState.serializeBinaryToWriter = function (message, writer) {
1549
+ var f = undefined;
1550
+ f = message.getEnergyUsage();
1551
+ if (f !== 0) {
1552
+ writer.writeInt64(1, f);
1553
+ }
1554
+ f = message.getEnergyFactor();
1555
+ if (f !== 0) {
1556
+ writer.writeInt64(2, f);
1557
+ }
1558
+ f = message.getUpdateCycle();
1559
+ if (f !== 0) {
1560
+ writer.writeInt64(3, f);
1561
+ }
1562
+ };
1563
+
1564
+ /**
1565
+ * optional int64 energy_usage = 1;
1566
+ * @return {number}
1567
+ */
1568
+ TronWebProto.ContractState.prototype.getEnergyUsage = function () {
1569
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1570
+ };
1571
+
1572
+ /**
1573
+ * @param {number} value
1574
+ * @return {!TronWebProto.ContractState} returns this
1575
+ */
1576
+ TronWebProto.ContractState.prototype.setEnergyUsage = function (value) {
1577
+ return jspb.Message.setProto3IntField(this, 1, value);
1578
+ };
1579
+
1580
+ /**
1581
+ * optional int64 energy_factor = 2;
1582
+ * @return {number}
1583
+ */
1584
+ TronWebProto.ContractState.prototype.getEnergyFactor = function () {
1585
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1586
+ };
1587
+
1588
+ /**
1589
+ * @param {number} value
1590
+ * @return {!TronWebProto.ContractState} returns this
1591
+ */
1592
+ TronWebProto.ContractState.prototype.setEnergyFactor = function (value) {
1593
+ return jspb.Message.setProto3IntField(this, 2, value);
1594
+ };
1595
+
1596
+ /**
1597
+ * optional int64 update_cycle = 3;
1598
+ * @return {number}
1599
+ */
1600
+ TronWebProto.ContractState.prototype.getUpdateCycle = function () {
1601
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1602
+ };
1603
+
1604
+ /**
1605
+ * @param {number} value
1606
+ * @return {!TronWebProto.ContractState} returns this
1607
+ */
1608
+ TronWebProto.ContractState.prototype.setUpdateCycle = function (value) {
1609
+ return jspb.Message.setProto3IntField(this, 3, value);
1610
+ };
1611
+
1612
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1613
+ /**
1614
+ * Creates an object representation of this proto.
1615
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1616
+ * Optional fields that are not set will be set to undefined.
1617
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1618
+ * For the list of reserved names please see:
1619
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1620
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1621
+ * JSPB instance for transitional soy proto support:
1622
+ * http://goto/soy-param-migration
1623
+ * @return {!Object}
1624
+ */
1625
+ TronWebProto.CreateSmartContract.prototype.toObject = function (opt_includeInstance) {
1626
+ return TronWebProto.CreateSmartContract.toObject(opt_includeInstance, this);
1627
+ };
1628
+
1629
+ /**
1630
+ * Static version of the {@see toObject} method.
1631
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1632
+ * the JSPB instance for transitional soy proto support:
1633
+ * http://goto/soy-param-migration
1634
+ * @param {!TronWebProto.CreateSmartContract} msg The msg instance to transform.
1635
+ * @return {!Object}
1636
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1637
+ */
1638
+ TronWebProto.CreateSmartContract.toObject = function (includeInstance, msg) {
1639
+ var f,
1640
+ obj = {
1641
+ ownerAddress: msg.getOwnerAddress_asB64(),
1642
+ newContract: (f = msg.getNewContract()) && TronWebProto.SmartContract.toObject(includeInstance, f),
1643
+ callTokenValue: jspb.Message.getFieldWithDefault(msg, 3, 0),
1644
+ tokenId: jspb.Message.getFieldWithDefault(msg, 4, 0),
1645
+ };
1646
+
1647
+ if (includeInstance) {
1648
+ obj.$jspbMessageInstance = msg;
1649
+ }
1650
+ return obj;
1651
+ };
1652
+ }
1653
+
1654
+ /**
1655
+ * Deserializes binary data (in protobuf wire format).
1656
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1657
+ * @return {!TronWebProto.CreateSmartContract}
1658
+ */
1659
+ TronWebProto.CreateSmartContract.deserializeBinary = function (bytes) {
1660
+ var reader = new jspb.BinaryReader(bytes);
1661
+ var msg = new TronWebProto.CreateSmartContract();
1662
+ return TronWebProto.CreateSmartContract.deserializeBinaryFromReader(msg, reader);
1663
+ };
1664
+
1665
+ /**
1666
+ * Deserializes binary data (in protobuf wire format) from the
1667
+ * given reader into the given message object.
1668
+ * @param {!TronWebProto.CreateSmartContract} msg The message object to deserialize into.
1669
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1670
+ * @return {!TronWebProto.CreateSmartContract}
1671
+ */
1672
+ TronWebProto.CreateSmartContract.deserializeBinaryFromReader = function (msg, reader) {
1673
+ while (reader.nextField()) {
1674
+ if (reader.isEndGroup()) {
1675
+ break;
1676
+ }
1677
+ var field = reader.getFieldNumber();
1678
+ switch (field) {
1679
+ case 1:
1680
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1681
+ msg.setOwnerAddress(value);
1682
+ break;
1683
+ case 2:
1684
+ var value = new TronWebProto.SmartContract();
1685
+ reader.readMessage(value, TronWebProto.SmartContract.deserializeBinaryFromReader);
1686
+ msg.setNewContract(value);
1687
+ break;
1688
+ case 3:
1689
+ var value = /** @type {number} */ (reader.readInt64());
1690
+ msg.setCallTokenValue(value);
1691
+ break;
1692
+ case 4:
1693
+ var value = /** @type {number} */ (reader.readInt64());
1694
+ msg.setTokenId(value);
1695
+ break;
1696
+ default:
1697
+ reader.skipField();
1698
+ break;
1699
+ }
1700
+ }
1701
+ return msg;
1702
+ };
1703
+
1704
+ /**
1705
+ * Serializes the message to binary data (in protobuf wire format).
1706
+ * @return {!Uint8Array}
1707
+ */
1708
+ TronWebProto.CreateSmartContract.prototype.serializeBinary = function () {
1709
+ var writer = new jspb.BinaryWriter();
1710
+ TronWebProto.CreateSmartContract.serializeBinaryToWriter(this, writer);
1711
+ return writer.getResultBuffer();
1712
+ };
1713
+
1714
+ /**
1715
+ * Serializes the given message to binary data (in protobuf wire
1716
+ * format), writing to the given BinaryWriter.
1717
+ * @param {!TronWebProto.CreateSmartContract} message
1718
+ * @param {!jspb.BinaryWriter} writer
1719
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1720
+ */
1721
+ TronWebProto.CreateSmartContract.serializeBinaryToWriter = function (message, writer) {
1722
+ var f = undefined;
1723
+ f = message.getOwnerAddress_asU8();
1724
+ if (f.length > 0) {
1725
+ writer.writeBytes(1, f);
1726
+ }
1727
+ f = message.getNewContract();
1728
+ if (f != null) {
1729
+ writer.writeMessage(2, f, TronWebProto.SmartContract.serializeBinaryToWriter);
1730
+ }
1731
+ f = message.getCallTokenValue();
1732
+ if (f !== 0) {
1733
+ writer.writeInt64(3, f);
1734
+ }
1735
+ f = message.getTokenId();
1736
+ if (f !== 0) {
1737
+ writer.writeInt64(4, f);
1738
+ }
1739
+ };
1740
+
1741
+ /**
1742
+ * optional bytes owner_address = 1;
1743
+ * @return {!(string|Uint8Array)}
1744
+ */
1745
+ TronWebProto.CreateSmartContract.prototype.getOwnerAddress = function () {
1746
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ''));
1747
+ };
1748
+
1749
+ /**
1750
+ * optional bytes owner_address = 1;
1751
+ * This is a type-conversion wrapper around `getOwnerAddress()`
1752
+ * @return {string}
1753
+ */
1754
+ TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asB64 = function () {
1755
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress()));
1756
+ };
1757
+
1758
+ /**
1759
+ * optional bytes owner_address = 1;
1760
+ * Note that Uint8Array is not supported on all browsers.
1761
+ * @see http://caniuse.com/Uint8Array
1762
+ * This is a type-conversion wrapper around `getOwnerAddress()`
1763
+ * @return {!Uint8Array}
1764
+ */
1765
+ TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asU8 = function () {
1766
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress()));
1767
+ };
1768
+
1769
+ /**
1770
+ * @param {!(string|Uint8Array)} value
1771
+ * @return {!TronWebProto.CreateSmartContract} returns this
1772
+ */
1773
+ TronWebProto.CreateSmartContract.prototype.setOwnerAddress = function (value) {
1774
+ return jspb.Message.setProto3BytesField(this, 1, value);
1775
+ };
1776
+
1777
+ /**
1778
+ * optional SmartContract new_contract = 2;
1779
+ * @return {?TronWebProto.SmartContract}
1780
+ */
1781
+ TronWebProto.CreateSmartContract.prototype.getNewContract = function () {
1782
+ return /** @type{?TronWebProto.SmartContract} */ (jspb.Message.getWrapperField(this, TronWebProto.SmartContract, 2));
1783
+ };
1784
+
1785
+ /**
1786
+ * @param {?TronWebProto.SmartContract|undefined} value
1787
+ * @return {!TronWebProto.CreateSmartContract} returns this
1788
+ */
1789
+ TronWebProto.CreateSmartContract.prototype.setNewContract = function (value) {
1790
+ return jspb.Message.setWrapperField(this, 2, value);
1791
+ };
1792
+
1793
+ /**
1794
+ * Clears the message field making it undefined.
1795
+ * @return {!TronWebProto.CreateSmartContract} returns this
1796
+ */
1797
+ TronWebProto.CreateSmartContract.prototype.clearNewContract = function () {
1798
+ return this.setNewContract(undefined);
1799
+ };
1800
+
1801
+ /**
1802
+ * Returns whether this field is set.
1803
+ * @return {boolean}
1804
+ */
1805
+ TronWebProto.CreateSmartContract.prototype.hasNewContract = function () {
1806
+ return jspb.Message.getField(this, 2) != null;
1807
+ };
1808
+
1809
+ /**
1810
+ * optional int64 call_token_value = 3;
1811
+ * @return {number}
1812
+ */
1813
+ TronWebProto.CreateSmartContract.prototype.getCallTokenValue = function () {
1814
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1815
+ };
1816
+
1817
+ /**
1818
+ * @param {number} value
1819
+ * @return {!TronWebProto.CreateSmartContract} returns this
1820
+ */
1821
+ TronWebProto.CreateSmartContract.prototype.setCallTokenValue = function (value) {
1822
+ return jspb.Message.setProto3IntField(this, 3, value);
1823
+ };
1824
+
1825
+ /**
1826
+ * optional int64 token_id = 4;
1827
+ * @return {number}
1828
+ */
1829
+ TronWebProto.CreateSmartContract.prototype.getTokenId = function () {
1830
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1831
+ };
1832
+
1833
+ /**
1834
+ * @param {number} value
1835
+ * @return {!TronWebProto.CreateSmartContract} returns this
1836
+ */
1837
+ TronWebProto.CreateSmartContract.prototype.setTokenId = function (value) {
1838
+ return jspb.Message.setProto3IntField(this, 4, value);
1839
+ };
1840
+
1841
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1842
+ /**
1843
+ * Creates an object representation of this proto.
1844
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1845
+ * Optional fields that are not set will be set to undefined.
1846
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1847
+ * For the list of reserved names please see:
1848
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1849
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1850
+ * JSPB instance for transitional soy proto support:
1851
+ * http://goto/soy-param-migration
1852
+ * @return {!Object}
1853
+ */
1854
+ TronWebProto.TriggerSmartContract.prototype.toObject = function (opt_includeInstance) {
1855
+ return TronWebProto.TriggerSmartContract.toObject(opt_includeInstance, this);
1856
+ };
1857
+
1858
+ /**
1859
+ * Static version of the {@see toObject} method.
1860
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1861
+ * the JSPB instance for transitional soy proto support:
1862
+ * http://goto/soy-param-migration
1863
+ * @param {!TronWebProto.TriggerSmartContract} msg The msg instance to transform.
1864
+ * @return {!Object}
1865
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1866
+ */
1867
+ TronWebProto.TriggerSmartContract.toObject = function (includeInstance, msg) {
1868
+ var f,
1869
+ obj = {
1870
+ ownerAddress: msg.getOwnerAddress_asB64(),
1871
+ contractAddress: msg.getContractAddress_asB64(),
1872
+ callValue: jspb.Message.getFieldWithDefault(msg, 3, 0),
1873
+ data: msg.getData_asB64(),
1874
+ callTokenValue: jspb.Message.getFieldWithDefault(msg, 5, 0),
1875
+ tokenId: jspb.Message.getFieldWithDefault(msg, 6, 0),
1876
+ };
1877
+
1878
+ if (includeInstance) {
1879
+ obj.$jspbMessageInstance = msg;
1880
+ }
1881
+ return obj;
1882
+ };
1883
+ }
1884
+
1885
+ /**
1886
+ * Deserializes binary data (in protobuf wire format).
1887
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1888
+ * @return {!TronWebProto.TriggerSmartContract}
1889
+ */
1890
+ TronWebProto.TriggerSmartContract.deserializeBinary = function (bytes) {
1891
+ var reader = new jspb.BinaryReader(bytes);
1892
+ var msg = new TronWebProto.TriggerSmartContract();
1893
+ return TronWebProto.TriggerSmartContract.deserializeBinaryFromReader(msg, reader);
1894
+ };
1895
+
1896
+ /**
1897
+ * Deserializes binary data (in protobuf wire format) from the
1898
+ * given reader into the given message object.
1899
+ * @param {!TronWebProto.TriggerSmartContract} msg The message object to deserialize into.
1900
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1901
+ * @return {!TronWebProto.TriggerSmartContract}
1902
+ */
1903
+ TronWebProto.TriggerSmartContract.deserializeBinaryFromReader = function (msg, reader) {
1904
+ while (reader.nextField()) {
1905
+ if (reader.isEndGroup()) {
1906
+ break;
1907
+ }
1908
+ var field = reader.getFieldNumber();
1909
+ switch (field) {
1910
+ case 1:
1911
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1912
+ msg.setOwnerAddress(value);
1913
+ break;
1914
+ case 2:
1915
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1916
+ msg.setContractAddress(value);
1917
+ break;
1918
+ case 3:
1919
+ var value = /** @type {number} */ (reader.readInt64());
1920
+ msg.setCallValue(value);
1921
+ break;
1922
+ case 4:
1923
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1924
+ msg.setData(value);
1925
+ break;
1926
+ case 5:
1927
+ var value = /** @type {number} */ (reader.readInt64());
1928
+ msg.setCallTokenValue(value);
1929
+ break;
1930
+ case 6:
1931
+ var value = /** @type {number} */ (reader.readInt64());
1932
+ msg.setTokenId(value);
1933
+ break;
1934
+ default:
1935
+ reader.skipField();
1936
+ break;
1937
+ }
1938
+ }
1939
+ return msg;
1940
+ };
1941
+
1942
+ /**
1943
+ * Serializes the message to binary data (in protobuf wire format).
1944
+ * @return {!Uint8Array}
1945
+ */
1946
+ TronWebProto.TriggerSmartContract.prototype.serializeBinary = function () {
1947
+ var writer = new jspb.BinaryWriter();
1948
+ TronWebProto.TriggerSmartContract.serializeBinaryToWriter(this, writer);
1949
+ return writer.getResultBuffer();
1950
+ };
1951
+
1952
+ /**
1953
+ * Serializes the given message to binary data (in protobuf wire
1954
+ * format), writing to the given BinaryWriter.
1955
+ * @param {!TronWebProto.TriggerSmartContract} message
1956
+ * @param {!jspb.BinaryWriter} writer
1957
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1958
+ */
1959
+ TronWebProto.TriggerSmartContract.serializeBinaryToWriter = function (message, writer) {
1960
+ var f = undefined;
1961
+ f = message.getOwnerAddress_asU8();
1962
+ if (f.length > 0) {
1963
+ writer.writeBytes(1, f);
1964
+ }
1965
+ f = message.getContractAddress_asU8();
1966
+ if (f.length > 0) {
1967
+ writer.writeBytes(2, f);
1968
+ }
1969
+ f = message.getCallValue();
1970
+ if (f !== 0) {
1971
+ writer.writeInt64(3, f);
1972
+ }
1973
+ f = message.getData_asU8();
1974
+ if (f.length > 0) {
1975
+ writer.writeBytes(4, f);
1976
+ }
1977
+ f = message.getCallTokenValue();
1978
+ if (f !== 0) {
1979
+ writer.writeInt64(5, f);
1980
+ }
1981
+ f = message.getTokenId();
1982
+ if (f !== 0) {
1983
+ writer.writeInt64(6, f);
1984
+ }
1985
+ };
1986
+
1987
+ /**
1988
+ * optional bytes owner_address = 1;
1989
+ * @return {!(string|Uint8Array)}
1990
+ */
1991
+ TronWebProto.TriggerSmartContract.prototype.getOwnerAddress = function () {
1992
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ''));
1993
+ };
1994
+
1995
+ /**
1996
+ * optional bytes owner_address = 1;
1997
+ * This is a type-conversion wrapper around `getOwnerAddress()`
1998
+ * @return {string}
1999
+ */
2000
+ TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asB64 = function () {
2001
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress()));
2002
+ };
2003
+
2004
+ /**
2005
+ * optional bytes owner_address = 1;
2006
+ * Note that Uint8Array is not supported on all browsers.
2007
+ * @see http://caniuse.com/Uint8Array
2008
+ * This is a type-conversion wrapper around `getOwnerAddress()`
2009
+ * @return {!Uint8Array}
2010
+ */
2011
+ TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asU8 = function () {
2012
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress()));
2013
+ };
2014
+
2015
+ /**
2016
+ * @param {!(string|Uint8Array)} value
2017
+ * @return {!TronWebProto.TriggerSmartContract} returns this
2018
+ */
2019
+ TronWebProto.TriggerSmartContract.prototype.setOwnerAddress = function (value) {
2020
+ return jspb.Message.setProto3BytesField(this, 1, value);
2021
+ };
2022
+
2023
+ /**
2024
+ * optional bytes contract_address = 2;
2025
+ * @return {!(string|Uint8Array)}
2026
+ */
2027
+ TronWebProto.TriggerSmartContract.prototype.getContractAddress = function () {
2028
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ''));
2029
+ };
2030
+
2031
+ /**
2032
+ * optional bytes contract_address = 2;
2033
+ * This is a type-conversion wrapper around `getContractAddress()`
2034
+ * @return {string}
2035
+ */
2036
+ TronWebProto.TriggerSmartContract.prototype.getContractAddress_asB64 = function () {
2037
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getContractAddress()));
2038
+ };
2039
+
2040
+ /**
2041
+ * optional bytes contract_address = 2;
2042
+ * Note that Uint8Array is not supported on all browsers.
2043
+ * @see http://caniuse.com/Uint8Array
2044
+ * This is a type-conversion wrapper around `getContractAddress()`
2045
+ * @return {!Uint8Array}
2046
+ */
2047
+ TronWebProto.TriggerSmartContract.prototype.getContractAddress_asU8 = function () {
2048
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getContractAddress()));
2049
+ };
2050
+
2051
+ /**
2052
+ * @param {!(string|Uint8Array)} value
2053
+ * @return {!TronWebProto.TriggerSmartContract} returns this
2054
+ */
2055
+ TronWebProto.TriggerSmartContract.prototype.setContractAddress = function (value) {
2056
+ return jspb.Message.setProto3BytesField(this, 2, value);
2057
+ };
2058
+
2059
+ /**
2060
+ * optional int64 call_value = 3;
2061
+ * @return {number}
2062
+ */
2063
+ TronWebProto.TriggerSmartContract.prototype.getCallValue = function () {
2064
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2065
+ };
2066
+
2067
+ /**
2068
+ * @param {number} value
2069
+ * @return {!TronWebProto.TriggerSmartContract} returns this
2070
+ */
2071
+ TronWebProto.TriggerSmartContract.prototype.setCallValue = function (value) {
2072
+ return jspb.Message.setProto3IntField(this, 3, value);
2073
+ };
2074
+
2075
+ /**
2076
+ * optional bytes data = 4;
2077
+ * @return {!(string|Uint8Array)}
2078
+ */
2079
+ TronWebProto.TriggerSmartContract.prototype.getData = function () {
2080
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ''));
2081
+ };
2082
+
2083
+ /**
2084
+ * optional bytes data = 4;
2085
+ * This is a type-conversion wrapper around `getData()`
2086
+ * @return {string}
2087
+ */
2088
+ TronWebProto.TriggerSmartContract.prototype.getData_asB64 = function () {
2089
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData()));
2090
+ };
2091
+
2092
+ /**
2093
+ * optional bytes data = 4;
2094
+ * Note that Uint8Array is not supported on all browsers.
2095
+ * @see http://caniuse.com/Uint8Array
2096
+ * This is a type-conversion wrapper around `getData()`
2097
+ * @return {!Uint8Array}
2098
+ */
2099
+ TronWebProto.TriggerSmartContract.prototype.getData_asU8 = function () {
2100
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData()));
2101
+ };
2102
+
2103
+ /**
2104
+ * @param {!(string|Uint8Array)} value
2105
+ * @return {!TronWebProto.TriggerSmartContract} returns this
2106
+ */
2107
+ TronWebProto.TriggerSmartContract.prototype.setData = function (value) {
2108
+ return jspb.Message.setProto3BytesField(this, 4, value);
2109
+ };
2110
+
2111
+ /**
2112
+ * optional int64 call_token_value = 5;
2113
+ * @return {number}
2114
+ */
2115
+ TronWebProto.TriggerSmartContract.prototype.getCallTokenValue = function () {
2116
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2117
+ };
2118
+
2119
+ /**
2120
+ * @param {number} value
2121
+ * @return {!TronWebProto.TriggerSmartContract} returns this
2122
+ */
2123
+ TronWebProto.TriggerSmartContract.prototype.setCallTokenValue = function (value) {
2124
+ return jspb.Message.setProto3IntField(this, 5, value);
2125
+ };
2126
+
2127
+ /**
2128
+ * optional int64 token_id = 6;
2129
+ * @return {number}
2130
+ */
2131
+ TronWebProto.TriggerSmartContract.prototype.getTokenId = function () {
2132
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
2133
+ };
2134
+
2135
+ /**
2136
+ * @param {number} value
2137
+ * @return {!TronWebProto.TriggerSmartContract} returns this
2138
+ */
2139
+ TronWebProto.TriggerSmartContract.prototype.setTokenId = function (value) {
2140
+ return jspb.Message.setProto3IntField(this, 6, value);
2141
+ };
2142
+
2143
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2144
+ /**
2145
+ * Creates an object representation of this proto.
2146
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2147
+ * Optional fields that are not set will be set to undefined.
2148
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2149
+ * For the list of reserved names please see:
2150
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2151
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2152
+ * JSPB instance for transitional soy proto support:
2153
+ * http://goto/soy-param-migration
2154
+ * @return {!Object}
2155
+ */
2156
+ TronWebProto.ClearABIContract.prototype.toObject = function (opt_includeInstance) {
2157
+ return TronWebProto.ClearABIContract.toObject(opt_includeInstance, this);
2158
+ };
2159
+
2160
+ /**
2161
+ * Static version of the {@see toObject} method.
2162
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2163
+ * the JSPB instance for transitional soy proto support:
2164
+ * http://goto/soy-param-migration
2165
+ * @param {!TronWebProto.ClearABIContract} msg The msg instance to transform.
2166
+ * @return {!Object}
2167
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2168
+ */
2169
+ TronWebProto.ClearABIContract.toObject = function (includeInstance, msg) {
2170
+ var f,
2171
+ obj = {
2172
+ ownerAddress: msg.getOwnerAddress_asB64(),
2173
+ contractAddress: msg.getContractAddress_asB64(),
2174
+ };
2175
+
2176
+ if (includeInstance) {
2177
+ obj.$jspbMessageInstance = msg;
2178
+ }
2179
+ return obj;
2180
+ };
2181
+ }
2182
+
2183
+ /**
2184
+ * Deserializes binary data (in protobuf wire format).
2185
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2186
+ * @return {!TronWebProto.ClearABIContract}
2187
+ */
2188
+ TronWebProto.ClearABIContract.deserializeBinary = function (bytes) {
2189
+ var reader = new jspb.BinaryReader(bytes);
2190
+ var msg = new TronWebProto.ClearABIContract();
2191
+ return TronWebProto.ClearABIContract.deserializeBinaryFromReader(msg, reader);
2192
+ };
2193
+
2194
+ /**
2195
+ * Deserializes binary data (in protobuf wire format) from the
2196
+ * given reader into the given message object.
2197
+ * @param {!TronWebProto.ClearABIContract} msg The message object to deserialize into.
2198
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2199
+ * @return {!TronWebProto.ClearABIContract}
2200
+ */
2201
+ TronWebProto.ClearABIContract.deserializeBinaryFromReader = function (msg, reader) {
2202
+ while (reader.nextField()) {
2203
+ if (reader.isEndGroup()) {
2204
+ break;
2205
+ }
2206
+ var field = reader.getFieldNumber();
2207
+ switch (field) {
2208
+ case 1:
2209
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2210
+ msg.setOwnerAddress(value);
2211
+ break;
2212
+ case 2:
2213
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2214
+ msg.setContractAddress(value);
2215
+ break;
2216
+ default:
2217
+ reader.skipField();
2218
+ break;
2219
+ }
2220
+ }
2221
+ return msg;
2222
+ };
2223
+
2224
+ /**
2225
+ * Serializes the message to binary data (in protobuf wire format).
2226
+ * @return {!Uint8Array}
2227
+ */
2228
+ TronWebProto.ClearABIContract.prototype.serializeBinary = function () {
2229
+ var writer = new jspb.BinaryWriter();
2230
+ TronWebProto.ClearABIContract.serializeBinaryToWriter(this, writer);
2231
+ return writer.getResultBuffer();
2232
+ };
2233
+
2234
+ /**
2235
+ * Serializes the given message to binary data (in protobuf wire
2236
+ * format), writing to the given BinaryWriter.
2237
+ * @param {!TronWebProto.ClearABIContract} message
2238
+ * @param {!jspb.BinaryWriter} writer
2239
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2240
+ */
2241
+ TronWebProto.ClearABIContract.serializeBinaryToWriter = function (message, writer) {
2242
+ var f = undefined;
2243
+ f = message.getOwnerAddress_asU8();
2244
+ if (f.length > 0) {
2245
+ writer.writeBytes(1, f);
2246
+ }
2247
+ f = message.getContractAddress_asU8();
2248
+ if (f.length > 0) {
2249
+ writer.writeBytes(2, f);
2250
+ }
2251
+ };
2252
+
2253
+ /**
2254
+ * optional bytes owner_address = 1;
2255
+ * @return {!(string|Uint8Array)}
2256
+ */
2257
+ TronWebProto.ClearABIContract.prototype.getOwnerAddress = function () {
2258
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ''));
2259
+ };
2260
+
2261
+ /**
2262
+ * optional bytes owner_address = 1;
2263
+ * This is a type-conversion wrapper around `getOwnerAddress()`
2264
+ * @return {string}
2265
+ */
2266
+ TronWebProto.ClearABIContract.prototype.getOwnerAddress_asB64 = function () {
2267
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress()));
2268
+ };
2269
+
2270
+ /**
2271
+ * optional bytes owner_address = 1;
2272
+ * Note that Uint8Array is not supported on all browsers.
2273
+ * @see http://caniuse.com/Uint8Array
2274
+ * This is a type-conversion wrapper around `getOwnerAddress()`
2275
+ * @return {!Uint8Array}
2276
+ */
2277
+ TronWebProto.ClearABIContract.prototype.getOwnerAddress_asU8 = function () {
2278
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress()));
2279
+ };
2280
+
2281
+ /**
2282
+ * @param {!(string|Uint8Array)} value
2283
+ * @return {!TronWebProto.ClearABIContract} returns this
2284
+ */
2285
+ TronWebProto.ClearABIContract.prototype.setOwnerAddress = function (value) {
2286
+ return jspb.Message.setProto3BytesField(this, 1, value);
2287
+ };
2288
+
2289
+ /**
2290
+ * optional bytes contract_address = 2;
2291
+ * @return {!(string|Uint8Array)}
2292
+ */
2293
+ TronWebProto.ClearABIContract.prototype.getContractAddress = function () {
2294
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ''));
2295
+ };
2296
+
2297
+ /**
2298
+ * optional bytes contract_address = 2;
2299
+ * This is a type-conversion wrapper around `getContractAddress()`
2300
+ * @return {string}
2301
+ */
2302
+ TronWebProto.ClearABIContract.prototype.getContractAddress_asB64 = function () {
2303
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getContractAddress()));
2304
+ };
2305
+
2306
+ /**
2307
+ * optional bytes contract_address = 2;
2308
+ * Note that Uint8Array is not supported on all browsers.
2309
+ * @see http://caniuse.com/Uint8Array
2310
+ * This is a type-conversion wrapper around `getContractAddress()`
2311
+ * @return {!Uint8Array}
2312
+ */
2313
+ TronWebProto.ClearABIContract.prototype.getContractAddress_asU8 = function () {
2314
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getContractAddress()));
2315
+ };
2316
+
2317
+ /**
2318
+ * @param {!(string|Uint8Array)} value
2319
+ * @return {!TronWebProto.ClearABIContract} returns this
2320
+ */
2321
+ TronWebProto.ClearABIContract.prototype.setContractAddress = function (value) {
2322
+ return jspb.Message.setProto3BytesField(this, 2, value);
2323
+ };
2324
+
2325
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2326
+ /**
2327
+ * Creates an object representation of this proto.
2328
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2329
+ * Optional fields that are not set will be set to undefined.
2330
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2331
+ * For the list of reserved names please see:
2332
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2333
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2334
+ * JSPB instance for transitional soy proto support:
2335
+ * http://goto/soy-param-migration
2336
+ * @return {!Object}
2337
+ */
2338
+ TronWebProto.UpdateSettingContract.prototype.toObject = function (opt_includeInstance) {
2339
+ return TronWebProto.UpdateSettingContract.toObject(opt_includeInstance, this);
2340
+ };
2341
+
2342
+ /**
2343
+ * Static version of the {@see toObject} method.
2344
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2345
+ * the JSPB instance for transitional soy proto support:
2346
+ * http://goto/soy-param-migration
2347
+ * @param {!TronWebProto.UpdateSettingContract} msg The msg instance to transform.
2348
+ * @return {!Object}
2349
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2350
+ */
2351
+ TronWebProto.UpdateSettingContract.toObject = function (includeInstance, msg) {
2352
+ var f,
2353
+ obj = {
2354
+ ownerAddress: msg.getOwnerAddress_asB64(),
2355
+ contractAddress: msg.getContractAddress_asB64(),
2356
+ consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 3, 0),
2357
+ };
2358
+
2359
+ if (includeInstance) {
2360
+ obj.$jspbMessageInstance = msg;
2361
+ }
2362
+ return obj;
2363
+ };
2364
+ }
2365
+
2366
+ /**
2367
+ * Deserializes binary data (in protobuf wire format).
2368
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2369
+ * @return {!TronWebProto.UpdateSettingContract}
2370
+ */
2371
+ TronWebProto.UpdateSettingContract.deserializeBinary = function (bytes) {
2372
+ var reader = new jspb.BinaryReader(bytes);
2373
+ var msg = new TronWebProto.UpdateSettingContract();
2374
+ return TronWebProto.UpdateSettingContract.deserializeBinaryFromReader(msg, reader);
2375
+ };
2376
+
2377
+ /**
2378
+ * Deserializes binary data (in protobuf wire format) from the
2379
+ * given reader into the given message object.
2380
+ * @param {!TronWebProto.UpdateSettingContract} msg The message object to deserialize into.
2381
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2382
+ * @return {!TronWebProto.UpdateSettingContract}
2383
+ */
2384
+ TronWebProto.UpdateSettingContract.deserializeBinaryFromReader = function (msg, reader) {
2385
+ while (reader.nextField()) {
2386
+ if (reader.isEndGroup()) {
2387
+ break;
2388
+ }
2389
+ var field = reader.getFieldNumber();
2390
+ switch (field) {
2391
+ case 1:
2392
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2393
+ msg.setOwnerAddress(value);
2394
+ break;
2395
+ case 2:
2396
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2397
+ msg.setContractAddress(value);
2398
+ break;
2399
+ case 3:
2400
+ var value = /** @type {number} */ (reader.readInt64());
2401
+ msg.setConsumeUserResourcePercent(value);
2402
+ break;
2403
+ default:
2404
+ reader.skipField();
2405
+ break;
2406
+ }
2407
+ }
2408
+ return msg;
2409
+ };
2410
+
2411
+ /**
2412
+ * Serializes the message to binary data (in protobuf wire format).
2413
+ * @return {!Uint8Array}
2414
+ */
2415
+ TronWebProto.UpdateSettingContract.prototype.serializeBinary = function () {
2416
+ var writer = new jspb.BinaryWriter();
2417
+ TronWebProto.UpdateSettingContract.serializeBinaryToWriter(this, writer);
2418
+ return writer.getResultBuffer();
2419
+ };
2420
+
2421
+ /**
2422
+ * Serializes the given message to binary data (in protobuf wire
2423
+ * format), writing to the given BinaryWriter.
2424
+ * @param {!TronWebProto.UpdateSettingContract} message
2425
+ * @param {!jspb.BinaryWriter} writer
2426
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2427
+ */
2428
+ TronWebProto.UpdateSettingContract.serializeBinaryToWriter = function (message, writer) {
2429
+ var f = undefined;
2430
+ f = message.getOwnerAddress_asU8();
2431
+ if (f.length > 0) {
2432
+ writer.writeBytes(1, f);
2433
+ }
2434
+ f = message.getContractAddress_asU8();
2435
+ if (f.length > 0) {
2436
+ writer.writeBytes(2, f);
2437
+ }
2438
+ f = message.getConsumeUserResourcePercent();
2439
+ if (f !== 0) {
2440
+ writer.writeInt64(3, f);
2441
+ }
2442
+ };
2443
+
2444
+ /**
2445
+ * optional bytes owner_address = 1;
2446
+ * @return {!(string|Uint8Array)}
2447
+ */
2448
+ TronWebProto.UpdateSettingContract.prototype.getOwnerAddress = function () {
2449
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ''));
2450
+ };
2451
+
2452
+ /**
2453
+ * optional bytes owner_address = 1;
2454
+ * This is a type-conversion wrapper around `getOwnerAddress()`
2455
+ * @return {string}
2456
+ */
2457
+ TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asB64 = function () {
2458
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress()));
2459
+ };
2460
+
2461
+ /**
2462
+ * optional bytes owner_address = 1;
2463
+ * Note that Uint8Array is not supported on all browsers.
2464
+ * @see http://caniuse.com/Uint8Array
2465
+ * This is a type-conversion wrapper around `getOwnerAddress()`
2466
+ * @return {!Uint8Array}
2467
+ */
2468
+ TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asU8 = function () {
2469
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress()));
2470
+ };
2471
+
2472
+ /**
2473
+ * @param {!(string|Uint8Array)} value
2474
+ * @return {!TronWebProto.UpdateSettingContract} returns this
2475
+ */
2476
+ TronWebProto.UpdateSettingContract.prototype.setOwnerAddress = function (value) {
2477
+ return jspb.Message.setProto3BytesField(this, 1, value);
2478
+ };
2479
+
2480
+ /**
2481
+ * optional bytes contract_address = 2;
2482
+ * @return {!(string|Uint8Array)}
2483
+ */
2484
+ TronWebProto.UpdateSettingContract.prototype.getContractAddress = function () {
2485
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ''));
2486
+ };
2487
+
2488
+ /**
2489
+ * optional bytes contract_address = 2;
2490
+ * This is a type-conversion wrapper around `getContractAddress()`
2491
+ * @return {string}
2492
+ */
2493
+ TronWebProto.UpdateSettingContract.prototype.getContractAddress_asB64 = function () {
2494
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getContractAddress()));
2495
+ };
2496
+
2497
+ /**
2498
+ * optional bytes contract_address = 2;
2499
+ * Note that Uint8Array is not supported on all browsers.
2500
+ * @see http://caniuse.com/Uint8Array
2501
+ * This is a type-conversion wrapper around `getContractAddress()`
2502
+ * @return {!Uint8Array}
2503
+ */
2504
+ TronWebProto.UpdateSettingContract.prototype.getContractAddress_asU8 = function () {
2505
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getContractAddress()));
2506
+ };
2507
+
2508
+ /**
2509
+ * @param {!(string|Uint8Array)} value
2510
+ * @return {!TronWebProto.UpdateSettingContract} returns this
2511
+ */
2512
+ TronWebProto.UpdateSettingContract.prototype.setContractAddress = function (value) {
2513
+ return jspb.Message.setProto3BytesField(this, 2, value);
2514
+ };
2515
+
2516
+ /**
2517
+ * optional int64 consume_user_resource_percent = 3;
2518
+ * @return {number}
2519
+ */
2520
+ TronWebProto.UpdateSettingContract.prototype.getConsumeUserResourcePercent = function () {
2521
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2522
+ };
2523
+
2524
+ /**
2525
+ * @param {number} value
2526
+ * @return {!TronWebProto.UpdateSettingContract} returns this
2527
+ */
2528
+ TronWebProto.UpdateSettingContract.prototype.setConsumeUserResourcePercent = function (value) {
2529
+ return jspb.Message.setProto3IntField(this, 3, value);
2530
+ };
2531
+
2532
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2533
+ /**
2534
+ * Creates an object representation of this proto.
2535
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2536
+ * Optional fields that are not set will be set to undefined.
2537
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2538
+ * For the list of reserved names please see:
2539
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2540
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2541
+ * JSPB instance for transitional soy proto support:
2542
+ * http://goto/soy-param-migration
2543
+ * @return {!Object}
2544
+ */
2545
+ TronWebProto.UpdateEnergyLimitContract.prototype.toObject = function (opt_includeInstance) {
2546
+ return TronWebProto.UpdateEnergyLimitContract.toObject(opt_includeInstance, this);
2547
+ };
2548
+
2549
+ /**
2550
+ * Static version of the {@see toObject} method.
2551
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2552
+ * the JSPB instance for transitional soy proto support:
2553
+ * http://goto/soy-param-migration
2554
+ * @param {!TronWebProto.UpdateEnergyLimitContract} msg The msg instance to transform.
2555
+ * @return {!Object}
2556
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2557
+ */
2558
+ TronWebProto.UpdateEnergyLimitContract.toObject = function (includeInstance, msg) {
2559
+ var f,
2560
+ obj = {
2561
+ ownerAddress: msg.getOwnerAddress_asB64(),
2562
+ contractAddress: msg.getContractAddress_asB64(),
2563
+ originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 3, 0),
2564
+ };
2565
+
2566
+ if (includeInstance) {
2567
+ obj.$jspbMessageInstance = msg;
2568
+ }
2569
+ return obj;
2570
+ };
2571
+ }
2572
+
2573
+ /**
2574
+ * Deserializes binary data (in protobuf wire format).
2575
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2576
+ * @return {!TronWebProto.UpdateEnergyLimitContract}
2577
+ */
2578
+ TronWebProto.UpdateEnergyLimitContract.deserializeBinary = function (bytes) {
2579
+ var reader = new jspb.BinaryReader(bytes);
2580
+ var msg = new TronWebProto.UpdateEnergyLimitContract();
2581
+ return TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader(msg, reader);
2582
+ };
2583
+
2584
+ /**
2585
+ * Deserializes binary data (in protobuf wire format) from the
2586
+ * given reader into the given message object.
2587
+ * @param {!TronWebProto.UpdateEnergyLimitContract} msg The message object to deserialize into.
2588
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2589
+ * @return {!TronWebProto.UpdateEnergyLimitContract}
2590
+ */
2591
+ TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader = function (msg, reader) {
2592
+ while (reader.nextField()) {
2593
+ if (reader.isEndGroup()) {
2594
+ break;
2595
+ }
2596
+ var field = reader.getFieldNumber();
2597
+ switch (field) {
2598
+ case 1:
2599
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2600
+ msg.setOwnerAddress(value);
2601
+ break;
2602
+ case 2:
2603
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2604
+ msg.setContractAddress(value);
2605
+ break;
2606
+ case 3:
2607
+ var value = /** @type {number} */ (reader.readInt64());
2608
+ msg.setOriginEnergyLimit(value);
2609
+ break;
2610
+ default:
2611
+ reader.skipField();
2612
+ break;
2613
+ }
2614
+ }
2615
+ return msg;
2616
+ };
2617
+
2618
+ /**
2619
+ * Serializes the message to binary data (in protobuf wire format).
2620
+ * @return {!Uint8Array}
2621
+ */
2622
+ TronWebProto.UpdateEnergyLimitContract.prototype.serializeBinary = function () {
2623
+ var writer = new jspb.BinaryWriter();
2624
+ TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter(this, writer);
2625
+ return writer.getResultBuffer();
2626
+ };
2627
+
2628
+ /**
2629
+ * Serializes the given message to binary data (in protobuf wire
2630
+ * format), writing to the given BinaryWriter.
2631
+ * @param {!TronWebProto.UpdateEnergyLimitContract} message
2632
+ * @param {!jspb.BinaryWriter} writer
2633
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2634
+ */
2635
+ TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter = function (message, writer) {
2636
+ var f = undefined;
2637
+ f = message.getOwnerAddress_asU8();
2638
+ if (f.length > 0) {
2639
+ writer.writeBytes(1, f);
2640
+ }
2641
+ f = message.getContractAddress_asU8();
2642
+ if (f.length > 0) {
2643
+ writer.writeBytes(2, f);
2644
+ }
2645
+ f = message.getOriginEnergyLimit();
2646
+ if (f !== 0) {
2647
+ writer.writeInt64(3, f);
2648
+ }
2649
+ };
2650
+
2651
+ /**
2652
+ * optional bytes owner_address = 1;
2653
+ * @return {!(string|Uint8Array)}
2654
+ */
2655
+ TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress = function () {
2656
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ''));
2657
+ };
2658
+
2659
+ /**
2660
+ * optional bytes owner_address = 1;
2661
+ * This is a type-conversion wrapper around `getOwnerAddress()`
2662
+ * @return {string}
2663
+ */
2664
+ TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64 = function () {
2665
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getOwnerAddress()));
2666
+ };
2667
+
2668
+ /**
2669
+ * optional bytes owner_address = 1;
2670
+ * Note that Uint8Array is not supported on all browsers.
2671
+ * @see http://caniuse.com/Uint8Array
2672
+ * This is a type-conversion wrapper around `getOwnerAddress()`
2673
+ * @return {!Uint8Array}
2674
+ */
2675
+ TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8 = function () {
2676
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getOwnerAddress()));
2677
+ };
2678
+
2679
+ /**
2680
+ * @param {!(string|Uint8Array)} value
2681
+ * @return {!TronWebProto.UpdateEnergyLimitContract} returns this
2682
+ */
2683
+ TronWebProto.UpdateEnergyLimitContract.prototype.setOwnerAddress = function (value) {
2684
+ return jspb.Message.setProto3BytesField(this, 1, value);
2685
+ };
2686
+
2687
+ /**
2688
+ * optional bytes contract_address = 2;
2689
+ * @return {!(string|Uint8Array)}
2690
+ */
2691
+ TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress = function () {
2692
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ''));
2693
+ };
2694
+
2695
+ /**
2696
+ * optional bytes contract_address = 2;
2697
+ * This is a type-conversion wrapper around `getContractAddress()`
2698
+ * @return {string}
2699
+ */
2700
+ TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asB64 = function () {
2701
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getContractAddress()));
2702
+ };
2703
+
2704
+ /**
2705
+ * optional bytes contract_address = 2;
2706
+ * Note that Uint8Array is not supported on all browsers.
2707
+ * @see http://caniuse.com/Uint8Array
2708
+ * This is a type-conversion wrapper around `getContractAddress()`
2709
+ * @return {!Uint8Array}
2710
+ */
2711
+ TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asU8 = function () {
2712
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getContractAddress()));
2713
+ };
2714
+
2715
+ /**
2716
+ * @param {!(string|Uint8Array)} value
2717
+ * @return {!TronWebProto.UpdateEnergyLimitContract} returns this
2718
+ */
2719
+ TronWebProto.UpdateEnergyLimitContract.prototype.setContractAddress = function (value) {
2720
+ return jspb.Message.setProto3BytesField(this, 2, value);
2721
+ };
2722
+
2723
+ /**
2724
+ * optional int64 origin_energy_limit = 3;
2725
+ * @return {number}
2726
+ */
2727
+ TronWebProto.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit = function () {
2728
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2729
+ };
2730
+
2731
+ /**
2732
+ * @param {number} value
2733
+ * @return {!TronWebProto.UpdateEnergyLimitContract} returns this
2734
+ */
2735
+ TronWebProto.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit = function (value) {
2736
+ return jspb.Message.setProto3IntField(this, 3, value);
2737
+ };
2738
+
2739
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2740
+ /**
2741
+ * Creates an object representation of this proto.
2742
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2743
+ * Optional fields that are not set will be set to undefined.
2744
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2745
+ * For the list of reserved names please see:
2746
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2747
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2748
+ * JSPB instance for transitional soy proto support:
2749
+ * http://goto/soy-param-migration
2750
+ * @return {!Object}
2751
+ */
2752
+ TronWebProto.SmartContractDataWrapper.prototype.toObject = function (opt_includeInstance) {
2753
+ return TronWebProto.SmartContractDataWrapper.toObject(opt_includeInstance, this);
2754
+ };
2755
+
2756
+ /**
2757
+ * Static version of the {@see toObject} method.
2758
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2759
+ * the JSPB instance for transitional soy proto support:
2760
+ * http://goto/soy-param-migration
2761
+ * @param {!TronWebProto.SmartContractDataWrapper} msg The msg instance to transform.
2762
+ * @return {!Object}
2763
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2764
+ */
2765
+ TronWebProto.SmartContractDataWrapper.toObject = function (includeInstance, msg) {
2766
+ var f,
2767
+ obj = {
2768
+ smartContract: (f = msg.getSmartContract()) && TronWebProto.SmartContract.toObject(includeInstance, f),
2769
+ runtimecode: msg.getRuntimecode_asB64(),
2770
+ contractState: (f = msg.getContractState()) && TronWebProto.ContractState.toObject(includeInstance, f),
2771
+ };
2772
+
2773
+ if (includeInstance) {
2774
+ obj.$jspbMessageInstance = msg;
2775
+ }
2776
+ return obj;
2777
+ };
2778
+ }
2779
+
2780
+ /**
2781
+ * Deserializes binary data (in protobuf wire format).
2782
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2783
+ * @return {!TronWebProto.SmartContractDataWrapper}
2784
+ */
2785
+ TronWebProto.SmartContractDataWrapper.deserializeBinary = function (bytes) {
2786
+ var reader = new jspb.BinaryReader(bytes);
2787
+ var msg = new TronWebProto.SmartContractDataWrapper();
2788
+ return TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader(msg, reader);
2789
+ };
2790
+
2791
+ /**
2792
+ * Deserializes binary data (in protobuf wire format) from the
2793
+ * given reader into the given message object.
2794
+ * @param {!TronWebProto.SmartContractDataWrapper} msg The message object to deserialize into.
2795
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2796
+ * @return {!TronWebProto.SmartContractDataWrapper}
2797
+ */
2798
+ TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader = function (msg, reader) {
2799
+ while (reader.nextField()) {
2800
+ if (reader.isEndGroup()) {
2801
+ break;
2802
+ }
2803
+ var field = reader.getFieldNumber();
2804
+ switch (field) {
2805
+ case 1:
2806
+ var value = new TronWebProto.SmartContract();
2807
+ reader.readMessage(value, TronWebProto.SmartContract.deserializeBinaryFromReader);
2808
+ msg.setSmartContract(value);
2809
+ break;
2810
+ case 2:
2811
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2812
+ msg.setRuntimecode(value);
2813
+ break;
2814
+ case 3:
2815
+ var value = new TronWebProto.ContractState();
2816
+ reader.readMessage(value, TronWebProto.ContractState.deserializeBinaryFromReader);
2817
+ msg.setContractState(value);
2818
+ break;
2819
+ default:
2820
+ reader.skipField();
2821
+ break;
2822
+ }
2823
+ }
2824
+ return msg;
2825
+ };
2826
+
2827
+ /**
2828
+ * Serializes the message to binary data (in protobuf wire format).
2829
+ * @return {!Uint8Array}
2830
+ */
2831
+ TronWebProto.SmartContractDataWrapper.prototype.serializeBinary = function () {
2832
+ var writer = new jspb.BinaryWriter();
2833
+ TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter(this, writer);
2834
+ return writer.getResultBuffer();
2835
+ };
2836
+
2837
+ /**
2838
+ * Serializes the given message to binary data (in protobuf wire
2839
+ * format), writing to the given BinaryWriter.
2840
+ * @param {!TronWebProto.SmartContractDataWrapper} message
2841
+ * @param {!jspb.BinaryWriter} writer
2842
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2843
+ */
2844
+ TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter = function (message, writer) {
2845
+ var f = undefined;
2846
+ f = message.getSmartContract();
2847
+ if (f != null) {
2848
+ writer.writeMessage(1, f, TronWebProto.SmartContract.serializeBinaryToWriter);
2849
+ }
2850
+ f = message.getRuntimecode_asU8();
2851
+ if (f.length > 0) {
2852
+ writer.writeBytes(2, f);
2853
+ }
2854
+ f = message.getContractState();
2855
+ if (f != null) {
2856
+ writer.writeMessage(3, f, TronWebProto.ContractState.serializeBinaryToWriter);
2857
+ }
2858
+ };
2859
+
2860
+ /**
2861
+ * optional SmartContract smart_contract = 1;
2862
+ * @return {?TronWebProto.SmartContract}
2863
+ */
2864
+ TronWebProto.SmartContractDataWrapper.prototype.getSmartContract = function () {
2865
+ return /** @type{?TronWebProto.SmartContract} */ (jspb.Message.getWrapperField(this, TronWebProto.SmartContract, 1));
2866
+ };
2867
+
2868
+ /**
2869
+ * @param {?TronWebProto.SmartContract|undefined} value
2870
+ * @return {!TronWebProto.SmartContractDataWrapper} returns this
2871
+ */
2872
+ TronWebProto.SmartContractDataWrapper.prototype.setSmartContract = function (value) {
2873
+ return jspb.Message.setWrapperField(this, 1, value);
2874
+ };
2875
+
2876
+ /**
2877
+ * Clears the message field making it undefined.
2878
+ * @return {!TronWebProto.SmartContractDataWrapper} returns this
2879
+ */
2880
+ TronWebProto.SmartContractDataWrapper.prototype.clearSmartContract = function () {
2881
+ return this.setSmartContract(undefined);
2882
+ };
2883
+
2884
+ /**
2885
+ * Returns whether this field is set.
2886
+ * @return {boolean}
2887
+ */
2888
+ TronWebProto.SmartContractDataWrapper.prototype.hasSmartContract = function () {
2889
+ return jspb.Message.getField(this, 1) != null;
2890
+ };
2891
+
2892
+ /**
2893
+ * optional bytes runtimecode = 2;
2894
+ * @return {!(string|Uint8Array)}
2895
+ */
2896
+ TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode = function () {
2897
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ''));
2898
+ };
2899
+
2900
+ /**
2901
+ * optional bytes runtimecode = 2;
2902
+ * This is a type-conversion wrapper around `getRuntimecode()`
2903
+ * @return {string}
2904
+ */
2905
+ TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asB64 = function () {
2906
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getRuntimecode()));
2907
+ };
2908
+
2909
+ /**
2910
+ * optional bytes runtimecode = 2;
2911
+ * Note that Uint8Array is not supported on all browsers.
2912
+ * @see http://caniuse.com/Uint8Array
2913
+ * This is a type-conversion wrapper around `getRuntimecode()`
2914
+ * @return {!Uint8Array}
2915
+ */
2916
+ TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asU8 = function () {
2917
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getRuntimecode()));
2918
+ };
2919
+
2920
+ /**
2921
+ * @param {!(string|Uint8Array)} value
2922
+ * @return {!TronWebProto.SmartContractDataWrapper} returns this
2923
+ */
2924
+ TronWebProto.SmartContractDataWrapper.prototype.setRuntimecode = function (value) {
2925
+ return jspb.Message.setProto3BytesField(this, 2, value);
2926
+ };
2927
+
2928
+ /**
2929
+ * optional ContractState contract_state = 3;
2930
+ * @return {?TronWebProto.ContractState}
2931
+ */
2932
+ TronWebProto.SmartContractDataWrapper.prototype.getContractState = function () {
2933
+ return /** @type{?TronWebProto.ContractState} */ (jspb.Message.getWrapperField(this, TronWebProto.ContractState, 3));
2934
+ };
2935
+
2936
+ /**
2937
+ * @param {?TronWebProto.ContractState|undefined} value
2938
+ * @return {!TronWebProto.SmartContractDataWrapper} returns this
2939
+ */
2940
+ TronWebProto.SmartContractDataWrapper.prototype.setContractState = function (value) {
2941
+ return jspb.Message.setWrapperField(this, 3, value);
2942
+ };
2943
+
2944
+ /**
2945
+ * Clears the message field making it undefined.
2946
+ * @return {!TronWebProto.SmartContractDataWrapper} returns this
2947
+ */
2948
+ TronWebProto.SmartContractDataWrapper.prototype.clearContractState = function () {
2949
+ return this.setContractState(undefined);
2950
+ };
2951
+
2952
+ /**
2953
+ * Returns whether this field is set.
2954
+ * @return {boolean}
2955
+ */
2956
+ TronWebProto.SmartContractDataWrapper.prototype.hasContractState = function () {
2957
+ return jspb.Message.getField(this, 3) != null;
2958
+ };
2959
+
2960
+ goog.object.extend(exports, TronWebProto);