Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
issue
issue
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • issueissue
  • Issues
  • #309

Closed
Open
Opened Aug 10, 2022 by taifu yuan@taifu🏸Maintainer

【we open star】 Java-SDK接口新增

【分类】

java-SDK相关

【问题描述】

java-sdk 中缺少相应的链处理接口

【需求描述】

需根据go-sdk中的接口补充java-sdk的接口

【贡献步骤】

issue评论区留言方案认领-方案被采纳-代码提交到【we open star】对应项目的开发分支中

【go-sdk接口】

// ### 3.27 开启或关闭链配置的Gas优化payload生成

CreateChainConfigOptimizeChargeGasPayload(enable bool) (*common.Payload, error)

// ### 3.28 查询最新权限配置列表 GetChainConfigPermissionList()

// ### 13.11 估算交易的gas消耗量

// 参数说明

// - payload: 待估算gas消耗量的交易payload

// 返回值说明

// - uint64: 估算出的gas消耗量

EstimateGas(payload *common.Payload) (uint64, error)

// ### 13.12 构造 配置账户基础gas消耗数量 payload

// 参数说明

// - amount: 基础gas消耗数量

CreateSetInvokeBaseGasPayload(amount int64) (*common.Payload, error)

// ## 15 交易池相关接口

// ### 15.1 获取交易池状态

GetPoolStatus() (*txpool.TxPoolStatus, error)

// ### 15.2 获取不同交易类型和阶段中的交易Id列表。

// 参数说明

// - txType: 交易类型 在pb的txpool包中进行了定义

// - txStage: 交易阶段 在pb的txpool包中进行了定义

// 返回值说明

// - []string: 交易Id列表

GetTxIdsByTypeAndStage(txType txpool.TxType, txStage txpool.TxStage) ([]string, error)

// ### 15.3 根据txIds获取交易池中存在的txs,并返回交易池缺失的tx的txIds

// 参数说明

// - txIds: 交易Id列表

// 返回值说明

// - []*common.Transaction: 交易池中存在的txs

// - []string: 交易池缺失的tx的txIds

GetTxsInPoolByTxIds(txIds []string) ([]*common.Transaction, []string, error)

// ### 3.27 开启或关闭链配置的Gas优化payload生成

CreateChainConfigOptimizeChargeGasPayload(enable bool) (*common.Payload, error)

// ### 3.28 查询最新权限配置列表

GetChainConfigPermissionList()

// ### 13.11 估算交易的gas消耗量

// **参数说明**

//   - payload: 待估算gas消耗量的交易payload

// **返回值说明**

//   - uint64: 估算出的gas消耗量
```go
EstimateGas(payload *common.Payload) (uint64, error)

// ### 13.12 构造 配置账户基础gas消耗数量 payload

// 参数说明

// - amount: 基础gas消耗数量

CreateSetInvokeBaseGasPayload(amount int64) (*common.Payload, error)

// ## 15 交易池相关接口 // ### 15.1 获取交易池状态

GetPoolStatus() (*txpool.TxPoolStatus, error)

// ### 15.2 获取不同交易类型和阶段中的交易Id列表。

// 参数说明

// - txType: 交易类型 在pb的txpool包中进行了定义

// - txStage: 交易阶段 在pb的txpool包中进行了定义

// 返回值说明

// - []string: 交易Id列表

GetTxIdsByTypeAndStage(txType txpool.TxType, txStage txpool.TxStage) ([]string, error)

// ### 15.3 根据txIds获取交易池中存在的txs,并返回交易池缺失的tx的txIds

// 参数说明

// - txIds: 交易Id列表

// 返回值说明

// - []*common.Transaction: 交易池中存在的txs

// - []string: 交易池缺失的tx的txIds

GetTxsInPoolByTxIds(txIds []string) ([]*common.Transaction, []string, error)
Edited Aug 10, 2022 by taifu yuan
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/issue#309

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。