Skip to content

feat: add custom Deployer in Account constructor #1446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 24, 2025

Conversation

PhilippeR26
Copy link
Collaborator

@PhilippeR26 PhilippeR26 commented Jul 16, 2025

Motivation and Resolution

Current UDC is a Cairo 0 contract as is used by all Starknet.js contract deployment.
new Cairo 1 deployer contracts are also available.
A new option in the Account constructor has been added to use a custom deployer.
A Deployer class has been created.

Usage related changes

An account can be used with a customDeployer option:

const customDeployer= new Deployer(
        customDeployer.address,
         'deploy_contract',
);
const accountCustomDeployer = new Account({
        address,
        provider,
        signer,
        customDeployer,
});

Development related changes

utils/buildUDCCall() and utils/events/parseUDCEvent() are still there if needed by users.
buildDeployerCall() and parseDeployerEvent() have been added in the Deployer class.

Braking change:
DeployContractUDCResponse and DeclareDeployUDCResponse types are replaced by DeployContractDCResponse and DeclareDeployDCResponse.

Checklist:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Documented the changes in code (API docs will be generated automatically)
  • Updated the tests
  • All tests are passing

@tabaktoni tabaktoni assigned penovicp and unassigned penovicp Jul 16, 2025
@penovicp penovicp changed the base branch from feat/rpc09 to beta July 18, 2025 07:57
@PhilippeR26 PhilippeR26 requested a review from tabaktoni July 21, 2025 16:47
@PhilippeR26
Copy link
Collaborator Author

@penovicp
Devnet is now using the new UDC, so you can remove your commit d5c1d3d, and you should bump the devnet used for the test suite to v0.5.0-rc.3.

@tabaktoni
Copy link
Member

  • resolved Beta
  • DC to UDC
  • export Deployer Class
  • use new entrypoint on the new UDC
  • remove helpers: buildUDCCall, parseUDCEvent, buildDeployerContractPayload
  • update tests
  • update devnet

@tabaktoni tabaktoni requested a review from penovicp July 24, 2025 12:45
@tabaktoni tabaktoni merged commit 4d7ae26 into starknet-io:beta Jul 24, 2025
3 checks passed
Copy link
Contributor

🎉 This PR is included in version 8.0.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

🎉 This PR is included in version 8.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants