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

Predict safe address util #415

Merged
merged 58 commits into from
Apr 28, 2023
Merged

Predict safe address util #415

merged 58 commits into from
Apr 28, 2023

Conversation

DaniSomoza
Copy link
Contributor

@DaniSomoza DaniSomoza commented Apr 20, 2023

What it solves

Resolves #355

How this PR fixes it

Added predictSafeAddress as a util function
Added encodeSetupCallData as a util function

Removed calculateProxyAddress and using now the new predictSafeAddress util function
Removed getSafeInitializer and using now the new encodeSetupCallData util function

Other changes

Now we are using the PREDETERMINED_SALT_NONCE as a default value for the saltNonce in the SafeFactory instead of the old default saltNonce based on the timestamp:

(Date.now() * 1000 + Math.floor(Math.random() * 1000)).toString()

see this comment

Tests

Added predictSafeAddress unit tests:

Captura de pantalla 2023-04-21 a las 19 08 12

Base automatically changed from protocol-kit-undeployed-safe to development April 26, 2023 10:07
@dasanra dasanra changed the base branch from development to protocol-kit-undeployed-safe April 27, 2023 08:31
@dasanra dasanra changed the base branch from protocol-kit-undeployed-safe to development April 27, 2023 12:15
@dasanra dasanra changed the base branch from development to protocol-kit-undeployed-safe April 27, 2023 12:15
@dasanra dasanra changed the base branch from protocol-kit-undeployed-safe to development April 27, 2023 14:13
@dasanra dasanra force-pushed the predict-safe-address-util branch 2 times, most recently from a8841fc to 552bb50 Compare April 27, 2023 14:48
@dasanra dasanra force-pushed the predict-safe-address-util branch from 552bb50 to f9f00b4 Compare April 27, 2023 14:52
@dasanra dasanra merged commit f7cd9f6 into development Apr 28, 2023
@dasanra dasanra deleted the predict-safe-address-util branch April 28, 2023 15:01
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose counterfactual deployment methods from Protocol Kit
3 participants