Overview
智能合约需要一个全新的工程思维,不同于以往项目的开发;因为它犯错的代价是巨大的,并且很难像传统软件那样轻易的打上补丁。
- Gas limit & Gas used
- Sending a native token normally costs
21000
gas - Sending an ERC20 token normally costs
45000
gas
- Sending a native token normally costs
- Gas Tracker
-
solmate - Modern, opinionated, and gas optimized building blocks for smart contract development.
-
ERC721A - The goal of ERC721A is to provide a fully compliant implementation of IERC721 with significant gas savings for minting multiple NFTs in a single transaction.
-
其他知名项目的合约
- Compond, Uniswap, Aave, PancakeSwap, Lens ...
-
useful-solidity-patterns - This repo is an ongoing collection of useful, and occasionally clever, solidity/EVM patterns that actually get used in the wild.
-
web3 链上工具 - by OKLink
- ethers
- wagmi
- viem - Build reliable apps & libraries with lightweight, composable, and type-safe modules that interface with Ethereum
- 发送 ETH, fallback 和 receive
- 使用 Solidity 验证签名 & 以太坊签名方法
- Call, Delegatecall ect. - 合约调用的几种方式
- Proxy & Upgradable contract - 代理合约与可升级合约
- Gas Optimizatioin - 学习如何做 Gas 优化
- abi encode and decode / input data decoding - abi 的编码解码以及函数签名
- cli: solc, abigen - generate abi, bin, go code ...