Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify json api #1673

Merged
merged 2 commits into from
Nov 26, 2020
Merged

Unify json api #1673

merged 2 commits into from
Nov 26, 2020

Conversation

nanne007
Copy link
Member

change json api to adopt new api types.

@nanne007
Copy link
Member Author

sip link: starcoinorg/sips#1

@nanne007
Copy link
Member Author

在 SIP 的基础上,加了 获取 chain id 的接口。

Comment on lines +68 to +96
// pub struct BlockHeaderView {
// pub parent_hash: HashValue,
// pub number: u64,
// pub id: HashValue,
// pub author: AccountAddress,
// pub accumulator_root: HashValue,
// pub state_root: HashValue,
// pub gas_used: u64,
// pub time: u64,
// }
//
// impl From<Block> for BlockHeaderView {
// fn from(block: Block) -> Self {
// BlockHeaderView::from(block.header)
// }
// }
//
// impl From<BlockHeader> for BlockHeaderView {
// fn from(header: BlockHeader) -> Self {
// Self {
// parent_hash: header.parent_hash,
// number: header.number,
// id: header.id(),
// author: header.author,
// accumulator_root: header.accumulator_root,
// state_root: header.state_root,
// gas_used: header.gas_used,
// time: header.timestamp,
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以删除了

@jolestar jolestar merged commit bf40ad4 into master Nov 26, 2020
@jolestar jolestar deleted the unify-json-api branch November 26, 2020 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

return value of get_txn_info should include the block hash and block number
2 participants