xJonathanLEI / starknet-rs

Complete Starknet library in Rust™
https://starknet.rs
Apache License 2.0
280 stars 96 forks source link

UDC: Contract deployment selector mismatch #610

Open FabijanC opened 3 months ago

FabijanC commented 3 months ago

Currently starknet.rs uses deployContract (camelCase): https://github.com/xJonathanLEI/starknet-rs/blob/36ec1d681fc2917ca4857d14ce262ed7c2b60a7a/starknet-contract/src/factory.rs#L15-L16

OpenZeppelin has been using deploy_contract (snake_case) as the UDC method name since v0.11.0: https://github.com/OpenZeppelin/cairo-contracts/blob/a83f36b23f1af6e160288962be4a2701c3ecbcda/src/presets/universal_deployer.cairo#L38

Should someone change something?

xJonathanLEI commented 3 months ago

The new universal deployer contract is a completely different implementation that uses Poseidon hash instead of Pedersen. So no, we should not change this.

Whether we should support the new deployer contract is another question. I don't really see the point though? It does the same thing as the old one as is probably not widely deployed. I mean on the other hand the old one's address is pretty much hard-coded to every single piece of tooling in the ecosystem.