Contract address hash calculation
Add contract address calculation as specified in: https://starknet.io/documentation/contracts/
CONTRACTS ADDRESSES The contract address is a unique identifier of the contract on Starknet. It is a hash chain of the following information:
Prefix. Caller address. Salt. In StarkNet alpha this is a random value given by the sequencer Contract hash Constructor call data hash
Specifically, it is calculated as follows:
contract_address := pedersen( “STARKNET_CONTRACT_ADDRESS”, caller_address, salt, pedersen(contract_code), pedersen(constructor_calldata)) Where:
pedersen is a Pedersen hash function applied to a list of elements. “STARKNET_CONTRACT_ADDRESS” is a constant prefix encoded into bytes (ASCII) using big endian encoding. See the address computation here.