Closed enitrat closed 1 month ago
I am applying to this issue via OnlyDust platform.
Hello,I'm a front-end developer with a resolve to confront and solve new challenges. This alongside my experience will aid me in resolving this issue
I would carefully go through the github link highlighted to aid the implementation of the cheatcodes to resolve the issue, and also carry out the test as required
I am applying to this issue via OnlyDust platform.
I am a blockchaindevelopereveloper
I would approach this issue with the following steps:
For Testing Address Registration: Add a value to the mapping. Verify that the expected value is returned when calling get_starknet_address.
For Testing Computation: Ensure the mapping is empty. Check that get_starknet_address returns the same value as compute_starknet_address.
I am applying to this issue via OnlyDust platform.
I'm a returning contributor and I have some experience in Cairo testing.
I will carefully implement the test as explained in the issue description.
I am applying to this issue via OnlyDust platform.
I have a degree in computer science and am a mobile developer with experience in TypeScript and Python, among other programming languages. Although I haven't worked with Cairo directly, I have a strong grasp of Starknet's architecture because to my experience developing smart contracts for other blockchain platforms. My background in test-driven development and unit testing in a variety of settings will be helpful in putting thorough tests for the get_starknet_address function in place.
I would begin by reviewing the current codebase, paying close attention to the test file you mentioned and the get_starknet_address method. With the cheatcodes from starknet-foundry, I would then write a new test function. In the first test case, I would use get_starknet_address and assert that it returns the stored value after adding a known address to the mapping using the "store" cheatcode. In order to validate that the results of get_starknet_address and compute_starknet_address are identical in the second scenario, I would first make sure the mapping is empty. Before submitting a pull request with the new test cases and any required documentation modifications, I would run the tests locally to make sure they pass.
test
fn get_starknet_address
to ensurethe test will use starknet-foundry's "store" and "load" cheatcodes, as already used in: https://github.com/lordshashank/kakarot-ssj/blob/ed7e4145a0bb2517c60c6904fd317d11d1b00625/crates/contracts/tests/test_kakarot_core.cairo#L96-L131
The logic should be: for 1. you can just put any value in the mapping and verify it's returned for 2., make sure the mapping is empty, and that
get_starknet_address
returns the same ascompute_starknet_address
.reserved for @saimeunt