crytic / building-secure-contracts

Guidelines and training material to write secure smart contracts
https://secure-contracts.com/
GNU Affero General Public License v3.0
2.18k stars 341 forks source link

Wrong require in Cairo example #365

Open fontanellag opened 1 month ago

fontanellag commented 1 month ago

Within the example in https://github.com/crytic/building-secure-contracts/tree/master/not-so-smart-contracts/cairo/unchecked_from_address_in_l1_handler the require in setOwnerOnL2() should be:

 require(OWNER == msg.sender, "not owner");

instead of

 require(owner == msg.sender, "not owner");