Contract Address

The contract address is a unique identifier of the contract on StarkNet. It is a chain hash of the following information:

  • prefix - the ASCII encoding of the constant string “STARKNET_CONTRACT_ADDRESS”

  • caller_address - currently always zero

  • salt - part of the deploy transaction

  • contract_hash - see the docs

  • calldata_hash - array hash of the inputs to the constructor

The computation is roughly the following:

contract_address := pedersen(
    “STARKNET_CONTRACT_ADDRESS”,
    caller_address,
    salt,
    pedersen(contract_code),
    pedersen(constructor_calldata))

You can find the address computation on our repo here.