Skip to content

Safe x Scroll: l1sload / keystore module demonstration

Notifications You must be signed in to change notification settings

5afe/safe-scroll-keystore

Repository files navigation

Safe x Scroll: l1sload module demonstration

This project demonstrates a basic use-case where a safe on a Layer2 safe(L2) inherits its keystore (configuration/security policy: owners and threshold) from a Safe on a Layer1 safe(L1) via a Safe module SafeRemoteKeystoreModule enabled on safe(L2).

This Module can optionally set a guard to prevent safe(L2) to use its local keystore and only enable the remote keystore of safe(L1) as valid keystore.

It leverages a precompiled contract called l1sload to load a storage slot on the L1 chain (see L1SLOAD spec).

Getting started

Contracts

yarn install
npx hardhat compile
npx hardhat test
npx hardhat deploy_singletons --network <network>
npx hardhat deploy_safe --network <network> --factory <factory> --mastercopy <mastercopy> --owner <owner>

Frontend

cd frontend
yarn install
yarn dev
open http://localhost:3000

Demo

TODO

  • Support EIP-712 signature

About

Safe x Scroll: l1sload / keystore module demonstration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published