Skip to content

Commit

Permalink
Merge pull request #25 from nanmu42/develop
Browse files Browse the repository at this point in the history
Doc fix and amendation
  • Loading branch information
nanmu42 authored Feb 19, 2021
2 parents 4fb3ccd + fee45c9 commit 878d197
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ func main() {
// or, if you are working with etherscan-family API like BscScan
//
// client := etherscan.NewCustomized(etherscan.Customization{
// Timeout: 15 * time.Second,
// Key: "You key here",
// BaseURL: "https://api.bscscan.com/api?",
// Verbose: false,
// })
// Timeout: 15 * time.Second,
// Key: "You key here",
// BaseURL: "https://api.bscscan.com/api?",
// Verbose: false,
// })

// (optional) add hooks, e.g. for rate limit
client.BeforeRequest = func(module, action string, param map[string]interface{}) error {
Expand Down
11 changes: 10 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@ import (
func main() {
// 创建连接指定网络的客户端
client := etherscan.New(etherscan.Mainnet, "[your API key]")


// 或者,如果你要调用的是EtherScan家族的BscScan:
//
// client := etherscan.NewCustomized(etherscan.Customization{
// Timeout: 15 * time.Second,
// Key: "You key here",
// BaseURL: "https://api.bscscan.com/api?",
// Verbose: false,
// })

// (可选)按需注册钩子函数,例如用于速率控制
client.BeforeRequest = func(module, action string, param map[string]interface{}) error {
// ...
Expand Down

0 comments on commit 878d197

Please sign in to comment.