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

[ISSUES#394]Update Snfoundry package to support starknet foundry script #426

Open
wants to merge 115 commits into
base: starknet-foundry
Choose a base branch
from

Conversation

847850277
Copy link

@847850277 847850277 commented Jan 21, 2025

PR description

Currently, we can use yarn deploy&&yarn deploy -- network sepolia.
but there has some problem need to solve.
the problem is cairo script ``declare` can not get class_hash when the contract has been already declared.
it will return

{
  "version": 1,
  "transactions": {
    "transactions": {
      "196d86c22d6bd216c4c0497de3f9aa008a298f36478e25b7225a84ddc84c6643": {
        "name": "declare",
        "output": {
          "type": "ErrorResponse",
          "message": "Transaction already exists"
        },
        "status": "Error",
        "timestamp": 1737548319,
        "misc": null
      }
    }
  }
}

u can check out and go to folder packages/test_2/scripts execute
sncast --account account-1 script run my_script --url https://starknet-sepolia.public.blastapi.io/rpc/v0_7 recurrent it.

or u can read packages/snfoundry/scripts/readme.md.

Fixes #394

Types of change

  • Feature
  • Bug
  • Enhancement

Comments (optional)

omsant02 and others added 30 commits October 2, 2024 11:14
Co-authored-by: Gianfranco99 <gianfranco.benvenuto99gmail.com>
This reverts commit d229d47.
This reverts commit f95a0fa.
@@ -1,8 +1,8 @@
# ## Devnet
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it necessary to change this flie?

@847850277 847850277 marked this pull request as ready for review January 24, 2025 09:14
@gianalarcon
Copy link
Collaborator

PR ready for review @jrcarlos2000 @Nadai2010

@gianalarcon
Copy link
Collaborator

Hi @847850277 , your PR should point to starknet-foundry branch, not to main, pls fix it. Thank you so much

@847850277 847850277 changed the base branch from main to starknet-foundry February 11, 2025 01:25
# Conflicts:
#	packages/snfoundry/.env.example
#	packages/snfoundry/Scarb.toml
#	packages/snfoundry/contracts/src/lib.cairo
#	packages/snfoundry/package.json
#	packages/snfoundry/scripts-ts/helpers/command.ts
#	packages/snfoundry/scripts/Scarb.lock
#	packages/snfoundry/scripts/Scarb.toml
#	packages/snfoundry/scripts/src/lib.cairo
#	packages/snfoundry/src/test/TestContract.cairo
#	yarn.lock
Copy link
Collaborator

@Nadai2010 Nadai2010 left a comment

Choose a reason for hiding this comment

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

Thank you very much for the contribution, good job, there are several details to fix before the merged to the sn-foundry branch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This file should not change

Copy link
Author

Choose a reason for hiding this comment

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

update.

casm = true

[workspace]
members = ["scripts"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you should keep the sricpt to point to the new scarb.

Copy link
Author

Choose a reason for hiding this comment

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

update.

@@ -3,7 +3,7 @@
"version": "0.0.1",
"scripts": {
"chain": "starknet-devnet --seed 0 --account-class cairo1",
"deploy": "ts-node scripts-ts/helpers/deploy-wrapper.ts",
"deploy": "ts-node ./scripts-ts/helpers/command.ts deploy",
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the main idea is to keep it in a branch snfoundry, wouldn't it be better to add it as a different deploy or adjust as you are doing

What do you think @jrcarlos2000 ?

```


## current may Troubled problem
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is one of the main problems when integrating in the main, we must have it under control, once it is solved we could revaluate

Copy link
Author

@847850277 847850277 Feb 12, 2025

Choose a reason for hiding this comment

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

yes! It must be resolved, otherwise using cairo's dacare&&deploy in already declared scenarios will block it.

but sncast_std seem not support return class_hash when declared exist.

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.

[FEAT] Update Snfoundry package to support starknet foundry script