Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support caller_is_root - main code added #2310

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

olahfemi
Copy link

@olahfemi olahfemi commented Nov 16, 2024

Summary

Closes #_

  • y/n | Does it introduce breaking changes?
  • y/n | Is it dependant on the specific version of cargo-contract or pallet-contracts?

Description

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have added an entry to CHANGELOG.md
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@olahfemi olahfemi changed the title WIP: Support and Test caller_is_root - main code added WIP: Support and test caller_is_root - main code added Nov 16, 2024
@cmichi
Copy link
Collaborator

cmichi commented Nov 21, 2024

Thanks for the PR, generally the right direction. The function should be implemented analog to caller_is_origin:

fn caller_is_origin<E>(&mut self) -> bool
where
E: Environment,
{
ext::caller_is_origin()
}
.

If you have full-text search the repository for caller_is_origin you'll find the other places where code needs to be added (on_chain/impls.rs).

Co-authored-by: Michael Müller <mich@elmueller.net>
@olahfemi olahfemi changed the title WIP: Support and test caller_is_root - main code added WIP: Support caller_is_root - main code added Nov 21, 2024
@olahfemi olahfemi changed the title WIP: Support caller_is_root - main code added Support caller_is_root - main code added Nov 21, 2024
@olahfemi olahfemi marked this pull request as ready for review November 21, 2024 21:29
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