Skip to content

Commit

Permalink
Supported merge of block and types repos (#42)
Browse files Browse the repository at this point in the history
* Supported merge of block and types repos

* Update CHANGELOG.md file #nolog

* Rebranding changes for Cargo.toml

* Fix some warnings

* Fix typos in names

* Satisfy rustfmt check

---------

Co-authored-by: tonjen <[email protected]>
Co-authored-by: ViacheslavB <[email protected]>
  • Loading branch information
3 people authored Apr 17, 2024
1 parent 0794204 commit 7074b62
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Release Notes

All notable changes to this project will be documented in this file.

##
## Version 1.0.31

- Supported merge of block and types repos
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ authors = [ 'EverX Labs <[email protected]>' ]
edition = '2021'
license = 'Apache-2.0'
name = 'ever-struct'
repository = 'https://github.com/tonlabs/ever-struct'
repository = 'https://github.com/everx-labs/ever-struct'
rust-version = '1.65'
version = '1.0.30'
version = '1.0.31'

[dependencies]
anyhow = '1.0.70'
failure = '0.1.0'
hex-literal = '0.3.4'
ton_block = { git = 'https://github.com/tonlabs/ever-block.git', tag = '1.9.143' }
ton_types = { git = 'https://github.com/tonlabs/ever-types.git', tag = '2.0.40' }
ever_block = { git = 'https://github.com/everx-labs/ever-block.git', tag = '1.10.0' }

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## ever-struct

[![GitHub](https://img.shields.io/github/license/tonlabs/ever-struct)](./LICENSE) [![Rust Version](https://img.shields.io/badge/Rust-1.65+-orange.svg)](https://www.rust-lang.org/)
[![GitHub](https://img.shields.io/github/license/everx-labs/ever-struct)](./LICENSE) [![Rust Version](https://img.shields.io/badge/Rust-1.65+-orange.svg)](https://www.rust-lang.org/)

This repository contains an implementation of frequently used structures that aren't part of blocks and/or don't participate in the source code of the ever-node. The schemes are described in the [`src/scheme.tlb`](./src/scheme.tlb) file.
10 changes: 5 additions & 5 deletions src/scheme/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
limitations under the License.
*/

use ton_block::{Deserializable, Serializable};
use ton_types::{fail, BuilderData, Cell, IBitstring, Result, SliceData};
use ever_block::{
fail, BuilderData, Cell, Deserializable, IBitstring, Result, Serializable, SliceData,
};

#[derive(Debug, failure::Fail)]
pub enum DeserializationError {
Expand Down Expand Up @@ -98,7 +99,7 @@ pub fn slice_load_string_ref(slice: &mut SliceData) -> Result<String> {
}

impl Serializable for TVC {
fn write_to(&self, builder: &mut BuilderData) -> ton_types::Result<()> {
fn write_to(&self, builder: &mut BuilderData) -> Result<()> {
builder.append_u32(Self::TVC_TAG)?;

if let Some(c) = &self.code {
Expand All @@ -120,7 +121,7 @@ impl Serializable for TVC {
}

impl Deserializable for TVC {
fn read_from(&mut self, slice: &mut SliceData) -> ton_types::Result<()> {
fn read_from(&mut self, slice: &mut SliceData) -> Result<()> {
let tag = slice.get_next_u32()?;
if tag != Self::TVC_TAG {
return Err(DeserializationError::UnexpectedTLBTag.into());
Expand All @@ -137,4 +138,3 @@ impl Deserializable for TVC {
Ok(())
}
}

0 comments on commit 7074b62

Please sign in to comment.