Skip to content

Conversation

@dacarva
Copy link

@dacarva dacarva commented Jul 3, 2025

Motivation

The Safe Transaction Service on Rootstock differs from the canonical Gnosis S-T-S API and Rootstock addresses use the EIP-1191 checksum variant.
Without explicit handling, our frontend either failed to fetch/parse transactions or threw bad address checksum errors when encoding calldata with ethers.js.
This PR makes the app Rootstock-compatible while leaving behavior on every other chain untouched.

What’s changed

app/utils/api.ts

  • Added dedicated Rootstock gateway (https://gateway.safe.rootstock.io).

  • Introduced a two-step fetch flow:
    …/multisig-transactions/?nonce= – get basic tx list & internal transaction.id.
    …/transactions/{id} – fetch txData + detailedExecutionInfo.

  • Normalised the response to our common TransactionParams shape:

  • Handles nested objects (e.g. to.value, refundReceiver.value).

  • Concatenates confirmations into one signatures blob (first sig keeps 0x, subsequent ones drop the prefix – same as Gnosis backend).

app/components/safeHashesComponent.tsx

  • Address normalisation only when chainId === "30":
     if (chainId === "30") {
       address = address.toLowerCase();
       to = to.toLowerCase();
       gasToken = gasToken.toLowerCase();
       refundReceiver = refundReceiver.toLowerCase();
     }
  • Likewise, safeAddress is lowered in calculateDomainHash for Rootstock.
  • Eliminates INVALID_ARGUMENT: bad address checksum on both API-loaded and manually crafted transactions.

UI

  • No visual changes; the “Decode Data” popover and other components work as before.

@github-actions
Copy link

github-actions bot commented Jul 3, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@dacarva
Copy link
Author

dacarva commented Jul 3, 2025

I confirm that I have read and hereby agree to the OpenZeppelin Contributor License Agreement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant