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

Add reverse proxy call to owner #35

Open
frozeman opened this issue Jul 2, 2020 · 1 comment
Open

Add reverse proxy call to owner #35

frozeman opened this issue Jul 2, 2020 · 1 comment

Comments

@frozeman
Copy link
Contributor

frozeman commented Jul 2, 2020

This was proposed by @Amxx in this PR: #26 on the old code base.

owner might be a multisig, this allows read from/management of any eventual owning contract directly from the proxy. Usefull if the owning contract implements interfaces like ERC1271. That way dapps can call them without having to resolve the proxy ownership, thus making the proxy transparent

Very useful and should be discussed here.

This is especially relevant for the ERC725Account type (see types)

@frozeman
Copy link
Contributor Author

       function fallback()
        public
        {
            address to = owner();
            assembly {
                calldatacopy(0, 0, calldatasize())
                let result := staticcall(gas(), to, 0, calldatasize(), 0, 0)
                returndatacopy(0, 0, returndatasize())
                switch result
                case 0  { revert (0, returndatasize()) }
                default { return (0, returndatasize()) }
            }
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant