Skip to content

Using SAFE

The Ethereum-based SAFE can be used to manage a SKALE Chain, IF set as the SKALE Chain owner during creation. It operates using SKALE’s Native IMA bridge to execute on a SKALE Chain.

Sending transactions to your SKALE Chain requires encoding the function data to execute via both Marionette and IMA. The recommended way for this is to use the multisigwallet CLI from SKALE.

This uses the encodeData command from MultisigWallet CLI

The following example will help you grant a specific role to an externally owned account (EOA) on your SKALE Chain. This can be useful in the early days of setting up your chain to help distribute sFUEL with scripts as needed.

NameValue
Contract NameEtherbase
RoleETHER_MANAGER_ROLE
Role Id (keccak256)0xe0ba7b49edc651b7ad93b374c67f1e9a0d37370168bbb86b81c569ebfa15f046
Receiver0xa9E1712086412A157A2A187A111bFAb203C73F6E
SKALE Chain Namejuicy-low-small-testnet
Terminal window
npx msig encodeData juicy-low-small-testnet Etherbase grantRole 0xe0ba7b49edc651b7ad93b374c67f1e9a0d37370168bbb86b81c569ebfa15f046 0xa9E1712086412A157A2A187A111bFAb203C73F6E
Terminal window
# Output
0x9448920200000561bf78bd39c8e04acfad7995005495094c7d395d405c3288f009efc402000000000000000000000000d2c0deface000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000d2ba3e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000442f2ff15de0ba7b49edc651b7ad93b374c67f1e9a0d37370168bbb86b81c569ebfa15f046000000000000000000000000a9e1712086412a157a2a187a111bfab203c73f6e00000000000000000000000000000000000000000000000000000000
  1. Go to SAFE App or your preferred frontend for SAFE.
  2. Press New Transaction and then Transaction Builder

Click on Transaction Builder

  1. Enable the toggle Custom Data

Enable the custom data toggle

  1. Input the MessageProxy address for your correct environment into the Contract Address field and select Use Implementation ABI

MessageProxy Contract Addresses

NetworkContract Address
Ethereum Mainnet0x8629703a9903515818C2FeB45a6f6fA5df8Da404
Ethereum Holesky Testnet0x682ef859e1cE314ceD13A6FA32cE77AaeCE98e28
  1. Input 0 for ETH Value
  2. Input the above Output from the npx msig... command into the Data (Hex Encoded) field (see image).

Transaction Prepared in SAFE

  1. Click Add transaction, scroll down, and click Create Batch, then click Send Batch. Tenderly simulation is generally available, even on testnet, and is encouraged to be used to see all the changes occuring on the Ethereum side before they occur.

Executing the transaction is equivalent to sending a transaction to the blockchain. As this requires the SKALE Network validators to pickup the message from Ethereum and post it to the SKALE Chain, please allow time for the Ethereum transaction to be included and for the message to post to SKALE.