-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a6ea55
commit f77d79e
Showing
5 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/move/account_abstraction/sources/add_permission_delegation.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
script { | ||
use aptos_framework::coin::{Self}; | ||
use aptos_framework::transaction_validation::{Self}; | ||
use aptos_framework::primary_fungible_store::{Self}; | ||
use aptos_framework::account_abstraction::{Self}; | ||
use aptos_framework::permissioned_delegation::{Self}; | ||
use aptos_std::ed25519; | ||
use std::string::utf8; | ||
use std::option; | ||
|
||
fun main(sender: &signer, sender_public_key: vector<u8>) { | ||
coin::migrate_to_fungible_store<aptos_framework::aptos_coin::AptosCoin>(sender); | ||
let key = permissioned_delegation::gen_ed25519_key(ed25519::new_unvalidated_public_key_from_bytes(sender_public_key)); | ||
let permissioned_signer = permissioned_delegation::add_permissioned_handle(sender, key, option::none(), 10000000000000); | ||
primary_fungible_store::grant_apt_permission(sender, &permissioned_signer, 100000000); | ||
transaction_validation::grant_gas_permission(sender, &permissioned_signer, 100000000); // 1 apt because that is the max_gas | ||
account_abstraction::add_dispatchable_authentication_function(sender, @aptos_framework, utf8(b"permissioned_delegation"), utf8(b"authenticate"));// 10 apt | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
tests/move/account_abstraction/sources/hello_world_authenticator.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters