Gas Optimization Tips
Minimize on-chain dataUse librariesUse ERC1167Turn on the Solidity optimizerUse eventsUse literal instead of computed valuesAvoid to copy arrays in memoryAvoid for-loop over dynamic rangesOptimize order of variable declarationUse eth-gas-reporter
EIP-712: Quick Intro and Use case
https://eips.ethereum.org/EIPS/eip-712 Abstract This is a standard for hashing and signing of typed structured data as opposed to just bytestrings. It includes a theoretical framework for correctness of encoding functions, specification of structured data similar to and compatible with Solidity structs, safe hashing algorithm for instances of those structures, safe inclusion of those instances in the set of signable messages, an extensible mechanism for domain separation, new RPC call eth_sig...
How Tornado Cash works
Tornado Cash is a coin mixer that you can use to anonymize your Ethereum transactions. Because of the logic of the blockchain, every transaction is public. If you have some ETH on your account, you cannot transfer it anonymously, because anybody can follow your transaction history on the blockchain. Coin mixers, like Tornado Cash, can solve this privacy problem by breaking the on-chain link between the source and the destination address by using ZKP.Deposit:Users deposit the same amount of ET...
Blockchain Developer
Gas Optimization Tips
Minimize on-chain dataUse librariesUse ERC1167Turn on the Solidity optimizerUse eventsUse literal instead of computed valuesAvoid to copy arrays in memoryAvoid for-loop over dynamic rangesOptimize order of variable declarationUse eth-gas-reporter
EIP-712: Quick Intro and Use case
https://eips.ethereum.org/EIPS/eip-712 Abstract This is a standard for hashing and signing of typed structured data as opposed to just bytestrings. It includes a theoretical framework for correctness of encoding functions, specification of structured data similar to and compatible with Solidity structs, safe hashing algorithm for instances of those structures, safe inclusion of those instances in the set of signable messages, an extensible mechanism for domain separation, new RPC call eth_sig...
How Tornado Cash works
Tornado Cash is a coin mixer that you can use to anonymize your Ethereum transactions. Because of the logic of the blockchain, every transaction is public. If you have some ETH on your account, you cannot transfer it anonymously, because anybody can follow your transaction history on the blockchain. Coin mixers, like Tornado Cash, can solve this privacy problem by breaking the on-chain link between the source and the destination address by using ZKP.Deposit:Users deposit the same amount of ET...
Blockchain Developer

Subscribe to Hicss

Subscribe to Hicss
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers
Extended Reading:
https://vitalik.ca/general/2021/01/11/recovery.html
How to start with ERC-4337
Very curious about ERC-4337, so after some research, I finally got it:
It is everything about using smart contract accounts over EOAs (Externally Owned Accounts), implementing account abstraction (#ERC4337).
The first draft about this topic was proposed on 2021-09-29 by Vitalik Buterin in "ERC-4337: Account Abstraction Using Alt Mempool"
Now we have an "official" EntryPoint Smart Contract deployed by Ethereum Foundation, and **audited** by Open Zeppelin.
These are the main components to ERC-4337:
UserOperations are pseudo-transaction objects that are used to execute transactions with contract accounts. These are created by your app.
Bundlers are actors that package UserOperations from a mempool and send them to the EntryPoint contract on the #blockchain network. Can receive UserOperations via a JSON RPC Client and submit them to the EntryPoint.
EntryPoint is a smart contract that handles the verification and execution logic for transactions.
Contract Accounts are smart contract accounts owned by a user.
[optional] Paymasters are smart contract accounts that can sponsor transactions for Contract Accounts, enabling gasless transactions in your apps.
[optional] Aggregators are smart contracts that can validate signatures for Contract Accounts.
The EntryPoint contract has been deployed on multiple chains, in the same address 0x0576a174D229E3cFA37253523E645A78A0C91B57 for: Ethereum, Polygon, Optimistic, Avalanche (only testnet), Gnosis and other supported networks:
Stackup was first to create a fully compliant bundler and a paymaster service.
Alchemy announced their first two products in the space: Bundler Services and Paymaster Services (wait list).
These ones have also built and deployed bundlers:
According to the existing consensus, having multiple bundler clients is critical for the robustness of the protocol.
Taking the information above into account, we can also answer the initial questions:
It is an interface like ERC-20, ERC-721 or ERC-1155?
No, it is a set of technical components, based on Smart Contracts. Currently there is an official EntryPoint Smart Contract developed and deployed by Ethereum Foundation, and audited by Open Zeppelin.
Could I use ERC-4337 just importing the interface (from OpenZeppelin, for example), like IERC-20, IERC-721 or IERC-1155?
No, depending on the use case to achieve, you should use an available Bundler (or Paymaster) service provider, like Stackup, Biconomy, Blocknative, Etherspot or Candide wallet
This will be the end version of the code?
The last audited version of the code is on this Github repository branch.
It is this the ERC-4337 "official" contract?
The only "official contract" is he **EntryPoint contract that has been developed and deployed in multiple networks, by the Ethereum Foundation, and audited by Open Zeppelin in the following address: 0x0576a174D229E3cFA37253523E645A78A0C91B57
How can I use it from my Dapp?
Depending on the use case, you have to choose a Bundler or Paymaster service provider.
Extended Reading:
https://vitalik.ca/general/2021/01/11/recovery.html
How to start with ERC-4337
Very curious about ERC-4337, so after some research, I finally got it:
It is everything about using smart contract accounts over EOAs (Externally Owned Accounts), implementing account abstraction (#ERC4337).
The first draft about this topic was proposed on 2021-09-29 by Vitalik Buterin in "ERC-4337: Account Abstraction Using Alt Mempool"
Now we have an "official" EntryPoint Smart Contract deployed by Ethereum Foundation, and **audited** by Open Zeppelin.
These are the main components to ERC-4337:
UserOperations are pseudo-transaction objects that are used to execute transactions with contract accounts. These are created by your app.
Bundlers are actors that package UserOperations from a mempool and send them to the EntryPoint contract on the #blockchain network. Can receive UserOperations via a JSON RPC Client and submit them to the EntryPoint.
EntryPoint is a smart contract that handles the verification and execution logic for transactions.
Contract Accounts are smart contract accounts owned by a user.
[optional] Paymasters are smart contract accounts that can sponsor transactions for Contract Accounts, enabling gasless transactions in your apps.
[optional] Aggregators are smart contracts that can validate signatures for Contract Accounts.
The EntryPoint contract has been deployed on multiple chains, in the same address 0x0576a174D229E3cFA37253523E645A78A0C91B57 for: Ethereum, Polygon, Optimistic, Avalanche (only testnet), Gnosis and other supported networks:
Stackup was first to create a fully compliant bundler and a paymaster service.
Alchemy announced their first two products in the space: Bundler Services and Paymaster Services (wait list).
These ones have also built and deployed bundlers:
According to the existing consensus, having multiple bundler clients is critical for the robustness of the protocol.
Taking the information above into account, we can also answer the initial questions:
It is an interface like ERC-20, ERC-721 or ERC-1155?
No, it is a set of technical components, based on Smart Contracts. Currently there is an official EntryPoint Smart Contract developed and deployed by Ethereum Foundation, and audited by Open Zeppelin.
Could I use ERC-4337 just importing the interface (from OpenZeppelin, for example), like IERC-20, IERC-721 or IERC-1155?
No, depending on the use case to achieve, you should use an available Bundler (or Paymaster) service provider, like Stackup, Biconomy, Blocknative, Etherspot or Candide wallet
This will be the end version of the code?
The last audited version of the code is on this Github repository branch.
It is this the ERC-4337 "official" contract?
The only "official contract" is he **EntryPoint contract that has been developed and deployed in multiple networks, by the Ethereum Foundation, and audited by Open Zeppelin in the following address: 0x0576a174D229E3cFA37253523E645A78A0C91B57
How can I use it from my Dapp?
Depending on the use case, you have to choose a Bundler or Paymaster service provider.
No activity yet