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

Integration origin from runtime context #562

Merged
merged 3 commits into from
Aug 19, 2022
Merged

Integration origin from runtime context #562

merged 3 commits into from
Aug 19, 2022

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Aug 19, 2022

Depends on filecoin-project/ref-fvm#793
TBD: update cargo lock once that merges.

@vyzo vyzo requested a review from raulk August 19, 2022 11:18
Comment on lines 30 to +44

#[inline]
pub fn address<'r, BS: Blockstore, RT: Runtime<BS>>(
_state: &mut ExecutionState,
_platform: &'r System<'r, BS, RT>,
) -> Result<(), StatusCode> {
todo!()
state: &mut ExecutionState,
platform: &'r System<'r, BS, RT>,
) {
state.stack.push(U256::from(platform.rt.message().receiver().id().unwrap()))
}

#[inline]
pub fn origin<'r, BS: Blockstore, RT: Runtime<BS>>(
state: &mut ExecutionState,
platform: &'r System<'r, BS, RT>,
) {
state.stack.push(U256::from(platform.rt.message().caller().id().unwrap()))
state.stack.push(U256::from(platform.rt.message().origin().id().unwrap()))
Copy link
Member

Choose a reason for hiding this comment

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

Note that these will likely not be the final addresses we return here -- we might return Eth addresses, depending on where the addressing spec lands. But it's OK to get rolling for now.

@vyzo vyzo marked this pull request as ready for review August 19, 2022 13:22
@raulk raulk merged commit 0dc90b0 into next Aug 19, 2022
@raulk raulk deleted the next-origin branch August 19, 2022 13:59
shamb0 pushed a commit to shamb0/builtin-actors that referenced this pull request Oct 3, 2022
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