Skip to content

Commit

Permalink
apply some coderabbit suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ptisserand committed Feb 18, 2025
1 parent 6e890fe commit 66f1f89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ scripts:
description: deploy the ERC20 contract
run: |
starkli deploy --salt 0x12345678 0x07d4ee0e4494fe12b26da8e7d2cb114185f768f2bce3e7b1b356cecc9596474b u256:1000000000000000000000000000 0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691 2>&1
test:
description: Run all tests
steps:
Expand Down
5 changes: 3 additions & 2 deletions packages/starknet_cli/lib/account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ class AccountDeployCommand extends Command<void> {
final privateKey = Felt.fromHexString(
globalResults?['private-key'] as String,
);
final signer = StarkSigner(privateKey: privateKey);
final accountAddress = Contract.computeAddress(
classHash: accountClassHash,
calldata: [StarkSigner(privateKey: privateKey).publicKey],
salt: StarkSigner(privateKey: privateKey).publicKey,
calldata: [signer.publicKey],
salt: signer.publicKey,
);
stdout.writeln('Account address: ${accountAddress.toHexString()}');

Expand Down
6 changes: 1 addition & 5 deletions packages/starknet_cli/lib/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ Account accountFromArgs(ArgResults? globalResults) {
globalResults?['chain-id'] as String,
),
provider: provider,
signer: StarkAccountSigner(
signer: StarkSigner(
privateKey: Felt.fromHexString(globalResults?['private-key'] as String),
),
),
signer: signerFromArgs(globalResults),
);
}

Expand Down

0 comments on commit 66f1f89

Please sign in to comment.