Skip to content
New issue

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

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

Already on GitHub? # to your account

Support caller_is_root #2310

Closed
wants to merge 8 commits into from

Conversation

olahfemi
Copy link
Contributor

@olahfemi olahfemi commented Nov 16, 2024

Summary

Closes #_

  • n | Does it introduce breaking changes?
  • 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
@olahfemi olahfemi requested a review from ascjones as a code owner November 21, 2024 21:29
@olahfemi olahfemi changed the title Support caller_is_root - main code added Support caller_is_root Nov 23, 2024
@olahfemi olahfemi closed this Nov 24, 2024
@olahfemi olahfemi reopened this Nov 24, 2024
@olahfemi
Copy link
Contributor Author

olahfemi commented Dec 2, 2024

@cmichi, this suggests we don't need an integration test here. Can we merge now?

@cmichi
Copy link
Collaborator

cmichi commented Dec 3, 2024

@olahfemi Can you merge master and ensure that the PR only contains relevant changes? Right now it shows this:
image
And from a quick glance there seem to be a number of unrelated changes in here.

@olahfemi
Copy link
Contributor Author

olahfemi commented Dec 3, 2024

@olahfemi Can you merge master and ensure that the PR only contains relevant changes? Right now it shows this: image And from a quick glance there seem to be a number of unrelated changes in here.

I guess most of the changes are from when I merged master in the past and/or when I replaced the Cargo.lock. I'll look into it though.

@olahfemi olahfemi mentioned this pull request Dec 3, 2024
7 tasks
@cmichi
Copy link
Collaborator

cmichi commented Dec 4, 2024

Superseded by #2332.

@cmichi cmichi closed this Dec 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants