智能合约
文章平均质量分 80
mutourend
Code for ZKP
展开
-
Halmos:Solidity合约形式化验证工具
Halmos:Solidity合约形式化验证工具原创 2023-02-03 11:19:16 · 476 阅读 · 0 评论 -
智能合约开发——Sui/Move vs. Solana/Rust
智能合约开发——Sui/Move vs. Solana/Rust原创 2023-01-26 11:32:10 · 2518 阅读 · 0 评论 -
Solidity Storage底层管理
Solidity Storage底层管理原创 2023-01-14 13:27:41 · 1486 阅读 · 0 评论 -
Solidity Keccak256与SHA3-256
Solidity Keccak256与SHA3-256原创 2023-01-09 16:53:08 · 1500 阅读 · 0 评论 -
Polygon zkEVM测试集——创建合约交易
Polygon zkEVM测试集——创建合约交易原创 2023-01-03 18:48:42 · 682 阅读 · 0 评论 -
以太坊Solidity的Storage/Memory/Calldata layout
以太坊Solidity的Storage/Memory/Calldata layout原创 2022-12-27 12:47:31 · 482 阅读 · 0 评论 -
以太坊的ecrecover预编译合约
以太坊在0x01地址实现了ecrecover预编译合约原创 2022-12-21 10:59:41 · 1372 阅读 · 0 评论 -
以太坊Solidity合约动态部署合约策略
1. 引言在Solidity合约中动态部署合约的方案有:1)Wormhole 1.0 中的deployWrappedAsset:https://github.com/certusone/wormhole/blob/v1.3.0/ethereum/contracts/Wormhole.sol#L2122)Optics Bridge中的_deployToken:https://github.com/celo-org/optics-monorepo/blob/main/solidity/optics-xa原创 2022-03-03 14:28:37 · 1191 阅读 · 0 评论 -
以太坊Solidity合约升级策略
1. 引言前序博客有:以太坊proxy合约以太坊的proxy contract pattern合约升级示例代码可参看:https://github.com/celo-org/optics-monorepo/tree/main/solidity/optics-core/contracts/upgrade其中,主要由三部分组成:1)UpgradeBeacon.sol:存储了implementation合约的地址,支持controller对该implementation地址进行升级操作。原创 2022-03-03 12:05:41 · 1221 阅读 · 0 评论 -
NEAR 智能合约开发
1. 引言NEAR系列博客有:NEAR协议简介NEAR共识机制NEAR light clientAurora与NEAR的关系NEAR的storage stakingRainbow Bridge:trustless bridge between NEAR and EthereumNEAR Rainbow Bridge代码解析NEAR官方推荐使用Rust语言来编写智能合约,然后编译为WebAssembly并部署在NEAR链上。near.dev中有各种合约示例。Rust工具中需增加was原创 2022-02-23 15:50:42 · 942 阅读 · 0 评论 -
Optimistic Contracts
1. 引言Optimistic Contracts:Allowing for cheaper data submission when validation is expensive。Optimistic Contracts 与 “bond and slash” 模式结合,具有实用价值。Optimistic Contracts主要分为2类:Immediate Optimistic:accepts the submission of data immediately, and keeps the s原创 2022-02-22 18:31:54 · 185 阅读 · 0 评论 -
Solana中的跨合约调用 及 Program Derived Addresses
1. 引言Solana runtime可通过cross-program invocation机制来支持合约间的相互调用。invoking合约A 可触发调用 invoked合约B 的instruction。invoking合约A 将halted直到 invoked合约B处理完成该instruction。如客户端可创建a transaction that modifies two accounts, each owned by separate on-chain programs:let message原创 2021-12-08 12:11:10 · 3326 阅读 · 0 评论 -
Solana中的托管合约——资产交换
1. 引言在Solana中,智能合约称为program。相关代码见:https://github.com/ironaddicteddog/anchor-escrow(Escrow program implemented in Anchor)https://github.com/paul-schaaf/solana-escrowhttps://github.com/mvines/solana-bpf-program-template通过界面创建Solana SPL token有:Solan原创 2021-12-07 17:45:14 · 1107 阅读 · 0 评论 -
radare2 和 EVM
1. 引言radare2为开源的逆向工程框架,具体代码见:https://github.com/radareorg/radare2其包含多个组件,如:radare2:为主要工具,其核心为hexadecimal editor and debugger。rabin2:从二进制可执行文件中提取信息。支持的二进制格式有ELF, PE, Java CLASS, Mach-O 以及其他支持r2 plugins的格式。rasm2:为汇编和反汇编工具,支持多种架构,如Intel x86, x86-64,原创 2021-09-14 12:35:26 · 951 阅读 · 0 评论 -
Clarity 和 Reach语言
1. Clarity语言Clarity语言为由Blockstack 和 Algorand 团队主导开发的智能合约语言,Clarity具有如下属性:decidable:所见即所得,看到代码即可确定其运行结果。Clarity本身是图灵不完备的,因此可避免图灵复杂性。支持complete static analysis of the entire call graph of a given smart contract。interpreted:不需要编译。将源码发布到区块链节点即可执行。去除了中间介质(如原创 2021-07-28 17:11:23 · 337 阅读 · 0 评论 -
预编译合约
参考资料[1] 内部资料 librustzcash库说明-接口注释[2] 内部资料 TRC20匿名合约指令[3] What’s a precompiled contract and how are they different from native opcodes?[4] A Prehistory of the Ethereum Protocol[5] 2018年4月博客 Extending the EVM[6] 2020年9月博客 Edgeware EVM Precompiles: A de原创 2021-07-26 12:05:02 · 887 阅读 · 0 评论 -
Solidity智能合约的重入攻击
参考资料[1] Protect Your Solidity Smart Contracts From Reentrancy Attacks[2] Reentrancy Attack in a Smart contract[3] Reentrancy After Istanbul[4] 重入攻击概述原创 2021-05-28 17:45:58 · 3512 阅读 · 3 评论