kkrt-labs/kakarot-ssj

feat: implement `eth_get_transaction_count`

Closed this issue · 5 comments

fn eth_get_transaction_count(self: @TContractState, address: EthAddress) -> u64 {
panic!("unimplemented")
}

Given an evm address, this will return the transaction count (none) of this address.

Use it where required in the codebase, for example:

// Validate nonce
let starknet_caller_address = get_caller_address();
let account = IAccountDispatcher { contract_address: starknet_caller_address };
assert(account.get_nonce() == tx.nonce(), 'Invalid nonce');

reference:

https://github.com/kkrt-labs/kakarot/blob/main/src/kakarot/eth_rpc.cairo#L43-L50

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged


Hey! I'm Gerson. 👋

Member of Dojo Coding. I have contributed before to other Kakarot projects like:

  • kakarot-rpc
  • ef-tests

Can I work on this issue?

Check my OnlyDust profile, I've contributed to many projects: Profile

How I plan on tackling this issue


Plan to Solve the Issue:

  1. Study the codebase to understand the current structure and functionality.
  2. Understand the problem that needs to be solved by thoroughly reading the issue details.
  3. Leverage all provided resources within the issue to get a better grasp of the task at hand.
  4. If I encounter roadblocks, I will ask questions ASAP in the Telegram group to move forward effectively.
  5. I will open a PR and wait for ur feedback

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, I am Cairo Developer with lots of experience contributing to Cairo projects, you can check my profile to be sure of this.

How I plan on tackling this issue

I would go through the code base and understand what is needed and ensure I do just that, after that I would write a robust test ensuring all test cases are covered and the feat behaves as expected.

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

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

My recent work with cairo starknet

My recent work with rust

How I plan on tackling this issue

Am going to

  • implement the function
  • Look through the codebase where ever the function is call and make sure the code build successfully
  • Write unit test for the function
    ETH: 18hrs

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

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

My recent work with cairo starknet

My recent work with rust

How I plan on tackling this issue

Am going to

  • implement the function
  • Look through the codebase where ever the function is call and make sure the code build successfully
  • Write unit test for the function
    ETH: 18hrs

The maintainer enitrat has assigned Gerson2102 to this issue via OnlyDust Platform.
Good luck!