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

BCI-1923: Cairo Test Upgradeable #326

Merged
merged 6 commits into from
Oct 30, 2023

Conversation

augustbleeds
Copy link
Collaborator

@augustbleeds augustbleeds commented Sep 19, 2023

Changes

  • Introduce 2 mock contracts (for testing purposes)
  • Uncomments ignore macro to test upgradeability functionality
  • Adds additional test that deploys and upgrades a contract and tests the function calls are as expected

note: we'll need to change these tests once contract composition is introduced because this will change the way we compose the Upgradeable module. See https://community.starknet.io/t/cairo-1-contract-syntax-is-evolving/94794?page=2#extensibility-and-components-11 for the proposed #[starknet::component] macro

@augustbleeds augustbleeds temporarily deployed to integration September 19, 2023 07:33 — with GitHub Actions Inactive
@augustbleeds augustbleeds temporarily deployed to integration September 19, 2023 07:33 — with GitHub Actions Inactive
@archseer
Copy link
Collaborator

Contract builds fail in a weird way. Maybe we need to bump the scarb version on CI?

@augustbleeds augustbleeds temporarily deployed to integration September 22, 2023 01:35 — with GitHub Actions Inactive
@augustbleeds augustbleeds temporarily deployed to integration September 22, 2023 01:35 — with GitHub Actions Inactive
@augustbleeds augustbleeds temporarily deployed to integration September 22, 2023 01:35 — with GitHub Actions Inactive
@augustbleeds
Copy link
Collaborator Author

augustbleeds commented Sep 22, 2023

Contract builds fail in a weird way. Maybe we need to bump the scarb version on CI?

Thanks, I fixed the issue. It was failing locally too. I pinpointed the issue to the constructor of the mock contracts, which need to have a mutable reference instead of a snapshot to the contract state even if they are not writing anything to storage.

I also made some changes to implement the IUpgradeable trait. Do you think we should remove the upgrade function from the Multisig interface?

@archseer
Copy link
Collaborator

Yeah I think that's fine, since we're no longer upstreaming the contract we can just implement IUpgradeable 👍🏻

@augustbleeds augustbleeds temporarily deployed to integration October 3, 2023 07:22 — with GitHub Actions Inactive
@augustbleeds augustbleeds temporarily deployed to integration October 3, 2023 07:22 — with GitHub Actions Inactive
@augustbleeds augustbleeds temporarily deployed to integration October 3, 2023 07:22 — with GitHub Actions Inactive
@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@augustbleeds augustbleeds merged commit 259bab6 into develop Oct 30, 2023
16 of 20 checks passed
@augustbleeds augustbleeds deleted the augustus.BCI-1923.cairo-tests-upgradeable branch October 30, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants