Home

Awesome

<div align="center"> <h1 align="center">SoulWallet Contracts</h1> </div> <div align="center"> <img src="https://raw.githubusercontent.com/proofofsoulprotocol/soul-wallet-packages/main/src/assets/logo.svg"> </div>

Features

Repository overview

Below is a brief overview of the repository contracts

SoulWalletFactory

"SoulWalletFactory" is a factory contract. It is used to create a new wallet contract. The wallet contract is created using the singleton contract with the CREATE2 opcode, which allows the wallet contract to be created with a deterministic address.

SoulWalletProxy

"SoulWalletProxy" is a proxy contract that manages the implementation contract address and is responsible for forwarding delegate calls to the implementation contract. Additionally, users' contract wallet data is stored in the proxy contract.

SoulWallet

"SoulWallet" is the implementation contract. It is responsible for the core logic of the wallet

MethodOwnerGuardiansAnyoneComment
transferOwnerXXThe owner has the ability to replace the signing key, and the guardians (multi-signature contract) can also replace the signing key through social recovery.
setGuardianXThe owner can update the guardians.
preUpgradeToXLet the owner perform a contract upgrade
upgradeXFinalizes an ongoing contract upgrade if the set time period has elapsed. The method is public and can be called by anyone.

AccountStorage

"AccountStorage" is a library contract that uses the diamond storage pattern to store data in a particular position in the contract storage.

GuardianMultiSigWallet

"GuardianMultiSigWallet" is a multi-signature contract that is used to verify the signatures of the guardians during social recovery. This multi-sig wallet is only deployed on the fly during social recovery, and guardians are only revealed at that point.

TokenPaymaster

"TokenPaymaster" is a paymaster contract that is used to pay gas fees with stablecoins such as USDC, USDT, DAI, etc.

Test

npm run test
npm run deploy:optimisticGoerli

Disclaimer

This project is provided "as is" with no warranties or guarantees of any kind, express or implied. The developers make no claims about the suitability, reliability, availability, timeliness, security or accuracy of the software or its related documentation. The use of this software is at your own risk.

The developers will not be liable for any damages or losses, whether direct, indirect, incidental or consequential, arising from the use of or inability to use this software or its related documentation, even if advised of the possibility of such damages.

Acknowledgments