Closed DenisCarriere closed 1 year ago
Using example Rust EOSIO library, doesn't produce the right SymbolCode
use eosio::*; #[test] fn test_symbol_code() { assert_eq!(SymbolCode::new(5197638).to_string(), "FOO"); assert_eq!(Name::from_str("........dxboa").unwrap().as_u64(), 5197638); }
failures: ---- abi::test_symbol_code stdout ---- thread 'abi::test_symbol_code' panicked at 'assertion failed: `(left == right)` left: `"SOE"`, right: `"EOS"`', substreams/eosio.token/src/abi.rs:208:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ eosc tools names FOO from \ to hex hex_be hex_rev_u32 name uint64 symbol symbol_code --------- --- ------ ----------- ---- ------ ------ ----------- name 0000000000000000 0000000000000000 ffffffff 0 0, - symbol_code 464f4f0000000000 00000000004f4f46 ffb0b0b9 ........dxboa 5197638 70,OO FOO
What do we want to do with it? The crate hasn't been updated for 3 years: https://crates.io/crates/eosio Do you know its maintainers?
SymbolCode .raw() & to_string() works with the current test cases
.raw()
to_string()
Using example Rust EOSIO library, doesn't produce the right SymbolCode
❌ Failure
Expected Output