I hereby claim:
- I am jsvisa on github.
- I am jsvisa (https://keybase.io/jsvisa) on keybase.
- I have a public key ASAVPz_zjqcNy3wtqCqvBOwxxAhE_Ikrbtiy-QlzN0lRxwo
To claim this, I am signing this object:
| { | |
| "name": "JSLayer", | |
| "website": "https://github.com/jsvisa", | |
| "description": "EigenLayer maintained by jsvisa", | |
| "logo": "https://p.ipic.vip/632txr.png", | |
| "twitter": "https://twitter.com/jsvisa" | |
| } |
| #!/usr/bin/env python3 | |
| import logging | |
| logging.basicConfig( | |
| format="[%(asctime)s] - %(levelname)s - %(message)s", level=logging.INFO | |
| ) | |
| WITHDRAW_EVENT = "0x1::coin::WithdrawEvent" | |
| DEPOSIT_EVENT = "0x1::coin::DepositEvent" |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| import argparse | |
| import logging | |
| from web3 import Web3, HTTPProvider | |
| logging.basicConfig( | |
| format="[%(asctime)s] - %(levelname)s - %(message)s", level=logging.INFO | |
| ) |
The problem is caused by the current design of the SubscribeXXX interface, which only processes data from the current block height onwards, and this processing is done in a goroutine serialized by the filter_system (handled in EventSystem.eventLoop). This means that SubscribeFilterLogs cannot separately process blocks between fromBlock and currentBlock, and what we want is to filter both historical and current data consistently with the FilterLogs interface semantics.
Minimize the cost of implementing this requirement:
If the fromBlock in SubscribeFilterLogs is a block height in history, we split this interface into two parts:
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.7.0; | |
| /** | |
| * @dev Wrappers over Solidity's arithmetic operations with added overflow | |
| * checks. | |
| * | |
| * Arithmetic operations in Solidity wrap on overflow. This can easily result | |
| * in bugs, because programmers usually assume that an overflow raises an |
| [ | |
| "000d836201318ec6899a67540690382780743280", | |
| "001762430ea9c3a26e5749afdb70da5f78ddbb8c", | |
| "001d14804b399c6ef80e64576f657660804fec0b", | |
| "0032403587947b9f15622a68d104d54d33dbd1cd", | |
| "00497e92cdc0e0b963d752b2296acb87da828b24", | |
| "004bfbe1546bc6c65b5c7eaa55304b38bbfec6d3", | |
| "005a9c03f69d17d66cbb8ad721008a9ebbb836fb", | |
| "005d0ee8155ec0a6ff6808552ca5f16bb5be323a", | |
| "007622d84a234bb8b078230fcf84b67ae9a8acae", |
删除一个字符串中后面的字符
$ str=foo_bar:baz
$ echo "${str%%:*}"
foo_bar
删除一个字符串前面的字符
| # ~/.gitconfig | |
| [alias] | |
| sm = smart-merge | |
| sp = smart-pull | |
| sl = smart-log | |
| gs = status | |
| co = checkout | |
| st = status | |
| ci = commit | |
| cl = clone |
| import os | |
| import numpy as np | |
| import pandas as pd | |
| import multiprocessing | |
| import matplotlib.pyplot as plt | |
| from multiprocessing import Queue | |
| import web3 | |
| # import matplotlib.mlab as mlab | |
| # import matplotlib.pyplot as plt |