找到约 15 条结果

文章 [译]如何利用OpenZeppelin编写可升级的智能合约

... private _cap = 1000000000000000000; ERC20Capped public token; constructor(uint8 cap) public { _cap = cap; token = new ERC20Capped(_cap); } } ``` ### 限制1:没有构造函数 由于基于代理的可升级性的要求,因此在可升级合同...

文章 Libra 白皮书中英文对照版

...lability of the protocol and implementation. * The Libra Association will construct well-documented APIs and libraries to enable users to interact with the Libra Blockchain. * The Libra Association will create a framework for the collaborative development of the technology behind the Libra Blockcha...

文章 如何使用Create2工厂创建合约并验证(Base Remix)?

...Create2 ```solidity // initializationCode = creationCode + abi.encode(constructor.parameter) function safeCreate2( bytes32 salt, bytes calldata initializationCode ) external payable containsCaller(salt) returns (address deploymentAddress) {} ``` ## 2. Demo contract ```...

文章 以太坊第2层扩容方案:状态通道(State Channels)、Plasma 和 Truebit

...分布式交易的实现,他们在 [这里](https://blog.omisego.network/construction-of-a-plasma-chain-0x1-614f6ebd1612) 发布了最近更新进展信息。 #### [](https://github.com/xitu/gold-miner/blob/master/TODO/making-sense-of-ethereums-layer-2-scaling-solutions-state-channels-plasma-an...

文章 Taproot Assets:协议、闪电网络兼容性

...含的都是空的叶子,可以用 nil 哈希值来代表。 ![constructing-a-sparse-merkle-tree](https://img.learnblockchain.cn/attachments/2024/08/gKXNNyHE66bddcfdb02bf.png) > - 构造一棵稀疏默克尔树 - 举个例子,我们可以使用一种虚构的哈希函数 sha002 ...

文章 Move 高阶语法 | 共学课优秀笔记

...以资源的形式储存在 account 账户下面 **How to use?** - construct a capability resource and `move_to` the receiptor. - 定义一个 Capability 的 type,比如 ownerCapability 表示是一个 module 的拥有者,把这个资源对象发送给其他人,别人有了这个资源...

文章 尝试用 Halo2 实现 Tornado Cash

... )?; Ok((left, right)) }, )?; let chip = HashChip::construct(config); let hash_result_cell = chip.hash(layouter.namespace(|| "hasher"), left, right)?; ``` 最重要的部分是最后一行 ``` layouter.constrain_instance(hash_result_cell.cell(), config.instance, 0) ...

文章 从 Lamport 签名中获得脚本状态

...(bit set)的不同数字相加,我们就可以按位构造(bitwise-construct)以及按位解构(bitwise-deconstruct)一个数字。 凭借这一洞见,Rubin 以如下方法检查了一个编码成一系列哈希原像的 Lamport 签名: 1. 对每一个原像,计算其哈希...

文章 Ethernaut 题解 01-35

...将部署者设为owner,同时将owner的contributions设为1000eth constructor() { owner = msg.sender; contributions[msg.sender] = 1000 * (1 ether); } modifier onlyOwner() { require(msg.sender == owner, "caller is not the owner"); _; } ...

文章 从 Lamport 签名中获得脚本状态

...(bit set)的不同数字相加,我们就可以按位构造(bitwise-construct)以及按位解构(bitwise-deconstruct)一个数字。 凭借这一洞见,Rubin 以如下方法检查了一个编码成一系列哈希原像的 Lamport 签名: 1. 对每一个原像,计算其哈希值...

文章 区块链时代的拜占庭将军们(上)

...的[论文](https://www.microsoft.com/en-us/research/uploads/prod/2016/12/Constructing-Digital-Signatures-from-a-One-Way-Function.pdf)。 对于拜占庭将军问题,他提出的解决方案就是加入签名,而且,他在论文中提出了加入签名之后解决拜占庭将军问题的算...

文章 比特币 - BIP-0341.mediawiki,位于bip-anyprevout · ajtowns/bips

...ithub.com/ajtowns/bips/blob/bip-anyprevout/bip-0341.mediawiki#user-content-Constructing_and_spending_Taproot_outputs)- [安全性](https://github.com/ajtowns/bips/blob/bip-anyprevout/bip-0341.mediawiki#user-content-Security)- [测试向量](https://github.com/ajtowns/bips/blob/bip-anyprevout/bip-034...

文章 以太坊 Casper 101简而言之,Casper 将实现权益证明… | 作者:jon choi | Medium

...s://ethereumfoundation.org/devcon2/wp-content/uploads/2016/10/A-Correct-by-Construction-Asynchronous-Casper-Protocol.pdf)和[视频](https://www.youtube.com/watch?v=4LhC-jDaI00)由Vlad Zamfir。2016年10月。 - 2016.12.06 [Casper的历史:第一章](https://blog.ethereum.org/2016/12/06/history-ca...

文章 深入探讨 Solana 的 AccountsDB

...**生成账户索引** 使用 AccountsDB 元数据,验证者使用 `reconstruct_accountsdb_from_fields` 函数 **构建 AccountsDB 结构**。然后,使用 `AccountsDB :: initialize` 将账户文件加载到数据库,并使用 `AccountsDB :: generate_index` 生成索引。 索引的架...

文章 Bitcoin Optech:2021 比特币技术进展年度回顾

...nops.org/en/newsletters/2021/06/02/#candidate-set-based-csb-block-template-construction) 描述了一种矿工选择在区块中包含哪些交易的另类方法,预计这种新的方法可以在短期内略微提高矿工的利润。在长期中,如果矿工普遍接收了这种方法,意识...