Contract Module
5.1 Get Contract Code
get_contract_codecontract_address (str): The address of the smart contract.from crypto_com_developer_platform_client import Contract code = Contract.get_contract_code('example-contract') print(code)
The bytecode of the smart contract.ValueError: If the Contract class is not initialized with a Client instance.{'status': 'Success', 'data': {'code': 'example-code'}}
getContractCode{string} {string} contractAddress: The smart contract address.import { Contract } from '@crypto.com/developer-platform-client'; try { const bytecode = await Contract.getContractCode('example-address'); console.log(bytecode); } catch(err) { console.log(err); }
{Promise<ApiResponse<ContractCode>>}: A promise that resolves to the bytecode of the contract.{Error} If the bytecode retrieval fails.{ status: 'Success', data: { code: 'example-byte-code' } }
Last updated
Was this helpful?