Skip to content

Commit

Permalink
[framework] add aptos-token-objects
Browse files Browse the repository at this point in the history
construct the container for aptos-token-objects
migrate examples token-objects to framework/aptos-token-objects
  • Loading branch information
davidiw committed Mar 19, 2023
1 parent ee2da2f commit 50334a9
Show file tree
Hide file tree
Showing 20 changed files with 3,110 additions and 21 deletions.
4 changes: 2 additions & 2 deletions api/src/tests/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn test_gen_object() {
let collection_addr = account_address::create_collection_address(user_addr, "Hero Quest!");
let token_addr = account_address::create_token_address(user_addr, "Hero Quest!", "Wukong");
let object_resource = "0x1::object::ObjectCore";
let token_resource = format!("0x{}::token::Token", user_addr);
let token_resource = "0x4::token::Token";
let hero_resource = format!("0x{}::hero::Hero", user_addr);

let collection0 = context.gen_all_resources(&collection_addr).await;
Expand All @@ -56,7 +56,7 @@ async fn test_gen_object() {
let hero = context.gen_all_resources(&token_addr).await;
let hero_map = to_object(hero);
assert!(hero_map.contains_key(object_resource));
assert!(hero_map.contains_key(&token_resource));
assert!(hero_map.contains_key(token_resource));
assert!(hero_map.contains_key(&hero_resource));
let owner: AccountAddress = hero_map[object_resource]["owner"]
.as_str()
Expand Down
2 changes: 1 addition & 1 deletion aptos-move/e2e-move-tests/src/tests/token_objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn test_basic_token() {
type_params: vec![],
};
let token_obj_tag = StructTag {
address: addr,
address: AccountAddress::from_hex_literal("0x4").unwrap(),
module: Identifier::new("token").unwrap(),
name: Identifier::new("Token").unwrap(),
type_params: vec![],
Expand Down
13 changes: 13 additions & 0 deletions aptos-move/framework/aptos-token-objects/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "AptosTokenObjects"
version = "1.0.0"

[addresses]
std = "0x1"
aptos_std = "0x1"
aptos_framework = "0x1"
aptos_token_objects = "0x4"

[dependencies]
MoveStdlib = { local = "../move-stdlib" }
AptosFramework = { local = "../aptos-framework"}
Loading

0 comments on commit 50334a9

Please sign in to comment.