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

Default use owner function to get address #525

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Default use owner function to get address #525

merged 1 commit into from
Apr 27, 2024

Conversation

aefhm
Copy link
Contributor

@aefhm aefhm commented Mar 25, 2024

Description

Confidential EVMs such as Sapphire prevents direct getStorageAt calls from accessing raw slot data in order to allow a smart contract to permission access to its own state.

The default proxy supports the EIP173 spec function owner which appears to be the smoothest path towards supporting additional EVM like networks.

Would y'all find this compatible? An alternative solution would be to compare msg.data with a set of predefined keys and to return the storage slot.

function owner() external view returns (address) {
return _owner();
}

Relates to issue #530.

@aefhm aefhm marked this pull request as draft March 25, 2024 03:33
@aefhm aefhm closed this Mar 25, 2024
@aefhm aefhm reopened this Apr 3, 2024
@aefhm aefhm changed the title Use EIP173 function to query owner address Use owner function to query owner address Apr 3, 2024
@aefhm aefhm marked this pull request as ready for review April 3, 2024 23:28
@wighawag
Copy link
Owner

wighawag commented Apr 6, 2024

Happy to have that in, but it should support both.
it should check if the proxy has an owner function and uses it if it does, else fallback on reading storage slot

@aefhm
Copy link
Contributor Author

aefhm commented Apr 15, 2024

Happy to have that in, but it should support both. it should check if the proxy has an owner function and uses it if it does, else fallback on reading storage slot

Appreciate the feedback. Will do.

@aefhm aefhm changed the title Use owner function to query owner address Default use owner function to get address Apr 24, 2024
@aefhm
Copy link
Contributor Author

aefhm commented Apr 27, 2024

@wighawag one more look please?

@wighawag wighawag merged commit 9afb473 into wighawag:master Apr 27, 2024
2 checks passed
@wighawag
Copy link
Owner

Thanks!
available in 0.12.3

@aefhm aefhm deleted the xz/sapphire-proxy branch April 30, 2024 02:35
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