The protocol is an independent project. You can use it for building other application.
java-tron, wallet-cli and grpc-gateway
git subtree pull --prefix src/main/protos/ protocol master
License: GNU Lesser General Public License v3.0
The protocol is an independent project. You can use it for building other application.
java-tron, wallet-cli and grpc-gateway
git subtree pull --prefix src/main/protos/ protocol master
A transaction should have a contractRet
field, so we can tell if the transaction is success.
But transaction da124c316ea64e5df700296376d0cf894215e241b50c6cf6c71ae0aa7021d815 do not have a contractRet field, the raw data from trongrid is below:
curl -X POST https://api.trongrid.io/wallet/gettransactionbyid -d '{"value": "31743abbba46f4c458112ea4aa50dad42bba6cec0d73599cc22ad65aec8dc3aa"}'
{
"ret": [{}],
"signature": ["957c31368ceb44e274d4a563006bf34e7d121fb72f20c2bdb7648934177d5c9b5e247e0a9acaae64858fc3d6419354c5cc03c174a3e5a610b3f88f488b8eefc601"],
"txID": "31743abbba46f4c458112ea4aa50dad42bba6cec0d73599cc22ad65aec8dc3aa",
"raw_data": {
"data": "2053656e742066726f6d2054726f6e57616c6c6574",
"contract": [{
"parameter": {
"value": {
"amount": 21750000,
"owner_address": "41cc0af1db2de5687613e1086a1ab92eca29abba86",
"to_address": "41f5cc3be990c3686c9a183766f78a1892a8650197"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract"
}],
"ref_block_bytes": "3ed9",
"ref_block_hash": "7e6bf293e63e4dd1",
"expiration": 1561507505743,
"timestamp": 1561507206118
},
"raw_data_hex": "0a023ed922087e6bf293e63e4dd140cfcce688b92d52152053656e742066726f6d2054726f6e57616c6c65745a68080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412330a1541cc0af1db2de5687613e1086a1ab92eca29abba86121541f5cc3be990c3686c9a183766f78a1892a865019718f0c1af0a70e6a7d488b92d"
}
So the question is:
contractRet
exists in every TransferContract transaction?What should the ByteMessage provide like? there's also no relevant documentation described......
https://github.com/tronprotocol/protocol/blob/master/api/api.proto
This library is older than the one present here : https://github.com/tronprotocol/java-tron/tree/develop/protocol/src/main/protos
In the latest version above RPC's like estimate_energy are available.
I am trying to execute TriggerConstantContract via gRPC protocol and having returned this error:
"A���=contract validate error: No contract or not a smart contract
I am setting addresses like this:
$sc = new TriggerSmartContract();
$sc->setOwnerAddress('41977C20977F412C2A1AA4EF3D49FEE5EC4C31CDFB');
$sc->setContractAddress('419E62BE7F4F103C36507CB2A753418791B1CDC182'); // USDT contract.
gRPC client is PHP library generated from this repo, but I think that's irrelevant.
I am using the latest stable release.
I have TriggerConstantContract working via HTTP but can't make it working using gRPC.
Why does the block in the GRPC protocol not add the txId field?
curl -X POST https://api.trongrid.io/wallet/updateBrokerage -d '{"owner_address":"TGj1Ej1qRzL9feLTLhjwgxXF4Ct6GTWg2U", "brokerage":20, "visible":true}'
The above command gives an error, owner_address is encoded in hex format, no error is reported.
Content of file ./install-googleapis.sh seems to be outdated and I see two problems there:
cannot find package "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger"
(this package seems to be deprecated and replaced)
And
wget http://central.maven.org/maven2/com/google/api/grpc/googleapis-common-protos/0.0.3/googleapis-common-protos-0.0.3.jar
returns
--2020-12-24 19:02:17-- http://central.maven.org/maven2/com/google/api/grpc/googleapis-common-protos/0.0.3/googleapis-common-protos-0.0.3.jar
Resolving central.maven.org (central.maven.org)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address ‘central.maven.org
Can we have this fixed ?
unable to freeze trx to gain power,bandwidth from tronscan.org
Hi,
where are the C based language API's for the Tron protocol?
I am getting error on line with BELOW_THAN_ME = 0X24;
(Tron.proto file):
Illegal id 0X24. Fixed just changing to 0x24
, but i dont know what it can break
Здрастуйте. Подскажите на SefePal столкнулися с такой проблемой, при передаче или выводе USDT мне сразу выбивает SIGEEROR. Дело ещё такого рода что при покупке TRX деньги у меня с карты уходят но TRX не появляется.. Что может быть?
Whenever the contract is created these are the parameters it returns:
{
"ownerAddress": "TGAGGMBKK1fq2Ym3ZQDzTWa55R68UB5xWU",
"firstTokenId": "SEED",
"firstTokenBalance": 1500,
"secondTokenId": "_",
"secondTokenBalance": 7500000000,
"contractType": 41,
"hash": "54d41e4408e74de3ec9d8cf25362676f41e37a72d8dcb05b09ce10db603c5a6f",
"time": 1541743302279
}
...but it lacks the most important one which is the 'exchangeId'. with it we can get track the secondary token which is not in the ExchangeTransactionContract.
A very important feature is missing here. How can an SR / SRC view its voters without accessing third party vendors? This is important!
This repo is underdocumented.
Please be aware that all this makes a quite sloppy impression.
Tronscan team suggested I raise the suggestion / recommendation here.
Allow the community to support TRX buy holding on to their TRX for longer periods of time in exchange for agreed TRX dividends by percentage of TRX held.
For example if you have 1000 TRX and freeze for:-
6 months - 1% = 10 TRX dividends
12 months - 2.5% = 25 TRX dividends
24 months - 6% = 60 TRX
Rather than set a set % you could tie this into a percentage of how much TRX has gained in the period. If there is no gain then no dividends are awarded (given that long term investors want to support Tron they may not mind if nothing is distributed if within the frozen period the price drops. They could be given an additional % if they opt to freeze again and continue their support.
When using grpcio_tools module to generate code, there are so many missing files using the following command:
python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=apps/trx/protocol/ --grpc_python_out=apps/trx/protocol/ -I. api/api.proto --include_imports
Is there any proper method to get this work?
Is it possible to modify the existing query "/wallet/listwitnesses" and add values?
Many queries are necessary to keep your app in the Votes section up to date.
1x query "Listwitnesses" - ~220 entries
220x queries "GetAccount" - to get the name of each single candidate
220x queries "GetBrokerage" - to find out the current level of rewards.
These are 441 queries. If you could add the name and the brokerage info, it would only be 1 query.
I am trying to get go version of protoc files but the following error is returned:
tron_protocol protoc -I=. --go_out=go_data api/api.proto
protoc-gen-go: unable to determine Go import path for "google/api/http.proto"
Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line.
Any idea how to fix this? Earlier I was able to use them for nodejs, but with golang no luck so far.
I have executed install scripts and file google/api/http.proto exists in my local path
(see title, and example follows.)
The protocol of TRON is defined by Google Protobuf and contains a range of layers, from account, block to transfer.
There are 3 types of account—basic account, asset release account and contract account, and attributes included in each account are name, types, address, balance and related asset.
A basic account is able to apply to be a validation node, which has serval parameters, including extra attributes, public key, URL, voting statistics, history performance, etc.
enum AccountType {
Normal = 0;
AssetIssue = 1;
Contract = 2;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.