Use const values directly in tnt addressing
@@ -40,15 +40,15 @@ pub fn hash(to_hash: &str, num: usize) -> String {
}
pub fn make_agent_address(identifier: &str) -> String {
- get_supply_chain_prefix() + &AGENT + &hash(identifier, 62)
+ get_supply_chain_prefix() + AGENT + &hash(identifier, 62)
}
pub fn make_record_address(record_id: &str) -> String {
- get_supply_chain_prefix() + &RECORD + &hash(record_id, 62)
+ get_supply_chain_prefix() + RECORD + &hash(record_id, 62)
}
pub fn make_record_type_address(type_name: &str) -> String {
- get_supply_chain_prefix() + &RECORD_TYPE + &hash(type_name, 62)
+ get_supply_chain_prefix() + RECORD_TYPE + &hash(type_name, 62)
}
pub fn make_property_address(record_id: &str, property_name: &str, page: u32) -> String {
@@ -56,7 +56,7 @@ pub fn make_property_address(record_id: &str, property_name: &str, page: u32) ->
}
pub fn make_property_address_range(record_id: &str) -> String {
- get_supply_chain_prefix() + &PROPERTY + &hash(record_id, 36)
+ get_supply_chain_prefix() + PROPERTY + &hash(record_id, 36)
}
pub fn num_to_page_number(page: u32) -> String {
