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

Remove constructors from Safe contract and extensions, which only execute setup function. #21

Closed
Georgi87 opened this issue Apr 15, 2018 · 0 comments
Assignees

Comments

@Georgi87
Copy link
Contributor

Since setup function is called from the constructor, and can also be used standalone, the compiler actually generates two copies of this function. These copies are almost the same, the difference is in the way the input argument are read. When setup is called from the constructor, the input arguments are appended at the very end of the transaction data and are access by using CODECOPY. When setup is called standalone, the input arguments are accessed via CALLDATALOAD or CALLDATACOPY. Recommendation - remove call to setup from the GnosisSafe constructor. The master copy setup will require two transactions instead of one, but the benefit is shorter code and easier audit.

@rmeissner rmeissner self-assigned this Apr 16, 2018
rmeissner added a commit that referenced this issue Apr 16, 2018
Implements
* #21: Remove setup constructors
* #22: Add solc package
* #16: Remove functionality related to transaction confirmations via
smart contracts
@rmeissner rmeissner mentioned this issue Apr 17, 2018
11 tasks
Saw-mon-and-Natalie pushed a commit to Saw-mon-and-Natalie/safe-contracts that referenced this issue Nov 1, 2023
Implements
* safe-global#21: Remove setup constructors
* safe-global#22: Add solc package
* safe-global#16: Remove functionality related to transaction confirmations via
smart contracts
fdarian pushed a commit to fdarian/safe-contracts that referenced this issue Jan 14, 2024
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

2 participants