gnosisguild/zodiac-module-connext(opens in a new tab)
Language: TypeScript
- stars
- 11
- watchers
- 2
- forks
- 7
- open issues
- 2
- Last updated
- 09/16/2024
Language: TypeScript
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:
restrictedFunction(), by ABI encoding:
_to: target contract address,_value: native assets to be passed into the function,_data: the function signature of restrictedFunction(),_operation: the type of operationxcall on the Connext contract on the origin domain, passing in the above _calldata and the target Connext Module. See the Connext Quickstart for more info.restrictedFunction().To add this module to your Gnosis Safe:
_origin and _originAddress that you expect messages to come from.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.