I want to send a token by this (tron-api-python) library but I received an error
When I send the Trx, there is no problem and it is sent, but when I want to send the desired token using the smart contract, I get an error.
from tronapi import Tron
from tronapi import HttpProvider
full_node = HttpProvider('https://nile.trongrid.io')
solidity_node = HttpProvider('https://nile.trongrid.io')
event_server = HttpProvider('https://nile.trongrid.io')
tron = Tron(full_node=full_node,
solidity_node=solidity_node,
event_server=event_server)
trx_kwargs = dict()
trx_kwargs["private_key"] = '59d4b72df50290d7f78e2c16fc27758d6e235f3959f2212f2497fc55da33e888'
trx_kwargs["default_address"] = 'TRNDt7bjFoTq7p52iw5u2BLNhsff1ux7Fc'
trron = Tron(**trx_kwargs)
kwargs = dict()
kwargs["contract_address"] = tron.address.to_hex("TLBaRhANQoJFTqre9Nf1mjuwNWjCJeYqUL") # USDT contract address
kwargs["function_selector"] = "transfer(address,uint256)" # function to call and types. for reference on tronscan it looks like this: transfer(address _to,uint256 _value)
kwargs["fee_limit"] = 5000000 # fee limit in tron (5 TRX here)
kwargs["call_value"] = 0 # I have no idea
Towallet = 'TTG8u8fUKqJwMtB59ppaWqgFVGDb5ojWPU'
Amount = 10.3
# added message
send = trron.trx.send_transaction(trron.address.to_hex(Towallet), Amount)
txid = send["txid"]
print(send)
print(f'your txid is {txid}')
I get this error Validate TransferContract error, no OwnerAccount.
full error:
Traceback (most recent call last):
File "main.py", line 26, in <module>
send = trron.trx.send_transaction(trron.address.to_hex(Towallet), Amount)
File "/home/runner/newtrx/venv/lib/python3.8/site-packages/tronapi/trx.py", line 421, in send_transaction
tx = self.tron.transaction_builder.send_transaction(
File "/home/runner/newtrx/venv/lib/python3.8/site-packages/tronapi/transactionbuilder.py", line 68, in send_transaction
response = self.tron.manager.request('/wallet/createtransaction', {
File "/home/runner/newtrx/venv/lib/python3.8/site-packages/tronapi/manager.py", line 124, in request
return self.full_node.request(url, json=params, method=method)
File "/home/runner/newtrx/venv/lib/python3.8/site-packages/tronapi/providers/http.py", line 84, in request
response = self._request(
File "/home/runner/newtrx/venv/lib/python3.8/site-packages/tronapi/providers/http.py", line 133, in _request
raise ValueError(data['Error'])
ValueError: class org.tron.core.exception.ContractValidateException : Validate TransferContract error, no OwnerAccount.
CONTRACT_VALIDATE_ERROR when running migrate #8
Comments
vicpon commented Dec 8, 2018 •
Getting this error when running tronbox migrate —reset
The text was updated successfully, but these errors were encountered:
vicpon commented Dec 8, 2018
This seems to have been an issue in tronbox and was resolved when I updated it to the latest (currently 2.2.2)
vicpon commented Dec 8, 2018
So the issue is still present if it uses the shasta network. It works fine with the development network.
tronbox migrate —reset —network development works fine
but tronbox migrate —reset —network shasta gives the contract validation error.
Since migrate-and-setup.sh uses the shasta network the npm run setup-dapp command fails unless you change the sh script to use the develompent network. It seems that all the code is supposed to use the development network anyway so maybe this just needs to be updated.
Side note, on Windows 10 you have to install the windows-build-tools npm package for this project:
npm install -g —production windows-build-tools
sullof commented Dec 8, 2018
I guess you are running latest TronBox 2.2.2.
When someone can deploy on Tron Quickstart but cannot deploy on Shasta, usually, means that they don’t have enough energy in the Shasta account. Can you verify that?
vicpon commented Dec 9, 2018
Ahh. that must be it. I have TRX but no energy. Thanks, I’ll try that.
vicpon commented Dec 9, 2018
I guess you are running latest TronBox 2.2.2.
When someone can deploy on Tron Quickstart but cannot deploy on Shasta, usually, means that they don’t have enough energy in the Shasta account. Can you verify that?
Yes, that was the issue. It’s working now, thank you! Is there a chat room somewhere to ask things like how this project is configured and how it works, etc? Basically, general TRON dev questions. I don’t think they’d be appropriate here.
Источник
TriggerConstantContract via gRPC not working. #3602
Comments
neshala commented Dec 26, 2020 •
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:
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.
Problem is caused because of this part of framework/src/main/java/org/tron/core/Wallet.java
public Transaction triggerConstantContract
to be more specific:
I am getting this error even with provided USDT contract at this format: 419E62BE7F4F103C36507CB2A753418791B1CDC182
Is there a bug or I am passing invalid variables? I am just trying to call USDT TRC20 contract and call function name()
The text was updated successfully, but these errors were encountered:
Starsakary commented Dec 28, 2020
Have you checked if you are in the correct network? These addresses work only in Shasta test net.
neshala commented Dec 28, 2020 •
I am using my own node and doing it all via 127.0.0.1 My node is generated from data from https://backup.trongrid.io/ and syncing with the main network.
I have this main config supportConstant = true
I am using the latest release and even tried to compile from the latest source from the main brench.
I just don’t understand what I am doing wrong. When using HTTP API I can query my contract, but when try the same via gRPC I have that error: «No contract or not a smart contract».
I only have a problem calling triggerConstantContract, other endpoints are working both in HTTP and gRPC.
I am thinking should I maybe again deploy my contract to my local node and see if then it will exist, but that just doesn’t make sense to me, because it works via HTTP.
Starsakary commented Dec 28, 2020
I’ve said that the addresses you provided are from Shasta test net but not the main net.
USDT address on main net is :
TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t — Base58
41A614F803B6FD780986A42C78EC9C7F77E6DED13C — Hex
neshala commented Dec 28, 2020 •
Ok, that was just a bad example I provided.
I have now tried with usdt contract address and owner like this:
My node is synced 1 second ago with the main network, but still, I have this returned: «No contract or not a smart contract»
Via HTTP the same example is working.
I have even changed and recompiled FullNode to see if the address is passed properly and I can see there in java exception that it’s received as «41a614f803b6fd780986a42c78ec9c7f77e6ded13c», but still node thin fails with «No contract or not a smart contract».
I am so desperate to solve this, but can’t figure out what is wrong. Thanks for helping.
Starsakary commented Dec 28, 2020 •
Alright, in the Protobuf definition that addresses are in the type of bytes . You may try to find out the corresponding data type in your language and set the param again.
neshala commented Dec 28, 2020
Well, this is how gRPC library was generated for my programming language (PHP):
So it’s expected to have a string as input for address, and validation exist for that.
Also, I have checked what is received on the server-side in FullNode and it was byte type that I had to convert to string in JAVA in order to see if the proper value was passed.
So I think that server receive byte format of hex address, but for some reason it trow exception with message that it’s not an existing contract even for USDT contract in synced and up to date node.
Источник
Can not deploy after upgrade to 2.2.0 #33
Comments
emn178 commented Dec 4, 2018 •
2.1.10 has problem «CONTRACT_VALIDATE_ERROR» #32
try to upgrade to 2.2.0, but it still doesn’t work.
The text was updated successfully, but these errors were encountered:
GarryPlays commented Dec 4, 2018
ha lol, thought it was just me! neither, all kaputt
sullof commented Dec 4, 2018
There was a critical error in the previous version.
We just published TronBox 2.0.1, which supports the new java-tron 3.2 and fixes a couple of issues. Can you update and try again, please?
sullof commented Dec 5, 2018
@GarryPlays This should be fixed. Reopen it, please, if not.
infine8 commented Dec 15, 2018 •
still doesn’t work even for test «Metacoin» project. nothing was changed. i’m using tronbox v 2.3.0
Using network ‘shasta’.
Running migration: 1_initial_migration.js
Deploying Migrations.
ERROR: Unknown error: <
«code»: «CONTRACT_VALIDATE_ERROR»,
«message»: «636f6e74726163742076616c6964617465206572726f72203a206163636f756e74206e6f7420657869737473»
>
sullof commented Dec 15, 2018
That message is contract validate error : account not exists .
With TronBox 2.3.0, when there is an error during the deployment, you should see the link to get info about the transaction. Did you check it?
sullof commented Dec 15, 2018
BTW, metacoin-box passes all the tests on Shasta without issue (I can share a video, if you don’t believe me).
Is it possible that the account that you are using doesn’t have enough energy or bandwidth?
GarryPlays commented Dec 15, 2018 •
I would side with sullof here. I had the same issue, but since shasta recently reset, your account will most likely not have any tron in it.
Of course with shasta refill being down since 2 days it seems mission impossible to refill your account 😀
Or I am just hitting every single maintenance window they have.
Feel free to send me some shasta tron if you have TU1TYKYNKE928LvmXSSR7iiShr3SjexomY
Источник
DoctorLai/Tron-FAQ
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Tron Blockchain FAQs
- What will be the consumption token when users don’t have enough bandwidth to make transfer transaction?
It will burn TRX to pay the fee, one bandwidth = 420 SUN (previously was 140 SUN before Proposal 51), you can calculate based on this. 1TRX = 1000000SUN. You can check this doc for more tech detail https://developers.tron.network/docs/resource-model
- Is there a config in tron full node which can allow only certain ip’s or ip range to query http api?
This needs to be restricted in the nginx service.
- We are trying to set up a multisignature with 7 participants, but it isn’t allowing us more than 5 users. The documentation says that the maximum is 8 active accesses.
8 Active Accesses meaning that you can set up to 8 permission groups. In each group, max num of participants is 5 i.e. so the maximum number of participants in a multisignature is 5.
- How to verify Tron Wallet Addresses offline?
- How to get the Fee by Transaction Hash?
You can use the TronGrid API GetTransactionInfoById to Query the transaction fee, block height by transaction id see: https://developers.tron.network/reference#walletgettransactionbyid
- How to transfer trc20 token to smart contact?
See https://developers.tron.network/docs/trc20-contract-interaction Be careful on transfer TRC20 to a contract address. In most case, transfer TRC20 token to a contract means you will lose those tokens becase no one can withdraw it.
Just receiving a token into your wallet does not have any harm to your wallet, but using that token on any platform is solely your responsibility, don’t do anything with an unknown token. Tron network is a decentralised system anyone in the world can create a token with any name and distribute it over tron network to any wallets, there is no permission is needed for incoming transfer, also tronlink is a decentralised wallet no permission is needed for incoming transfer, if someone sends this token to your wallet most probably it will visible. Verified or legitimate token has a blue tick ✔️ mark. You can hide the visibility of the token by using the «+» option on the right side of the tronlink home page. Also, you can see more information for that token by clicking the information button on the top right corner of that token’s transfer history page. If by mistake you have tried to swap fake tokens on any scam website then please don’t use that wallet again immediately transfer your wallet funds to a new wallet.
- How do I retrieve transaction note from the get_tranaction() function?
Please refer to https://developers.tron.network/docs/make-transaction-locally and after you get the transaction by id, please parse the data field to get the note.
- If I want to become an SR(c), would I have to deploy a fullnode?
Yes, because if your node goes up the list, it must be able to create blocks and confirm transactions.
- I have created a token on your blockchain network but it’s price is not yet determined. What should I do for the price to appear in my wallet?
It needs to be listed on PoloniDex or another exchange & tracked by CoinGecko. If you need the price to show, then exchange listing is needed, again if not on PoloniDEX, then the exchange you list it on must be tracked by CoinGecko and you must apply for your token to be tracked by CoinGecko.
- Can I use Ethereum private key to generate a Tron address?
- How to figure out gas costs when deploying smart contracts on my tronbox setup? I can then use that account to query «http://127.0.0.1:9090/wallet/getcontract?value=xxx» and get JSON that describes the methods available in the contract, but I see not cost for the creation or running of the contract when I interact with it.
You need the transaction hash to query it and see how much it has used. Besides the more functions and internal transactions a contract has the more processing power it uses on the node hence the fee going up.
- Can I use Tron from my Shasta testnet to invest into something?
TRX on shasta can only work on shasta, mainly for Developers, no other value.
- What is the cost to deploy a new contract?
Deploy a new contract is not free, for a simple TRC20 Token contract, it will cost around 80 TRX to complete it. it will cost more if your contract is more complex.
- I want to deploy a contract in tron blockchain. Can I use the tron energy for it instead of paying TRX?
Trx are burned only if you don’t have enough energy or bandwidth.
- What is the justswap contract address on shasta?
Justswap does not have a testnet version.
- Is there a way to accept a particular token as payment in a contract? Ethereum has a ERC-1363 Payable Token — is there something comparable for TRON?
I would suggest you try on Tron testnet, it should be supported from TVM level.
- When a token is made Do users always have to pay a fee for the transfer? Is there a solution for transferring tokens free of charge?
You can freeze TRX to get ressources for free transfer.
- How do we use TRON-PRO-API-KEY in the website?
when you send API make sure you include the key in the headers for example
- How can i use api to create wallet address for my app users?
It is suggested that you generate address offline instead of using any API.
- Is it possible to get jst token on Shasta test net? I wanted to test the justlink vrf but I using shasta instead of nile?
users cannot join shasta, but you can join Nile and get JST token at: https://nileex.io/join/getJoinPage
- When i create an adress, next how i make it to online chain?
Activate that account, for example transfer 1 TRX to that account.
- Will it be any case, energy of an wallet can be negative value?
energy = obtain-consumed, and let’s say now you have 200k obtianed by freezing from two different account, one 150k, one 50k, and you consumed 100k, but the one freezing 150k do a unfreez, and this time, the consumed is more than obtained, so an energy can be negative. I would say it is normal if your energy is negative after unfreeze, and all your consumed energy will be recovered to 0 in 24 hours.
- Even you are not producing block, you still need to keep running the server and all the txn consume storage, right ?
Yes it consumes storage because you are keeping a copy of the blockchain, also if your node is voted up and activates as a top SR it has to be in sync or may be kicked back down or even voted out of the SRs.
- Although TRON is burning on a daily basis, why is the supply increasing?
TRON burns and produces at the same time. If the production rate is high compared to burning, of course, the percentage of currencies will rise and vice versa.
- What is the formula for energy regeneration?
regeneration is 24 hours, it may be per second. I do not have the exact formula but is something like ((ENERGY_Assigned / 86400 seconds) * (timestamp — last_consume_timestamp) + ENERGY_left_calculation_formula_at_last_consume_timestamp[This is a separate formula]) and maybe a couple more things in it to calculate it precisely. So the formula is: total assigned energy/86400 (1 day in seconds) per second. Using the entire energy takes 24 hours to come back, if you have 10,000 energy, and use 5,000 energy, it will come back in 12 hours, but if you have 20,000 energy and use up 5,000 energy, it’ll be back in 6 hours.
- How to make a Stablecoin on tron network?
- How to Integrate TRC20 token in backend for Deposit and Withdraw Operations?
- How to Test JustSwap in TestNet?
Currently, there is no testnet for JustSwap, if you are familiar with smart contract realted development, it is very easy to integrate with justswap if you follow the developer document on justswap homepage.
- How can I make withdrawal from my Tron Wallet?
- I get «Out of Energy» error with 7656 Energy on Tronlink wallet.
That amount of energy is very low for a TRC20 contract operation. A simple transaction is about 20000 energy. You need to have some TRX to burn or stake.
- Are there any guides how to make TRC20 transfers via full node api?
- How to fetch list of transaction list by wallet address?
- How can i watch transactions of tron blockchain by socket?
You can do this by http api or gRPC api.
- The Energy consumption of Nile and Shasta TestNet?
The Nile is 3 times as the mainnet and the Shasta is the same as the mainnet.
- When will be possible to count estimated energy before execute transaction?
- https://developers.tron.network/docs/greatvoyage-430bacon#1-add-a-new-field-energy_used-in-transactionextention.
- https://developers.tron.network/docs/faq#5-how-to-calculate-the-bandwidth-and-energy-consumed-when-calling-the-contract
- Can I override unconfirmed transations in tron?
- I have successfully launched my token on mainnet. How would i get it listed on tronlink?
It will sycn to tronlink around 2 hours after you finished token record on tronscan.
- why need to build own fullnode?
Trongrid has Ratio limit, If you have a large business volume and frequent API visits, it will exceed the maximum visits of Trongrid. At this time, the best choice is to build your own FullNode.
- How can i start private network on local in my system?
- Do we have to use a black hole to burn tokens in Tron network? If yes, what is the official black hole address of TRC20? What is the fee and on what basis is it calculated?
- Startup will still be stuck after the upgrade (v4.3).
change the maxTimeRatio to above 20.0 e.g. 30.0 and restart the node.
- how to define the fee_limit for TRC20 token?
You can set the feelimit when you create a contract transaction, refer to the documentation https://developers.tron.network/reference#trigger-smart-contract
- Let’s said I’m going to trigger smart contract for transfer. Does it mean it wil out of energy if it exceed the fee limit that I set?
- the API URL of the tron test browser
- How much is the Fee to activate account on Main net?
- If i want to grab the latest tron/usdt price how would i go about doing so? I cannot find anywhere the API offers 😕
- I created a private Tron chain. It comes with TronGrid. Do I have to pay for Trongrid if my calls exceed 100K daily?
no, you dont need to pay on your own private chain.
- Is there a way to get information about user’s balance using only the address of wallet?
you can do this via tronweb or trongrid api
- Is there any IDE like Remix to develop contract?
- I am looking for someone to help me develop a TRC-20 stablecoin.
- How can i valid one address is valid?
the account is a public key created from private key, you can verify it according to this: https://developers.tron.network/docs/account
- I already set up fullnode and solidity node, so my question is how can i listen to new transaction received by given address ?
- Is there a way to pool energy or bandwith across multiple wallets? As in sharing the resources between multiple wallets.
- How to find out if a Tron Address is active or not?
It will return account detai via getaccount API if account is activated.
- What is the minimum sending amount of TRX to activate the address?
Transfer >0.1 TRX to activate the address. At least 1 TRX must be burned to activate the account. If there is not enough frozen bandwidth, an additional 0.1 TRX will be burned. In this case, it will cost 1.1 TRX to complete the creation of a new account; if there is enough frozen bandwidth, 1 TRX must be burned to complete creating the new account.
- Where we can find the token icon file? (manual search via google . or there is some better way? )
All token icon can be found on tronscan.
- is there any email list subscription to be notified about important update on full nodes? ( when we need to update our full nodes If happening any critical update)
You will see Update notification in this channel if there is a new version. or you can subscribe the release from here: https://github.com/tronprotocol/java-tron/releases
- Is it more profitable to freeze balance than pay fees in TRX?
Depends on your balance and daily transaction count. very much transactions, 100+. If you have more balance then freeze, your freezing resource gets filled every day. If you got 100k bandwidth, and used all of it, it will be filled to 100k the next day. You’ll get about 1.5 bandwidth for each TRX stacked
- Does any one know an efficient method to listen for triggered smart contract event on the tron network. Tried using tronweb’s watch method but it doesn’t pick all transactions.
- Sample JS code to transfer TRC20 token?
- I create a transaction for TRX in Tron network successfully. How can I send USDT or any other token in Tron with the Trongrid API?
- How to fix this «contract validate error : account does not exist»?
Probably the account is not activated, transfer >0.1 TRX to that account will activate the new accout. At least 1 TRX must be burned to activate the account. If there is not enough frozen bandwidth, an additional 0.1 TRX will be burned. In this case, it will cost 1.1 TRX to complete the creation of a new account; if there is enough frozen bandwidth, 1 TRX must be burned to complete creating the new account.
- How to transfer TRC10/TRC20 token and I want to see the fee when transfering?
- Is it possible the wallet account and account being approved both need activated?
the account must be activated if you want to start transction with that account.
- How to improve the sync speed or solve the sync stop problems of java-tron?
- a better machine such as 16 CORES + 32GB RAM, 500 GB SSD
- make sure single physical CPU has 16 cores or above: the following needs to be bigger or equal to 16.
- Change the max time toerlance to 20.0 or above:
- Improve the start-up by adding XX:+UseConcMarkSweepGC $java -XX:+UseConcMarkSweepGC -jar Fullnode.jar -c config.conf
- Is it harmful or advantageous to use a public node instead of setting up my own node?
depends on your own requirement, public nodes are mainly for seed nodes, it cannot support very limited requests, too many requests may cause the node stop working. If you have a large number of requests, it is best to use your own Node, because your own Node only serves you and is more secure.
- first you have to write the smart contract for your coin.
- deploy your token’s smart contract.
- from this link you can record your trx20 token: https://tronscan.org/#/tokens/create/Type
- I got this number from api. amount_str = «2535672» how can i understand how much is this? how can i convert it to exact amount? 🤔
- What are internal transactions?
- Can I generate TRC20 address in Mainnet? I need generate TRC20 adrress while become a member for all user.
- Is there a method to get the current chain id on TronWeb instance?
- Can anyone help me learn to add liquidity to my TRC 20 token?
- We are developing an exchange software that use TronGrid to manage transactions, Is this the best way? Or run the Full node?
depends on the request volume, if the trongrid free volume cannot meet your requirement , you need to set up your own node.
- How to get «REST API endpoint providing circulating supply value» for certain token using http? Token: https://tronscan.org/#/token20/TThrzAzRj2Pw4CQjqo1dk2zGyifPhuNHRu/ I need to get something like this: http://explorer.litecoin.net/chain/Litecoin/q/totalbc (only pure number «9,964,245,481.605456077196663259» using http)
- How much energy can I get by staking 1000 TRX?
With 1000 TRX, you can get estimated gain 1000 TRON Power and 25970.664 Energy. You can see this at tronscan.io when you staking the TRX.
- Is there an API to get the unit price of energy?
- Where can i find documentation for setting up event server in vps? Right now, i am trying to «deploy tron event subscription plugin» but i am not sure if i am doing something wrong or documentation is broken. I need this to fetch user’s NFT balance and some other events.
- I cannot get any information of a tron wallet on tronscan.org or using trongrid API
only activated account can return data. non-activated account will return empty. Transfer > 0.1 TRX to that account will activate that account.
- Getting 503 Errors: Failed to load resource: the server responded with a status of 503 (). This happen 100% of the times on the main net, on Nile everything works as expected.
IP or API-KEY access exceeds frequency limit, max 15 times/s
- Is possible to send energy to address in tron network?
You cannot send energy to other address, however you can set the receive address when you freezing TRX for energy.
- How can I get a api of Energy By Burning TRX?
- How can we forecast how much SUN = 1 Energy?
https://api.trongrid.io/wallet/getaccountresource?address=TEi9FxmwRAGncvMLEdgKpFsQrGBgAZywC7&visible=true you can see the total energy and total freezing TRX for energy , Based on this, you can roughly estimate how much energy the new freezing TRX can obtain:
1 TRX = 1000000 sun, e.g. 280 sun means 0.00028 TRX.
- I got this error <«result»:<«code»:»OTHER_ERROR»,»message»:»636c617373206f72672e74726f6e2e636f72652e73657276696365732e687474702e4a736f6e466f726d6174245061727365457863657074696f6e203a20343a32363a20494e56414c49442068657820537472696e67″>> — How can I decode the message?
- How to generate address offline?
Some Demo code of Generate address offline(means generate address locally):
- java: https://github.com/tronprotocol/java-tron/blob/develop/framework/src/main/java/org/tron/core/services/http/GenerateAddressServlet.java#L23
- Python: https://github.com/andelf/tronpy/blob/8beacd905ecd8cb151498748e2d446004c0b53ff/tronpy/tron.py#L458
- Java-script: https://github.com/tronprotocol/tronweb/blob/34cb9c5ac0f5167b0660e663583d973949868e04/src/index.js#L393
- C sharp: https://github.com/farukterzioglu/TronSharp/blob/master/TronSharp.Tests/Singature/SignWithPrivateKey.cs
- Java: https://cn.developers.tron.network/docs/%E6%9C%AC%E5%9C%B0%E6%9E%84%E5%BB%BA%E4%BA%A4%E6%98%93
- Python: https://github.com/andelf/tronpy/blob/8beacd905ecd8cb151498748e2d446004c0b53ff/tronpy/tron.py#L130
- Java-script: https://github.com/tronprotocol/tronweb/blob/34cb9c5ac0f5167b0660e663583d973949868e04/src/lib/trx.js#L650
- How do I calculate contract call bandwidth and energy values? Are there any relevant code samples?
- How can I check balance of USDT trc20 token?
- How can ı create seed phrase from keystore?
- What is an offline mode? And can I create a account with PHP?
offline mode ≈ create it via SDK. We can create address with library instead of communicating with the node.
- Does any one know about ByteString convert to readable string in trident-java get transaction by id, and the return value such like below:
- Validate signature error: xxxx is signed by xxxx but it is not contained of permission
You are using wrong private key. The private key must the priavate key of the owner_address.
- Does tronweb have the function of identifying and observing the wallet?
This feature is not currently available on tronweb.
- How to get address using trident-java?
- How to Transfer TRC-20 using Python?
- when running a litenode that was started from a database snapshot, is there a way to compress the current database when it gets to big for the litenode to store?
- If i want to listen trc20 transaction for certain address, should i develop a full node?
https://developers.tron.network/v3.7/docs/tronweb-trx-functions
Get all transaction detail by block with tronWeb.trx.getBlock(12345); thus no need for a full node.
- How should I monitor real-time transfer events on the chain?
- one is using event plugin: https://developers.tron.network/docs/event-subscribe
- one is scanning the block: please refer to the doc: https://developers.tron.network/docs/how-to-determine-address-recharge
- owner_address Why is this parameter mandatory? We can activate the newly created account later.
activate account has cost, you have the specify the owner account to pay the cost.
- How to get user’s authority so that can check his balance with wallet address?
you don’t need user authority to check balance. Just call the BalanceOf(address) funtion of the token contract, or use the Tronlink api for TRX balance
- How to check confirmation of the transaction?
- How much fee for issuing a TRC10 token?
- Is there a way to predict block hash values?
- I have a tron address but lost the private key, is there anyway to regain (recover) this?
- Does TRON have any documentation that encapsulates the API? Interfaces can be called directly, like API
- How to listen to wallet address deposit? You can use:
- event plugin: https://developers.tron.network/docs/event-subscribe
- scanning blocks: https://developers.tron.network/docs/faq#14how-to-judge-the-recharge-and-withdraw-funds-by-scanning-the-block
- How to transfer TRX to another account using Javascript (tronweb)?
- Can i pay fees in tron and not freeze my tron?
- I want to create a raw transaction (without signing it) and get its hash in hex format. The official TRON API normally returns a JSON for creating transactions. Does anybody here know how to do this?
- How to Convert TRX to SUN using tronWeb?
- is it possible to hide transaction for any particular wallet?
No way, block chain is a fully transparent platform. all transactions are public.
- can we block any particular wallet, if someone steal crypto & is it possible to block those users so they can not able to access to those funds?
No. Blockchain is decentralised. As long as you have private keys, you have accessed to the funds in your wallet. However, there are several work arounds from centralized org.
- USDT contract do support account block if user report it is a scam.
- Exchanges usually also support account block if the money goes to the exchange.
- CEX can block because they internally use Wallet Mechanism
- curl -X GET http://127.0.0.1:8090/wallet/getnowblock curl: (7) Failed connect to 127.0.0.1:8090; Connection refused
- check whether your node is still running.
- Check your server configuration and see whether 8090 is enabled.
- I by mistake deposited USDT on my tronlink wallet usdt contract address. Is there a way to retreive/recover the coins?
- How do I get the current USDT price?
- Does tronscan have api to get chain id or net id like ethereum?
TRON has no concept of chainid.
- How long does it take for a successfully broadcasted transaction that did not appear on the blockchain to expire?
https://developers.tron.network/docs/tron-protocol-transaction#transaction-confirmation The mechanism of TRON’s block validation is that a block is validated after this block is produced and 19 different SRs produce subsequent blocks based on this block.
- Can the wallet address be customized?
- Is it possible to get a list all holder addresses from a defined trc20 token via API?
- How can I add tron network on coinbase wallet?
- Which API of Trongrid queries the balance of USDT?
- Does Tron have a json rpc api like Ethereum?
- How much bandwidth/energy for freezing the TRX?
- How to freeze trx for account that i created using tronweb?
- Is there a way to upload a custom abi on Tronscan for a contract already deployed?
- How to transfer or send USDT from one wallet to another wallet using TronWeb?
- How to transfer or send TRX from one wallet to another wallet using TronWeb?
- What are the USDT Contract Addresses (TRC-20)?
- Main Net: TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
- Shasta TestNet: TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs
- Nile TestNet: TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf
- How can I validate a Tron Wallet Address using Tronweb?
You can use TronWeb.isAddress method to validate an address.
- What is the difference between Energy and Bandwidth in Tron?
- Is there a beginner’s guide to deploy a smart contract on tron?
- How to Verify a Signature of a Signed Hex Message?
- How to Convert Base58 to Hex Tron TRC20?
- What is the «visible» parameter? POST /wallet/createtransaction
It is the address format, visible true for base58 and false for hex format.
Источник
Question from a newbie that is learning it’s way around the blockchain world. Hope you can help me out!
My Ethereum Wallet holds the main account and some accounts for testing. I also made one Wallet Contract with the main account as owner. Several months ago I transferred 1 Ether from the main account to the contract without problems.
I have tried several times to transfer the Ether back to the main contract but keep getting an «unknown account» error after providing the password and selecting Send Transaction. There is no entry in the node log so I have no idea what is happening here. Both the contract address and the main account address are filled in by the program. I have tried manual copy-paste, but with the same result.
Does it have anything to do with the status of the blockchain download? I have kept Wallet running for a whole day now, but there are still more then 400k blocks left to download.
asked Aug 22, 2017 at 8:58
4
The error unknown account
occurs when you try to use a non-EOA account as from
in sendTransaction
method. For e.g.,
sendTransaction({from: contractAddtess, to: eth.accounts[0], value: web3.toWei(1, 'ether'});
This line of code will throw unknown account
error, because from
address is not valid EOA. The contract addresses are governed by it’s code unlike EOA’s which are governed by their private key. Hence to release funds from EOA you need their private key and to release funds from your contract you need to use it’s code.
So your contract should have a function that transfers funds from contracts to any account.
answered Oct 5, 2017 at 18:33
5