找到约 14 条结果

文章 使用 OpenZeppelin 创建 ERC-20 代币:详细指南

...C20.sol"; contract MyToken is ERC20 { // Constructor to set the name and symbol for the token constructor(uint256 initialSupply) ERC20("MyToken", "MTK") { _mint(msg.sender, initialSupply * 10 ** decimals()); } } ``` ### 说明: - `import "@openzeppelin/contracts/token/ERC20...

文章 每周以太坊进展,2020-11-22

... 800 万美元](https://medium.com/originprotocol/urgent-ousd-has-hacked-and-there-has-been-a-loss-of-funds-7b8c4a7d534c) * Cheesebank [在闪电贷攻击者被黑 330 万美元](https://cheesebank2020.medium.com/cheese-bank-detailed-statement-a765372dd84f) ## 生态 * [为什么去中心化...

文章 什么是去中心化身份(DID),为什么你应该关心它?

... 去中心化身份是一种新的身份和访问管理(IAM:Identity and Access Management )形式,不再是用户信息的集中存储。去中心化身份支持个人对其数据的控制,因此它也被称为自我主权身份(SSI: Self-Sovereign Identity )。 通俗地说,...

文章 每周以太坊进展 2021/09/04

... * [Tenderly](https://blog.tenderly.co/tenderly-now-supports-both-solidity-and-vyper/) 现已支持 Vyper 语言 * ts-essentials [v8.1.0](https://github.com/krzkaczor/ts-essentials/releases/tag/v8.1.0) (TypeScript):修复一些小问题 * [fractional-rs](https://github.com/gakonst/fractional...

文章 解构 Solidity 合约 #4: 函数体

...正在解构一个简单的[Solidity合约](https://gist.github.com/ajsantander/dce951a95e7608bc29d7f5deeb6e2ecf)的[EVM字节码](https://gist.github.com/ajsantander/03a4a183756980ef0865825bea96d6f5)。 我们已经走过了很长的路,不是吗?首先,我们理解了合约的创建...

文章 PeckShield:硬核技术解析,bZx协议遭黑客漏洞攻击始末

...n/2020/02/19_/938477074.png) > Figure 4: Margin Pumping With bZx (and Kyber + Uniswap) 应该注意的是,**这步操作在合约内部实现有个安全检查逻辑,但是实际上在交易之后并没有验证锁仓值。**也就是说,当攻击发生时,此检查没有...

文章 Solidity实战系列 - (NFT - 质押 - 锁仓 - ERC1155 - 兑换)

... } if(_parent == _child) { revert ErrorMsg("Parent and child cannot be the same address"); } if(_parent == address(0x0) || _child == address(0x0)) { revert ErrorMsg("account isn't zero address"); } if(hasParent[_child] == t...

文章 Solidity中最常见的漏洞:深入分析第一部分

...初发布于 [BuildBear 教程](https://www.buildbear.io/resources/guides-and-tutorials/Common_Vulnerabilities_part_1)。 本文将带你深入了解 Solidity 中一些最常见的漏洞,例如重入攻击、错误计算、Oracle 失败/操纵、弱访问控制和抢跑攻击。我们还将指...

文章 将 NFT 向 Layer 2 迁移,如何让它们友好地跨 Rollup?

...NFT 封装和迁移思路](https://ethresear.ch/t/cross-Rollup-nft-wrapper-and-migration-ideas/10507)》 撰文:Vitalik Buterin,以太坊****联合创始人 翻译:凯尔** > 我们需要将 NFT 转移到第 2 层(L2)生态系统以降低费用。 然而,这样正确做到这一点...

文章 Rust高级特性

... let r2 = &s; // 可以存在多个不可变借用 println!("{} and {}", r1, r2); } let r3 = &mut s; // 可变借用 println!("{}", r3); } ``` 生命周期 - 确保引用不会超出其被引用的数据的生命周期。 ```rust fn longest y.len() { x ...

文章 来自隐形脚本的多跳锁

...86.html) * [Privacy-preserving Multi-hop Locks for Blockchain Scalability and Interoperability](https://eprint.iacr.org/2018/472.pdf) * [Payment Decorrelation](https://medium.com/@rusty_lightning/decorrelation-of-lightning-payments-7b6579db96b0) * [eltoo](https://blockstream.com/eltoo.pdf) * [Po...

文章 什么是价格优化?为什么它是CoW Swap独有的?- CoW DAO

...ow.fi/learn/what-is-pri...](https://cow.fi/learn/what-is-price-improvement-and-why-is-it-unique-to-cow-swap) >- 登链社区 AI 助手,为大家转译优秀英文文章,如有翻译不通的地方,还请包涵~

文章 DeFi 收益耕作:方法与风险

...ube.com/channel/UC9NHWIsftI0bd9LZom_9uaQ) >- 原文链接: [medium.com/@andreysokolo...](https://medium.com/@andreysokolow2025/defi-yield-farming-methods-and-risks-f0034a0cb96b) >- 登链社区 AI 助手,为大家转译优秀英文文章,如有翻译不通的地方,还请包涵~

文章 区块链基础教程 1 # ETH & BTC 私链搭建

...ced in following path: # ~/.bitcoin/bitcoin.conf # [rpc] # Accept command line and JSON-RPC commands. server=1 txindex=1 # Username for JSON-RPC connections rpcuser=bitcoinrpc # Password for JSON-RPC connections rpcpassword=bitcoinrpc # Listen for JSON-RPC connections on this port ...