this is my solidity code :

address constant public erc20 = 0xdac917D0C6ae59216317e533CfB295bAfc452f08;

i want to change it to Tron address ( like this ) :

address constant public erc20 = TGA5QuuSEDi6TsLk4CffBqkYVk4oD9DMQ5 ;

but compiler does not allow using this format would you please help me what to do ? thanks

  • you probably need to transform it to uint256 and then use address(<uint256-of-transformed-tron-address>)
    – Majd TL
    Oct 19, 2021 at 14:44
  • 1
  • @MajdTL thanks but this link is not solution for constant tron address but input argument in function (greet) Oct 20, 2021 at 5:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.