找到约 11 条结果

文章 Solidity进阶之gas优化

...//github.com/ethereum/solidity/blob/develop/libevmasm/RuleList.h),比如`AND(X, X)`就可以改为直接在栈上放置一个`X`。 ### Storage优化 #### 减少Slot的数量 在合约中对Storage的读写永远是gas消耗的大头,Storage优化的思路之一就是尽可能减少slot...

文章 Ethernaut 题库闯关 #10 — Re-entrancy(重入)

...e: msg.value}(address(this)); // withdraw 1 way and trigger the re-entrancy exploit victim.withdraw(initialDonation); // because the victim contract underflowed our balance // we are now able to drain the whole balance of the co...

文章 密码学如何重新定义私有产权?

...易和追逐利润](https://mises.org/library/aristotle-private-property-and-money),因此他没有建立一个自洽的经济学框架。) 自柏拉图和亚里士多德以来,关于财产的讨论主要包括四个方面:道德、政治学、心理学和经济学 \[1\]。其中关于私...

文章 什么是代币化黄金?

...s.com/2021/01/14/paxos-adopts-chainlink-oracles-to-further-adoption-of-pax-and-paxg-in-defi/) ### **Instruxi** [Instruxi](https://www.instruxi.io/) 开发了 I-ON,其愿景是创建一个安全、稳健和超可扩展的基础设施,可以支持资产数字化和代币化,以便他们可以...

文章 Solana笔记 08.案例:写一个SOL转账程序

...来实现账户的创建。以下是具体代码: ```js it('Create and fund account owned by our program', async () => { const instruction = SystemProgram.createAccount({ fromPubkey: payer.publicKey, // 我的钱包地址 newAccountPubkey: programOwnedAccount.publicKey, // ...

文章 DeepSeek开启智能PDF问答新时代:从0到1搭建系统全攻略

...ext("Failed to load pdf documents")?; println!("Successfully loaded and chunked PDF documents"); // Create embedding model let model = client.embedding_model("bge-m3"); // Create embeddings builder let mut builder = EmbeddingsBuilder::new(model.clone()); // Add ...

文章 Akash网络(AKT):Akash区块链生态系统分析

... 和 RNDR 代币](https://academy.moralis.io/blog/exploring-render-network-and-the-rndr-token)) ### Render Network 与 Akash Network 类似,[Render Network](https://rendernetwork.com/) 也是一个云计算网络,专门用于为 GPU 计算提供点对点 (P2P) 市场。但与 Akash 不同的...

文章 如何使用 Traceye 运行托管 subgraph

...的 workspace(应该是默认 workspace)的信息。**Deployment Command** 按钮说明了托管 subgraph 的步骤(我们稍后会介绍)。 subgraph 的 **Query URL** 部分提供了用于查询托管 subgraph 的 URL,还可以通过交互式 playground (通过 **Open** 按钮) 与之...

问题 改造safemoon的代码,将流动池由xxx-ETH-LP改为xxx-USDT-LP后,打开swap开关,转账时总会报错TransfeHelper:TRANSFER_FROM_FAILED

...手续费,然后将手续费添加进流动性池。 2 改造后的swapAndLiquidity函数实现如下 ``` function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { // split the contract balance into halves uint256 half = contractTokenBalance.div(2); ...

文章 UniswapV2 深入解析系列 10:安全转账机制与ERC20兼容性处理

...@notice 展示不同调用方式的错误处理差异 */ contract ErrorHandlingComparison { /** * @notice 高级别调用的错误处理 * @dev 错误会直接传播,难以定制 */ function highLevelCall(address token, address to, uint256 value) external { ...

文章 2021年最受欢迎的区块链开发者框架

...项目,更名之前叫做Builder - 技术方面:Javascript, Web3.js and Ethers.js 插件, OpenZeppelin 可升级智能合约插件, Etherscan 插件, blockchain forking. - 区块链环境:Hardhat运行时环境/本地,测试网,主网。 - 有测试框架:Waffle - 维护:非常积...