Must Read

A detailed macro shot of a brass padlock with a key on heavy steel chains, symbolizing security and protection.

Question: What is a reentrancy attack in smart contracts, and how can it be detected and prevented?

A reentrancy attack is one of the most common security issues in smart contracts. It usually occurs when a contract calls an external contract’s function (such as a custom payment handler) right after sending Ether. If the attacker exploits this feature, they can repeatedly call the original contract’s function from within the external call. This […]

Question: What is a reentrancy attack in smart contracts, and how can it be detected and prevented? Read More »

EIP explained

EIP-7702: 让普通钱包(EOA)拥有智能合约能力

以太坊上的账户主要分为两类: 传统上,EOA 没有能力执行智能合约逻辑,这限制了用户体验和 UX 创新。EIP-7702 的目标就是让普通 EOA 也可以“半智能化”,无需迁移到合约钱包。 为什么需要 EIP-7702? 尽管智能合约钱包越来越强大,普通用户大多仍使用 EOA,但这导致以下限制: EIP-7702 提供了针对 EOA 的 短期功能扩展,解决这些痛点。 核心功能 1. 批量交易(Batching) 通过一次交易执行多个操作,例如: 传统上需要两笔交易,现在可以一次完成,减少用户操作和 gas 成本。 2. 代付交易(Sponsorship) 允许第三方账户为 EOA 支付交易费,例如: 3. 子权限(Privilege De-escalation) 允许用户签署子 key,限制其权限范围,例如: 技术实现原理 EIP-7702 引入了 新交易类型:Set Code Transaction(类型 0x04)。 交易结构如下: 核心流程 如果目标地址为 0x0,表示清空委托,恢复普通 EOA。 Delegation Indicator 工作机制 安全与注意事项 Gas 成本 交易发送者支付所有授权 gas,无论授权是否有效 简单示例(伪代码)

EIP-7702: 让普通钱包(EOA)拥有智能合约能力 Read More »

Hand of anonymous female on touchpad of laptop while surfing internet lying on mat at home during workout

Exploring EIP-7702: Practical Applications and Hands-on Tutorial

Git Repo viem project: https://github.com/songb2/ts-eip7702foundry project: https://github.com/songb2/eip7702 Introduction EIP-7702 introduces account delegation on Ethereum, allowing externally owned accounts (EOAs) to delegate certain operations to smart contracts or relayers. This feature enables gas sponsorship, meta-transactions, and more flexible account management, improving developer experience and user onboarding. In this article, we will explore the concept of EIP-7702,

Exploring EIP-7702: Practical Applications and Hands-on Tutorial Read More »

Subscribe for New Articles!