Skip to content

Feat: implement up-gradable and access control #5

Merged
caxtonacollins merged 2 commits intocaxtonacollins:mainfrom
Olowodarey:acoount
May 29, 2025
Merged

Feat: implement up-gradable and access control #5
caxtonacollins merged 2 commits intocaxtonacollins:mainfrom
Olowodarey:acoount

Conversation

@Olowodarey
Copy link
Contributor

  • Integrated OpenZeppelin's upgradable Account contract.
  • Added AccessControl for role-based permission management.
  • Implemented function-level protection using only_owner (or relevant role modifier).
  • Wrote Cairo tests to verify that only the contract owner can successfully call the protected function.

Test Coverage:

  • Owner can call the restricted function.
  • Non-owner call is correctly reverted.

@caxtonacollins
Copy link
Owner

@Olowodarey, please integrate the SNIP9 OutsideExecution component from OZ.

Copy link
Owner

@caxtonacollins caxtonacollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have made some reviews that will close this pr, pls make the changes, run scarb fmt, scarb build and scarb test, before pushing.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add this to storage:
// Custom storage for SyncPayment functionality
fiat_balance: Map<(ContractAddress, felt252), u128>, // (user, currency) => balance
token_address: Map<felt252, ContractAddress>, // symbol => token_address
default_fiat_currency: felt252,
liquidity_bridge: ContractAddress,
initialized: bool,

@caxtonacollins caxtonacollins merged commit 7239e64 into caxtonacollins:main May 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants