A contract instance has a nonce, the value of which is the number of
transactions originating from this address plus 1. For example, when you deploy
an account with a DEPLOY_ACCOUNT transaction, the nonce of the account contract
in the transaction is 0. After the DEPLOY_ACCOUNT transaction, until the account
contract sends its next transaction, the nonce is 1.
Origin-independent contract deployments create contract addresses
independent of the deployer and the UDC instance. Instead, only the class
hash, salt, and constructor arguments determine the address. This type of
deployment enables redeployments of accounts and known systems across
multiple networks. To deploy a reproducible deployment, set unique to false.
By making deployments dependent upon the origin address, users can reserve a
whole address space to prevent someone else from taking ownership of the
address.
The UDC address is
0x041a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf in
Mainnet, Sepolia testnet, and starknet-devnet. This address might change in
the future when it is migrated to a modern version of Cairo.
If you use a DEPLOY_ACCOUNT transaction, the fees are paid from the address
of the deployed account. If you use the UDC, which requires an INVOKE
transaction, the fees are paid from the sender’s account.
To use it, you should first pre-fund your new account address so that you can
pay the transaction fee. You can then send the DEPLOY_ACCOUNT transaction.