Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ public fun create(
authenticator: AuthenticatorInfoV1<AbstractAccount>,
ctx: &mut TxContext,
): address {
let mut account = AbstractAccount { id: object::new(ctx) };
let authenticator_compatibility_proof = account::check_auth_info_v1_compatibility(
&account,
authenticator,
);
account::attach_auth_info_v1(&mut account.id, authenticator_compatibility_proof);
let account = AbstractAccount { id: object::new(ctx) };

let account_address = object::id_address(&account);
iota::transfer::share_object(account);

account::create_shared_account_v1(account, authenticator);

account_address
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ processed 5 tasks
init:
A: object(0,0)

task 1, lines 8-35:
task 1, lines 8-33:
//# publish --sender A
created: object(1,0), object(1,1)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11225200, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10032000, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 37-39:
task 2, lines 35-37:
//# programmable --sender A --inputs x"10" object(1,1) "abstract_account" "authenticate"
//> 0: iota::account::create_auth_info_v1<test::abstract_account::AbstractAccount>(Input(1), Input(2), Input(3));
//> 1: test::abstract_account::create(Input(0), Result(0));
created: object(2,0), object(2,1)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5677200, storage_rebate: 980400, non_refundable_storage_fee: 0

task 3, line 41:
task 3, line 39:
//# view-object 2,1
Owner: Shared( 3 )
Version: 3
Expand All @@ -32,6 +32,6 @@ Contents: test::abstract_account::AbstractAccount {
},
}

task 4, lines 43-45:
task 4, lines 41-43:
//# abstract --account immshared(2,1) --ptb-inputs 100 @A
Error: Error checking transaction input objects: GasObjectNotOwnedObject { owner: Shared { initial_shared_version: SequenceNumber(3) } }
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ public fun create(
authenticator: AuthenticatorInfoV1<AbstractAccount>,
ctx: &mut TxContext,
): address {
let mut account = AbstractAccount { id: object::new(ctx) };
let authenticator_compatibility_proof = account::check_auth_info_v1_compatibility(
&account,
authenticator,
);
account::attach_auth_info_v1(&mut account.id, authenticator_compatibility_proof);
let account = AbstractAccount { id: object::new(ctx) };

let account_address = object::id_address(&account);
iota::transfer::share_object(account);

account::create_shared_account_v1(account, authenticator);

account_address
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ processed 6 tasks
init:
A: object(0,0)

task 1, lines 8-35:
task 1, lines 8-33:
//# publish --sender A
created: object(1,0), object(1,1)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11225200, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10032000, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 37-41:
task 2, lines 35-39:
//# programmable --sender A --inputs x"10" object(1,1) "abstract_account" "authenticate" 7000000000
//> 0: iota::account::create_auth_info_v1<test::abstract_account::AbstractAccount>(Input(1), Input(2), Input(3));
//> 1: test::abstract_account::create(Input(0), Result(0));
Expand All @@ -22,7 +22,7 @@ created: object(2,0), object(2,1), object(2,2)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6657600, storage_rebate: 980400, non_refundable_storage_fee: 0

task 3, line 43:
task 3, line 41:
//# view-object 2,0
Owner: Account Address ( fake(2,2) )
Version: 3
Expand All @@ -37,7 +37,7 @@ Contents: iota::coin::Coin<iota::iota::IOTA> {
},
}

task 4, line 45:
task 4, line 43:
//# view-object 2,2
Owner: Shared( 3 )
Version: 3
Expand All @@ -49,6 +49,6 @@ Contents: test::abstract_account::AbstractAccount {
},
}

task 5, lines 47-48:
task 5, lines 45-46:
//# abstract --account object(2,2) --gas-payment 2,0 --ptb-inputs 100 @A
Error: Error checking transaction input objects: Unsupported("MoveAuthenticator cannot authenticate mutable shared objects")
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ public fun create(
authenticator: AuthenticatorInfoV1<AbstractAccount>,
ctx: &mut TxContext,
): address {
let mut account = AbstractAccount { id: object::new(ctx) };
let authenticator_compatibility_proof = account::check_auth_info_v1_compatibility(
&account,
authenticator,
);
account::attach_auth_info_v1(&mut account.id, authenticator_compatibility_proof);
let account = AbstractAccount { id: object::new(ctx) };

let account_address = object::id_address(&account);
iota::transfer::share_object(account);

account::create_shared_account_v1(account, authenticator);

account_address
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ processed 8 tasks
init:
A: object(0,0)

task 1, lines 8-46:
task 1, lines 8-44:
//# publish --sender A
created: object(1,0), object(1,1)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12737600, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11696400, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 48-52:
task 2, lines 46-50:
//# programmable --sender A --inputs x"10" object(1,1) "abstract_account" "authenticate" 7000000000
//> 0: iota::account::create_auth_info_v1<test::abstract_account::AbstractAccount>(Input(1), Input(2), Input(3));
//> 1: test::abstract_account::create(Input(0), Result(0));
Expand All @@ -22,7 +22,7 @@ created: object(2,0), object(2,1), object(2,2)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6657600, storage_rebate: 980400, non_refundable_storage_fee: 0

task 3, line 54:
task 3, line 52:
//# view-object 2,2
Owner: Shared( 3 )
Version: 3
Expand All @@ -34,20 +34,20 @@ Contents: test::abstract_account::AbstractAccount {
},
}

task 5, lines 58-60:
task 5, lines 56-58:
//# programmable --sender A --inputs 2000000000 @a_account
//> 0: SplitCoins(Gas, [Input(0)]);
//> 1: TransferObjects([Result(0)], Input(1));
created: object(5,0)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0

task 6, lines 62-63:
task 6, lines 60-61:
//# abstract --account immshared(2,2) --gas-payment 2,0 --ptb-inputs object(2,2) receiving(5,0)
mutated: object(2,0), object(2,2), object(5,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3382000, storage_rebate: 3382000, non_refundable_storage_fee: 0

task 7, line 65:
task 7, line 63:
//# view-object 5,0
Owner: Account Address ( a_account )
Version: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ public fun create(
authenticator: AuthenticatorInfoV1<AbstractAccount>,
ctx: &mut TxContext,
) {
let mut account = AbstractAccount { id: object::new(ctx) };
let authenticator_compatibility_proof = account::check_auth_info_v1_compatibility(
&account,
authenticator,
);
account::attach_auth_info_v1(&mut account.id, authenticator_compatibility_proof);
iota::transfer::share_object(account);
let account = AbstractAccount { id: object::new(ctx) };

account::create_shared_account_v1(account, authenticator);
}

#[authenticator]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ processed 6 tasks
init:
A: object(0,0)

task 1, lines 8-33:
task 1, lines 8-29:
//# publish --sender A
created: object(1,0), object(1,1)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10966800, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9720400, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 35-37:
task 2, lines 31-33:
//# programmable --sender A --inputs x"10" object(1,1) "abstract_account" "authenticate" 7000000000
//> 0: iota::account::create_auth_info_v1<test::abstract_account::AbstractAccount>(Input(1), Input(2), Input(3));
//> 1: test::abstract_account::create(Input(0), Result(0));
created: object(2,0), object(2,1)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5677200, storage_rebate: 980400, non_refundable_storage_fee: 0

task 3, line 39:
task 3, line 35:
//# view-object 2,1
Owner: Shared( 3 )
Version: 3
Expand All @@ -32,14 +32,14 @@ Contents: test::abstract_account::AbstractAccount {
},
}

task 4, lines 41-43:
task 4, lines 37-39:
//# abstract --account immshared(2,1) --sponsor A --ptb-inputs 100 @A
created: object(4,0)
mutated: object(0,0)
unchanged_shared: object(2,1)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0

task 5, line 45:
task 5, line 41:
//# view-object 4,0
Owner: Account Address ( A )
Version: 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ public fun create(
ctx: &mut TxContext,
): address {
let mut account = AbstractAccount { id: object::new(ctx) };
let authenticator_compatibility_proof = account::check_auth_info_v1_compatibility(
&account,
authenticator,
);
account::attach_auth_info_v1(&mut account.id, authenticator_compatibility_proof);

dynamic_field::add(&mut account.id, OwnerPublicKey {}, public_key);

let account_address = object::id_address(&account);
iota::transfer::share_object(account);

account::create_shared_account_v1(account, authenticator);

account_address
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ processed 7 tasks
init:
A: object(0,0)

task 1, lines 8-57:
task 1, lines 8-56:
//# publish --sender A
created: object(1,0), object(1,1)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13322800, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12182800, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 59-63:
task 2, lines 58-62:
//# programmable --sender A --inputs x"cc62332e34bb2d5cd69f60efbb2a36cb916c7eb458301ea36636c4dbb012bd88" object(1,1) "abstract_account" "authenticate_ed25519" 7000000000
//> 0: iota::account::create_auth_info_v1<test::abstract_account::AbstractAccount>(Input(1), Input(2), Input(3));
//> 1: test::abstract_account::create(Input(0), Result(0));
Expand All @@ -22,7 +22,7 @@ created: object(2,0), object(2,1), object(2,2), object(2,3)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8816000, storage_rebate: 980400, non_refundable_storage_fee: 0

task 3, line 65:
task 3, line 64:
//# view-object 2,3
Owner: Shared( 3 )
Version: 3
Expand All @@ -34,7 +34,7 @@ Contents: test::abstract_account::AbstractAccount {
},
}

task 4, line 67:
task 4, line 66:
//# view-object 2,0
Owner: Account Address ( fake(2,3) )
Version: 3
Expand All @@ -49,14 +49,14 @@ Contents: iota::coin::Coin<iota::iota::IOTA> {
},
}

task 5, lines 69-71:
task 5, lines 68-70:
//# abstract --account immshared(2,3) --gas-payment 2,0 --auth-inputs x"cce72947906dbae4c166fc01fd096432784032be43db540909bc901dbc057992b4d655ca4f4355cf0868e1266baacf6919902969f063e74162f8f04bc4056105" x"315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3" --ptb-inputs 100 @A
created: object(5,0)
mutated: object(2,0)
unchanged_shared: object(2,3)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0

task 6, line 73:
task 6, line 72:
//# view-object 5,0
Owner: Account Address ( A )
Version: 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ public fun create(
ctx: &mut TxContext,
): address {
let mut account = AbstractAccount { id: object::new(ctx) };
let authenticator_compatibility_proof = account::check_auth_info_v1_compatibility(
&account,
authenticator,
);
account::attach_auth_info_v1(&mut account.id, authenticator_compatibility_proof);

dynamic_field::add(&mut account.id, OwnerPublicKey {}, public_key);

let account_address = object::id_address(&account);
iota::transfer::share_object(account);

account::create_shared_account_v1(account, authenticator);

account_address
}

Expand Down Expand Up @@ -68,4 +67,4 @@ public fun authenticate_ed25519(

//# abstract --account immshared(2,3) --gas-payment 2,0 --auth-inputs x"cce72947906dbae4c166fc01fd096432784032be43db540909bc901dbc057992b4d655ca4f4355cf0868e1266baacf6919902969f063e74162f8f04bc4056105" x"315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c10000edd3" --ptb-inputs 100 @A
//> 0: SplitCoins(Gas, [Input(0)]);
//> 1: TransferObjects([Result(0)], Input(1));
//> 1: TransferObjects([Result(0)], Input(1));
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ processed 6 tasks
init:
A: object(0,0)

task 1, lines 8-57:
task 1, lines 8-56:
//# publish --sender A
created: object(1,0), object(1,1)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13322800, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12182800, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 59-63:
task 2, lines 58-62:
//# programmable --sender A --inputs x"cc62332e34bb2d5cd69f60efbb2a36cb916c7eb458301ea36636c4dbb012bd88" object(1,1) "abstract_account" "authenticate_ed25519" 7000000000
//> 0: iota::account::create_auth_info_v1<test::abstract_account::AbstractAccount>(Input(1), Input(2), Input(3));
//> 1: test::abstract_account::create(Input(0), Result(0));
Expand All @@ -22,7 +22,7 @@ created: object(2,0), object(2,1), object(2,2), object(2,3)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8816000, storage_rebate: 980400, non_refundable_storage_fee: 0

task 3, line 65:
task 3, line 64:
//# view-object 2,3
Owner: Shared( 3 )
Version: 3
Expand All @@ -34,7 +34,7 @@ Contents: test::abstract_account::AbstractAccount {
},
}

task 4, line 67:
task 4, line 66:
//# view-object 2,0
Owner: Account Address ( fake(2,3) )
Version: 3
Expand All @@ -49,6 +49,6 @@ Contents: iota::coin::Coin<iota::iota::IOTA> {
},
}

task 5, lines 69-71:
task 5, lines 68-70:
//# abstract --account immshared(2,3) --gas-payment 2,0 --auth-inputs x"cce72947906dbae4c166fc01fd096432784032be43db540909bc901dbc057992b4d655ca4f4355cf0868e1266baacf6919902969f063e74162f8f04bc4056105" x"315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c10000edd3" --ptb-inputs 100 @A
Error: Failed to execute the Move authenticator, reason: "ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: object(1,0), name: Identifier(\"abstract_account\") }, function: 1, instruction: 11, function_name: Some(\"authenticate_ed25519\") }, 0), source: Some(VMError { major_status: ABORTED, sub_status: Some(0), message: Some(\"object(1,0)::abstract_account::authenticate_ed25519 at offset 11\"), exec_state: None, location: Module(ModuleId { address: object(1,0), name: Identifier(\"abstract_account\") }), indices: [], offsets: [(FunctionDefinitionIndex(1), 11)] }), command: Some(0) } }".
Loading
Loading