Skip to content

Event data too long when migrating Safe multisig contract #140

@sekisamu

Description

@sekisamu

Description

When attempting to deploy and migrate a Safe multisig contract using a 1/2 threshold, the transaction reverts with a ValueTooLarge error. This appears to be due to the event data exceeding the maximum allowed size in the revive pallet.

Steps to Reproduce

  1. Clone and setup the project
git clone https://github.com/papermoonio/safe-polkadot-poc
cd safe-polkadot-poc
pnpm install
  1. Configure environment variables
    Create a .env file in the project root:
LOCAL_PRIV_KEY=0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133
LOCAL_PRIV_KEY_2=<your_second_private_key>
  1. Run the deployment script
USE_POLKAVM=true npx hardhat run scripts/deploy_all.ts --network local

Expected Behavior

The Safe multisig contract should be successfully deployed and migrated without errors.

Actual Behavior

The transaction reverts with the following error in the node logs:

2025-07-23 15:49:46.826 TRACE tokio-runtime-worker runtime::revive::strace: 
deposit_event(topics_ptr: 4294832384, num_topic: 1, data_ptr: 132336, data_len: 640) = 
Err(TrapReason::SupervisorError(Module(ModuleError { index: 80, error: [11, 0, 0, 0], message: Some("ValueTooLarge") })))

Analysis

The error indicates that the event data length (640) exceeds the maximum allowed size for events in the revive pallet.

Additional Context

Safe multisig contracts are widely used in the Ethereum ecosystem, and supporting their deployment is crucial for ecosystem compatibility. Considering that the Safe account configuration used in testing is minimal (1/2 threshold), this indicates that the vast majority of Safe accounts would encounter this issue when executing transactions.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions