Skip to content

Commit 179f2d3

Browse files
l-monningerandygolaymusitdevmzabaluev0xmovses
authored
Upgrade Framework Script w/ Burn (#1084)
Co-authored-by: Andy Golay <[email protected]> Co-authored-by: musitdev <[email protected]> Co-authored-by: Mikhail Zabaluev <[email protected]> Co-authored-by: Richard Melkonian <[email protected]> Co-authored-by: Icarus131 <[email protected]> Co-authored-by: primata <[email protected]> Co-authored-by: Icarus131 <[email protected]> Co-authored-by: Richard Melkonian <[email protected]> Co-authored-by: Radu Popa <[email protected]>
1 parent bc45d4f commit 179f2d3

File tree

7 files changed

+22
-16
lines changed

7 files changed

+22
-16
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

process-compose/movement-full-node/process-compose.test-migrate-elsa-to-biarritz-rc1.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ processes:
55
setup:
66
environment:
77
- "KNOWN_FRAMEWORK_RELEASE=elsa"
8+
- APTOS_ACCOUNT_WHITELIST=$DOT_MOVEMENT_PATH/default_signer_address_whitelist
9+
- MAPTOS_PRIVATE_KEY=random
810

911
test-migrate-elsa-to-biarritz-rc1:
1012
command: |

protocol-units/bridge/contracts/minter/sources/minter.move

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ script {
44

55
fun main(core_resources: &signer) {
66

7-
let core_signer = aptos_governance::get_signer_testnet_only(core_resources, @0x1);
8-
9-
let framework_signer = &core_signer;
10-
11-
transaction_fee::burn_from(framework_signer, @0xdead, 4);
7+
let core_signer = aptos_governance::get_signer_testnet_only(core_resources, @0x1);
128

9+
let framework_signer = &core_signer;
10+
transaction_fee::burn_from(framework_signer, @0xdead, 4);
1311
}
14-
}
12+
}

protocol-units/execution/maptos/framework/releases/biarritz-rc1/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use maptos_framework_release_util::commit_hash_with_script;
55
commit_hash_with_script!(
66
BiarritzRc1, // Struct name
77
"https://github.com/movementlabsxyz/aptos-core.git", // Repository URL
8-
"aa45303216be96ea30d361ab7eb2e95fb08c2dcb", // Commit hash
8+
"27397b5835e6a466c06c884a395653c9ff13d1fe", // Commit hash
99
6, // Bytecode version
1010
"biarritz-rc1.mrb", // MRB file name
1111
"CACHE_BIARRITZ_RC1_FRAMEWORK_RELEASE" // Cache environment variable for Elsa

protocol-units/execution/maptos/framework/releases/biarritz-rc1/src/cached.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use maptos_framework_release_util::mrb_release;
44
mrb_release!(
55
BiarritzRc1,
66
BIARRTIZ_RC1,
7-
"aa45303216be96ea30d361ab7eb2e95fb08c2dcb-biarritz-rc1.mrb"
7+
"27397b5835e6a466c06c884a395653c9ff13d1fe-biarritz-rc1.mrb"
88
);
99

1010
generate_gas_upgrade_module!(gas_upgrade, BiarritzRc1, {
@@ -28,16 +28,21 @@ pub mod script {
2828
script {
2929
use aptos_framework::aptos_governance;
3030
use aptos_framework::gas_schedule;
31-
use aptos_framework::governed_gas_pool;
31+
use aptos_framework::governed_gas_pool;
32+
use aptos_framework::aptos_coin;
33+
use aptos_framework::signer;
3234
3335
fun main(core_resources: &signer) {
34-
let core_signer = aptos_governance::get_signer_testnet_only(core_resources, @0x1);
36+
let core_signer = aptos_governance::get_signer_testnet_only(core_resources, @0000000000000000000000000000000000000000000000000000000000000001);
3537
36-
let framework_signer = &core_signer;
38+
let core_address: address = signer::address_of(core_resources);
3739
38-
governed_gas_pool::initialize(framework_signer, b"aptos_framework::governed_gas_pool");
40+
// this initialize function is idempotent, already initialized GGP will not error.
41+
governed_gas_pool::initialize(&core_signer, b"aptos_framework::governed_gas_pool");
3942
40-
}
43+
// this will burn the mint capability for the core_resource signer
44+
aptos_coin::destroy_mint_capability_from(&core_signer, core_address);
45+
}
4146
}
4247
"#
4348
.to_string()

protocol-units/execution/maptos/framework/releases/biarritz-rc1/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use maptos_framework_release_util::commit_hash_with_script;
77
commit_hash_with_script!(
88
BiarritzRc1, // Struct name
99
"https://github.com/movementlabsxyz/aptos-core.git", // Repository URL
10-
"aa45303216be96ea30d361ab7eb2e95fb08c2dcb", // Commit hash
10+
"27397b5835e6a466c06c884a395653c9ff13d1fe", // Commit hash
1111
6, // Bytecode version
1212
"biarritz-rc1.mrb", // MRB file name
1313
"CACHE_BIARRITZ_RC1_FRAMEWORK_RELEASE" // Cache environment variable for Elsa
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 0335e8f7e1bd1e8d8329fd300aea2ef2f36dd19f

0 commit comments

Comments
 (0)