Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions ERC4337-AccountAbstraction/ERC-4337.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# What is ERC-4337 🤔
ERC-4337, also known as account abstraction, is a proposed Ethereum standard that would allow users to interact with the Ethereum network without having to manage their own private keys. This would make it easier for users to get started with Ethereum and would also make it more secure, as users would not be at risk of losing their funds if they lost their private keys.

ERC-4337 would be implemented as a smart contract that would act as a proxy for the user's account. The user would interact with the smart contract instead of interacting directly with the Ethereum network. The smart contract would handle all of the low-level details of interacting with the Ethereum network, such as signing transactions and managing gas fees.

ERC-4337 is still under development, but it has the potential to make Ethereum more user-friendly and secure. It could also lead to new types of applications, such as wallets that allow users to manage their funds without having to worry about private keys.

Here are some of the benefits of ERC-4337:

* **Improved user experience:🍫** ERC-4337 would make it easier for users to get started with Ethereum by removing the need to manage private keys. This would make Ethereum more accessible to a wider range of users.
* **Increased security:🔫** ERC-4337 would make Ethereum more secure by reducing the risk of users losing their funds due to lost or stolen private keys.
* **New types of applications:🎫** ERC-4337 could lead to new types of applications, such as wallets that allow users to manage their funds without having to worry about private keys.

ERC-4337 is a promising new development for Ethereum, and it has the potential to make the platform more user-friendly, secure, and versatile.
51 changes: 51 additions & 0 deletions ERC4337-AccountAbstraction/ERC4337.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
pragma solidity ^0.8.0;

// ERC-4337 interface
interface IERC4337 {

function submitTransaction(
bytes calldata transaction
) external returns (uint256 transactionId);

function getTransactionStatus(
uint256 transactionId
) external view returns (bool success);

}

// ERC-4337 contract
contract ERC4337 is IERC4337 {

// Mapping of transaction IDs to transaction statuses
mapping(uint256 => bool) public transactionStatuses;

// Submits a transaction to the Ethereum network
function submitTransaction(
bytes calldata transaction
) external override returns (uint256 transactionId) {

// Generate a unique transaction ID
transactionId = uint256(keccak256(transaction));

// Set the transaction status to pending
transactionStatuses[transactionId] = false;

// Submit the transaction to the Ethereum network
// ...

// Return the transaction ID
return transactionId;

}

// Returns the status of a transaction
function getTransactionStatus(
uint256 transactionId
) external view override returns (bool success) {

// Return the transaction status
return transactionStatuses[transactionId];

}

}
20 changes: 20 additions & 0 deletions ERC4337-AccountAbstraction/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Project Title
Simple Overview of ERC-4337
## Description
This code implements the basic functionality of an ERC-4337 contract. It allows users to submit transactions to the Ethereum network and to get the status of transactions.
# How to Run this Contract
To use this contract, you would first need to deploy it to the Ethereum blockchain.

Simply copy the contract code and paste it on
```
https://remix.ethereum.org/
```
then deploy it.

Once the contract is deployed, you can submit transactions to the Ethereum network by calling the **submitTransaction()** function. You can get the status of a transaction by calling the **getTransactionStatus()** function.
## More info
To know more about ERC-4337

Check these resources ->
- https://www.youtube.com/watch?v=1pE261Tbjcc&ab_channel=UttamSingh
- https://www.youtube.com/watch?v=CgXzDuN5Xqc&ab_channel=EthereumCatHerders