From d37158ee79ec2547067da03a3067df65e009eee6 Mon Sep 17 00:00:00 2001 From: angieyth Date: Wed, 4 Oct 2023 14:08:31 -0700 Subject: [PATCH] [ans] bulk migrate script --- bulk_migrate/Move.toml | 9 +++++++++ bulk_migrate/README.md | 11 +++++++++++ bulk_migrate/sources/script.move | 12 ++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 bulk_migrate/Move.toml create mode 100644 bulk_migrate/README.md create mode 100644 bulk_migrate/sources/script.move diff --git a/bulk_migrate/Move.toml b/bulk_migrate/Move.toml new file mode 100644 index 00000000..d4ef6a27 --- /dev/null +++ b/bulk_migrate/Move.toml @@ -0,0 +1,9 @@ +[package] +name = 'aptos_names_bulk_migrate' +version = '1.0.0' + +[addresses] +repository = "_" + +[dependencies.bulk] +local = "../bulk" diff --git a/bulk_migrate/README.md b/bulk_migrate/README.md new file mode 100644 index 00000000..5b1b401f --- /dev/null +++ b/bulk_migrate/README.md @@ -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` diff --git a/bulk_migrate/sources/script.move b/bulk_migrate/sources/script.move new file mode 100644 index 00000000..0ac7cdc7 --- /dev/null +++ b/bulk_migrate/sources/script.move @@ -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); + } +}