Here is a simple flow chart:
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
// ... | |
function UserOperationConfirmation(props: { userOpLog: UserOperationLog }) { | |
// ... | |
// TODO: Put it into a dedicated module | |
const estimateGasFee = async () => { | |
const fee = await provider.getFeeData() | |
const gasPriceWithBuffer = (fee.gasPrice * 120n) / 100n |
const fetchData = async () => { | |
const fetchUserOpsSent = async () => { | |
const s = storage.get() | |
const nm = new NetworkStorageManager(storage) | |
const bundler = nm.getActive().bundler | |
const bundlerProvider = new JsonRpcProvider(bundler.url) | |
console.log( | |
`[ttt] storage userOp: ${json.stringify(s.userOpPool, null, 2)}` | |
) | |
const userOps = Object.values(s.userOpPool) |
// ... | |
import { type State } from "~background/storage" | |
import { | |
AccountType, | |
getStorage, | |
setStorageTest, | |
type Account |
import { AbiCoder } from "ethers"; | |
import { readFileSync } from "fs"; | |
import { p1363ToDer } from "./ecdsa-utils"; | |
const userOpHash = process.argv[2]; | |
const ethersAbi = AbiCoder.defaultAbiCoder(); | |
const fido2Credential = JSON.parse( | |
readFileSync("test/ffi/bitwarden_export_20231219124736.json", "utf-8"), |
Here is a simple flow chart:
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
{ | |
// 同步更新至:https://gist.github.com/oneleo/780d90384b6444e504b8a7b2fc49f9e5 | |
// ----------------------------- | |
// ----------- VSCode ----------- | |
// ----------------------------- | |
// 滑鼠點選其他分頁時,舊分頁自動存檔 | |
"files.autoSave": "onFocusChange", | |
// 調整字體大小 | |
"editor.fontSize": 15, | |
// 文字超過螢幕自動挪到下一行 |
{ | |
"title": "LR_Shift to Ctrl+Space", | |
"rules": [ | |
{ | |
"description": "Change L_Shift to switch EN/ZH condition", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"conditions": [ | |
{ |
{ | |
"title": "LR_Shift to Ctrl+Space", | |
"rules": [ | |
{ | |
"description": "Change L_Shift to switch EN/ZH condition", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"conditions": [ | |
{ |
import hashlib | |
import string | |
##### Helper function ##### | |
ssz_byteorder = "little" # https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md | |
# https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md#aliases | |
def isBytesN(input_): | |
# BytesN := Vector[uint8, N] | |
assert isinstance(input_, list) |