eth_estimateGas failed, eth_call (to simulate) failed but tx succeeded 🤷
[
{
"jsonrpc": "2.0",
"id": 9,| #!/usr/bin/env node | |
| /* | |
| * Scan pnpm workspace/project for known bad package versions. | |
| */ | |
| const fs = require("fs"); | |
| const path = require("path"); | |
| const { execFile } = require("child_process"); | |
| // 👇 paste your affected list here |
| // Source: https://stackoverflow.com/a/2450976/6812545 | |
| const shuffle = <T>(array: T[]): T[] => { | |
| let currentIndex = array.length, randomIndex; | |
| // While there remain elements to shuffle. | |
| while (currentIndex != 0) { | |
| // Pick a remaining element. | |
| randomIndex = Math.floor(Math.random() * currentIndex); |
Nọ đội Dwarves Foundation mới đăng 1 bài viết về cấu trúc cũng như các thư viện họ dùng trong các dự án React. Có 1 cái khá thú vị là họ bảo éo thèm chơi state management lib, ví dụ như Redux, mà chỉ cần dùng Context là đủ. Bất ngờ vãi nồi. Hệ thống lớn mà ko có thằng như Redux thì phải tự optimize re-renders bằng tay. Xong hoá ra có lý do cả, họ dùng mấy thằng lib ở bên dưới đây. Cái danh sách này có thêm 1-2 cái của cùng tác giả, tiện em viết luôn.
const contextValue = {
count: 0,
text: "hehe"File package.json
{
"main": "index.js",
"script": {
"build": "babel src -d build --copy-files",
"start": "rm -rf build && yarn build && node build/index.js"
},
"dependencies": {| FROM nginx | |
| COPY ./nginx.conf /etc/nginx/conf.d/default.conf |
| // Example of using ethers.js to interact with a smart contract | |
| // Call a contract method at a specific block | |
| // This example is to get rate of a token at a block | |
| import { ethers } from "ethers" | |
| import BigNumber from "bignumber.js" | |
| // prettier-ignore | |
| const oracleABI = '[{"inputs":[{"internalType":"contract MultiWrapper","name":"_multiWrapper","type":"address"},{"internalType":"contract IOracle[]","name":"existingOracles","type":"address[]"},{"internalType":"enum OffchainOracle.OracleType[]","name":"oracleTypes","type":"uint8[]"},{"internalType":"contract IERC20[]","name":"existingConnectors","type":"address[]"},{"internalType":"contract IERC20","name":"wBase","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC20","name":"connector","type":"address"}],"name":"ConnectorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC20","name":"connector","type":"address"}],"name":" |
| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/text/runes" | |
| "golang.org/x/text/transform" | |
| "golang.org/x/text/unicode/norm" | |
| "strings" | |
| "unicode" | |
| ) |
git clone git@github.com:hungdoansy/test-the-graph.git test-uniswap-graphcd test-uniswap-graphyarn to install all dependencies