Skip to content
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

Contract Factory #676

Merged
merged 5 commits into from
Jul 6, 2023
Merged

Contract Factory #676

merged 5 commits into from
Jul 6, 2023

Conversation

tabaktoni
Copy link
Collaborator

@tabaktoni tabaktoni commented Jul 6, 2023

Motivation and Resolution

BREAKING: contractFactory constructor signature
Update Contract Factory to work with Cairo 1

  • Fix two failing tests

Usage related changes

- new contractFactory(par1, par2, ...)
+ new contractFactory(obj)

Checklist:

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

@netlify
Copy link

netlify bot commented Jul 6, 2023

Deploy Preview for starknetjs canceled.

Name Link
🔨 Latest commit 91e8eb9
🔍 Latest deploy log https://app.netlify.com/sites/starknetjs/deploys/64a6c62da9a9920007eab6ed

src/contract/contractFactory.ts Outdated Show resolved Hide resolved
src/contract/contractFactory.ts Outdated Show resolved Hide resolved
src/contract/contractFactory.ts Outdated Show resolved Hide resolved
@@ -20,3 +20,12 @@ export function getAbiVersion(abi: Abi) {
if (isCairo1Abi(abi)) return 1;
return 0;
}

export function isNoConstructorValid(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this name is a bit strange to me 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, agree.
Full name will be: 'Is it valid that the constructor is not part of the abi in this procedural case?'

@tabaktoni tabaktoni requested a review from ivpavici July 6, 2023 13:48
@tabaktoni tabaktoni changed the base branch from develop to next-version July 6, 2023 13:54
@tabaktoni tabaktoni merged commit 866972a into next-version Jul 6, 2023
@github-actions
Copy link

🎉 This PR is included in version 5.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@penovicp penovicp deleted the 0.12.0/factory branch September 16, 2023 13:40
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.

2 participants