Skip to main content
To retrieve the code and data of a contract, use TON explorers such as tonviewer.com, tonscan.org, and others, or use the get_info method programmatically.

Using TON Explorers

  1. Open Tonviewer.
  2. Enter the contract address into the search field.
  3. Navigate to the Code tab.
  4. The Bytecode section contains the contract code.
  5. The Raw data section contains the contract data.

Using the get_info Method

info.code and info.data are None for contracts that are not deployed. The raw hex-encoded BoC strings are also available directly as info.code_raw and info.data_raw. See also ContractInfo Fields Overview.