## Paymaster 如果你想为你的用户赞助用户操作,ERC-4337 定义了一种特殊的合约,称为 **paymaster**,其目的是支付用户操作所消耗的 gas 费用。 在账户抽象的上下文中,赞助用户操作允许第三方代表用户支付交易 gas 费用。这可以...
...异,这些差异直接影响用户体验 - **Gelato**在赞助交易和ERC20交易方面,针对Safe、Kernel、Thirdweb和Alchemy钱包取得了卓越的性能 - **开源**基准测试能够在所有主要提供商之间实现可复现的结果 **结论**:基础设施选择直接影响用户...
...PS/eip-7683)到以太坊魔法师[论坛](https://ethereum-magicians.org/t/erc-7683-cross-chain-intents-standard/19619/1)。这两个项目已将该标准提交给 [CAKE 工作组](https://frontier.tech/cake-working-group) 以供他们讨论和审查。 ### 摘要 以下标准允许实现跨...
## **1. `onERC721Received` 的作用与使用** ### **1.1 `onERC721Received` 是什么?** `onERC721Received` 是 ERC-721 标准中的一个回调函数,专门用于 **合约** 接收 NFT(ERC-721 代币)时的安全处理。当 NFT 通过 `safeTransferFrom` 方式被转移到合约时...
在本节中,我们将讲解官方文档中的 100% Yul 实现的 [ERC20 合约](https://docs.soliditylang.org/en/latest/yul.html#complete-erc20-example)。为了方便理解,我们会逐步讲解,并在适当的位置附上代码。 首先,来看合约的构造函数部分: ``` yu...
...已经上传,构造需要传参数 调用代码: ``` interface IERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory);...
...安全考虑 ChainLight 已经分析了针对构建在或计划实现 ERC4337 的项目的安全审计报告,并根据这些报告编制了基于这些报告的账户抽象项目的基本注意事项清单。在本文中,我们参考了 OpenZeppelin 对 ERC4337 参考实现的审计报告,...
... ``` pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract NFT_WEB3_EXPLORER is ERC721, ERC721Enumerable, Ownable { ...
...TH,则**最终攻击者总共获利为 71 WETH +5,500 WETH -4,300 ETH=1,271 ETH,合计大约$355,880(当前ETH价格$280)。** 硬核解析:bZx 可规避风险代码逻辑缺陷 通过前面攻击者在合约中实现的步骤可以看出,问题的核心原因是在第...
...`EIP-1822 UUPS`的进一步标准化版本,读者可以在这里找到[ERC文档](https://learnblockchain.cn/docs/eips/EIPS/eip-1967)。该标准被`etherscan`等区块链浏览器支持,可以提供完整的代理合约展示和交互功能。你可以前往[USDC合约](https://etherscan.io/add...
...thub.com/ethereum/EIPs/pull/7266/files):移除blake2f (0x09)预编译 - ERCs(应用层): - [ERC7265](https://github.com/ethereum/EIPs/pull/7265/files):断路器,用于当超过阈值时暂停 Token 留出。 - [ERC7272](https://github.com/ethereum/EIPs/pull/7272/files):以太坊...
...s://github.com/ethereum/EIPs/pull/7949/files):分离付款方交易 * ERC(应用层): * [ERC7554](https://github.com/ethereum/ERCs/pull/97/files):通过元数据附件实现 NFT 的收益(ERC721 扩展) * [ERC7555](https://github.com/ethereum/ERCs/pull/99/files):用...
...s`付出(前提是用户在`paymasters`有存款或授权一定数量的 ERC20 代币)。这使得用户在区块链上能有更好的体验了。 # 设计 ZKsync 上的帐户抽象协议与 `EIP-4337`非常相似,但为了效率和更好的用户体验,仍然有所不同。 ## No...
...com/ethereum/EIPs/pull/7809/files):EVM 配置文件用于 zk rollup * ERC(应用层): * [ERC7527](https://github.com/ethereum/EIPs/pull/7797/files):基于内置函数 Oracle AMM 的标准接口系统 * [ERC7528](https://github.com/ethereum/EIPs/pull/7808/files):ETH(原...
...nvulnerabledefi-foundry > ## 合约 - ReceiverUnstoppable:继承IERC3156FlashBorrower合约,用于发起闪电贷,执行闪电贷后的回调 - UnstoppableVault:金库合约,继承IERC3156FlashLender、ERC4626,支持闪电贷 ## 脚本 - 依次部署DamnValuableToken、Uns...