接入 Base 与 Arbitrum 基础支持 - #98
Open
mybot102 wants to merge 12 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 为现有收款/监听体系新增 Base 与 Arbitrum One 两条 EVM 链的基础支持,并同步补齐默认种子数据与对外文档说明,使其可在同一套 GMPay/EPay 接口下被配置启用、监听并参与补单校验流程。
Changes:
- 新增 Base/Arbitrum 的 EVM WebSocket 监听任务,并接入统一的 ERC20 Transfer 处理逻辑。
- 扩展网络枚举/展示、地址规范化、手动补单校验分支与测试数据种子(chains / chain_tokens / rpc_nodes)。
- 更新 README 与 wiki/API 文档,明确默认内置资产与部署/API 暴露边界说明。
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wiki/API.md | 补充 Base/Arbitrum 默认内置资产与 RPC 配置要求说明 |
| src/task/listen.go | 启动任务中新增 Base/Arbitrum 监听 goroutine |
| src/task/listen_evm_added_chains.go | 新增 Base/Arbitrum 的通用 EVM WS 监听实现 |
| src/task/listen_chain_common.go | loadChainTokenContracts 增加合约地址合法性校验 |
| src/task/listen_chain_common_test.go | 增加 added EVM 收款地址隔离与无效合约跳过测试 |
| src/model/service/task_service.go | 补齐 Base/Arbitrum 的日志标签与网络展示名 |
| src/model/service/order_service.go | 订单地址规范化支持 Base/Arbitrum(EVM lowercase) |
| src/model/service/manual_payment_verify.go | 手动补单校验与 txid 规范化支持 Base/Arbitrum |
| src/model/mdb/wallet_address_mdb.go | 新增 NetworkBase/NetworkArbitrum 常量 |
| src/model/data/wallet_address_data.go | isEVMNetwork 纳入 Base/Arbitrum |
| src/model/data/wallet_address_data_test.go | 新增 Base/Arbitrum 钱包地址规范化测试 |
| src/model/data/order_data_test.go | 新增 Base/Arbitrum 交易锁隔离测试 |
| src/model/dao/mdb_table_init.go | 种子数据新增 Base/Arbitrum chains、tokens、WS RPC 节点 |
| src/model/dao/mdb_table_init_test.go | 增加 Base/Arbitrum 种子数据断言测试 |
| src/internal/testutil/testdb.go | 测试库默认链与代币种子纳入 Base/Arbitrum |
| README.md | 更新默认内置网络/代币与 API 暴露边界说明,并补充仓库内 API 文档入口 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return | ||
| } | ||
| log.Sugar.Infof("%s connecting using WSS node %s watching %d contract(s)", logPrefix, data.RpcNodeLogLabel(wsNode), len(contracts)) | ||
| query := ethereum.FilterQuery{Addresses: contracts, Topics: [][]common.Hash{}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
接入 Base 与 Arbitrum 基础支持