File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ func main() {
2626// or, if you are working with etherscan-family API like BscScan
2727//
2828// client := etherscan.NewCustomized(etherscan.Customization{
29- // Timeout: 15 * time.Second,
30- // Key: "You key here",
31- // BaseURL: "https://api.bscscan.com/api?",
32- // Verbose: false,
33- // })
29+ // Timeout: 15 * time.Second,
30+ // Key: "You key here",
31+ // BaseURL: "https://api.bscscan.com/api?",
32+ // Verbose: false,
33+ // })
3434
3535// (optional) add hooks, e.g. for rate limit
3636client.BeforeRequest = func (module, action string , param map [string ]interface {}) error {
Original file line number Diff line number Diff line change @@ -24,7 +24,16 @@ import (
2424func main () {
2525// 创建连接指定网络的客户端
2626client := etherscan.New (etherscan.Mainnet , " [your API key]" )
27-
27+
28+ // 或者,如果你要调用的是EtherScan家族的BscScan:
29+ //
30+ // client := etherscan.NewCustomized(etherscan.Customization{
31+ // Timeout: 15 * time.Second,
32+ // Key: "You key here",
33+ // BaseURL: "https://api.bscscan.com/api?",
34+ // Verbose: false,
35+ // })
36+
2837// (可选)按需注册钩子函数,例如用于速率控制
2938client.BeforeRequest = func (module, action string , param map [string ]interface {}) error {
3039// ...
You can’t perform that action at this time.
0 commit comments