1 Star 0 Fork 12

Turbo/etherscan-api

forked from 楠木/etherscan-api 
Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
client_test.go 658 Bytes
Copy Edit Raw Blame History
楠木 authored 7 years ago . [dev] client call is now okay
/*
* Copyright (c) 2018 LI Zhennan
*
* Use of this work is governed by a MIT License.
* You may find a license copy in project root.
*/
package etherscan
import (
"testing"
)
func TestClient_craftURL(t *testing.T) {
c := New(Ropsten, "abc123")
const expected = `https://api-ropsten.etherscan.io/api?action=craftURL&apikey=abc123&four=d&four=e&four=f&module=testing&one=1&three=1&three=2&three=3&two=2`
output := c.craftURL("testing", "craftURL", M{
"one": 1,
"two": "2",
"three": []int{1, 2, 3},
"four": []string{"d", "e", "f"},
})
if output != expected {
t.Fatalf("output != expected, got %s, want %s", output, expected)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/x-studio-wangqu/etherscan-api.git
git@gitee.com:x-studio-wangqu/etherscan-api.git
x-studio-wangqu
etherscan-api
etherscan-api
master

Search