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 |
deployer_address
|
One of the following:
|
salt
|
The salt passed by the contract calling the syscall, provided by the transaction sender. |
class_hash
|
|
constructor_calldata_hash
|
Array hash of the inputs to the constructor. |
The address is computed as follows:
contract_address = pedersen(
“STARKNET_CONTRACT_ADDRESS”,
deployer_address,
salt,
class_hash,
constructor_calldata_hash)
A random It also thwarts replay attacks by influencing the transaction hash with a unique sender address. |
-
For more information on the address computation, see contract_address.cairo in the Cairo code repository.