Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from 1 commit
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
dd378a1
created interfaces for Account recovery feature
Oct 16, 2023
37e2c9d
guardian interface and contract
Oct 17, 2023
1b09442
added test suite for Guardian.sol
Oct 20, 2023
3f4e74c
Merge branch 'thirdweb-dev:main' into account-social-recovery
alfheimrShiven Oct 20, 2023
a3cc320
AccountGuardian contract
Oct 20, 2023
f22fb72
added test suite for AccountGuardian contract
Oct 21, 2023
d3e6fe0
dependency injection for social recovery feature
Oct 21, 2023
3dba350
account lock req creation, signature validation and acceptance check
Oct 24, 2023
2ee0e32
Chainlink automation for lock request evaluation and lock account fea…
Oct 26, 2023
c642267
refactored deploy script for smart account util contracts
Oct 27, 2023
c476031
Deploy script for util contracts and its test
Oct 28, 2023
d7bd5d6
added link to feature doc in Readme
Oct 28, 2023
5bd148f
Merge pull request #1 from alfheimrShiven/account-social-recovery
alfheimrShiven Oct 30, 2023
14dfa8f
fixing..
Oct 30, 2023
8395b06
brought back DeployGuardian as DeploySmartAccountUtilContracts script…
Oct 30, 2023
b106090
Merge pull request #2 from alfheimrShiven/account-social-recovery
alfheimrShiven Oct 30, 2023
8001b8b
moved account util contract deployments to Account.sol, commented out…
Nov 1, 2023
c72f748
switched AccountLock to single instance deployment (as per the system…
Nov 2, 2023
a8ca25f
Merge pull request #3 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 2, 2023
19f18e3
restoring to util contract deployments to createAccount()
Nov 4, 2023
0ddb444
Changed the approach of calling Account.sol from AccountLock.sol
Nov 8, 2023
9c15308
added modifier to restrict an Account's lock status change by Account…
Nov 8, 2023
493001e
Merge pull request #4 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 8, 2023
f6b4843
made AccountGuardianTest compatible with deployment of AccountGuardia…
Nov 8, 2023
53b9588
replaced DeployGuardian script with DeploySmartAccountUtilContracts s…
Nov 10, 2023
38e568d
Merge pull request #5 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 10, 2023
3f763ed
sending AccountLock address while initilizing Account clones for acco…
Nov 14, 2023
665f243
Merge pull request #6 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 14, 2023
bb6c8ba
AccountLock tests: createLockRequest() unit tests
Nov 14, 2023
dc9a859
[Buggy] ECDSA.recover(hash, signature) throwing error
Nov 16, 2023
5a7d6aa
Merge pull request #7 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 16, 2023
a6f7e33
foundry error
codypharm Nov 17, 2023
82c9281
depencies added but errors persist
codypharm Nov 17, 2023
598de03
error comntinues
codypharm Nov 17, 2023
3be95eb
build error persists
codypharm Nov 17, 2023
896717d
updated chainlink remappings
Nov 17, 2023
b15ce17
ECDSA.recover(...) bug fixed, made lockRequest hash EIP 191 compatibl…
Nov 17, 2023
fe87435
Merge pull request #8 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 17, 2023
819a0a7
unlock request feature, refactored concensys evaluation to both lock/…
Nov 18, 2023
a764396
Merge pull request #9 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 18, 2023
4ae52bb
added unit tests for account unlock feature
Nov 18, 2023
a50e537
Merge pull request #10 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 19, 2023
0aee37b
Makefile
Nov 21, 2023
ad2a9b1
Merge pull request #11 from alfheimrShiven/account-social-recovery
alfheimrShiven Nov 22, 2023
cb6691e
cross chain transaction now includes estimated amount deposit
codypharm Nov 28, 2023
11c2173
slippage calvualtion added
codypharm Nov 29, 2023
1687b2f
bugs fixed
codypharm Nov 30, 2023
0bc9b51
stopped at this stage
codypharm Dec 4, 2023
20e1477
added IAccountRecovery
Dec 5, 2023
ecab36c
native payment intiation done
codypharm Dec 5, 2023
c3c5a31
link transfer initiator done
codypharm Dec 5, 2023
e822483
Account Recovery interface
Dec 5, 2023
42322c5
stock with userOp
codypharm Dec 5, 2023
0f95847
external signing implemented
codypharm Dec 5, 2023
37c3a36
recovery request guardian signature collection & concensus evaluation
Dec 7, 2023
78bb350
used isValidSignature but review is needed
codypharm Dec 7, 2023
7ceeb42
comments added and code made more dynamic
codypharm Dec 7, 2023
0bf4596
private key restoration
Dec 8, 2023
fc7af00
now using just one estimate function
codypharm Dec 9, 2023
4d4a248
proceed now has _
codypharm Dec 9, 2023
5c6ada8
Merge pull request #13 from alfheimrShiven/account-social-recovery
alfheimrShiven Dec 9, 2023
aaee738
Merge branch 'main' into cross-chain-transactions
codypharm Dec 9, 2023
b81a628
cross chain contracts deployed with accessible address
codypharm Dec 10, 2023
921b5c8
merge added
codypharm Dec 10, 2023
706d43e
getter added for account lock
codypharm Dec 10, 2023
c48ef73
Merge pull request #12 from alfheimrShiven/cross-chain-transactions
codypharm Dec 10, 2023
b818a8b
cross chain script sample added
codypharm Dec 10, 2023
faed719
Merge pull request #14 from alfheimrShiven/cross-chain-script
codypharm Dec 10, 2023
67ab98b
interface changes
Dec 10, 2023
e838c6d
Updated contract deploy script, fixed backward compatibility issues d…
Dec 10, 2023
318e840
Code optimized
codypharm Dec 10, 2023
7ec5c55
restructured functions
codypharm Dec 10, 2023
c036372
link address also added to constructot
codypharm Dec 10, 2023
3ad8a0b
master deployment updated
codypharm Dec 11, 2023
648be6c
one step skipped
codypharm Dec 11, 2023
e426334
last trial
codypharm Dec 11, 2023
21c1db4
Merge pull request #16 from alfheimrShiven/Fix-compilation
alfheimrShiven Dec 11, 2023
13454b1
Merge pull request #15 from alfheimrShiven/account-social-recovery
alfheimrShiven Dec 11, 2023
9994ac3
Update README.md
alfheimrShiven Dec 11, 2023
ddf5634
building cancelling
codypharm Dec 16, 2023
4e07d7c
resolved conflicts with main
Dec 18, 2023
4d11bd3
added AccountRecovery to deploy script
Dec 19, 2023
d968a8b
commented out both CCIP contracts [build still failing]
Dec 19, 2023
b17bd89
[FIX]: Fixed the stack too deep error by removing the _router, _link …
Dec 19, 2023
4b0133d
updating owner of smart account
Dec 22, 2023
89d12a4
Email verification to generate recovery request
Dec 24, 2023
669d16f
uncommented the CCIP contracts
Dec 24, 2023
15718b2
moved the deployment of CCIP contracts from BaseAccountFactory to non…
Dec 24, 2023
6a28d89
Merge pull request #17 from alfheimrShiven/revert/debugging
alfheimrShiven Dec 24, 2023
6413321
merged with main
Dec 24, 2023
14cc533
Merge pull request #18 from alfheimrShiven/account-social-recovery
alfheimrShiven Dec 24, 2023
a91ba30
updated account util deploy script and test
Dec 25, 2023
e12640a
Moved smart account creation to deploy script, updated deployment scr…
Dec 27, 2023
ab94b18
Merge pull request #19 from alfheimrShiven/account-social-recovery
alfheimrShiven Dec 27, 2023
17ed4de
generateRecoveryReq(..) tests
Dec 31, 2023
b9b472e
collectGuardianSignaturesOnRecoveryRequest(..) unit tests
Dec 31, 2023
b5490d4
refactored AccountRecovery unit tests
Dec 31, 2023
6abbb81
Consensus evaluation tests
Dec 31, 2023
f694b4f
Merge pull request #20 from alfheimrShiven/account-social-recovery
alfheimrShiven Dec 31, 2023
abbeeff
fixed Account::updateAdmin() function signature and call from Account…
Jan 3, 2024
6454a6c
Merge pull request #21 from alfheimrShiven/account-social-recovery
alfheimrShiven Jan 3, 2024
625340b
removed _generateSalt dependency on account admin, as it can get upda…
Jan 4, 2024
b0d399a
finished AccountRecovery unit tests. Coverage: 92%
Jan 4, 2024
af976db
Merge pull request #22 from alfheimrShiven/account-social-recovery
alfheimrShiven Jan 4, 2024
faf0a62
reduced params for commitEmailVerificationHash()
Jan 5, 2024
41099ca
Merge pull request #23 from alfheimrShiven/account-social-recovery
alfheimrShiven Jan 5, 2024
047eac0
updated Readme: Problem statement, Architecture
Jan 6, 2024
548776e
Merge pull request #24 from alfheimrShiven/account-social-recovery
alfheimrShiven Jan 6, 2024
d4162c5
updated Readme: Benefits of smart wallets
Jan 8, 2024
d54fdb5
Readme touchups
Jan 8, 2024
8b9536a
Merge pull request #25 from alfheimrShiven/account-social-recovery
alfheimrShiven Jan 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Readme touchups
  • Loading branch information
Shivendra Singh committed Jan 8, 2024
commit d54fdb547e60911509618766fd5bf7ce895188e7
66 changes: 27 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<h1 align="center">CryptoPhoenix Smart Wallet Contracts</h1>
<p>CryptoPhoenix Wallet SDK is a rollup to thirdweb's smart wallet contracts and offers: <br />
<ol>
<li>Smart Accounts</li>
<li>Social Account Locking</li>
<li>Social Account Recovery</li>
<li>Guardian Management</li>
Expand All @@ -10,36 +11,9 @@
## Problem Statement
As we all know, a wallet is a gateway to web3 but the wallet experience is unfortunately broken! For a user to interact with a blockchain, they not only have to **create a wallet but also secure their private keys and seed phrase, purchase native tokes to pay for gas, and sign every single action** that they take on a dApp.

Such an intimidating user experience for newcomers is a big obstacle in the mass adoption of web3 and CryptoPhoenix Wallet SDK is here to change this through its **Account abstraction technology.
Such an intimidating user experience for newcomers is a big obstacle in the mass adoption of web3 and CryptoPhoenix Wallet SDK is here to change this through its **Account abstraction technology.**

## Smart Wallets (ERC 4337)
Smart wallets are wallets that are controlled by programmable smart contract therefore having the following key benefits:
1. **Improved user experience:**
Eliminates the need to manage private keys, making it easier and safer for users to interact with Web3.
Enable gasless transactions for your users.
Enable batched transactions, preventing user from having to approve every single transaction.
Enables features like social recovery and multi-signature wallets.
Allows for programmable payments and recurring subscriptions.
Enhanced security:
Reduces the risk of losing funds due to private key theft.
Smart contracts can be programmed with additional security features.
Increased flexibility:
Enables new types of wallets and applications.
Allows for more complex financial transactions.
Reduced transaction costs:
Can batch multiple transactions into one, saving gas fees.
Greater scalability:
Can improve the overall performance of blockchain networks.
They follow ERC-4337, a new ‘account abstraction’ standard that unlocks the power of smart contract wallets, or ‘smart accounts,’ on the Ethereum blockchain (and EVM-compatible networks).
## Architecture

<img src="./images/architecture.png" width="400" alt="puppy-raffle">
<br/>
<br />

[**Architecture walkthrough**](https://www.youtube.com/embed/0zq2YdOYFUo)

## Smart wallets
## Smart wallets and its features
Smart wallets are wallets that are controlled by a smart contract and have the following key benefits-
<ol>
<li>
Expand All @@ -58,23 +32,37 @@ Smart accounts can also provide multisig capabilities, requiring multiple signat
<li><h4>Automation of transactions</h4>
Enables self executing transactions when certain defined conditions are met like approving a predefined number of tokens to an entity based on fixed time intervals, stop loss and take profit orders, recurring subscriptions, etc.
</li>
</ol>

## Architecture

<img src="./images/architecture.png" width="600" alt="cryptophoenix_architecture">
<br/>
<br />

## How we built it
[![YouTube](https://img.shields.io/badge/YouTube-Video-red?style=for-the-badge&logo=youtube)](https://youtu.be/0zq2YdOYFUo?si=Ng6favRkGL9faG_Y)


## Contracts
The wallet SDK is a rollup to thirdweb's smart wallet (ERC-4337) contracts. We've added the following contracts to extend it's functionality:
<li> AccountGuardian.sol: Used to assign guardians for smart wallet accounts. </li>
<li> Guardian.sol: Powers the guardian interactions, like attending to account lock & recovery requests. </li>
<li> AccountLock.sol: Adds features like creating and evaluating account lock requests and locking the account assets, if consensus is achieved. </li>
<li> AccountRecovery.sol: Offers the ability to back up account's private key shards, create and evaluate account recovery requests and help with account recovery overall. </li>
<li> CrossChainTokenTransfer.sol: Provides creation of Chainlink's CCIP transfer request, signature verification, and finally implementation according to the ERC-4337 standards. </li>
<li> <b>Account.sol:</b>This is the smart contract that powers the smart wallet by offering features like executing single or batched transactions, locking account assets and updating the owner of the smart account incase of an account recovery is made.</li>
<li> <b>AccountGuardian.sol:</b> Used by the user to assign guardians for smart wallet accounts. </li>
<li> <b>Guardian.sol:</b> Powers the guardian interactions, like attending to account lock & recovery requests for the account they are guarding. </li>
<li> <b>AccountLock.sol:</b> Adds features like creating account lock requests and evaluating concensus on them followed by locking/unlocking the account assets.</li>
<li> <b>AccountRecovery.sol:</b> One of the most important contracts adding features like creating account recovery requests and evaluating concensus on them. Once the concensus is achieved, a new embedded wallet is created and made the owner of the smart contract holding all user assets, thus recovering the account.</li>


## Documentation

[CryptoPhoenix Smart Wallet Contract Docs](https://chukwunonsos-personal-organizati.gitbook.io/cryptophoenix/)
[**CryptoPhoenix Smart Wallet Contract Docs**](https://0xshiven.gitbook.io/cryptophoenix/)

## Authors
## Author:
### Shivendra Singh
[![GitHub](https://img.shields.io/badge/GitHub-Profile-black?logo=github)](https://github.com/alfheimrShiven)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-Profile-blue?logo=linkedin)](https://www.linkedin.com/in/shivends)
[![Twitter](https://img.shields.io/badge/Twitter-Profile-blue?logo=twitter)](https://twitter.com/0xShiven)
[![Substack](https://img.shields.io/badge/Substack-Newsletter-orange?logo=substack)](https://0xshiven.substack.com/)

- [Shiven](https://github.com/alfheimrShiven)
- [William](https://github.com/techyNonso)

## License

Expand Down