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

dev: replace transaction hash computation by use of ExecutionV1 type #756

Open
greged93 opened this issue Sep 13, 2024 · 1 comment
Open
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@greged93
Copy link
Collaborator

The below hash computation + signing of the transaction can be replaced by the use of the ExecutionV1 or ExecutionV3 type from starknet-rs. It exposes an API to compute the transaction hash and the signature. The only part that can be a little annoying is that it requires an access to a ConnectedAccount for the signature computation (which doesn't make a lot of sense imo).

Either use a ConnectedAccount with a filled in provider, or keep the current signature derivation and just compute the hash with the type.

@greged93 greged93 added the enhancement New feature or request label Sep 13, 2024
@greged93 greged93 added the good first issue Good for newcomers label Oct 10, 2024
@mubarak23
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a Experience Rust / Cairo smart contract developer with experience working on projects such as Just Art Peace, Dojo, Karst, TBA, and Shinigami. Before transitioning to Cairo development, I was a backend developer specializing in Rust.

My recent work with rust

How I plan on tackling this issue

  • Use ExecutionV1: Instead of manually computing the hash, we now use the ExecutionV1 type from starknet-rs to handle transaction hashing and signing.
  • Use ConnectedAccount: The ConnectedAccount object is used to compute the transaction hash and signature through its API.
  • Remove manual signing: The old manual signing logic with RELAYER_SIGNING_KEY is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: 🆕 Backlog
Development

No branches or pull requests

2 participants