...ort "forge-std/Test.sol"; import "./interface.sol"; import "../contracts/ERC20.sol"; interface DEI { function burnFrom(address account, uint256 amount) external; } interface AMM { function sync() external; function swap(uint amount0Out, uint amount1Out, address to, bytes call...
...时会让绝大部分 DeFi 合约更节省 gas ### Single transaction [ERC-20](https://eips.ethereum.org/EIPS/eip-20) approval 不知道有没有其他小伙伴和笔者一样,在刚接触 Dex 的时候,被想要 Swap 却要先 Approve Token 这一操作给整懵了。更难受的是,假...
... Optimistic Virtual Machine (OVM) 实现以太坊兼容性。\- 构建 [Superchain-](https://www.bankless.com/optimism-op-superchain),旨在互连 L2 生态系统 | \- 2017 年作为 Matic Network 成立,2021 年更名为 Polygon。\- 通过 PoS 侧链和 zkEVM 实现可扩展性。\- PoS 独立...
...umber() ``` # 合约操作 ## 创建合约实例 ``` const abiERC20 = [ "function name() view returns (string)", "function symbol() view returns (string)", "function totalSupply() view returns (uint256)", "function balanceOf(address) view returns (uin...
...提供的预测gas price的接口,如:[gasPriceOracle](https://www.etherchain.org/tools/gasPriceOracle) 、 [ethgasAPI](https://ethgasstation.info/json/ethgasAPI.json)、 [etherscan gastracker](https://etherscan.io/gastracker),大家可自行选择。 获取Gas设置,[代码](https://gith...
## 從抽象帳戶到 ERC4337 ### 從使用者角度,看 ERC4337 對合約錢包帶來的變化 > 特別感謝 [Cyan Ho](https://medium.com/u/fa719f8b236f?source=post_page---user_mention--1b10d417b8d5---------------------------------------), [NIC Lin](https://medium.com/u/aca73f7679fe?source=pos...
...具自由部署到任何 EVM 兼容链上,网址为 [https://developers.erc721c.com/infrastructure](https://developers.erc721c.com/infrastructure) 。 只需将任何以太坊钱包连接到基础设施部署工具,即可在你选择的链上将 Wrapped Native 合约部署并验证到地址 **0x...
...也是DAPP的重要的一个部分,可以学习这两篇文章: 1. [ERC20 代币](https://learnblockchain.cn/2018/01/12/create_token/) 2. [ERC721 代币](https://learnblockchain.cn/2018/03/23/token-erc721/) 学习过程中逐步去深入了解 `Solidity` 的语法、特性。 查看文档...
...区块链及其众多功能和应用。 这些开发人员必须具备ERC20、ERC721和对于其他协议的知识,并且应该很好地理解基本的加密机制。  资料来源:Freelancer...
...earnblockchain.cn/article/12121)中,我们看到如何为广泛使用的 ERC4626 保管库标准定义这些属性类型中的每一个。本文中,我们将讨论如何实际将这些属性作为代码实现,以便我们可以使用模糊测试工具进行测试。 一旦我们在代码中...
...40545),可以对定序者和证明者进行 DoS 攻击 ## EIP * ERC: * [ERC7085](https://github.com/ethereum/EIPs/pull/7085/files) : NFT 关系增强 * [ERC7087](https://github.com/ethereum/EIPs/pull/7087/files):自动模式下 web3 URL 的 MIME 类型 * [ERC7092]...
## ERC1155多代币标准 ERC1155结合了ERC20和[ERC721](https://learnblockchain.cn/article/4163)的能力,这是一个标准接口,支持开发同质化的、半同质化的、非同质化的代币和其他配置的通用智能合约。 ## IERC1155接口 ``` // SPDX-License-Identifier: ...
...的需求进行定制,允许他们将其代币与任何他们选择的 ERC-20 代币组合,并根据需要对池中的代币价值权重进行调整。这些权重可以根据团队配置的[预定时间表](https://docs.google.com/spreadsheets/d/1Zmy8pRz9Kx3zQR1g2XDIDrLf7RF4Jo-tmQonW-ag84w/edit...
...一直以来,我们都在使用一个鲜为人知、更灵活的系统 - ERC-1271 集成。 听起来很技术性,但基本上这是一个旨在允许智能合约“签名”的标准 - 经验丰富的 CoWmunity 已经熟悉的一种体验 - 但现在有了这个系统,你可以定义条件,...