Skip to content

Unable to use SmartTables #392

Discussion options

You must be logged in to vote

All functions have to use the module name, instead of the type name. Try

module 0x42::example {
  use aptos_std::smart_table::{self, SmartTable};

  fun do_something(){
    let key:u8 = 1;
    let table = smart_table::new<u8, u8>();
    let removed_value = smart_table::remove(&mut table, key);
  }
}

Looks like the docs are wrong and we'll fix it

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@0xblockbard
Comment options

Answer selected by 0xaptosj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants