add etherscan to add transaction history

This commit is contained in:
2026-05-10 20:32:12 +08:00
parent 7eecbd2206
commit 9fca18cf95
4 changed files with 352 additions and 32 deletions
+25
View File
@@ -1,5 +1,21 @@
import { Electroview } from 'electrobun/view'
export type EtherscanTx = {
blockNumber: string
timeStamp: string
hash: string
from: string
to: string
value: string
isError: string
txreceipt_status: string
gas: string
gasPrice: string
input: string
contractAddress: string
gasUsed: string
}
type RPC = {
bun: {
requests: {
@@ -18,6 +34,15 @@ type RPC = {
}
response: Promise<void>
}
fetchTxHistory: {
params: {
address: string
chainid: string
page?: number
offset?: number
}
response: Promise<EtherscanTx[]>
}
}
messages: {}
}