Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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 @@ -4,6 +4,7 @@
module abstract_account_with_pub_key::abstract_account;

use iota::account;
use iota::authenticator_function;
use iota::dynamic_field;
use iota::package_metadata::PackageMetadataV1;
use std::ascii;
Expand All @@ -21,7 +22,7 @@ public fun create(
public_key: vector<u8>,
ctx: &mut TxContext,
): address {
let authenticator = account::create_auth_function_ref_v1<AbstractAccount>(
let authenticator = authenticator_function::create_auth_function_ref_v1<AbstractAccount>(
package_metadata,
module_name,
function_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

module simple_abstract_account::abstract_account;

use iota::account::{Self, AuthenticatorFunctionRefV1};
use iota::account;
use iota::authenticator_function::{Self, AuthenticatorFunctionRefV1};
use iota::package_metadata::PackageMetadataV1;
use std::ascii;

Expand All @@ -17,7 +18,7 @@ public fun create(
function_name: ascii::String,
ctx: &mut TxContext,
): address {
let authenticator = account::create_auth_function_ref_v1<AbstractAccount>(
let authenticator = authenticator_function::create_auth_function_ref_v1<AbstractAccount>(
package_metadata,
module_name,
function_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ task 1, line 8:
Output for 'crates/iota-adapter-transactional-tests/data/account_abstraction/simple_abstract_account.move':
created: object(2,0)
mutated: object(0,1)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7759600, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7949600, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 10-17:
//# publish --sender A --dependencies simple_abstract_account
Expand All @@ -23,7 +23,7 @@ task 3, line 19:
//# init-abstract-account --sender A --package-metadata object(3,1) --inputs "authenticate" "authenticate" --create-function simple_abstract_account::abstract_account::create --account-type simple_abstract_account::abstract_account::AbstractAccount
created: object(4,0), object(4,1), object(4,2)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6733600, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6847600, storage_rebate: 980400, non_refundable_storage_fee: 0

task 4, line 21:
//# view-object 4,2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module test::authenticate;

use iota::account;
use iota::auth_context::AuthContext;
use iota::authenticator_function;
use iota::coin::Coin;
use iota::iota::IOTA;
use iota::package_metadata::PackageMetadataV1;
Expand All @@ -25,7 +26,7 @@ public fun create(
function_name: ascii::String,
ctx: &mut TxContext,
): address {
let authenticator = account::create_auth_function_ref_v1<AbstractAccount>(
let authenticator = authenticator_function::create_auth_function_ref_v1<AbstractAccount>(
package_metadata,
module_name,
function_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ processed 8 tasks
init:
A: object(0,0)

task 1, lines 8-53:
task 1, lines 8-54:
//# 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: 12646400, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12836400, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, line 55:
task 2, line 56:
//# init-abstract-account --sender A --package-metadata object(1,1) --inputs "authenticate" "authenticate" --create-function test::authenticate::create --account-type test::authenticate::AbstractAccount
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: 6672800, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6786800, storage_rebate: 980400, non_refundable_storage_fee: 0

task 3, line 57:
task 3, line 58:
//# view-object 2,2
Owner: Shared( 3 )
Version: 3
Expand All @@ -30,20 +30,20 @@ Contents: test::authenticate::AbstractAccount {
},
}

task 5, lines 61-63:
task 5, lines 62-64:
//# 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 65-66:
task 6, lines 66-67:
//# abstract --account immshared(2,2) --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: 3351600, storage_rebate: 3351600, non_refundable_storage_fee: 0

task 7, line 68:
task 7, line 69:
//# 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 @@ -11,7 +11,7 @@ task 1, line 8:
Output for 'crates/iota-adapter-transactional-tests/data/account_abstraction/simple_abstract_account.move':
created: object(2,0)
mutated: object(0,1)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7759600, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7949600, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 10-25:
//# publish --sender A --dependencies simple_abstract_account
Expand All @@ -23,25 +23,25 @@ task 3, line 27:
//# init-abstract-account --sender A --package-metadata object(3,1) --inputs "authenticate" "authenticate_hello_world" --create-function simple_abstract_account::abstract_account::create --account-type simple_abstract_account::abstract_account::AbstractAccount
created: object(4,0), object(4,1), object(4,2)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6824800, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6938800, storage_rebate: 980400, non_refundable_storage_fee: 0

task 4, line 29:
//# init-abstract-account --sender A --package-metadata object(3,1) --inputs "authenticate" "authenticate_hello_world" --create-function simple_abstract_account::abstract_account::create --account-type simple_abstract_account::abstract_account::AbstractAccount
created: object(5,0), object(5,1), object(5,2)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6824800, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6938800, storage_rebate: 980400, non_refundable_storage_fee: 0

task 5, line 31:
//# init-abstract-account --sender A --package-metadata object(3,1) --inputs "authenticate" "authenticate_hello_world" --create-function simple_abstract_account::abstract_account::create --account-type simple_abstract_account::abstract_account::AbstractAccount
created: object(6,0), object(6,1), object(6,2)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6824800, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6938800, storage_rebate: 980400, non_refundable_storage_fee: 0

task 6, line 33:
//# view-object 4,1
Owner: Object ID: ( fake(4,2) )
Version: 3
Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Key, iota::account::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount>> {
Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Key, iota::authenticator_function::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount>> {
id: iota::object::UID {
id: iota::object::ID {
bytes: fake(4,1),
Expand All @@ -50,7 +50,7 @@ Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Ke
name: iota::account::AuthenticatorFunctionRefV1Key {
dummy_field: false,
},
value: iota::account::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount> {
value: iota::authenticator_function::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount> {
package: iota::object::ID {
bytes: test,
},
Expand Down Expand Up @@ -117,7 +117,7 @@ task 8, line 37:
//# view-object 5,1
Owner: Object ID: ( fake(5,2) )
Version: 4
Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Key, iota::account::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount>> {
Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Key, iota::authenticator_function::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount>> {
id: iota::object::UID {
id: iota::object::ID {
bytes: fake(5,1),
Expand All @@ -126,7 +126,7 @@ Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Ke
name: iota::account::AuthenticatorFunctionRefV1Key {
dummy_field: false,
},
value: iota::account::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount> {
value: iota::authenticator_function::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount> {
package: iota::object::ID {
bytes: test,
},
Expand Down Expand Up @@ -193,7 +193,7 @@ task 10, line 41:
//# view-object 6,1
Owner: Object ID: ( fake(6,2) )
Version: 5
Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Key, iota::account::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount>> {
Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Key, iota::authenticator_function::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount>> {
id: iota::object::UID {
id: iota::object::ID {
bytes: fake(6,1),
Expand All @@ -202,7 +202,7 @@ Contents: iota::dynamic_field::Field<iota::account::AuthenticatorFunctionRefV1Ke
name: iota::account::AuthenticatorFunctionRefV1Key {
dummy_field: false,
},
value: iota::account::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount> {
value: iota::authenticator_function::AuthenticatorFunctionRefV1<simple_abstract_account::abstract_account::AbstractAccount> {
package: iota::object::ID {
bytes: test,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ task 1, line 8:
Output for 'crates/iota-adapter-transactional-tests/data/account_abstraction/simple_abstract_account.move':
created: object(2,0)
mutated: object(0,1)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7759600, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7949600, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 10-17:
//# publish --sender A --dependencies simple_abstract_account
Expand All @@ -23,7 +23,7 @@ task 3, line 19:
//# init-abstract-account --sender A --package-metadata object(3,1) --inputs "authenticate" "authenticate" --create-function simple_abstract_account::abstract_account::create --account-type simple_abstract_account::abstract_account::AbstractAccount
created: object(4,0), object(4,1), object(4,2)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6733600, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6847600, storage_rebate: 980400, non_refundable_storage_fee: 0

task 4, line 21:
//# view-object 4,2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ task 3, line 36:
Output for 'crates/iota-adapter-transactional-tests/data/account_abstraction/simple_abstract_account.move':
created: object(4,0)
mutated: object(0,2)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7759600, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7949600, storage_rebate: 0, non_refundable_storage_fee: 0

task 4, lines 38-52:
//# publish --sender A --dependencies test_coin simple_abstract_account
Expand All @@ -44,7 +44,7 @@ task 5, line 54:
//# init-abstract-account --sender A --package-metadata object(5,1) --inputs "authenticate" "authenticate" --create-function simple_abstract_account::abstract_account::create --account-type simple_abstract_account::abstract_account::AbstractAccount
created: object(6,0), object(6,1), object(6,2)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6733600, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6847600, storage_rebate: 980400, non_refundable_storage_fee: 0

task 7, lines 59-63:
//# abstract --account immshared(6,2) --auth-inputs immshared(1,0) --ptb-inputs 100 @A
Expand All @@ -55,7 +55,7 @@ gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storag

task 8, lines 64-66:
//# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @account_addr --type-args test_coin::regulated_coin::REGULATED_COIN --sender C
events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: C, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 48, 55, 54, 98, 97, 56, 56, 97, 49, 55, 52, 50, 57, 52, 55, 55, 52, 49, 53, 57, 53, 101, 99, 99, 49, 97, 101, 97, 101, 48, 56, 55, 101, 101, 57, 98, 55, 100, 97, 57, 97, 52, 49, 48, 101, 100, 53, 48, 57, 54, 57, 48, 50, 57, 102, 52, 51, 98, 52, 99, 52, 100, 52, 99, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 199, 5, 172, 1, 35, 180, 154, 59, 97, 32, 107, 240, 43, 9, 249, 162, 212, 234, 119, 215, 193, 192, 207, 234, 90, 207, 140, 39, 219, 160, 113, 229] }
events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: C, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 48, 55, 54, 98, 97, 56, 56, 97, 49, 55, 52, 50, 57, 52, 55, 55, 52, 49, 53, 57, 53, 101, 99, 99, 49, 97, 101, 97, 101, 48, 56, 55, 101, 101, 57, 98, 55, 100, 97, 57, 97, 52, 49, 48, 101, 100, 53, 48, 57, 54, 57, 48, 50, 57, 102, 52, 51, 98, 52, 99, 52, 100, 52, 99, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 94, 8, 145, 4, 69, 172, 130, 45, 12, 155, 194, 102, 134, 200, 124, 34, 119, 240, 26, 175, 149, 201, 188, 115, 90, 237, 176, 32, 151, 206, 118, 211] }
created: object(9,0), object(9,1), object(9,2)
mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,1), object(1,2)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12144800, storage_rebate: 2758800, non_refundable_storage_fee: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ task 1, line 8:
Output for 'crates/iota-adapter-transactional-tests/data/account_abstraction/abstract_account_with_pub_key.move':
created: object(2,0)
mutated: object(0,1)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9158000, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9348000, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 10-35:
//# publish --sender A --dependencies abstract_account_with_pub_key
Expand All @@ -23,7 +23,7 @@ task 3, line 37:
//# init-abstract-account --sender A --package-metadata object(3,1) --inputs "authenticate" "authenticate_ed25519" x"cc62332e34bb2d5cd69f60efbb2a36cb916c7eb458301ea36636c4dbb012bd88" --create-function abstract_account_with_pub_key::abstract_account::create --account-type abstract_account_with_pub_key::abstract_account::AbstractAccount
created: object(4,0), object(4,1), object(4,2), object(4,3)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8892000, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9006000, storage_rebate: 980400, non_refundable_storage_fee: 0

task 4, line 39:
//# view-object 4,0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ task 1, line 8:
Output for 'crates/iota-adapter-transactional-tests/data/account_abstraction/abstract_account_with_pub_key.move':
created: object(2,0)
mutated: object(0,1)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9158000, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9348000, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 10-35:
//# publish --sender A --dependencies abstract_account_with_pub_key
Expand All @@ -23,7 +23,7 @@ task 3, line 37:
//# init-abstract-account --sender A --package-metadata object(3,1) --inputs "authenticate" "authenticate_ed25519" x"cc62332e34bb2d5cd69f60efbb2a36cb916c7eb458301ea36636c4dbb012bd88" --create-function abstract_account_with_pub_key::abstract_account::create --account-type abstract_account_with_pub_key::abstract_account::AbstractAccount
created: object(4,0), object(4,1), object(4,2), object(4,3)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8892000, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9006000, storage_rebate: 980400, non_refundable_storage_fee: 0

task 4, line 39:
//# view-object 4,0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ task 1, line 8:
Output for 'crates/iota-adapter-transactional-tests/data/account_abstraction/abstract_account_with_pub_key.move':
created: object(2,0)
mutated: object(0,1)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9158000, storage_rebate: 0, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9348000, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, lines 10-35:
//# publish --sender A --dependencies abstract_account_with_pub_key
Expand All @@ -23,7 +23,7 @@ task 3, line 37:
//# init-abstract-account --sender A --package-metadata object(3,1) --inputs "authenticate" "authenticate_ed25519" x"cc62332e34bb2d5cd69f60efbb2a36cb916c7eb458301ea36636c4dbb012bd88" --create-function abstract_account_with_pub_key::abstract_account::create --account-type abstract_account_with_pub_key::abstract_account::AbstractAccount
created: object(4,0), object(4,1), object(4,2), object(4,3)
mutated: object(0,0)
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8892000, storage_rebate: 980400, non_refundable_storage_fee: 0
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9006000, storage_rebate: 980400, non_refundable_storage_fee: 0

task 4, line 39:
//# view-object 4,0
Expand Down
Loading
Loading