The RIF Multisig - Gnosis Summary
Gnosis Safe solution consists of four main modules. It currently supports Ethereum and other EVM networks (Rinkeby, xDai, EWC, Volta), including Rootstock (RSK).
-
A) The smart contracts
-
The suite of the smart contracts has the following structure:
- A Gnosis Safe implementation. It implements functionality for:
- Managing owners(1) and threshold(2)
- Submitting signatures or transactions pre-signed off-chain
- Rejecting transactions
- Allowing gas payments with tokens (relayed transactions)
- Enhanced for adding modules (3)
- A proxy factory contract that deploys proxies using Gnosis Safe implementation in two transactions
{:.no-style}
- Repo: https://github.com/gnosis/safe-contracts
- Deployments: https://github.com/gnosis/safe-deployments/tree/main/src/assets/v1.2.0
- (1)Owners: accounts enabled to sign and approve/reject multisig transactions
- (2)Threshold: the number of owners that need to sign to approve and send a transaction
- (3)Those functionalities are not included in this project
- A Gnosis Safe implementation. It implements functionality for:
-
-
B) Transaction service
-
The transaction service exposes a REST API for multisig (and other features used in the UI). It collects all the multisig information using
trace_transaction
andtrace_blocks
. Furthermore, it allows collecting off-chain signatures and retrieving multisig pending transactions.{:.no-style}
-
-
C) The Core SDK
- A Javascript SDK that currently implements most of the functionalities required.
interface Safe { connect({ providerOrSigner, safeAddress, contractNetworks }: ConnectEthersSafeConfig): void getProvider(): Provider getSigner(): Signer | undefined getAddress(): string getMultiSendAddress(): string getContractVersion(): Promise<string> getNonce(): Promise<number> getOwners(): Promise<string[]> getThreshold(): Promise<number> getChainId(): Promise<number> getBalance(): Promise<BigNumber> getModules(): Promise<string[]> isModuleEnabled(moduleAddress: string): Promise<boolean> isOwner(ownerAddress: string): Promise<boolean> createTransaction(...safeTransactions: SafeTransactionDataPartial[]): Promise<SafeTransaction> createRejectionTransaction(nonce: number): Promise<SafeTransaction> getTransactionHash(safeTransaction: SafeTransaction): Promise<string> signTransactionHash(hash: string): Promise<SafeSignature> signTransaction(safeTransaction: SafeTransaction): Promise<void> approveTransactionHash(hash: string): Promise<ContractTransaction> getOwnersWhoApprovedTx(txHash: string): Promise<string[]> getEnableModuleTx(moduleAddress: string): Promise<SafeTransaction> getDisableModuleTx(moduleAddress: string): Promise<SafeTransaction> getAddOwnerTx(ownerAddress: string, threshold?: number): Promise<SafeTransaction> getRemoveOwnerTx(ownerAddress: string, threshold?: number): Promise<SafeTransaction> getSwapOwnerTx(oldOwnerAddress: string, newOwnerAddress: string): Promise<SafeTransaction> getChangeThresholdTx(threshold: number): Promise<SafeTransaction> executeTransaction(safeTransaction: SafeTransaction): Promise<ContractTransaction> }
{:.no-style}
-
D) The UI
-
Users can log in with an existent Gnosis Safe, or they can create a new one. It allows to view and to send assets, to show the transaction list, and to edit the safe settings properties (owners, threshold)
{:.no-style}
-