08 2022 档案
发表于 2022-08-30 22:28阅读:91评论:0推荐:0
摘要:hearthead waffle 测试框架插件 https://github.com/sc-forks/solidity-coverage 代码覆盖率检查插件 hardhat-gas-reporter - npm gas费报告插件 https://mochajs.org/ java异步测试框架 ht
阅读全文 »
发表于 2022-08-24 23:32阅读:244评论:0推荐:0
摘要:在package.json加入 "type":"module" 导入语句修改为 import { xx} from "xx" import * as fs from "xx" 在javascript中类型脚本,如果在外部使用import语句就需要使"type":"module",单在类型脚本中实际是
阅读全文 »
发表于 2022-08-18 00:03阅读:6评论:0推荐:0
摘要:安装下载maven后解压,配置环境变量 主要配置了conf/setting.xml文件,增加了阿里云源地址和本地仓库 <localRepository>D:\repository</localRepository> <mirror> <id>alimaven</id> <mirrorOf>centr
阅读全文 »
发表于 2022-08-17 15:29阅读:173评论:0推荐:0
摘要:快速术语表 Table of Contents 快速术语表 快速术语表 上一章:前言 这个快速术语表包含许多与以太坊相关的术语。这些术语在本书中都有使用,所以请将其加入书签以便快速参考。 账户 Account 包含地址、余额,随机数,以及可选存储和代码的对象。账户可以是合约账户或外部拥有账户(EOA
阅读全文 »
发表于 2022-08-17 00:04阅读:30评论:0推荐:0
摘要:history 可以显示最近执行的命令 当开发者开发完之后,可以用history -c 把输入过的命令清除 防止黑客破解电脑盗取信息
阅读全文 »
发表于 2022-08-16 23:20阅读:192评论:0推荐:0
摘要:🎈 作者:Linux猿 🎈 简介:CSDN博客专家🏆,C/C++、面试、刷题、算法尽管咨询我,关注我,有问题私聊! 🎈 关注专栏:Linux (优质好文持续更新中……)🚀 目录 一、为什么使用 .gitignore ? 二、使用规则 2.1 注释 2.2 忽略文件 2.3 忽略目录 2.4
阅读全文 »
发表于 2022-08-16 23:03阅读:772评论:0推荐:0
摘要:dotenv: Dotenv 是一个零依赖的模块,它能将环境变量中的变量从 .env 文件加载到 process.env 中。由于项目不同需求,需要配置不同环境变量,按需加载不同的环境变量文件,使用dotenv,可以完美解决这一问题。 终端输入 npm install dotenv --save 项
阅读全文 »
发表于 2022-08-16 00:55阅读:925评论:0推荐:0
摘要:网址:https://ethervm.io/decompile 主要作用分析合约漏洞,在安全上可以对攻击合约进行逆向
阅读全文 »
发表于 2022-08-16 00:53阅读:24评论:0推荐:0
摘要:Sending Ether (transfer, send, call) How to send Ether? You can send Ether to other contracts by transfer (2300 gas, throws error) send (2300 gas, ret
阅读全文 »
发表于 2022-08-16 00:32阅读:145评论:0推荐:0
摘要:首先准备ganache工具,可以快速搭建一条本地链。 在vscode终端安装yarn add 添加ethers,fs-sxtra,solc,用solc命令编译后下面文件生成abi和bin文件 // I'm a comment! // SPDX-License-Identifier: MIT prag
阅读全文 »
发表于 2022-08-11 23:28阅读:96评论:0推荐:0
摘要:网址https://trufflesuite.com/ 作用:可以在本地运行一个假区块链,类似remix上的虚拟账户,开启后有100个账户,每个账户有一百个测试以太 创建区块链后会有rpc url,在vscode通过rpcurl远程访问区块链
阅读全文 »
发表于 2022-08-10 22:20阅读:16评论:0推荐:0
摘要:网址:yarnpkg.com/getting-started 安装命令 nodejs >=16.10用 corepack enable
阅读全文 »
发表于 2022-08-10 22:09阅读:281评论:0推荐:1
摘要:github网址:https://github.com/ethereum/solc.js 知乎大佬小结:solc编译器分析 - 粒子区块链的文章 - 知乎 https://zhuanlan.zhihu.com/p/164633644 腾讯云大佬总结 https://cloud.tencent.com
阅读全文 »
发表于 2022-08-05 22:40阅读:138评论:0推荐:0
摘要:网页地址: www.gitpod.io/ Gitpod 是自动化开发环境的主要开源平台之一,近日 Gitpod 宣布正在开发一个名为「OpenVSCode Server」的新项目,该项目以 MIT 许可方式开源,是上游的微软 Visual Studio Code(VS Code)的实现,该项目使每个
阅读全文 »
发表于 2022-08-03 11:08阅读:18评论:0推荐:0
摘要:// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.3; contract A { function foo() public pure virtual returns (string memory) { return "A"; } fu
阅读全文 »
发表于 2022-08-02 12:11阅读:27评论:0推荐:0
摘要:ontract can call other contracts in 2 ways. The easiest way to is to just call it, like A.foo(x, y, z). Another way to call other contracts is to use
阅读全文 »
发表于 2022-08-02 12:11阅读:21评论:0推荐:1
摘要:delegatecall is a low level function similar to call. When contract A executes delegatecall to contract B, B's code is executed with contract A's stor
阅读全文 »
发表于 2022-08-02 12:11阅读:35评论:0推荐:0
摘要:call is a low level function to interact with other contracts. This is the recommended method to use when you're just sending Ether via calling the fa
阅读全文 »
发表于 2022-08-02 12:10阅读:19评论:0推荐:0
摘要:Events allow logging to the Ethereum blockchain. Some use cases for events are: Listening for events and updating user interface A cheap form of stora
阅读全文 »
发表于 2022-08-01 00:29阅读:17评论:0推荐:0
摘要:Libraries are similar to contracts, but you can't declare any state variable and you can't send ether. A library is embedded into the contract if all
阅读全文 »
发表于 2022-08-01 00:28阅读:33评论:0推荐:0
摘要:keccak256 computes the Keccak-256 hash of the input. Some use cases are: Creating a deterministic unique ID from a input Commit-Reveal scheme Compact
阅读全文 »
发表于 2022-08-01 00:28阅读:95评论:0推荐:0
摘要:abi.encode encodes data into bytes. abi.decode decodes bytes back into data. // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; contract AbiDeco
阅读全文 »
发表于 2022-08-01 00:27阅读:16评论:0推荐:0
摘要:Gas Saving TechniquesSome gas saving techniques. Replacing memory with calldataLoading state variable to memoryReplace for loop i++ with ++iCaching ar
阅读全文 »
发表于 2022-08-01 00:27阅读:26评论:0推荐:0
摘要:Messages can be signed off chain and then verified on chain using a smart contract. Example using ethers.js // SPDX-License-Identifier: MIT pragma sol
阅读全文 »
发表于 2022-08-01 00:26阅读:27评论:0推荐:0
摘要:Modifiers are code that can be run before and / or after a function call. Modifiers can be used to: Restrict access Validate inputs Guard against reen
阅读全文 »
发表于 2022-08-01 00:26阅读:16评论:0推荐:0
摘要:Ether WalletAn example of a basic wallet. Anyone can send ETH.Only the owner can withdraw. // SPDX-License-Identifier: MITpragma solidity ^0.8.13; con
阅读全文 »