-
Notifications
You must be signed in to change notification settings - Fork 433
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
Fix: multisend verification only worked for the latest contract version #2439
Conversation
Branch preview✅ Deploy successful! |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
I've realized this is not a good solution either because if a Safe Account is upgraded, existing transactions from a previous version won't be detected as multisend correctly.
|
We could check whether it's supported by looping over an array of contract versions. We could get the array from either the |
This reverts commit a2ada2f.
@iamacook yeah, I was thinking the same but after talking with infra, we should probably do it on CGW, see safe-global/safe-client-gateway#657. So I suggest we just check the current Safe version at this time, just for safe-deployments 1.2.6 to still work, and do a more robust solution on CGW. |
Looks like this verification was added not for security reasons but just to not break the UI when some other contract has a I've removed the |
@@ -132,7 +109,7 @@ export const getMultiSendCallOnlyContract = ( | |||
const ethAdapter = createEthersAdapter(provider) | |||
|
|||
return ethAdapter.getMultiSendCallOnlyContract({ | |||
singletonDeployment: getMultiSendCallOnlyContractDeployment(chainId), | |||
singletonDeployment: getMultiSendCallOnlyDeployment({ network: chainId, version: safeVersion || undefined }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also an important fix, because it was getting 1.3.0 multisend by default which would break any time.
To do a multisend I just batched 2 send funds tx in a single tx, made sure that interacts with I compared prod with this PR and the tx looks the same, but still nothing out of order there so is ok Looks good to me |
What it solves
safe-deployments 1.2.6 made Safe 1.4.1 the default. See safe-global/safe-deployments#248
This breaks our code because we were always retrieving multisend contract addresses w/o a version. It worked for 1.3.0 but not for any other version.
How to test