Skip to content

Commit

Permalink
Merge pull request #178 from aptos-labs/angie/bulk_migrate_script
Browse files Browse the repository at this point in the history
[ans] bulk migrate script
  • Loading branch information
angieyth authored Oct 4, 2023
2 parents 8168649 + d37158e commit 74bc281
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bulk_migrate/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = 'aptos_names_bulk_migrate'
version = '1.0.0'

[addresses]
repository = "_"

[dependencies.bulk]
local = "../bulk"
11 changes: 11 additions & 0 deletions bulk_migrate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This script helps with bulk name renewal as an admin. It will overrule the renewal window and the max renewal period.

Preparation:
1. Update `Move.toml` with the correct `repository` account.
2. Use the owner account to run the script.

Each iteration:
1. Update the script with the appropriate names to renew
2. Update the time period to renew the names for
3. Compile the script: `aptos move compile`
4. Run the script: `aptos move run-script --compiled-script-path bulk_migrate/build/aptos_names_bulk_migrate/bytecode_scripts/main.mv --profile name_owner`
12 changes: 12 additions & 0 deletions bulk_migrate/sources/script.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
script {
use std::string::utf8;

fun main(user: &signer) {
let names = vector [
utf8(b"name01"),
utf8(b"name02"),
];

bulk::bulk::bulk_migrate_domain(user, names);
}
}

0 comments on commit 74bc281

Please sign in to comment.