Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rpcproxy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
rpcproxy
Commits
59b1650e
Commit
59b1650e
authored
Oct 21, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test code
parent
d5ff7976
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
201 additions
and
2 deletions
+201
-2
blacklist_test.go
blacklist_test.go
+20
-0
go.mod
go.mod
+9
-2
go.sum
go.sum
+172
-0
No files found.
blacklist_test.go
0 → 100644
View file @
59b1650e
package
main
import
(
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
"testing"
)
func
TestInBlackList
(
t
*
testing
.
T
)
{
client
,
err
:=
ethclient
.
Dial
(
"https://mars.rpc.movachain.com"
)
if
err
!=
nil
{
t
.
Fatalf
(
"Failed to connect to Ethereum client: %v"
,
err
)
}
result
,
err
:=
IsInBlacklist
(
client
,
common
.
HexToAddress
(
"0x339F0Ca78A02062fcD1E2f81F9976b32d9552e82"
),
common
.
HexToAddress
(
"0x74FB49FB24700C896B6E68Af0dB872Ac0cD97c0C"
))
if
err
!=
nil
{
t
.
Fatalf
(
"IsInBlacklist failed: %v"
,
err
)
}
else
{
t
.
Logf
(
"IsInBlacklist result: %v"
,
result
)
}
}
go.mod
View file @
59b1650e
...
...
@@ -2,22 +2,29 @@ module code.wuban.net.cn/luxueqian/rpcproxy
go 1.24.4
require github.com/go-sql-driver/mysql v1.9.3
require (
github.com/ethereum/go-ethereum v1.15.10
github.com/go-sql-driver/mysql v1.9.3
)
require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/bits-and-blooms/bitset v1.20.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/consensys/gnark-crypto v0.18.0 // indirect
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.3 // indirect
github.com/ethereum/go-ethereum v1.16.5 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/holiman/uint256 v1.3.2 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
...
...
go.sum
View file @
59b1650e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment