找到约 12 条结果

文章 Solidity学习笔记(WTF:1-2)

... 运算同c++中bool:{ - `!` (逻辑非) - `&&` (逻辑与, "and" ) - `||` (逻辑或, "or" ) - `==` (等于) - `!=` (不等于)} ex: ```js // 布尔运算 bool public _bool = true ; bool public _bool1 = !_bool; //取非(_boo1为false) ...

文章 Avalanche 的资产跨链机制

...ionChain: ExportChainsC, exportFee: BN) { // Add import fee // X and P have the same fee const importFee = avm.getTxFee() const amtFee = amt.add(importFee) // 获取当前账户的EVM地址 const hexAddr = this.getEvmAddress() // 获取当前账户的bech地址,...

文章 深入探索以太坊共识层:存款与提款

...[ETH2 Book](https://eth2book.info/capella/part2/building_blocks/ssz/#fixed-and-variable-size-types) 内的一个有趣练习。该练习要求我们给出 `Vector[List[uint8,3],4]([1,2],[3,4,5],[],[6])` 的编码结果。按照上文的介绍,我们应该首先将 `List[uint8,3]` 视为 `uint32` ...

文章 AI 与DeFi - 重新塑造我们所知的加密货币

!["AI and DeFi - Reshaping Crypto as we Know it - Three Sigma" banner](https://img.learnblockchain.cn/2025/03/12/65507791_image.png) ## 引言 人工智能正在以令人瞩目的速度重塑 DeFi 应用,承诺在交易、治理、安全和用户个性化等领域实现突破。本文...

文章 什么是 “时间扭曲攻击”?

...https://bitcoin.stackexchange.com/questions/75831/what-is-time-warp-attack-and-how-does-it-work-in-general/75834#75834 作者:David A. Harding 比特币协议(共识规则)对区块头中的时间戳有两项相关的规则: 1. 节点不会接受一个时间戳超过本地时间 2 ...

文章 SUI Move合约学习与实践——极简IDO合约

...nction: 2, instruction: 42, function_name: Some(\"fund_ido\") }, 2) in command 0", > } > ``` ```bash sui client switch --address alice sui client gas --json | jq '.[] | select(.gasBalance > 20000000) | .gasCoinId' -r > output.txt GAS=$(sed -n '1p' output.txt) SPLIT_COIN=$(sed -n '2p' output...

文章 理解Solidity数据类型、安全与存储优化

...会[溢出或下溢](https://hackernoon.com/hack-solidity-integer-overflow-and-underflow)而不会回滚。 **易受攻击的代码:** ``` // 在 Solidity 通过掌握这些概念,你将在以太坊平台上开发出更安全、高效和健壮的智能合约。 ## 参考文献 ### 官方文...

文章 Foundry 备忘录

...查看以下资源: - [Foundry vs Hardhat: Differences in performance and developer experience](https://chainstack.com/foundry-hardhat-differences-performance/) - [Smart Contract Development with Foundry (Video)](https://www.youtube.com/watch?v=uelA2U9TbgM) - [Building and testing smart contrac...

文章 P vs NP 及其在零知识证明中的应用

...公式,我们使用操作符 $¬$ 表示布尔 NOT,$∧$ 表示布尔 AND,$∨$ 表示布尔 OR。例如,$a ∧ b$ 当且仅当 $a$ 和 $b$ 都为真时才返回真。$a ∧ ¬b$ 当且仅当 $a$ 为真且 $b$ 为假时返回真。 假设我们有一组布尔变量 $x₁$、$x₂$、$x₃...

文章 扩展DLC第二部分:DLC的免费选项问题

...b-LubmLpK2xHqF6FQ.jpeg) **论文:** [**《Discreet Log Contracts Channels and Integration in the Lightning Network》**](https://github.com/p2pderivatives/offchain-dlc-paper/blob/master/offchaindlc.pdf) **DLC扩展系列:** **DLC扩展第一部分:** [**《Off-chain Discreet Log Contracts》**](ht...

文章 通过逆向和调试深入EVM #5 - EVM如何处理 if/else/for/functions

> * 原文链接: https://trustchain.medium.com/reversing-and-debugging-evm-the-execution-flow-part-5-2ffc97ef0b77 > * 译文出自:[登链翻译计划](https://github.com/lbc-team/Pioneer) > * 译者:[翻译小组](https://learnblockchain.cn/people/412) 校对:[Tiny 熊](https://learnblo...

文章 Miniscript 和时间锁为何还未普及?

.../2025/07/31/...](https://www.btcstudy.org/2025/07/31/why-havent-miniscript-and-timelocks-become-common-tools) , 如有侵权请联系管理员删除。