The Connext Module belongs to the Zodiac collection of tools, which can be accessed through the Zodiac App available on Gnosis Safe.
If you have any questions about Zodiac, join the Gnosis Guild Discord. Follow @GnosisGuild on Twitter for updates.
This module allows an Avatar to be the target of any arbitrary function call originiating from a Gnosis Safe on another domain (chain or rollup) using Connext.
Connext is a modular protocol for cross-domain communication. It piggybacks on the most secure Arbitrary Messaging Bridge available for a given ecosystem (e.g. the Optimism rollup bridge, or the Gnosischain AMB) to relay data and funds asynchronously between contracts on different chains.
The module implements Connext's IXReceiver interface, which receives an encoded payload from across domains and uses it to call a target contract specified as part of the payload. The module restricts the cross-domain call to originate only from a prespecified _origin
(domain identifier of the origin domain) _originAddress
(address of the source Safe or other contract initiating the cross-domain call). Both _origin
and _originAddress
may be updated by the module owner.
A DAO or Gnosis Safe on the origin domain wants to call restrictedFunction()
on the destination domain:
- The DAO or Gnosis Safe prepares the calldata for
restrictedFunction()
, by ABI encoding:_to
: target contract address,_value
: native assets to be passed into the function,_data
: the function signature ofrestrictedFunction()
,_operation
: the type of operation
- The DAO or Gnosis Safe calls
xcall
on the Connext contract on the origin domain, passing in the above_calldata
and thetarget
Connext Module. See the Connext Quickstart for more info. - Connext's protocol posts your payload to the Connext Module on the destination domain, which in turn calls
restrictedFunction()
.
To add this module to your Gnosis Safe:
- Deploy the module (see instructions below), passing in the relevant
_origin
and_originAddress
that you expect messages to come from. - In the Gnosis Safe app, navigate to the "apps" tab and select the Zodiac Safe App.
- Select "custom module", enter the address of your newly deployed module, and hit "Add Module".
It will then show up under Modules and Modifiers in the Gnosis Safe's Zodiac app. You can now interact with this Safe from _originAddress
on _origin
!
To see available commands run yarn hardhat
.
Some helpful commands:
yarn install # install dependencies
yarn build # compiles contracts
yarn test # runs the tests
yarn deployMasterCopy # deploys the mastercopy of the Connext Module. Add the `--network` param to select a network.
yarn setup # deploys a instance of this module.
Created under the LGPL-3.0+ license.
An audit has been performed by the G0 group.
All issues and notes of the audit have been addressed in commit 531e086d1064525a7921caba310a5a0b2b4aa412.
The audit results are available as a pdf in this repo.
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.