From fed15ebd332c5d469b85923b6f1b80c05641caeb Mon Sep 17 00:00:00 2001 From: Fusee Date: Sat, 18 Nov 2023 14:47:17 +0100 Subject: [PATCH 1/2] added parsing from esdt attributes for generated structs --- Cargo.lock | 2 ++ abi-build/src/generator/impl_abi_mod.rs | 1 + abi-build/src/generator/impl_abi_types.rs | 24 +++++++++++++++ core/src/errors/coding_error.rs | 37 +++++++++++++++++++++++ core/src/errors/mod.rs | 4 ++- core/src/errors/novax_error.rs | 5 +++ mocking/src/world/infos.rs | 2 +- tester/core/Cargo.toml | 1 + tester/core/tests/esdt_attributes.rs | 19 ++++++++++++ token/Cargo.toml | 1 + token/src/account/balance.rs | 30 +++++++++++++++--- token/src/error/token.rs | 1 + 12 files changed, 120 insertions(+), 7 deletions(-) create mode 100644 core/src/errors/coding_error.rs create mode 100644 tester/core/tests/esdt_attributes.rs diff --git a/Cargo.lock b/Cargo.lock index 3ae72d0..046da7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1584,6 +1584,7 @@ name = "novax-token" version = "0.0.19" dependencies = [ "async-trait", + "base64 0.21.5", "hex", "hyper 1.0.0-rc.4", "multiversx-sc", @@ -2365,6 +2366,7 @@ name = "tester" version = "0.0.1" dependencies = [ "async-trait", + "base64 0.21.5", "hex", "novax", "novax-mocking", diff --git a/abi-build/src/generator/impl_abi_mod.rs b/abi-build/src/generator/impl_abi_mod.rs index 3b5bcf5..b4364f3 100644 --- a/abi-build/src/generator/impl_abi_mod.rs +++ b/abi-build/src/generator/impl_abi_mod.rs @@ -85,6 +85,7 @@ fn get_mod_imports() -> TokenStream { use multiversx_sdk::data::vm::VmValueRequest; use serde::{Deserialize, Serialize}; use crate::errors::NovaXError; + use crate::errors::CodingError; use crate::caching::CachingStrategy; use crate::caching::CachingNone; use std::collections::hash_map::DefaultHasher; diff --git a/abi-build/src/generator/impl_abi_types.rs b/abi-build/src/generator/impl_abi_types.rs index c18b878..156933e 100644 --- a/abi-build/src/generator/impl_abi_types.rs +++ b/abi-build/src/generator/impl_abi_types.rs @@ -340,6 +340,30 @@ fn impl_abi_struct_type(name: &str, abi_type: &AbiType, all_abi_types: &AbiTypes /// Type alias for wrapping the managed API. type #managed_name_type_wrap_api = #managed_name_ident; + impl #native_name_ident { + /// Constructs an instance of `#native_name_ident` from ESDT token attributes. + /// + /// This function attempts to decode the provided ESDT attributes into an instance of `#native_name_ident`. + /// It is specifically designed to work with the attributes associated with ESDT tokens, which are typically + /// encoded in a binary format. + /// + /// # Arguments + /// - `attributes`: A byte slice (`&[u8]`) representing the ESDT token attributes to be decoded. + /// + /// # Returns + /// - `Ok(#native_name_ident)`: Successfully decoded instance of `#native_name_ident`. + /// - `Err(NovaXError)`: An error wrapped in `NovaXError`, specifically `CodingError::CannotDecodeEsdtAttributes`, + /// if the decoding process fails. This error indicates that the provided attributes could not be properly + /// decoded into the expected `#native_name_ident` type. + pub fn from_esdt_attributes(attributes: &[u8]) -> Result<#native_name_ident, NovaXError> { + let Result::Ok(decoded) = #managed_name_ident::top_decode(attributes) else { + return Result::Err(CodingError::CannotDecodeEsdtAttributes.into()); + }; + + Result::Ok(decoded.to_native()) + } + } + /// Provides a mechanism for converting a `#native_name_ident` to its managed representation (`#managed_name_ident`). impl ManagedConvertible<#managed_name_ident> for #native_name_ident { /// Converts the `#native_name_ident` to its managed representation. diff --git a/core/src/errors/coding_error.rs b/core/src/errors/coding_error.rs new file mode 100644 index 0000000..3a5ed98 --- /dev/null +++ b/core/src/errors/coding_error.rs @@ -0,0 +1,37 @@ +use serde::{Deserialize, Serialize}; +use crate::errors::novax_error::NovaXError; + +/// Enumerates coding-related errors, specifically for encoding and decoding processes. +/// +/// This enum represents errors that can occur during the encoding and decoding stages, particularly +/// involving serialization and deserialization of data structures used within the NovaX framework. +/// +/// # Variants +/// - `CannotDecodeEsdtAttributes`: This error occurs when there's a failure in decoding attributes +/// associated with an ESDT (Elrond Standard Digital Token). While attributes are typically found in +/// non-fungible tokens (NFTs), this error covers scenarios where decoding such attributes fails for +/// any ESDT, fungible or non-fungible. +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub enum CodingError { + /// Represents an error that occurs when the decoding of attributes for an ESDT (Elrond Standard Digital Token) + /// fails. This error is particularly significant in the context of non-fungible tokens (NFTs), where attributes + /// play a crucial role in defining the token's properties and metadata. + CannotDecodeEsdtAttributes, +} + +impl From for NovaXError { + /// Converts a `CodingError` into a `NovaXError`. + /// + /// This implementation enables the seamless transformation of a specific coding error into the broader + /// `NovaXError` type. This is particularly useful for error handling strategies that require a consistent + /// error type across different modules of the NovaX framework. + /// + /// # Arguments + /// - `value`: The `CodingError` instance to be converted. + /// + /// # Returns + /// A `NovaXError` instance, specifically as a `NovaXError::Coding` variant containing the original `CodingError`. + fn from(value: CodingError) -> Self { + NovaXError::Coding(value) + } +} \ No newline at end of file diff --git a/core/src/errors/mod.rs b/core/src/errors/mod.rs index d7c9c00..bcfab48 100644 --- a/core/src/errors/mod.rs +++ b/core/src/errors/mod.rs @@ -3,9 +3,11 @@ mod caching_error; mod date_error; mod account_error; mod code_error; +mod coding_error; pub use novax_error::NovaXError; pub use caching_error::CachingError; pub use date_error::DateError; pub use account_error::AccountError; -pub use code_error::CodeError; \ No newline at end of file +pub use code_error::CodeError; +pub use coding_error::CodingError; \ No newline at end of file diff --git a/core/src/errors/novax_error.rs b/core/src/errors/novax_error.rs index b158cc2..d5956e7 100644 --- a/core/src/errors/novax_error.rs +++ b/core/src/errors/novax_error.rs @@ -4,6 +4,7 @@ use novax_executor::ExecutorError; use crate::errors::account_error::AccountError; use crate::errors::caching_error::CachingError; use crate::errors::code_error::CodeError; +use crate::errors::CodingError; use crate::errors::date_error::DateError; /// The main error type for the `novax` crate. @@ -20,6 +21,10 @@ pub enum NovaXError { Date(DateError), /// Errors related to fetching or parsing account information. Account(AccountError), + /// Errors occurring during the encoding or decoding of managed types. This variant encompasses issues + /// related to serialization and deserialization processes, which are fundamental in ensuring data + /// integrity and adherence to expected formats. + Coding(CodingError), /// Errors related to reading contract code from a file. Code(CodeError), } diff --git a/mocking/src/world/infos.rs b/mocking/src/world/infos.rs index 8f25ad1..19d3669 100644 --- a/mocking/src/world/infos.rs +++ b/mocking/src/world/infos.rs @@ -264,7 +264,7 @@ async fn get_addresses_balances(gateway_url: &str, addresses: &[Address]) -> Res token_identifier: parse_token_identifier(&infos.token_identifier), nonce: infos.nonce, amount: infos.balance, - opt_attributes: infos.attributes.map(|e| e.as_bytes().to_vec()) + opt_attributes: infos.attributes }) } diff --git a/tester/core/Cargo.toml b/tester/core/Cargo.toml index a3cb9a4..18179c7 100644 --- a/tester/core/Cargo.toml +++ b/tester/core/Cargo.toml @@ -16,6 +16,7 @@ hex = "0.4.3" tester-contract = { path = "../contract" } novax = { path = "../../core" } novax-mocking = { path = "../../mocking" } +base64 = "0.21.5" [package.metadata.release] release = false diff --git a/tester/core/tests/esdt_attributes.rs b/tester/core/tests/esdt_attributes.rs new file mode 100644 index 0000000..31a867c --- /dev/null +++ b/tester/core/tests/esdt_attributes.rs @@ -0,0 +1,19 @@ +use base64::Engine; +use num_bigint::BigUint; +use novax::tester::tester::TestTokenProperties; + +#[test] +fn test_decode_struct_from_esdt_attributes() { + let bytes_attributes = base64::engine::general_purpose::STANDARD.decode("AAAAC3Rlc3QgYnVmZmVyAAAAAQo=").unwrap(); + let result = TestTokenProperties::from_esdt_attributes( + &bytes_attributes + ) + .unwrap(); + + let expected = TestTokenProperties { + buffer: "test buffer".to_string(), + integer: BigUint::from(10u8), + }; + + assert_eq!(result, expected); +} \ No newline at end of file diff --git a/token/Cargo.toml b/token/Cargo.toml index d4cb716..0171955 100644 --- a/token/Cargo.toml +++ b/token/Cargo.toml @@ -20,6 +20,7 @@ async-trait = "0.1.73" multiversx-sc = "=0.43.3" multiversx-sc-scenario = "=0.43.3" multiversx-sc-codec = "=0.18.1" +base64 = "0.21.5" [dev-dependencies] tokio = "1.32.0" diff --git a/token/src/account/balance.rs b/token/src/account/balance.rs index b135844..5c9a1d9 100644 --- a/token/src/account/balance.rs +++ b/token/src/account/balance.rs @@ -3,6 +3,7 @@ use std::collections::HashMap; use std::hash::{Hash, Hasher}; use std::str::FromStr; use async_trait::async_trait; +use base64::Engine; use num_bigint::BigUint; use novax_data::Address; use serde::{Deserialize, Serialize}; @@ -37,10 +38,9 @@ pub struct TokenInfos { pub token_identifier: String, pub nonce: u64, pub balance: BigUint, - pub attributes: Option, + pub attributes: Option>, } - #[async_trait] pub trait FetchAllTokens { async fn fetch_all_tokens(&self, gateway_client: &Client, caching: &Caching) -> Result, TokenError> @@ -91,11 +91,26 @@ async fn fetch_all_tokens_for_address(gateway_client: &Client, }) }; + let decoded_attributes = if let Some(raw_attributes) = raw_infos.attributes { + let Ok(decoded_attributes) = base64::engine::general_purpose::STANDARD.decode( + raw_attributes + ) else { + return Err(TokenError::CannotDecodeBase64Attributes { + token_identifier: raw_infos.token_identifier, + nonce: raw_infos.nonce.unwrap_or_default() + }) + }; + + Some(decoded_attributes) + } else { + None + }; + let infos = TokenInfos { token_identifier: raw_infos.token_identifier, nonce: raw_infos.nonce.unwrap_or(0), balance, - attributes: raw_infos.attributes, + attributes: decoded_attributes, }; results.push(infos); @@ -109,6 +124,7 @@ async fn fetch_all_tokens_for_address(gateway_client: &Client, #[cfg(test)] mod tests { use std::str::FromStr; + use base64::Engine; use num_bigint::BigUint; use novax::caching::CachingNone; use novax_data::Address; @@ -127,11 +143,13 @@ mod tests { balance: BigUint::from_str("71179029947004300508").unwrap(), attributes: None, }; + + let expected_attributes_bytes = base64::engine::general_purpose::STANDARD.decode("AAAABBQU4X0AAAAE7ydxXJ+y2KdDsBjrBTlnPsuT9bwsZTAE/nLafAkBZBViCXHzAAAACA3gtrOnZAAAAAAACA3gtrOnZAAAAAAAAA==").unwrap(); let expected_non_fungible = TokenInfos { token_identifier: "FARM-c4c5ef-1f52".to_string(), nonce: 8018, balance: BigUint::from_str("1000000000000000000").unwrap(), - attributes: Some("AAAABBQU4X0AAAAE7ydxXJ+y2KdDsBjrBTlnPsuT9bwsZTAE/nLafAkBZBViCXHzAAAACA3gtrOnZAAAAAAACA3gtrOnZAAAAAAAAA==".to_string()), + attributes: Some(expected_attributes_bytes), }; assert_eq!(result.len(), expected_len); @@ -152,11 +170,13 @@ mod tests { balance: BigUint::from_str("71179029947004300508").unwrap(), attributes: None, }; + + let expected_attributes_bytes = base64::engine::general_purpose::STANDARD.decode("AAAABBQU4X0AAAAE7ydxXJ+y2KdDsBjrBTlnPsuT9bwsZTAE/nLafAkBZBViCXHzAAAACA3gtrOnZAAAAAAACA3gtrOnZAAAAAAAAA==").unwrap(); let expected_non_fungible = TokenInfos { token_identifier: "FARM-c4c5ef-1f52".to_string(), nonce: 8018, balance: BigUint::from_str("1000000000000000000").unwrap(), - attributes: Some("AAAABBQU4X0AAAAE7ydxXJ+y2KdDsBjrBTlnPsuT9bwsZTAE/nLafAkBZBViCXHzAAAACA3gtrOnZAAAAAAACA3gtrOnZAAAAAAAAA==".to_string()), + attributes: Some(expected_attributes_bytes), }; assert_eq!(result.len(), expected_len); diff --git a/token/src/error/token.rs b/token/src/error/token.rs index e8acf16..a6721db 100644 --- a/token/src/error/token.rs +++ b/token/src/error/token.rs @@ -5,6 +5,7 @@ use novax::errors::NovaXError; pub enum TokenError { TokenNotFound { token_identifier: String }, UnknownErrorForToken { token_identifier: String }, + CannotDecodeBase64Attributes { token_identifier: String, nonce: u64 }, UnknownErrorWhileGettingEsdtInfosOfAddress { address: String }, CannotParseEsdtBalances { address: String }, UnableToParseBigUintBalanceForTokenAndAddress { token_identifier: String, address: String, balance: String }, From ee89ca601d87d953ce7fe86bf481fe1cdfa7e89d Mon Sep 17 00:00:00 2001 From: Fusee Date: Sat, 18 Nov 2023 15:28:16 +0100 Subject: [PATCH 2/2] added parsing from esdt attributes for generated enums --- .novax/abis/tester-contract.abi.json | 64 +++++++++++++++- .novax/tester-contract.wasm | Bin 11774 -> 12555 bytes abi-build/src/generator/impl_abi_types.rs | 24 ++++++ tester/contract/src/printer.rs | 27 +++++++ tester/contract/wasm/src/lib.rs | 6 +- tester/core/tests/dummy_deploy.rs | 4 +- tester/core/tests/esdt_attributes.rs | 87 ++++++++++++++++++++++ 7 files changed, 207 insertions(+), 5 deletions(-) diff --git a/.novax/abis/tester-contract.abi.json b/.novax/abis/tester-contract.abi.json index ab4a219..210a6cd 100644 --- a/.novax/abis/tester-contract.abi.json +++ b/.novax/abis/tester-contract.abi.json @@ -10,7 +10,7 @@ "contractCrate": { "name": "tester-contract", "version": "0.0.0", - "gitVersion": "0.0.17-4-g302e541" + "gitVersion": "0.0.19-2-gfed15eb" }, "framework": { "name": "multiversx-sc", @@ -59,6 +59,26 @@ } ] }, + { + "name": "returnNftEnumProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestEnumProperties" + } + ] + }, + { + "name": "returnNftEnumFieldsProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestEnumPropertiesWithFields" + } + ] + }, { "name": "returnFungibleBalance", "mutability": "mutable", @@ -714,6 +734,48 @@ } ] }, + "TestEnumProperties": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0 + }, + { + "name": "Second", + "discriminant": 1, + "fields": [ + { + "name": "0", + "type": "bytes" + }, + { + "name": "1", + "type": "BigUint" + } + ] + } + ] + }, + "TestEnumPropertiesWithFields": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0, + "fields": [ + { + "name": "buffer_value", + "type": "bytes" + }, + { + "name": "integer", + "type": "BigUint" + } + ] + } + ] + }, "TestTokenProperties": { "type": "struct", "fields": [ diff --git a/.novax/tester-contract.wasm b/.novax/tester-contract.wasm index 4f34a0fb7ee6c41ae172887f54a3a3e3a8ebb6d6..3c314fe548fbedcd0015ce5049571b4e5be218f2 100755 GIT binary patch delta 5234 zcmb_gYiu0V6~6b*?C#jJkL!5XYj5m$cD;7i&I2a|C&W(bS-+A3AtdAhNl5%yCw3e= zS=)q1>a`)|4JEy_Jldv&Qc_w%Q1LI+idIA_QbkKsRVo#g+8^{GRH~{-{ZmN4GqdBw zCKCNYqTQW)?m6e4=XdV-(>;&&J-H?3E6_i7K*KkmIzY>*!m0hSGCsu)Fi`wc#8BXc zQx9L_VRfIjTAdaZ>T&*CUZ#4*1~n@#s#(qAi`4J5BrjM0(Ke+YoFt7;aKokSSjWD`ON!5{TG*3wi)&Z2Q*(=! zHSFu25j(D3y))O()ZDsd4XvNzk>VkaHAMObmqn6$?9SZMe)dgI?$+aDJD~Szj|pqn zk#Y8n+T*Y1&#D=JoIj_Y^)IgemX`th=+WHhfaf!!#lEfH^(Xju)QA2hYfpP2Ku&L( z9GMux3E&xL-{n=VDc(lbHObk0UbP2ei8G#T$K?3L*pclM`ALKj2fU!h0`=PWc)dCn zNHr7XMbBoJl}dtr-%HA68nM2l{vJs2vnpuR@gJyW!{RTiTZ{_+Lv_eVX+PpC)tg2- zxMhq|+t=HFn7yKYYP4zRcpEk{DqRu_y~>S#>}F~AJk%{VcJ_`;qAW>kwYMPU6{fpG z2fwUdEveBy+Wd(6Rmp7ga8g*@Hij*h5e9v+lx7Ke$l_Sryhm@h|9HP)YxeJF3_Bt_ z)Q?MB<2PE&He>;UayZRQgIP>2mu*TndwHK4G*_;@8yw6MP)A?798B0RUWAV=f(3<1 z%1P#MkmFfS&aKri&ATFfmT>i!63+&;EjVuF9ee02XiuLsY$hjU52TBWPW3^sgHNi) zP%96qTxeZu7_#wrOkKUXX)~gI#UrV3^CKv za2j}Z%Qp#$-uCN+5XZ=|wOH)FMl#Y)N zA3r_;e7Lh?;HgAXPy<~!h}-W>QwV|ycw@6x9=3GkMYF@hwvbskVDt5?8cquGkXa=y zq7pwwi-=kUgsDYHECVf0Ap9*n)7H0cuh1JVP=^dIz$SL!GskPX3*6rST|a4A*8h$<0VU z+%(IJ@h%nu#Ml*5>L=lLjFnHqH5xRin#hVZJxSf>PTkpOP}qLCi3ldD(p}px!Qim$ zK>m4=qf1Ris(6=rCbEfls6R)n4aXL?1-N0VQ|?qNW)l|$q;)vSWlvIQXcfHxXPI0f zkE)HbV#{ZDmdnjJksnUNI-ey>)A7Tpv@$rAq+l|+4#^ML7W$IHWIuSHVM}!73vw-n z;~(VeP&pl63uXjym#Qkewe&V*IXaA_+^&w7t>L}um9lI2pnAXTUf(V-^{Ty#()=DZ zv*>odSG~WeqkJ!UqCZ#rbaW|Zlk`OaG-+04}uCOs6-AYC~FL8 zahar6#a=GUAr21AprO#Qa!`F3dq~Tg*QwuB#A7JV;BboBy3_MtfpNMlsM>f%rka|P zN}NhlbWz+YoO(mGg5XvrlM%Hqo{kXYK@dj~2%J^V$D{Req=hhww8%=c(kaCxxAWOW zlH)jL=jCGcUVH{6xTkV=S>E!&P@SB`7a4k?GQD)%i5m#cmJausYvr=s!sEe5V#;NMCcQ0c}*=@2x|zbZ3Ir{ zU@XuF<{(S>(No+(GUTA(AyJ%CvBc(bJ6h)EB$LzR_FZO#fy(4|tmSc8Yt|7!&*y`- z<0@s=`g2+9fs;wiW=U#3&-$K_M%D)@ zquj*gi3YhUEU7BkZaiSaUQ0U*14a2Fdp9^z4PVlAzGAD7HlpfU*>Gh}p!9 zUpg!~Z$Dcqk6NrKj3?qa%`xtfv*yE>J4E)NlHP#HKDa@X?ajGoydqegm^j_m`lQ>A zJt={6$(7A$8s`c3lZ+gZo7EYs!=Rf=MpUQNufvuKCL0QlShloi#y&F*16&`xGrjXL zfpuKW$jrviGC4;%EM7RkT5Fb3%v|)4S^fZml$eJog(M^U;Qa`=ttcBA_``O$iy2Jbf_nsN9d)`B2&(>-s_Z@i zjL~Q)(sd6$GWULZ#}!a|RgF%|KqItqxl=uns@gOId^(X7jxHgio~i@?r)guJY3ifY z;_WA7n>SbM9O--9)U_7}@9CIOQE`Z(Wto$%wkA?nHnl z0t5Avx_F0E30}kjRBlFfDnF-GxmT*72(LJtGMg(%wJW`%W;cwm=xyc={EdK$*>c_$ z+&WNa($#^Ra7Pz%i@K1$bDeWNl)Eu+9GSWH!c1G@Z);c!ZKoQ%_?~a5OWo*> z3m_`c+6v<@D+?`FA2+0(fM^Iv?b4I=Zb0^+&z*pr=NMi(4Rj9^sIJx9OIKEPC4siC z|FVlh>OHGSrg1N-vQaa(5`Z^qXplzD0uO$qjG{1g#0ZIMrbInKXUrdvXj$x@1=0lM zR;QZK6QBf#<-KxDJ(X$Qwi714gFC1xXQ=L)hv!yuAJ#OK%w2A=&W)f2YTLkPk=iy_ zZEfSyp8d?6@XVRZ-U2y#&ti79Bb0Qy(4h8i6hVZ9F3q@@J>IzT3)3Z=+Q patAGebQ!T*ZVTbX!Sc&}K#i;N#~1PomtVcJtdbAC{+DHy;(tD%3}yfT delta 4646 zcmb_fYiwM_6`q-U*S_Ano1OJzy}PmFd)IdCHL-yZIcaRd-gTT8#0hzjgb?hty>a{w z>ooxqat)a9ZbPSql2TGiAf*NM2l-R}6bXK`KM;kg4^)9F6{(fl0#Z?{N)_ohbN4Pb zluDJb<$Ld(Ip@ro?|kRX_>tjH51$?A(OlQ1r-uS~op#9(JuUyJJ7mgn>4yvvs8o1k z%t>X}C67OJnTExi^tW_{c%EHb9huI~A3d5c?9CUmcNX(=q(Z#Uej^^EUE-2v(Wv;f zX47i%Pi>oZhAz??!UBvklTlhrHI3>TMl4XL8G1;J=&59dVX!KyQx*tT(Mm&Oj8;-w zQ6C72XZ0PaKUS@+n9fhn7Vcz3ADB7s=)9$Ht(7v~Ez zTjpoR#)qf!+1ylaW+YGU6(<8LJMN=(GqX-%Y+!be((0cXJw7`=QzVNtHF$#@^E=@ z&06wEdCTx#ZI{C4OI-V&r?`-OBbg&-k12tovt>_w%%7sYfZ3mfshhMv6Wwb{oy~2jcCj zn0VL-#-H<*RbV&ersnh53ArF%g7Wj?E#qqXf}mBs+C|zc-ZomqXjLNoLu!nG582$v zBzX~TR~pK2j!5qf{y;8b+0W77;NWPkm>UFm8Z`$8kL7d62ZwWWd5s01-@GWQgO}oC zHnXT>Ojx9y8S+6=n#FitydSKm*NJ}wd+N7Y#4-3usPTywVj9FEd=1|ywwXD4tN4-G zwf+P&h{a$mA37gSIv3tCEZWUTh?y3Z6NHb4D8Bhzc`PEKJ0iDQ%<~(RIz8fv(42K# zs=&UTg`9;&!y&xD`(RxfWJEgLN9V+JxQ7PCi{TAh!qPUKB0Qe7h#8^O#fU;ypR}kM z^2US*FnI&jT;6MIJdK?b=hMrVFIR5SGnU3TiN{ye(M{swigvdPCeGg$45yxFQo2PD zx0$qbXYn4x(bT8KU?OEaM9iqS0vtlIHfb?4gorE(B)9UgDZTMNn`#+_u=CP81|S*e z$Fd00`S?D=(fMZHk1YZrvxYXP4Up1);gBqGDAGJbO)X!^UigBw(d{`uk$RN zRq)MHU;=z^?7V=jtl-xXxG!lq;x9Zw9TA9bL!JksR&-X+IPbw)bAE?iM)-BYjn*F; zvnfJnnrl(r#ij}GCvB`4z*bGOgEAKrUsPSg`#+~DaZ#CCAwG&WVdY5mddkJt z>a}4Gx|mIX3K;GcXR7xF_XC{T34nN$_@H_nJt7h{SJGjzz2;U0J7!Pk`CRfxWh`RI*P=qD2Sz7 zfe8cvTUD(G7{vkGOdLL$(psb#;e|YOR5Y3sngIKdd>L!mUp)f$$f}pzDYcU#5|6bf zW$DQBmX*Q!W!_?n?RX%kAT$8Bv-5obeWiY!wUf+SWP{T-Lwz z%423+m6J`KLbjSy#6_F}Pl%t!?*Z?75(lHltpI@2CHQzq;4UOu+HO;Mgg{N{yxKcg`TPJ=`FF7(CgZNg7s-P_F-1VX}h@l$-BH<~Hg=9X!} z)qG0U@1z6*7Wac1x(jMplPS_tGIxHC4gi*;>U%Akt;iC-inA2s>Nlm~n|dtFa5-rCFPxxcL(Pm;t#}(p) zT`!($vRn&iO~mx3OYI9RkNIJ~gD_2=K`7T^w`FlD`fP;~8zpVC&cjT?lg24w0R=s2 z*7(lefHR$E$}(WV5zrb@7&K+1~ti87maBL3CSEvc{KGd4{6jB5zkM$s2U3^D06P zU>~yS{>=XtRn1$_BzHG&v^|3Kr5Ki#8|g=$)EAP}&L?=k_;GWe>_5#rU8S21mR3Gw zwqQ*!Zhskn2~b5xhGk^wFDfbjO2vl&s*Pq;g645JoTX;~OmZ2oU7N_Duwk5YIJK5= zegk0hGp3<95-LM-IgOt52y;M0i>A45fiD^oA1Zw&wY^b;&x#Q0g-j66O;`@vF>332irP zkeGC{I9_@;tHn#}X51oTp)Er9iL-6>0mTdPQd>jicASBX?+|ab-M&HHUHCq9LD?BT zt3Vv(=Ab&{JVG&-WmpECFoNq0!Tsp&_Vgwgm##Jo=u}~O5qdd$ncfH6-5xoX^+120 zw1nXY?X8Co07JF%*{>WKF`8aa4~VDJiPGL*O*hkR;{CLRGvso*Md6?UhmMZLRu6{* zsBjg{PbjWtx;)_hZXg*Xe$~;HaBQ5h-nO|Tk@UYs@{05=J1vsdjNOusX$|Q}YZi3y z;ylWuIE$jPnO`NbepIfZE)kiD(n$fqGu36Kz^)NAuelX>feJ&VDG2%2RBUuQj zJz3*v76KshhKE!7+?uYh%vYqdiyju6I+KB0QaUe+Bb|*MBUq6-mq4}zA4T`;vo*8< z3bbVi?GvS`5wzS3ots?T@O5X3SEI#%@Ix|Yt6$zepy~^@LBKMe^`GxGoCZGVH4}JS zL?RmbV3;~jVy2rDVt&?0reO0+f}o+b16f`9K(VW2=H6Lc95Yoc?d0%=0NZ_A#mP&Uyuxf7ZY9_pUhm565AlR{#J2 diff --git a/abi-build/src/generator/impl_abi_types.rs b/abi-build/src/generator/impl_abi_types.rs index 156933e..3d37931 100644 --- a/abi-build/src/generator/impl_abi_types.rs +++ b/abi-build/src/generator/impl_abi_types.rs @@ -66,6 +66,30 @@ fn impl_abi_enum_type(name: &String, abi_type: &AbiType, all_abi_types: &AbiType #native_values } + impl #native_name_ident { + /// Constructs an instance of `#native_name_ident` from ESDT token attributes. + /// + /// This function attempts to decode the provided ESDT attributes into an instance of `#native_name_ident`. + /// It is specifically designed to work with the attributes associated with ESDT tokens, which are typically + /// encoded in a binary format. + /// + /// # Arguments + /// - `attributes`: A byte slice (`&[u8]`) representing the ESDT token attributes to be decoded. + /// + /// # Returns + /// - `Ok(#native_name_ident)`: Successfully decoded instance of `#native_name_ident`. + /// - `Err(NovaXError)`: An error wrapped in `NovaXError`, specifically `CodingError::CannotDecodeEsdtAttributes`, + /// if the decoding process fails. This error indicates that the provided attributes could not be properly + /// decoded into the expected `#native_name_ident` type. + pub fn from_esdt_attributes(attributes: &[u8]) -> Result<#native_name_ident, NovaXError> { + let Result::Ok(decoded) = #managed_name_ident::top_decode(attributes) else { + return Result::Err(CodingError::CannotDecodeEsdtAttributes.into()); + }; + + Result::Ok(decoded.to_native()) + } + } + #native_convertible_impl #managed_convertible_impl diff --git a/tester/contract/src/printer.rs b/tester/contract/src/printer.rs index 92f8cff..079056d 100644 --- a/tester/contract/src/printer.rs +++ b/tester/contract/src/printer.rs @@ -7,6 +7,17 @@ pub struct TestTokenProperties { pub integer: BigUint } +#[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi)] +pub enum TestEnumProperties { + First, + Second(ManagedBuffer, BigUint), +} + +#[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi)] +pub enum TestEnumPropertiesWithFields { + First { buffer_value: ManagedBuffer, integer: BigUint }, +} + #[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi)] pub struct CustomStruct { pub first: ManagedBuffer, @@ -50,6 +61,22 @@ pub trait PrinterModule: ContractBase { ) } + #[endpoint(returnNftEnumProperties)] + fn return_nft_enum_properties(&self) -> TestEnumProperties { + self.blockchain().get_token_attributes( + &TokenIdentifier::from("NFT-abcdef"), + 6 + ) + } + + #[endpoint(returnNftEnumFieldsProperties)] + fn return_nft_enum_fields_properties(&self) -> TestEnumPropertiesWithFields { + self.blockchain().get_token_attributes( + &TokenIdentifier::from("NFT-abcdef"), + 6 + ) + } + #[endpoint(returnFungibleBalance)] fn return_fungible_balance(&self) -> BigUint { self.blockchain().get_sc_balance( diff --git a/tester/contract/wasm/src/lib.rs b/tester/contract/wasm/src/lib.rs index bb083b2..b2274fa 100644 --- a/tester/contract/wasm/src/lib.rs +++ b/tester/contract/wasm/src/lib.rs @@ -5,9 +5,9 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 45 +// Endpoints: 47 // Async Callback: 1 -// Total number of exported functions: 47 +// Total number of exported functions: 49 #![no_std] @@ -25,6 +25,8 @@ multiversx_sc_wasm_adapter::endpoints! { getSum => sum add => add returnNftProperties => return_nft_properties + returnNftEnumProperties => return_nft_enum_properties + returnNftEnumFieldsProperties => return_nft_enum_fields_properties returnFungibleBalance => return_fungible_balance returnNonFungibleBalance => return_non_fungible_balance noArgNoReturnEndpoint => no_arg_no_return_endpoint diff --git a/tester/core/tests/dummy_deploy.rs b/tester/core/tests/dummy_deploy.rs index bd469a2..a3555b0 100644 --- a/tester/core/tests/dummy_deploy.rs +++ b/tester/core/tests/dummy_deploy.rs @@ -38,7 +38,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { receiver: SYSTEM_SC_DEPLOY_ADDRESS.to_string(), egld_value: 0u8.into(), gas_limit: 600000000u64, - data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60037f7f7f017e60057f7f7f7e7f0060017e0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60057f7f7f7f7f0060027e7f0060027f7e017f60027e7e0060027f7f017e029c072603656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000d03656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000e03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e760f6d4275666665725365744279746573000603656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760d6d616e6167656443616c6c6572000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080386018401130002050201020b020101140103030104030201020205150308040c02050601010607020202040301030000010203010103011603030501070601080906060808020901040102050a09010708030202010701010617050c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005030100030616037f01418080080b7f0041f0d2080b7f0041f0d2080b07e30932066d656d6f7279020004696e6974007e0667657453756d007f036164640080011372657475726e4e667450726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011372657475726e4d756c746956616c756554776f00a4011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a5012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a601396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00a7013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00a8010863616c6c4261636b00a9011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020aa54484012e000240200120024d0440200220044d0d011027000b1027000b2000200220016b3602042000200120036a3602000b0b0041808408410e1000000b1301017f102922012000ad42ff0183100120010b1901017f419084084190840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102c21022001102d210320002001102e36020c20002002360208200020033703000b5801047f230041106b22012400200010672102200141086a200028020820002802002203200210652001280208410147044041dd8308410341d88108410f103f000b200128020c2000200220036a360200200141106a24000b3002017f017e230041106b22012400200142003703082000200141086a22004108104820004108107b200141106a24000b08002000102c103a0b1d00200028020820011030200029030020011031200028020c200110320baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a4104105e0240024020012d000404402000100722044190ce0041a4d20828020022036b4b0d0120022003200320046a22011077200041002002280200200228020410621a41a4d20820013602000c020b2001280200200010690c010b200110732001280200200010690b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a4108105e200241106a24000b0a002000103b200110300b3601027f230041106b22012400200141086a103420012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41a8d2082d0000220245044041a8d20841013a000041a4d2084100360200200141086a410010702001280208200128020c418084084100107210430c010b41808408410010400b360200200020024101733a0004200141106a24000b0b0020002001103610041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1073200228020820022d000c044041a4d208410036020041a8d20841003a00000b200241106a24000b0a0020004100103810390b0d00200010292200100a1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0d0020001029220010181a20000b0f01017f10292201200010171a20010b0c01017f10292200100520000b4c01037f103c210310292102200041feffffff074604402003103e41b0d2082002100620020f0b2000100721042003103e200041d0d20810081a41b0d20841d0d208200420012002100920020b0b00200041b0d20810081a0b2e01017f41ed800841171040220420002001100b1a2004418481084103100b1a200420022003100b1a2004100c000b1101017f102922022000200110141a20020b0c002000200120021047100d0b2e01017f104321010340200028020041acd2082802004e4504402001200041f083084104104410450c010b0b20010b1301017f1029220041808408410010141a20000b0c00200020012002104710380b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100b1a200241106a24000bb80102027e027f027f0240200141a1830841061047100d22024280808080105404402002a7220545200541ebde0146720d01027f200128020041acd2082802004e04401043210441010c010b200141a1830841061044210441010b0c020b41a18308410641a68008410e103f000b200141a183084106104122024280808080708321032002a72104200141a1830841061041210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b2f01017f2000280200220341acd2082802004e044020012002418781084111103f000b2000200341016a36020020030b3100200041086a200028020020012002106f044041dd8308410341d88108410f103f000b2000200028020020026a3602000b2a01027f20001067210110432102037f2001047f20022000102d106e200141016b21010c010520020b0b0b2a01027f20001067210110432102037f2001047f20022000102c1045200141016b21010c010520020b0b0b0c00200010292200100e20000b2101017f4100103822021007412047044020002001418782084110103f000b20020b1900200041acd2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101020004604400f0b41aa810841191000000b190041acd20828020041004e04400f0b4187810841111000000b0b0041acd20810103602000b1f01017f2001105321022000410036020820002002360204200020013602000b0900200010074102760b5501027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280210200141086a22021055200041146a2002105620002002102f200128020820012d000c1035200141106a24000baf0102017e047f230041106b22032400200010074103762001105d20001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810621a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011031200621040c010b0b0b5b01027f230041206b220224002000280200220310532001105d20022003100736021820024100360214200220003602100340200241086a200241106a107820022802080440200228020c200110300c0105200241206a24000b0b0bb00101027f230041206b2201240002402000280200450440200141086a1033200120012d000c3a001c200120012802083602184100200141186a220210582000280204200210302000290310200210312000280208200210320c010b200141106a1033200120012d00143a001c200120012802103602184101200141186a22021058200028020420021055200041086a20021056200041106a2002102f0b200128021820012d001c1035200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a4101105e200241106a24000b0a0020001011200110110b5801027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280208200141086a22021030200029030020021031200028020c20021032200128020820012d000c1035200141106a24000b7e01057f230041106b22012400200028021022030440105c2001103420012001280200360208200120012d00044101713a000c200041146a2802002205200141086a2202105d200220032005105e200041186a20021056200128020820012d000c103610121a0b200028020020002802042000280208200028020c1025000b1b01027f10292200101341c38108410a10402201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a4104105e200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041a4d20828020022046b2002490d01200341086a2004200220046a220010772003280208200328020c20012002107241a4d20820003602000c020b200028020020012002100b1a0c010b20001073200028020020012002100b1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061061200141002002280208200228020c10621a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021026200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310680b5a01037f230041106b2203240020002001200210642104200341086a20002802082000280200220520041065200328020841014704402001200241d88108410f1066000b200328020c2000200420056a360200200341106a24000b5702017f017e230041106b220324002003410036020c200041086a20002802002003410c6a4104106f04402001200241d88108410f1066000b2000200028020041046a3602002003410c6a4104107b200341106a2400a70b1f0020012002200310022201101a21022000200136020420002002453602000b1600200020011040220020022003100b1a2000100c000b3102017f017e230041106b220124002001410036020c20002001410c6a22004104104820004104107b200141106a2400a70b0f00200020012003200210244100470b09002000200110031a0b0c00200020002001101520000b0a0020002000200110160b1801017f10292101417242121001200120004172101920010b0e01017f102922004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100b1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141a8d2082d00000d0141a4d208200636020041a8d20841013a0000200441086a20061070200541002004280208200428020c10621a200041013a00080b4101200120036a220041a4d2082802004b0d011a20042001200010712002200320042802002004280204107241000c010b200041003a0008200520012002200310620b200441106a24000b3d01017f230041106b22022400200241086a419484084190ce0020011061200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d011027000b1027000b2000200220016b36020420002001419484086a3602000bb50201067f2001200346044020012203410f4b04402000410020006b41037122046a210520040440200221010340200020012d00003a0000200141016a2101200041016a22002005490d000b0b2005200320046b2203417c7122066a21000240200220046a22044103710440200641004c0d012004410374220141187121072004417c71220841046a2102410020016b4118712109200828020021010340200520012007762002280200220120097472360200200241046a2102200541046a22052000490d000b0c010b200641004c0d0020042102034020052002280200360200200241046a2102200541046a22052000490d000b0b20034103712103200420066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1027000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041a4d208280200107120002802002001280208200128020c100b1a41a4d208410036020041a8d20841003a00000b200141106a24000b0d00200010292200101b1a20000b080020001074103a0b0b0020002001103b10121a0b3f01017f230041106b22032400200341086a20012002419484084190ce001026200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410621a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c10402101200010433602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041062450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102a200341106a24000f0b20012002418781084111103f000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a0041fc8308410310400b6802027f017e230041106b22032400200020012002107a21002003420037030820001007220441094f04402001200241a68008410e103f000b2003200341086a41082004106120004100200328020022002003280204220110681a20002001107b200341106a24000b1601017f101c4101104f4100104b2100107c200010760b0e00101c4100104f107c1075101d0b2201037f101c4101104f4100104b2100107c2201107522022000106b2001200210760b850201047f230041206b22002400101c4100104f41c88308410a10402101103c200142064200101e100222021002100210022203100222014200101e1002101f20011007450440200141cd8008412010141a0b200041003b010820024100200041086a2201410210681a20012003102a1039200141e78108412010632101200041086a41e7810841201063103a2102200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602082001200041086a22011030200220011032200028020820002d000c1035200041206a24000f0b41e78108412041a68008410e1066000b1600101c4100104f41d28308410b10404200103d101d0b1600101c4100104f41c88308410a10404206103d101d0b0800101c4100104f0b1501017f101c4100104f102922001020200010041a0b1300101c4100104f41c483084104104010041a0b1300101c4101104f41e083084110104c10041a0b1000101c4100104f410a1028106c101d0b0c00101c4100104f420310110b0d00101c4100104f42f40310110b0e00101c4100104f42c09a0c10110b1000101c4100104f4280b4c4c32110110b1f01017f101c4100104f10432200410a1045200041c09a0c1045200010041a0b2101017f101c4100104f10432200420a106e20004280b4c4c321106e200010041a0b9e0101027f230041306b22002400101c4100104f1043220141ba8308410510401045200141bf830841051040104520002001360214200041086a1033200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a1078200028020004402000280204200041186a10300c010b0b200028021820002d001c1035200041306a24000bbc0101057f230041206b22002400101c4100104f10432202410a1028106c10452002410a1028106c41021028106a1045200041086a1033200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410681a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1032200421010c010b0b200028021020002d00141035200041206a24000b1200101c4100104f420a4280b4c4c32110590b2401027f101c4100104f41ba83084105104041bf830841051040210110041a200110041a0b2901027f101c4100104f41ba830841051040410a1028106c210110041a4280b4c4c32110112001101d0b1100101c4101104f4100100d42018610110b1a01017f101c4101104f4100104b2100410210282000106a101d0b2001017f101c4101104f41001038220041c483084104104010031a200010041a0b1c01017f101c4102104f4100104b220020004101104b10162000101d0b6201037f230041106b22002400101c10511050200041003602002000104221022000280200104d104321012000200210520340200028020820002802044f4504402001200041f483084108107a102a10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b22002400101c10511050200041003602002000104221012000280200104d2000200110520340200028020820002802044f450440200041f483084108107d20027c21020c010b0b20021011200041106a24000b6001037f230041106b22002400101c10511050200041003602002000104221022000280200104d106d21012000200210520340200028020820002802044f4504402001200041f483084108107a103a106b0c010b0b2001101d200041106a24000b4501027f230041106b22002400101c4100104f41c483084104104021012000410a1028106c36020c20004280b4c4c321370300200020013602082000105a200041106a24000b9f0102047f017e230041106b22002400101c4101104f230041206b22012400200141086a220210372002102c21032002102d21042002102e21020240200128020c2001280208460440200141186a2d0000044041a4d208410036020041a8d20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e103f000b2000105a200041106a24000b860101057f230041206b22002400101c4100104f41c48308410410402103410a1028106c210410432201420a106e20014280b4c4c321106e1043220241ba8308410510401045200241bf83084105104010452000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1054200041206a24000bba0101067f230041206b22032400101c4101104f200341086a2101230041306b22002400200041086a220210372002104921042002104a2105200041206a2002102b0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e103f000b20011054200341206a24000b0c00101c4100104f420110110b5f02017f017e101c4101104f027f024002404100100f04404100100d22014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e103f000b41dd8308410341808008410d103f000bad42ff018310110b5001037f230041206b22002400101c4100104f41c48308410410402101410a1028106c210220004280b4c4c32137031020002001360204200020023602082000410036020020001057200041206a24000b900101057f230041206b22002400101c4100104f41c48308410410402103410a1028106c210410432201420a106e20014280b4c4c321106e1043220241ba8308410510401045200241bf83084105104010452000411c6a2004360200200041186a200336020020004280b4c4c32137031020002002360208200020013602042000410136020020001057200041206a24000b970202057f027e230041206b22012400101c4101104f230041306b22002400200041086a22021037200041003a00202002200041206a41011048024002400240024020002d00200e020102000b41dd8308410341808008410d103f000b200041086a2202102c21042002102d21062002102e21020c010b200041086a2203104921042003104a2102200041206a2003102b2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e103f000b20011057200141206a24000baf0102037f047e230041306b22002400101c105110502000410036022c200041086a21012000412c6a220228020041acd2082802004e047e420105200241dd8308410310412103200241dd8308410310412104200241dd830841031041210542000b210620012005370318200120043703102001200337030820012006370300200028022c104d2000290308500440200029031820002903202104200029031010111011200410110b200041306a24000b8c0102037f017e230041406a22002400101c4101104f200041a783084107104c36020c200041106a2000410c6a1079106d210120002903102203427f510440102121030b10292102200320002802182001200028021c2000280220200210221a1023200041306a220120021052200141cd8108410b107d200041306a41cd8108410b107d1059200041406b24000b5701027f230041406a22002400101c4101104f200041a783084107104c36023c200041206a2000413c6a1079106d210120004100360210200020013602042000200029022c370308200020002802283602002000105b000b7402037f017e230041206b22002400101c4101104f200041a783084107104c36021c20002000411c6a1079106d210120002802082102200029020c2103200041186a1043360200200041146a411c360200200041e882083602102000200337030820002001360204200020023602002000105b000b7402037f017e230041206b22002400101c4101104f200041a783084107104c36021c20002000411c6a1079106d210120002802082102200029020c2103200041186a1043360200200041146a411d3602002000418483083602102000200337030820002001360204200020023602002000105b000bbd0302057f027e230041f0006b22002400024002400240105c2204107422031007450d00200041286a22012003102a1039200141b48008411910632102200141b48008411910642101104321030340200104402003200041286a41b48008411910631045200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b416c41808408410010141a2004416c10121a2000200210602000280220450d00200041286a200210602000280248450d000240200041286a41e88208411c105f450440200041286a41848308411d105f0d014197820841361000000b105110502000410036026c200041d0006a2201200041ec006a1046200028026c104d20002802502000290358210520002903602106200120031052105120002802542000280258104e0d032005200610590c010b105110502000410036026c200041d0006a2201200041ec006a1046200028026c104d20002802502000290358210520002903602106200120031052105120002802542000280258104e0d022005200610590b200041f0006a24000f0b41b48008411941a68008410e1066000b41cd8208411b1000000b0b89040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080ba103617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f6164647265737361726773766172206172677373756d0070616e6963206f6363757272656400419084080b049cffffff@0500@0000@05".to_string(), + data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f0060017e006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e029c072603656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564001103656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c0008038c018a010c0002050201020b02010114010303010403020102060202051503070908040d0205060101060702020204030103000001020301010301160303050107060108090608080201040102050a0901070803020201070101060c0217050d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005030100030616037f01418080080b7f0041f0d2080b7f0041f0d2080b07a10a34066d656d6f7279020004696e69740082010667657453756d008301036164640084011372657475726e4e667450726f706572746965730085011772657475726e4e6674456e756d50726f706572746965730086011d72657475726e4e6674456e756d4669656c647350726f706572746965730087011572657475726e46756e6769626c6542616c616e63650088011872657475726e4e6f6e46756e6769626c6542616c616e6365008901156e6f4172674e6f52657475726e456e64706f696e74008a010c72657475726e43616c6c6572008b011372657475726e4d616e61676564427566666572008c011572657475726e436f6e747261637441646472657373008d010d72657475726e42696775696e74008e010872657475726e5538008f010972657475726e5531360090010972657475726e5533320091010972657475726e5536340092010c72657475726e5533325665630093010c72657475726e5536345665630094010f72657475726e4275666665725665630095011072657475726e42696775696e745665630096010c72657475726e54776f5536340097011072657475726e54776f427566666572730098012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740099011472657475726e446f75626c654f66553634417267009a011872657475726e446f75626c654f6642696775696e74417267009b011772657475726e417070656e646564427566666572417267009c011772657475726e53756d54776f42696775696e7441726773009d011b72657475726e436f6e6361744d756c746942756666657241726773009e011572657475726e53756d4d756c746955363441726773009f011972657475726e53756d4d756c746942696775696e744172677300a0011272657475726e437573746f6d53747275637400a1011572657475726e437573746f6d53747275637441726700a2012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a3012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a4011072657475726e437573746f6d456e756d00a5011372657475726e437573746f6d456e756d41726700a6011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a7012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a8011d72657475726e437573746f6d456e756d576974684669656c647341726700a9011372657475726e4d756c746956616c756554776f00aa011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400ab012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00ac01396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00ad013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ae010863616c6c4261636b00af011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a7012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a8011d72657475726e437573746f6d456e756d5769746856616c75657341726700a9010a5f5f646174615f656e6403010b5f5f686561705f6261736503020aee498a012e000240200120024d0440200220044d0d011027000b1027000b2000200220016b3602042000200120036a3602000b0b0041808408410e1000000b1301017f102922012000ad42ff0183100120010b1901017f419084084190840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102c21022001102d210320002001102e36020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1043000b200128020c2000200220036a360200200141106a24000b3002017f017e230041106b22012400200142003703082000200141086a22004108104c20004108107f200141106a24000b08002000102c103c0b1d00200028020820011030200029030020011031200028020c200110320baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410620240024020012d000404402000100722044190ce0041a4d20828020022036b4b0d0120022003200320046a22011079200041002002280200200228020410661a41a4d20820013602000c020b20012802002000106b0c010b2001107520012802002000106b0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081062200241106a24000b0a002000103d200110300b3601027f230041106b22012400200141086a103420012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41a8d2082d0000220245044041a8d20841013a000041a4d2084100360200200141086a410010722001280208200128020c418084084100107410470c010b41808408410010440b360200200020024101733a0004200141106a24000b0b0020002001103610041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1075200228020820022d000c044041a4d208410036020041a8d20841003a00000b200241106a24000b0a0020004100103810390b0d00200010292200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103b103c0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0d00200010292200101a1a20000b0f01017f10292201200010191a20010b0c01017f10292200100520000b4c01037f103e210310292102200041feffffff074604402003104041b0d2082002100620020f0b20001007210420031040200041d0d20810081a41b0d20841d0d208200420012002100920020b0b00200041b0d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210421a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210244100470b2e01017f41ed800841171044220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f1029220220002001100c1a20020b0c00200020012002104b10100b2e01017f104721010340200028020041acd2082802004e4504402001200041f083084104104810490c010b0b20010b1301017f10292200418084084100100c1a20000b0c00200020012002104b10380b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bb80102027e027f027f0240200141a183084106104b101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041acd2082802004e04401047210441010c010b200141a1830841061048210441010b0c020b41a18308410641a68008410e1043000b200141a183084106104522024280808080708321032002a72104200141a1830841061045210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b2f01017f2000280200220341acd2082802004e0440200120024187810841111043000b2000200341016a36020020030b3100200041086a2000280200200120021071044041dd8308410341d88108410f1043000b2000200028020020026a3602000b2a01027f2000106a210110472102037f2001047f20022000102d1070200141016b21010c010520020b0b0b2a01027f2000106a210110472102037f2001047f20022000102c1049200141016b21010c010520020b0b0b0c00200010292200101120000b2101017f41001038220210074120470440200020014187820841101043000b20020b1900200041acd2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101320004604400f0b41aa810841191000000b190041acd20828020041004e04400f0b4187810841111000000b0b0041acd20810133602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010074102760b5501027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280210200141086a22021059200041146a2002105a20002002102f200128020820012d000c1035200141106a24000baf0102017e047f230041106b22032400200010074103762001106120001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810661a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011031200621040c010b0b0b5b01027f230041206b220224002000280200220310572001106120022003100736021820024100360214200220003602100340200241086a200241106a107a20022802080440200228020c200110300c0105200241206a24000b0b0bb00101027f230041206b2201240002402000280200450440200141086a1033200120012d000c3a001c200120012802083602184100200141186a2202105c2000280204200210302000290310200210312000280208200210320c010b200141106a1033200120012d00143a001c200120012802103602184101200141186a2202105c200028020420021059200041086a2002105a200041106a2002102f0b200128021820012d001c1035200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011062200241106a24000b0a0020001014200110140b5801027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280208200141086a22021030200029030020021031200028020c20021032200128020820012d000c1035200141106a24000b7e01057f230041106b2201240020002802102203044010602001103420012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210612002200320051062200041186a2002105a200128020820012d000c103610151a0b200028020020002802042000280208200028020c1025000b1b01027f10292200101641c38108410a10442201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041062200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041a4d20828020022046b2002490d01200341086a2004200220046a220010792003280208200328020c20012002107441a4d20820003602000c020b200028020020012002100e1a0c010b20001075200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061065200141002002280208200228020c10661a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021026200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310420b3502017f017e230041106b220324002003410036020c20002003410c6a2200410420012002107d20004104107f200341106a2400a70b1f0020012002200310022201101c21022000200136020420002002453602000b1600200020011044220020022003100e1a2000100f000b3102017f017e230041106b220124002001410036020c20002001410c6a22004104104c20004104107f200141106a2400a70b09002000200110031a0b0c00200020002001101720000b0a0020002000200110180b1801017f10292101417242121001200120004172101b20010b0e01017f102922004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141a8d2082d00000d0141a4d208200636020041a8d20841013a0000200441086a20061072200541002004280208200428020c10661a200041013a00080b4101200120036a220041a4d2082802004b0d011a20042001200010732002200320042802002004280204107441000c010b200041003a0008200520012002200310660b200441106a24000b3d01017f230041106b22022400200241086a419484084190ce0020011065200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d011027000b1027000b2000200220016b36020420002001419484086a3602000bb50201067f2001200346044020012203410f4b04402000410020006b41037122046a210520040440200221010340200020012d00003a0000200141016a2101200041016a22002005490d000b0b2005200320046b2203417c7122066a21000240200220046a22044103710440200641004c0d012004410374220141187121072004417c71220841046a2102410020016b4118712109200828020021010340200520012007762002280200220120097472360200200241046a2102200541046a22052000490d000b0c010b200641004c0d0020042102034020052002280200360200200241046a2102200541046a22052000490d000b0b20034103712103200420066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1027000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041a4d208280200107320002802002001280208200128020c100e1a41a4d208410036020041a8d20841003a00000b200141106a24000b0d00200010292200101d1a20000b080020001076103c0b0b0020002001103d10151a0b3f01017f230041106b22032400200341086a20012002419484084190ce001026200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410661a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c10442101200010473602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041066450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102a200341106a24000f0b200120024187810841111043000b2f00200041086a200028020020012002107104402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107d20012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a0041fc8308410310440b6802027f017e230041106b22032400200020012002107c21002003420037030820001007220441094f04402001200241a68008410e1043000b2003200341086a41082004106520004100200328020022002003280204220110421a20002001107f200341106a24000b1701017f101e410110534100104f2100108001200010780b0f00101e410010531080011077101f0b2301037f101e410110534100104f21001080012201107722022000106d2001200210780bc10101037f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22022000280214102a1039200241e781084120103b21012002103a2102200028022c2000280228460440200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602082001200041086a22011030200220011032200028020820002d000c1035200041406b24000f0b41e78108412041a68008410e1069000ba00202037f017e230041406a22002400101e4100105341c88308410a10442101200041086a103e200110410240024002402000280214102a220110070440200041286a220220011039410121010240024002402002107e41ff01710e020201000b41e78108412041808008410d1069000b200041286a220141e781084120103bad2001103aad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041a4d208410036020041a8d20841003a00000b2001450d010b420010140c010b20001033200020002d00043a000c200020002802003602084101200041086a2201105c2003a7200110302003422088a720011032200028020820002d000c10350b200041406b24000f0b41e78108412041a68008410e1069000be50101047f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22012000280214102a103902402001107e41ff0171450440200041286a220241e781084120103b2002103a2103200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602084100200041086a2202105c20021030200320021032200028020820002d000c1035200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b1600101e4100105341d28308410b10444200103f101f0b1600101e4100105341c88308410a10444206103f101f0b0800101e410010530b1501017f101e41001053102922001020200010041a0b1300101e4100105341c483084104104410041a0b1300101e4101105341e083084110105010041a0b1000101e41001053410a1028106e101f0b0c00101e41001053420310140b0d00101e4100105342f40310140b0e00101e4100105342c09a0c10140b1000101e410010534280b4c4c32110140b1f01017f101e4100105310472200410a1049200041c09a0c1049200010041a0b2101017f101e4100105310472200420a107020004280b4c4c3211070200010041a0b9e0101027f230041306b22002400101e410010531047220141ba8308410510441049200141bf830841051044104920002001360214200041086a1033200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107a200028020004402000280204200041186a10300c010b0b200028021820002d001c1035200041306a24000bbc0101057f230041206b22002400101e4100105310472202410a1028106e10492002410a1028106e41021028106c1049200041086a1033200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410421a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1032200421010c010b0b200028021020002d00141035200041206a24000b1200101e41001053420a4280b4c4c321105d0b2401027f101e4100105341ba83084105104441bf830841051044210110041a200110041a0b2901027f101e4100105341ba830841051044410a1028106e210110041a4280b4c4c32110142001101f0b1100101e410110534100101042018610140b1a01017f101e410110534100104f2100410210282000106c101f0b2001017f101e4101105341001038220041c483084104104410031a200010041a0b1c01017f101e410210534100104f220020004101104f10182000101f0b6201037f230041106b22002400101e105510542000410036020020001046210220002802001051104721012000200210560340200028020820002802044f4504402001200041f483084108107c102a10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400101e1055105420004100360200200010462101200028020010512000200110560340200028020820002802044f450440200041f48308410810810120027c21020c010b0b20021014200041106a24000b6001037f230041106b22002400101e105510542000410036020020001046210220002802001051106f21012000200210560340200028020820002802044f4504402001200041f483084108107c103c106d0c010b0b2001101f200041106a24000b4501027f230041106b22002400101e4100105341c483084104104421012000410a1028106e36020c20004280b4c4c321370300200020013602082000105e200041106a24000b9f0102047f017e230041106b22002400101e41011053230041206b22012400200141086a220210372002102c21032002102d21042002102e21020240200128020c2001280208460440200141186a2d0000044041a4d208410036020041a8d20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1043000b2000105e200041106a24000b860101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1058200041206a24000bba0101067f230041206b22032400101e41011053200341086a2101230041306b22002400200041086a220210372002104d21042002104e2105200041206a2002102b0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1043000b20011058200341206a24000b0c00101e41001053420110140b5f02017f017e101e41011053027f024002404100101204404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1043000b41dd8308410341808008410d1043000bad42ff018310140b5001037f230041206b22002400101e4100105341c48308410410442101410a1028106e210220004280b4c4c3213703102000200136020420002002360208200041003602002000105b200041206a24000b900101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105b200041206a24000b970202057f027e230041206b22012400101e41011053230041306b22002400200041086a22021037200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1043000b200041086a2202102c21042002102d21062002102e21020c010b200041086a2203104d21042003104e2102200041206a2003102b2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1043000b2001105b200141206a24000baf0102037f047e230041306b22002400101e105510542000410036022c200041086a21012000412c6a220228020041acd2082802004e047e420105200241dd8308410310452103200241dd8308410310452104200241dd830841031045210542000b210620012005370318200120043703102001200337030820012006370300200028022c10512000290308500440200029031820002903202104200029031010141014200410140b200041306a24000b8e0102037f017e230041406a22002400101e41011053200041a783084107105036020c200041106a2000410c6a107b106f210120002903102203427f510440102121030b10292102200320002802182001200028021c2000280220200210221a1023200041306a220120021056200141cd8108410b108101200041306a41cd8108410b108101105d200041406b24000b5701027f230041406a22002400101e41011053200041a783084107105036023c200041206a2000413c6a107b106f210120004100360210200020013602042000200029022c370308200020002802283602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411c360200200041e882083602102000200337030820002001360204200020023602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411d3602002000418483083602102000200337030820002001360204200020023602002000105f000bbd0302057f027e230041f0006b2200240002400240024010602204107622031007450d00200041286a22012003102a1039200141b480084119103b2102200141b48008411910672101104721030340200104402003200041286a41b480084119103b1049200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b416c418084084100100c1a2004416c10151a2000200210642000280220450d00200041286a200210642000280248450d000240200041286a41e88208411c1063450440200041286a41848308411d10630d014197820841361000000b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0320052006105d0c010b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0220052006105d0b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b0b89040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080ba103617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f6164647265737361726773766172206172677373756d0070616e6963206f6363757272656400419084080b049cffffff@0500@0000@05".to_string(), }; assert_eq!(tx, expected); @@ -70,7 +70,7 @@ async fn test_deploy_with_metadatas() -> Result<(), NovaXError> { receiver: SYSTEM_SC_DEPLOY_ADDRESS.to_string(), egld_value: 0u8.into(), gas_limit: 600000000u64, - data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60037f7f7f017e60057f7f7f7e7f0060017e0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60057f7f7f7f7f0060027e7f0060027f7e017f60027e7e0060027f7f017e029c072603656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000d03656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000e03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e760f6d4275666665725365744279746573000603656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760d6d616e6167656443616c6c6572000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080386018401130002050201020b020101140103030104030201020205150308040c02050601010607020202040301030000010203010103011603030501070601080906060808020901040102050a09010708030202010701010617050c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005030100030616037f01418080080b7f0041f0d2080b7f0041f0d2080b07e30932066d656d6f7279020004696e6974007e0667657453756d007f036164640080011372657475726e4e667450726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011372657475726e4d756c746956616c756554776f00a4011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a5012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a601396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00a7013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00a8010863616c6c4261636b00a9011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020aa54484012e000240200120024d0440200220044d0d011027000b1027000b2000200220016b3602042000200120036a3602000b0b0041808408410e1000000b1301017f102922012000ad42ff0183100120010b1901017f419084084190840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102c21022001102d210320002001102e36020c20002002360208200020033703000b5801047f230041106b22012400200010672102200141086a200028020820002802002203200210652001280208410147044041dd8308410341d88108410f103f000b200128020c2000200220036a360200200141106a24000b3002017f017e230041106b22012400200142003703082000200141086a22004108104820004108107b200141106a24000b08002000102c103a0b1d00200028020820011030200029030020011031200028020c200110320baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a4104105e0240024020012d000404402000100722044190ce0041a4d20828020022036b4b0d0120022003200320046a22011077200041002002280200200228020410621a41a4d20820013602000c020b2001280200200010690c010b200110732001280200200010690b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a4108105e200241106a24000b0a002000103b200110300b3601027f230041106b22012400200141086a103420012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41a8d2082d0000220245044041a8d20841013a000041a4d2084100360200200141086a410010702001280208200128020c418084084100107210430c010b41808408410010400b360200200020024101733a0004200141106a24000b0b0020002001103610041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1073200228020820022d000c044041a4d208410036020041a8d20841003a00000b200241106a24000b0a0020004100103810390b0d00200010292200100a1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0d0020001029220010181a20000b0f01017f10292201200010171a20010b0c01017f10292200100520000b4c01037f103c210310292102200041feffffff074604402003103e41b0d2082002100620020f0b2000100721042003103e200041d0d20810081a41b0d20841d0d208200420012002100920020b0b00200041b0d20810081a0b2e01017f41ed800841171040220420002001100b1a2004418481084103100b1a200420022003100b1a2004100c000b1101017f102922022000200110141a20020b0c002000200120021047100d0b2e01017f104321010340200028020041acd2082802004e4504402001200041f083084104104410450c010b0b20010b1301017f1029220041808408410010141a20000b0c00200020012002104710380b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100b1a200241106a24000bb80102027e027f027f0240200141a1830841061047100d22024280808080105404402002a7220545200541ebde0146720d01027f200128020041acd2082802004e04401043210441010c010b200141a1830841061044210441010b0c020b41a18308410641a68008410e103f000b200141a183084106104122024280808080708321032002a72104200141a1830841061041210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b2f01017f2000280200220341acd2082802004e044020012002418781084111103f000b2000200341016a36020020030b3100200041086a200028020020012002106f044041dd8308410341d88108410f103f000b2000200028020020026a3602000b2a01027f20001067210110432102037f2001047f20022000102d106e200141016b21010c010520020b0b0b2a01027f20001067210110432102037f2001047f20022000102c1045200141016b21010c010520020b0b0b0c00200010292200100e20000b2101017f4100103822021007412047044020002001418782084110103f000b20020b1900200041acd2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101020004604400f0b41aa810841191000000b190041acd20828020041004e04400f0b4187810841111000000b0b0041acd20810103602000b1f01017f2001105321022000410036020820002002360204200020013602000b0900200010074102760b5501027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280210200141086a22021055200041146a2002105620002002102f200128020820012d000c1035200141106a24000baf0102017e047f230041106b22032400200010074103762001105d20001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810621a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011031200621040c010b0b0b5b01027f230041206b220224002000280200220310532001105d20022003100736021820024100360214200220003602100340200241086a200241106a107820022802080440200228020c200110300c0105200241206a24000b0b0bb00101027f230041206b2201240002402000280200450440200141086a1033200120012d000c3a001c200120012802083602184100200141186a220210582000280204200210302000290310200210312000280208200210320c010b200141106a1033200120012d00143a001c200120012802103602184101200141186a22021058200028020420021055200041086a20021056200041106a2002102f0b200128021820012d001c1035200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a4101105e200241106a24000b0a0020001011200110110b5801027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280208200141086a22021030200029030020021031200028020c20021032200128020820012d000c1035200141106a24000b7e01057f230041106b22012400200028021022030440105c2001103420012001280200360208200120012d00044101713a000c200041146a2802002205200141086a2202105d200220032005105e200041186a20021056200128020820012d000c103610121a0b200028020020002802042000280208200028020c1025000b1b01027f10292200101341c38108410a10402201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a4104105e200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041a4d20828020022046b2002490d01200341086a2004200220046a220010772003280208200328020c20012002107241a4d20820003602000c020b200028020020012002100b1a0c010b20001073200028020020012002100b1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061061200141002002280208200228020c10621a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021026200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310680b5a01037f230041106b2203240020002001200210642104200341086a20002802082000280200220520041065200328020841014704402001200241d88108410f1066000b200328020c2000200420056a360200200341106a24000b5702017f017e230041106b220324002003410036020c200041086a20002802002003410c6a4104106f04402001200241d88108410f1066000b2000200028020041046a3602002003410c6a4104107b200341106a2400a70b1f0020012002200310022201101a21022000200136020420002002453602000b1600200020011040220020022003100b1a2000100c000b3102017f017e230041106b220124002001410036020c20002001410c6a22004104104820004104107b200141106a2400a70b0f00200020012003200210244100470b09002000200110031a0b0c00200020002001101520000b0a0020002000200110160b1801017f10292101417242121001200120004172101920010b0e01017f102922004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100b1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141a8d2082d00000d0141a4d208200636020041a8d20841013a0000200441086a20061070200541002004280208200428020c10621a200041013a00080b4101200120036a220041a4d2082802004b0d011a20042001200010712002200320042802002004280204107241000c010b200041003a0008200520012002200310620b200441106a24000b3d01017f230041106b22022400200241086a419484084190ce0020011061200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d011027000b1027000b2000200220016b36020420002001419484086a3602000bb50201067f2001200346044020012203410f4b04402000410020006b41037122046a210520040440200221010340200020012d00003a0000200141016a2101200041016a22002005490d000b0b2005200320046b2203417c7122066a21000240200220046a22044103710440200641004c0d012004410374220141187121072004417c71220841046a2102410020016b4118712109200828020021010340200520012007762002280200220120097472360200200241046a2102200541046a22052000490d000b0c010b200641004c0d0020042102034020052002280200360200200241046a2102200541046a22052000490d000b0b20034103712103200420066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1027000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041a4d208280200107120002802002001280208200128020c100b1a41a4d208410036020041a8d20841003a00000b200141106a24000b0d00200010292200101b1a20000b080020001074103a0b0b0020002001103b10121a0b3f01017f230041106b22032400200341086a20012002419484084190ce001026200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410621a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c10402101200010433602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041062450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102a200341106a24000f0b20012002418781084111103f000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a0041fc8308410310400b6802027f017e230041106b22032400200020012002107a21002003420037030820001007220441094f04402001200241a68008410e103f000b2003200341086a41082004106120004100200328020022002003280204220110681a20002001107b200341106a24000b1601017f101c4101104f4100104b2100107c200010760b0e00101c4100104f107c1075101d0b2201037f101c4101104f4100104b2100107c2201107522022000106b2001200210760b850201047f230041206b22002400101c4100104f41c88308410a10402101103c200142064200101e100222021002100210022203100222014200101e1002101f20011007450440200141cd8008412010141a0b200041003b010820024100200041086a2201410210681a20012003102a1039200141e78108412010632101200041086a41e7810841201063103a2102200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602082001200041086a22011030200220011032200028020820002d000c1035200041206a24000f0b41e78108412041a68008410e1066000b1600101c4100104f41d28308410b10404200103d101d0b1600101c4100104f41c88308410a10404206103d101d0b0800101c4100104f0b1501017f101c4100104f102922001020200010041a0b1300101c4100104f41c483084104104010041a0b1300101c4101104f41e083084110104c10041a0b1000101c4100104f410a1028106c101d0b0c00101c4100104f420310110b0d00101c4100104f42f40310110b0e00101c4100104f42c09a0c10110b1000101c4100104f4280b4c4c32110110b1f01017f101c4100104f10432200410a1045200041c09a0c1045200010041a0b2101017f101c4100104f10432200420a106e20004280b4c4c321106e200010041a0b9e0101027f230041306b22002400101c4100104f1043220141ba8308410510401045200141bf830841051040104520002001360214200041086a1033200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a1078200028020004402000280204200041186a10300c010b0b200028021820002d001c1035200041306a24000bbc0101057f230041206b22002400101c4100104f10432202410a1028106c10452002410a1028106c41021028106a1045200041086a1033200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410681a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1032200421010c010b0b200028021020002d00141035200041206a24000b1200101c4100104f420a4280b4c4c32110590b2401027f101c4100104f41ba83084105104041bf830841051040210110041a200110041a0b2901027f101c4100104f41ba830841051040410a1028106c210110041a4280b4c4c32110112001101d0b1100101c4101104f4100100d42018610110b1a01017f101c4101104f4100104b2100410210282000106a101d0b2001017f101c4101104f41001038220041c483084104104010031a200010041a0b1c01017f101c4102104f4100104b220020004101104b10162000101d0b6201037f230041106b22002400101c10511050200041003602002000104221022000280200104d104321012000200210520340200028020820002802044f4504402001200041f483084108107a102a10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b22002400101c10511050200041003602002000104221012000280200104d2000200110520340200028020820002802044f450440200041f483084108107d20027c21020c010b0b20021011200041106a24000b6001037f230041106b22002400101c10511050200041003602002000104221022000280200104d106d21012000200210520340200028020820002802044f4504402001200041f483084108107a103a106b0c010b0b2001101d200041106a24000b4501027f230041106b22002400101c4100104f41c483084104104021012000410a1028106c36020c20004280b4c4c321370300200020013602082000105a200041106a24000b9f0102047f017e230041106b22002400101c4101104f230041206b22012400200141086a220210372002102c21032002102d21042002102e21020240200128020c2001280208460440200141186a2d0000044041a4d208410036020041a8d20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e103f000b2000105a200041106a24000b860101057f230041206b22002400101c4100104f41c48308410410402103410a1028106c210410432201420a106e20014280b4c4c321106e1043220241ba8308410510401045200241bf83084105104010452000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1054200041206a24000bba0101067f230041206b22032400101c4101104f200341086a2101230041306b22002400200041086a220210372002104921042002104a2105200041206a2002102b0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e103f000b20011054200341206a24000b0c00101c4100104f420110110b5f02017f017e101c4101104f027f024002404100100f04404100100d22014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e103f000b41dd8308410341808008410d103f000bad42ff018310110b5001037f230041206b22002400101c4100104f41c48308410410402101410a1028106c210220004280b4c4c32137031020002001360204200020023602082000410036020020001057200041206a24000b900101057f230041206b22002400101c4100104f41c48308410410402103410a1028106c210410432201420a106e20014280b4c4c321106e1043220241ba8308410510401045200241bf83084105104010452000411c6a2004360200200041186a200336020020004280b4c4c32137031020002002360208200020013602042000410136020020001057200041206a24000b970202057f027e230041206b22012400101c4101104f230041306b22002400200041086a22021037200041003a00202002200041206a41011048024002400240024020002d00200e020102000b41dd8308410341808008410d103f000b200041086a2202102c21042002102d21062002102e21020c010b200041086a2203104921042003104a2102200041206a2003102b2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e103f000b20011057200141206a24000baf0102037f047e230041306b22002400101c105110502000410036022c200041086a21012000412c6a220228020041acd2082802004e047e420105200241dd8308410310412103200241dd8308410310412104200241dd830841031041210542000b210620012005370318200120043703102001200337030820012006370300200028022c104d2000290308500440200029031820002903202104200029031010111011200410110b200041306a24000b8c0102037f017e230041406a22002400101c4101104f200041a783084107104c36020c200041106a2000410c6a1079106d210120002903102203427f510440102121030b10292102200320002802182001200028021c2000280220200210221a1023200041306a220120021052200141cd8108410b107d200041306a41cd8108410b107d1059200041406b24000b5701027f230041406a22002400101c4101104f200041a783084107104c36023c200041206a2000413c6a1079106d210120004100360210200020013602042000200029022c370308200020002802283602002000105b000b7402037f017e230041206b22002400101c4101104f200041a783084107104c36021c20002000411c6a1079106d210120002802082102200029020c2103200041186a1043360200200041146a411c360200200041e882083602102000200337030820002001360204200020023602002000105b000b7402037f017e230041206b22002400101c4101104f200041a783084107104c36021c20002000411c6a1079106d210120002802082102200029020c2103200041186a1043360200200041146a411d3602002000418483083602102000200337030820002001360204200020023602002000105b000bbd0302057f027e230041f0006b22002400024002400240105c2204107422031007450d00200041286a22012003102a1039200141b48008411910632102200141b48008411910642101104321030340200104402003200041286a41b48008411910631045200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b416c41808408410010141a2004416c10121a2000200210602000280220450d00200041286a200210602000280248450d000240200041286a41e88208411c105f450440200041286a41848308411d105f0d014197820841361000000b105110502000410036026c200041d0006a2201200041ec006a1046200028026c104d20002802502000290358210520002903602106200120031052105120002802542000280258104e0d032005200610590c010b105110502000410036026c200041d0006a2201200041ec006a1046200028026c104d20002802502000290358210520002903602106200120031052105120002802542000280258104e0d022005200610590b200041f0006a24000f0b41b48008411941a68008410e1066000b41cd8208411b1000000b0b89040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080ba103617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f6164647265737361726773766172206172677373756d0070616e6963206f6363757272656400419084080b049cffffff@0500@0500@05".to_string(), + data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f0060017e006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e029c072603656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564001103656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c0008038c018a010c0002050201020b02010114010303010403020102060202051503070908040d0205060101060702020204030103000001020301010301160303050107060108090608080201040102050a0901070803020201070101060c0217050d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005030100030616037f01418080080b7f0041f0d2080b7f0041f0d2080b07a10a34066d656d6f7279020004696e69740082010667657453756d008301036164640084011372657475726e4e667450726f706572746965730085011772657475726e4e6674456e756d50726f706572746965730086011d72657475726e4e6674456e756d4669656c647350726f706572746965730087011572657475726e46756e6769626c6542616c616e63650088011872657475726e4e6f6e46756e6769626c6542616c616e6365008901156e6f4172674e6f52657475726e456e64706f696e74008a010c72657475726e43616c6c6572008b011372657475726e4d616e61676564427566666572008c011572657475726e436f6e747261637441646472657373008d010d72657475726e42696775696e74008e010872657475726e5538008f010972657475726e5531360090010972657475726e5533320091010972657475726e5536340092010c72657475726e5533325665630093010c72657475726e5536345665630094010f72657475726e4275666665725665630095011072657475726e42696775696e745665630096010c72657475726e54776f5536340097011072657475726e54776f427566666572730098012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740099011472657475726e446f75626c654f66553634417267009a011872657475726e446f75626c654f6642696775696e74417267009b011772657475726e417070656e646564427566666572417267009c011772657475726e53756d54776f42696775696e7441726773009d011b72657475726e436f6e6361744d756c746942756666657241726773009e011572657475726e53756d4d756c746955363441726773009f011972657475726e53756d4d756c746942696775696e744172677300a0011272657475726e437573746f6d53747275637400a1011572657475726e437573746f6d53747275637441726700a2012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a3012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a4011072657475726e437573746f6d456e756d00a5011372657475726e437573746f6d456e756d41726700a6011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a7012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a8011d72657475726e437573746f6d456e756d576974684669656c647341726700a9011372657475726e4d756c746956616c756554776f00aa011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400ab012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00ac01396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00ad013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ae010863616c6c4261636b00af011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a7012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a8011d72657475726e437573746f6d456e756d5769746856616c75657341726700a9010a5f5f646174615f656e6403010b5f5f686561705f6261736503020aee498a012e000240200120024d0440200220044d0d011027000b1027000b2000200220016b3602042000200120036a3602000b0b0041808408410e1000000b1301017f102922012000ad42ff0183100120010b1901017f419084084190840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102c21022001102d210320002001102e36020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1043000b200128020c2000200220036a360200200141106a24000b3002017f017e230041106b22012400200142003703082000200141086a22004108104c20004108107f200141106a24000b08002000102c103c0b1d00200028020820011030200029030020011031200028020c200110320baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410620240024020012d000404402000100722044190ce0041a4d20828020022036b4b0d0120022003200320046a22011079200041002002280200200228020410661a41a4d20820013602000c020b20012802002000106b0c010b2001107520012802002000106b0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081062200241106a24000b0a002000103d200110300b3601027f230041106b22012400200141086a103420012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41a8d2082d0000220245044041a8d20841013a000041a4d2084100360200200141086a410010722001280208200128020c418084084100107410470c010b41808408410010440b360200200020024101733a0004200141106a24000b0b0020002001103610041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1075200228020820022d000c044041a4d208410036020041a8d20841003a00000b200241106a24000b0a0020004100103810390b0d00200010292200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103b103c0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0d00200010292200101a1a20000b0f01017f10292201200010191a20010b0c01017f10292200100520000b4c01037f103e210310292102200041feffffff074604402003104041b0d2082002100620020f0b20001007210420031040200041d0d20810081a41b0d20841d0d208200420012002100920020b0b00200041b0d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210421a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210244100470b2e01017f41ed800841171044220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f1029220220002001100c1a20020b0c00200020012002104b10100b2e01017f104721010340200028020041acd2082802004e4504402001200041f083084104104810490c010b0b20010b1301017f10292200418084084100100c1a20000b0c00200020012002104b10380b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bb80102027e027f027f0240200141a183084106104b101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041acd2082802004e04401047210441010c010b200141a1830841061048210441010b0c020b41a18308410641a68008410e1043000b200141a183084106104522024280808080708321032002a72104200141a1830841061045210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b2f01017f2000280200220341acd2082802004e0440200120024187810841111043000b2000200341016a36020020030b3100200041086a2000280200200120021071044041dd8308410341d88108410f1043000b2000200028020020026a3602000b2a01027f2000106a210110472102037f2001047f20022000102d1070200141016b21010c010520020b0b0b2a01027f2000106a210110472102037f2001047f20022000102c1049200141016b21010c010520020b0b0b0c00200010292200101120000b2101017f41001038220210074120470440200020014187820841101043000b20020b1900200041acd2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101320004604400f0b41aa810841191000000b190041acd20828020041004e04400f0b4187810841111000000b0b0041acd20810133602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010074102760b5501027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280210200141086a22021059200041146a2002105a20002002102f200128020820012d000c1035200141106a24000baf0102017e047f230041106b22032400200010074103762001106120001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810661a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011031200621040c010b0b0b5b01027f230041206b220224002000280200220310572001106120022003100736021820024100360214200220003602100340200241086a200241106a107a20022802080440200228020c200110300c0105200241206a24000b0b0bb00101027f230041206b2201240002402000280200450440200141086a1033200120012d000c3a001c200120012802083602184100200141186a2202105c2000280204200210302000290310200210312000280208200210320c010b200141106a1033200120012d00143a001c200120012802103602184101200141186a2202105c200028020420021059200041086a2002105a200041106a2002102f0b200128021820012d001c1035200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011062200241106a24000b0a0020001014200110140b5801027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280208200141086a22021030200029030020021031200028020c20021032200128020820012d000c1035200141106a24000b7e01057f230041106b2201240020002802102203044010602001103420012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210612002200320051062200041186a2002105a200128020820012d000c103610151a0b200028020020002802042000280208200028020c1025000b1b01027f10292200101641c38108410a10442201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041062200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041a4d20828020022046b2002490d01200341086a2004200220046a220010792003280208200328020c20012002107441a4d20820003602000c020b200028020020012002100e1a0c010b20001075200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061065200141002002280208200228020c10661a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021026200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310420b3502017f017e230041106b220324002003410036020c20002003410c6a2200410420012002107d20004104107f200341106a2400a70b1f0020012002200310022201101c21022000200136020420002002453602000b1600200020011044220020022003100e1a2000100f000b3102017f017e230041106b220124002001410036020c20002001410c6a22004104104c20004104107f200141106a2400a70b09002000200110031a0b0c00200020002001101720000b0a0020002000200110180b1801017f10292101417242121001200120004172101b20010b0e01017f102922004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141a8d2082d00000d0141a4d208200636020041a8d20841013a0000200441086a20061072200541002004280208200428020c10661a200041013a00080b4101200120036a220041a4d2082802004b0d011a20042001200010732002200320042802002004280204107441000c010b200041003a0008200520012002200310660b200441106a24000b3d01017f230041106b22022400200241086a419484084190ce0020011065200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d011027000b1027000b2000200220016b36020420002001419484086a3602000bb50201067f2001200346044020012203410f4b04402000410020006b41037122046a210520040440200221010340200020012d00003a0000200141016a2101200041016a22002005490d000b0b2005200320046b2203417c7122066a21000240200220046a22044103710440200641004c0d012004410374220141187121072004417c71220841046a2102410020016b4118712109200828020021010340200520012007762002280200220120097472360200200241046a2102200541046a22052000490d000b0c010b200641004c0d0020042102034020052002280200360200200241046a2102200541046a22052000490d000b0b20034103712103200420066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1027000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041a4d208280200107320002802002001280208200128020c100e1a41a4d208410036020041a8d20841003a00000b200141106a24000b0d00200010292200101d1a20000b080020001076103c0b0b0020002001103d10151a0b3f01017f230041106b22032400200341086a20012002419484084190ce001026200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410661a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c10442101200010473602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041066450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102a200341106a24000f0b200120024187810841111043000b2f00200041086a200028020020012002107104402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107d20012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a0041fc8308410310440b6802027f017e230041106b22032400200020012002107c21002003420037030820001007220441094f04402001200241a68008410e1043000b2003200341086a41082004106520004100200328020022002003280204220110421a20002001107f200341106a24000b1701017f101e410110534100104f2100108001200010780b0f00101e410010531080011077101f0b2301037f101e410110534100104f21001080012201107722022000106d2001200210780bc10101037f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22022000280214102a1039200241e781084120103b21012002103a2102200028022c2000280228460440200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602082001200041086a22011030200220011032200028020820002d000c1035200041406b24000f0b41e78108412041a68008410e1069000ba00202037f017e230041406a22002400101e4100105341c88308410a10442101200041086a103e200110410240024002402000280214102a220110070440200041286a220220011039410121010240024002402002107e41ff01710e020201000b41e78108412041808008410d1069000b200041286a220141e781084120103bad2001103aad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041a4d208410036020041a8d20841003a00000b2001450d010b420010140c010b20001033200020002d00043a000c200020002802003602084101200041086a2201105c2003a7200110302003422088a720011032200028020820002d000c10350b200041406b24000f0b41e78108412041a68008410e1069000be50101047f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22012000280214102a103902402001107e41ff0171450440200041286a220241e781084120103b2002103a2103200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602084100200041086a2202105c20021030200320021032200028020820002d000c1035200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b1600101e4100105341d28308410b10444200103f101f0b1600101e4100105341c88308410a10444206103f101f0b0800101e410010530b1501017f101e41001053102922001020200010041a0b1300101e4100105341c483084104104410041a0b1300101e4101105341e083084110105010041a0b1000101e41001053410a1028106e101f0b0c00101e41001053420310140b0d00101e4100105342f40310140b0e00101e4100105342c09a0c10140b1000101e410010534280b4c4c32110140b1f01017f101e4100105310472200410a1049200041c09a0c1049200010041a0b2101017f101e4100105310472200420a107020004280b4c4c3211070200010041a0b9e0101027f230041306b22002400101e410010531047220141ba8308410510441049200141bf830841051044104920002001360214200041086a1033200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107a200028020004402000280204200041186a10300c010b0b200028021820002d001c1035200041306a24000bbc0101057f230041206b22002400101e4100105310472202410a1028106e10492002410a1028106e41021028106c1049200041086a1033200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410421a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1032200421010c010b0b200028021020002d00141035200041206a24000b1200101e41001053420a4280b4c4c321105d0b2401027f101e4100105341ba83084105104441bf830841051044210110041a200110041a0b2901027f101e4100105341ba830841051044410a1028106e210110041a4280b4c4c32110142001101f0b1100101e410110534100101042018610140b1a01017f101e410110534100104f2100410210282000106c101f0b2001017f101e4101105341001038220041c483084104104410031a200010041a0b1c01017f101e410210534100104f220020004101104f10182000101f0b6201037f230041106b22002400101e105510542000410036020020001046210220002802001051104721012000200210560340200028020820002802044f4504402001200041f483084108107c102a10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400101e1055105420004100360200200010462101200028020010512000200110560340200028020820002802044f450440200041f48308410810810120027c21020c010b0b20021014200041106a24000b6001037f230041106b22002400101e105510542000410036020020001046210220002802001051106f21012000200210560340200028020820002802044f4504402001200041f483084108107c103c106d0c010b0b2001101f200041106a24000b4501027f230041106b22002400101e4100105341c483084104104421012000410a1028106e36020c20004280b4c4c321370300200020013602082000105e200041106a24000b9f0102047f017e230041106b22002400101e41011053230041206b22012400200141086a220210372002102c21032002102d21042002102e21020240200128020c2001280208460440200141186a2d0000044041a4d208410036020041a8d20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1043000b2000105e200041106a24000b860101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1058200041206a24000bba0101067f230041206b22032400101e41011053200341086a2101230041306b22002400200041086a220210372002104d21042002104e2105200041206a2002102b0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1043000b20011058200341206a24000b0c00101e41001053420110140b5f02017f017e101e41011053027f024002404100101204404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1043000b41dd8308410341808008410d1043000bad42ff018310140b5001037f230041206b22002400101e4100105341c48308410410442101410a1028106e210220004280b4c4c3213703102000200136020420002002360208200041003602002000105b200041206a24000b900101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105b200041206a24000b970202057f027e230041206b22012400101e41011053230041306b22002400200041086a22021037200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1043000b200041086a2202102c21042002102d21062002102e21020c010b200041086a2203104d21042003104e2102200041206a2003102b2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1043000b2001105b200141206a24000baf0102037f047e230041306b22002400101e105510542000410036022c200041086a21012000412c6a220228020041acd2082802004e047e420105200241dd8308410310452103200241dd8308410310452104200241dd830841031045210542000b210620012005370318200120043703102001200337030820012006370300200028022c10512000290308500440200029031820002903202104200029031010141014200410140b200041306a24000b8e0102037f017e230041406a22002400101e41011053200041a783084107105036020c200041106a2000410c6a107b106f210120002903102203427f510440102121030b10292102200320002802182001200028021c2000280220200210221a1023200041306a220120021056200141cd8108410b108101200041306a41cd8108410b108101105d200041406b24000b5701027f230041406a22002400101e41011053200041a783084107105036023c200041206a2000413c6a107b106f210120004100360210200020013602042000200029022c370308200020002802283602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411c360200200041e882083602102000200337030820002001360204200020023602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411d3602002000418483083602102000200337030820002001360204200020023602002000105f000bbd0302057f027e230041f0006b2200240002400240024010602204107622031007450d00200041286a22012003102a1039200141b480084119103b2102200141b48008411910672101104721030340200104402003200041286a41b480084119103b1049200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b416c418084084100100c1a2004416c10151a2000200210642000280220450d00200041286a200210642000280248450d000240200041286a41e88208411c1063450440200041286a41848308411d10630d014197820841361000000b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0320052006105d0c010b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0220052006105d0b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b0b89040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080ba103617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f6164647265737361726773766172206172677373756d0070616e6963206f6363757272656400419084080b049cffffff@0500@0500@05".to_string(), }; assert_eq!(tx, expected); diff --git a/tester/core/tests/esdt_attributes.rs b/tester/core/tests/esdt_attributes.rs index 31a867c..42e1b6c 100644 --- a/tester/core/tests/esdt_attributes.rs +++ b/tester/core/tests/esdt_attributes.rs @@ -1,6 +1,9 @@ use base64::Engine; use num_bigint::BigUint; +use novax::errors::{CodingError, NovaXError}; use novax::tester::tester::TestTokenProperties; +use novax::tester::tester::TestEnumProperties; +use novax::tester::tester::TestEnumPropertiesWithFields; #[test] fn test_decode_struct_from_esdt_attributes() { @@ -15,5 +18,89 @@ fn test_decode_struct_from_esdt_attributes() { integer: BigUint::from(10u8), }; + assert_eq!(result, expected); +} + +#[test] +fn test_decode_struct_from_esdt_attributes_invalid() { + let bytes_attributes = b"yooooo"; + let result = TestTokenProperties::from_esdt_attributes( + bytes_attributes + ) + .unwrap_err(); + + let expected = NovaXError::Coding(CodingError::CannotDecodeEsdtAttributes); + + assert_eq!(result, expected); +} + +#[test] +fn test_decode_enum_no_value_from_empty_esdt_attributes() { + let bytes_attributes = base64::engine::general_purpose::STANDARD.decode("").unwrap(); + let result = TestEnumProperties::from_esdt_attributes( + &bytes_attributes + ) + .unwrap(); + + let expected = TestEnumProperties::First; + + assert_eq!(result, expected); +} + +#[test] +fn test_decode_enum_no_value_from_esdt_attributes() { + let bytes_attributes = base64::engine::general_purpose::STANDARD.decode("AA==").unwrap(); + let result = TestEnumProperties::from_esdt_attributes( + &bytes_attributes + ) + .unwrap(); + + let expected = TestEnumProperties::First; + + assert_eq!(result, expected); +} + +#[test] +fn test_decode_enum_with_values_from_esdt_attributes() { + let bytes_attributes = base64::engine::general_purpose::STANDARD.decode("AQAAAAt0ZXN0IGJ1ZmZlcgAAAAEK").unwrap(); + let result = TestEnumProperties::from_esdt_attributes( + &bytes_attributes + ) + .unwrap(); + + let expected = TestEnumProperties::Second( + "test buffer".to_string(), + BigUint::from(10u8) + ); + + assert_eq!(result, expected); +} + +#[test] +fn test_decode_enum_with_fields_from_esdt_attributes() { + let bytes_attributes = base64::engine::general_purpose::STANDARD.decode("AAAAAAt0ZXN0IGJ1ZmZlcgAAAAEK").unwrap(); + let result = TestEnumPropertiesWithFields::from_esdt_attributes( + &bytes_attributes + ) + .unwrap(); + + let expected = TestEnumPropertiesWithFields::First { + buffer_value: "test buffer".to_string(), + integer: BigUint::from(10u8), + }; + + assert_eq!(result, expected); +} + +#[test] +fn test_decode_enum_from_esdt_attributes_invalid() { + let bytes_attributes = b"yooooo"; + let result = TestEnumProperties::from_esdt_attributes( + bytes_attributes + ) + .unwrap_err(); + + let expected = NovaXError::Coding(CodingError::CannotDecodeEsdtAttributes); + assert_eq!(result, expected); } \ No newline at end of file