Closed EmmanuelAR closed 4 days ago
Hi, I'm Peter and I'll be working on issue #253.
I estimate this will take 1hr to complete.
This is how I would tackle this issue:
First, I'll modify the current set_reason
method to check for both owner and admin permissions. Already we have the pattern for admin validation in the set_state
method, so I will follow a similar approach.
Get both admin addresses using contract_address_const
Modified assert to check if caller is either:
I would like to work on this issue
May I try my hand at this?
Can I take this from here?
Hi, mind if I take this issue?
Can I take this from here?
Would love to tackle this!
Hi, I am proficient Blockchain developer expert in Cairo , Rust and Solidity and also in web development. I have contributed many cairo and rust projects like chaineventt , stark me , arkproject etc . please /assign this issue . Thank You
Can I try solving this issue?
May I work on this issue @EmmanuelAR?
I am an experienced cairo dev and a regular contributor at @keep-starknet-strange.
eta: 3 days
I am a full-stack developer with experience in QA testing and languages like Python, Cairo, Solidity, React, and JavaScript. please can i address this issue
Hello! Dojo Here⛩️
I found that the function set_state already have an assert that check that the caller should be an admin. So I will implement a similar logic on the set_reason function. This is how the function will looks when finished:
fn set_reason(ref self: ContractState, reason: ByteArray) {
let caller = get_caller_address();
let valid_address_1 = contract_address_const::<FundManagerConstants::VALID_ADDRESS_1>();
let valid_address_2 = contract_address_const::<FundManagerConstants::VALID_ADDRESS_2>();
assert!(
valid_address_1 == caller || valid_address_2 == caller || self.owner.read() == caller,
"Only Admins or owner can set a reason."
);
self.reason.write(reason);
}
Of course If is needed maybe I will remove the owner conditional from the code
I'm attentive!
Would love to tackle this!
hey sir I'd like to handle this task. i'm a frontend developer with experience i would really love to contribute to your project kindly assign :)
Hey, I'm a returning contributor having previously worked on testing gostarkme, I think this can be completed in half a day.
Hello, I can solve this issue easily, I have already been contributing to this project and I would like to continue being part of it!
Thank you for assigning @EmmanuelAR getting to it ASAP!
This issue will be part of ODHack10, please apply via Onlydust app