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

test: deploy account on katana via beerus, scarb and starkli #827

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

ICavlek
Copy link
Contributor

@ICavlek ICavlek commented Nov 6, 2024

With this PR, starkli library is introduced in test environment. Additionally, a test case has been created, that uses all of the major tools from starknet ecosystem:

  • scarb
  • starkli
  • katana
  • beerus

In the test case, a template account contract is compiled with scarb, manipulated with starkli and deployed via beerus to katana. Necessary updates were done on the template contract because of the deployment issue.

Copy link
Collaborator

@sergey-melnychuk sergey-melnychuk left a comment

Choose a reason for hiding this comment

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

LGTM % a few nitpicks

) -> Self {
let prefunded_account = match prefunded_account {
PreFundedAccount::Katana => "katana-0".to_string(),
PreFundedAccount::Sepolia => "TODO".to_string(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this TODO is not being addressed in this PR: let's maybe fail fast here, e.g. with unimplemented!().

@@ -7,15 +7,15 @@ const SOURCE_LIB: &str = "./tests/starknet/contract/account/src/lib.cairo";
const SOURCE_SCARB: &str = "./tests/starknet/contract/account/Scarb.toml";

#[allow(dead_code)]
pub fn prepare_account() -> Result<String, Error> {
pub fn prepare_account() -> Result<(String, String, String), Error> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick: extract struct for the return type or at add a comment about what is being returned, it doesn't seem obvious which string represents what.

@ICavlek ICavlek merged commit 76e4240 into main Nov 6, 2024
7 checks passed
@ICavlek ICavlek deleted the ic/starkli_lib branch November 6, 2024 16:49
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.

test: declare and deploy account on katana feat: starkli support for declaring and deploying account
2 participants