Skip to content

Commit 6da07f0

Browse files
committed
format
1 parent 4cafb9d commit 6da07f0

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ BLOCKCHAIN=<block-chain-name>
3838
3939
# l1 rpc url example: eth json rpc url
4040
L1_RPC_URL=<l1-rpc>
41+
# l2 rpc url example: op json rpc url
42+
L2_RPC_URL=<l2-rpc>
43+
44+
NODE_RPCURL=<op-node-rpc>
4145
4246
RPC_RATE_LIMIT=15
4347
RPC_RATE_BURST=5

main.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ func main() {
5252
router.POST("/disputegames/calculate/claim", disputeGameHandler.GetGamesClaimByPosition)
5353
router.GET("/disputegames/chainname", disputeGameHandler.GetCurrentBlockChain)
5454

55-
router.POST("/disputegames/frontend-move", frontendMoveAPI.RecordMove) // 记录前端发起的 move 交易
56-
router.GET("/disputegames/:address/frontend-moves", frontendMoveAPI.GetMovesByGame) // 获取指定游戏的前端 move 交易
57-
router.GET("/disputegames/frontend-move/:txhash", frontendMoveAPI.GetMoveByTxHash) // 根据交易哈希获取前端 move 交易详情
58-
router.GET("/disputegames/with-frontend-flag", frontendMoveAPI.GetGamesWithFrontendFlag) // 获取带有前端发起标记的游戏列表
55+
router.POST("/disputegames/frontend-move", frontendMoveAPI.RecordMove)
56+
router.GET("/disputegames/:address/frontend-moves", frontendMoveAPI.GetMovesByGame)
57+
router.GET("/disputegames/frontend-move/:txhash", frontendMoveAPI.GetMoveByTxHash)
58+
router.GET("/disputegames/with-frontend-flag", frontendMoveAPI.GetGamesWithFrontendFlag)
5959

6060
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
6161

@@ -66,7 +66,6 @@ func main() {
6666
}
6767
}
6868

69-
// 新增:初始化 RollupClient 的函数
7069
func initRollupClient(cfg *types.Config) *sources.RollupClient {
7170
rpcClient, err := client.NewRPC(context.Background(), gethlog.New(), cfg.NodeRPCURL)
7271
if err != nil {

0 commit comments

Comments
 (0)