79640424

Date: 2025-05-27 11:55:47
Score: 3
Natty:
Report link

It looks like you're on the right track by deploying your Safe contracts locally and trying to enable modules via delegatecall during the Safe setup. The error you’re encountering:

Error: Transaction reverted without reason string

usually indicates that something in the transaction execution failed silently.

Here are some suggestions to help you troubleshoot and fix the issue:

Check Delegatecall Context: The enableModules function relies on being called via delegatecall from the Safe itself (address(this) is the Safe). Make sure that during the initialization call, the context is indeed the Safe proxy and not your SafeModuleSetup contract directly.

ABI Encoding & Data: Verify that the data field you pass to the Safe setup function is properly encoded. The to and data parameters should correspond exactly to a call on your SafeModuleSetup contract that will be executed in delegatecall context by the Safe.

Module Addresses: Double-check that the module addresses you pass are valid and deployed. Trying to enable non-existent or zero addresses will cause revert.

Gas Limit & Fees: Since you are on Hardhat local network, ensure your gas settings are sufficient. Sometimes low gas or fee configurations cause unexpected reverts.

Debugging with Events or Logs: Add events or use console.log (via Hardhat console.sol) inside your enableModules function to trace execution and see which module enables fail.

Minimal Reproducible Setup: Try enabling just one known working module initially to isolate whether the problem is with specific modules or the overall setup process.

Safe Version Compatibility: Make sure your contracts and protocol kit versions are compatible with each other (you use Safe v1.4.1).

If you want, here is a checklist for your setup:

Deploy all modules before creating the safe. Encode the call data to enableModules correctly with deployed module addresses. Pass this data as data param in Safe’s setup to call pointing to your SafeModuleSetup. Confirm that delegatecall during setup executes on your SafeModuleSetup code but in Safe proxy context. Monitor revert reasons by adding events or try/catch error handling. If none of this helps, please share exact transaction calldata and deployment steps, so we can pinpoint the issue better.

Good luck! You’re very close to a working local sandbox for module-enabled Safes. Keep going! 🚀

Reasons:
  • RegEx Blacklisted phrase (2.5): please share
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: MOHD SAYEEDUDDIN AHMED