Skip to content

Conversation

@jcvernaleo
Copy link
Contributor

@jcvernaleo jcvernaleo commented May 14, 2025

πŸ•“ Changelog

This PR adds support for the following additional chains:

  • Hemi (identifier: hemi, chain ID: 43111),
  • Lens (identifier: lens, chain ID: 232).

All supported chains that use the Safe transaction service API can be retrieved via:

curl -s https://safe-config.safe.global/api/v1/chains/ | jq '.results[].chainName'

Test Example hemi:

./safe_hashes.sh --network hemi --address 0xAFE7041797E8916616952a719971575f352e2b0d --nonce 7

returns:

===================================
= Selected Network Configurations =
===================================

Network: hemi
Chain ID: 43111

========================================
= Transaction Data and Computed Hashes =
========================================

> Transaction Data:
Multisig address: 0xAFE7041797E8916616952a719971575f352e2b0d
To: 0x40A2aCCbd92BCA938b02010E17A5b8929b49130D
Value: 0
Data: 0x8d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000f200a579605e9291c67eb9030bb866880614af61a11700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024e0bd12ee0000000000000000000000000000000000000000000000000000000000003a9800f7c6c918877d10e531574ae3ce175dcd206ad3d100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024e0bd12ee0000000000000000000000000000000000000000000000000000000000003a980000000000000000000000000000
Operation: Delegatecall (trusted delegatecall)
Safe Transaction Gas: 93172
Base Gas: 0
Gas Price: 0
Gas Token: 0x0000000000000000000000000000000000000000
Refund Receiver: 0x0000000000000000000000000000000000000000
Nonce: 7
Encoded message: 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d800000000000000000000000040a2accbd92bca938b02010e17a5b8929b49130d000000000000000000000000000000000000000000000000000000000000000085b14b6b66e85840a66117127a1cb131b4da24809a5d723586b22c87e67f1bc500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000016bf400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007
Method: multiSend
Parameters: [
  {
    "name": "transactions",
    "type": "bytes",
    "value": "0x00a579605e9291c67eb9030bb866880614af61a11700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024e0bd12ee0000000000000000000000000000000000000000000000000000000000003a9800f7c6c918877d10e531574ae3ce175dcd206ad3d100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024e0bd12ee0000000000000000000000000000000000000000000000000000000000003a98",
    "valueDecoded": [
      {
        "operation": 0,
        "to": "0xa579605E9291C67Eb9030BB866880614af61A117",
        "value": "0",
        "data": "0xe0bd12ee0000000000000000000000000000000000000000000000000000000000003a98",
        "dataDecoded": null
      },
      {
        "operation": 0,
        "to": "0xF7C6c918877d10e531574aE3Ce175DcD206ad3D1",
        "value": "0",
        "data": "0xe0bd12ee0000000000000000000000000000000000000000000000000000000000003a98",
        "dataDecoded": null
      }
    ]
  }
]

> Hashes:
Domain hash: 0xFF8C01ACB4A54236DCAEA3F0C5365A74CB0C21FF20737BC1868C021232FC3233
Message hash: 0x559EFFAFAAE3FFCB5225AF631155BA5C150E97C0365BE5C3405D4F96D88F7788
Safe transaction hash: 0x32b6a87f7eda92b27ad946aff18ba83fe95153a5c83246ad11b1ae8f38929da2

Now compare with https://app.safe.global/transactions/tx?safe=hemi:0xAFE7041797E8916616952a719971575f352e2b0d&id=multisig_0xAFE7041797E8916616952a719971575f352e2b0d_0x32b6a87f7eda92b27ad946aff18ba83fe95153a5c83246ad11b1ae8f38929da2.

Test Example lens:

./safe_hashes.sh --network lens --address 0x49b0EA5B0691D460F2026EF98CfB3819E2e9f97d --nonce 3

returns:

===================================
= Selected Network Configurations =
===================================

Network: lens
Chain ID: 232

========================================
= Transaction Data and Computed Hashes =
========================================

> Transaction Data:
Multisig address: 0x49b0EA5B0691D460F2026EF98CfB3819E2e9f97d
To: 0x88F08E304EC4f90D644Cec3Fb69b8aD414acf884
Value: 0
Data: 0xa9059cbb00000000000000000000000057237374df5f4efc44dbf620a529ce470687ae170000000000000000000000000000000000000000000000000000000000002710
Operation: Call
Safe Transaction Gas: 0
Base Gas: 0
Gas Price: 0
Gas Token: 0x0000000000000000000000000000000000000000
Refund Receiver: 0x0000000000000000000000000000000000000000
Nonce: 3
Encoded message: 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d800000000000000000000000088f08e304ec4f90d644cec3fb69b8ad414acf8840000000000000000000000000000000000000000000000000000000000000000bab992950131b7e5ace49c8c11e2eb7d024057dfcfe499bf3ab6dfe313e1557e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003
Method: transfer
Parameters: [
  {
    "name": "to",
    "type": "address",
    "value": "0x57237374Df5f4eFC44DBf620a529ce470687AE17"
  },
  {
    "name": "value",
    "type": "uint256",
    "value": "10000"
  }
]

> Hashes:
Domain hash: 0x91B305E687CAE81DD2D6193CB8F12B278B864EBA51A13876303E3BFC4961AA4F
Message hash: 0xC45B1B0964AA4493858A15707C56E20F573A056E241755161B66C965B0E589D7
Safe transaction hash: 0xd27de09d8a15ed30e06e4d3ffdc78873a7760c0d68823b5e13bcc3ff9d7f43e2

Now compare with https://app.safe.global/transactions/tx?safe=lens:0x49b0EA5B0691D460F2026EF98CfB3819E2e9f97d&id=multisig_0x49b0EA5B0691D460F2026EF98CfB3819E2e9f97d_0xd27de09d8a15ed30e06e4d3ffdc78873a7760c0d68823b5e13bcc3ff9d7f43e2.

Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio changed the title Add support for Hemi ✨ Add Support for Hemi and Lens May 14, 2025
@pcaversaccio pcaversaccio self-requested a review May 14, 2025 14:58
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio self-assigned this May 14, 2025
@pcaversaccio pcaversaccio added feature πŸ’₯ New feature or request documentation πŸ“– Improvements or additions to documentation labels May 14, 2025
Copy link
Owner

@pcaversaccio pcaversaccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcvernaleo thx for the PR! I also added support for lens in this PR after noticing that lens was recently added to the Safe transaction service API.

@pcaversaccio pcaversaccio merged commit 4415d2b into pcaversaccio:main May 14, 2025
2 of 3 checks passed
@jcvernaleo jcvernaleo deleted the jcv_hemi branch May 16, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation πŸ“– Improvements or additions to documentation feature πŸ’₯ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants