Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(target_chains/aptos): update libs + toolchain to 4.5.0 #2152

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .github/workflows/ci-aptos-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- uses: actions/checkout@v3

- name: Download CLI
run: wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v3.1.0/aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip
run: wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v4.5.0/aptos-cli-4.5.0-Ubuntu-22.04-x86_64.zip

- name: Unzip CLI
run: unzip aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip
run: unzip aptos-cli-4.5.0-Ubuntu-22.04-x86_64.zip

- name: Run tests
run: ./aptos move test
12 changes: 6 additions & 6 deletions target_chains/aptos/contracts/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ version = "0.0.1"
upgrade_policy = "compatible"

[dependencies]
AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "6f83bc6d02207298b2dee91133d75538789bf582" }
MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "6f83bc6d02207298b2dee91133d75538789bf582" }
AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "6f83bc6d02207298b2dee91133d75538789bf582" }
AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "6f83bc6d02207298b2dee91133d75538789bf582" }
Wormhole = { git = "https://github.com/wormhole-foundation/wormhole.git", subdir = "aptos/wormhole", rev = "b8676f09a6e4a92bbaecb5f3d59b5e9b778de082" }
Deployer = { git = "https://github.com/wormhole-foundation/wormhole.git", subdir = "aptos/deployer", rev = "b8676f09a6e4a92bbaecb5f3d59b5e9b778de082" }
AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "47f0bf397eb5ca43257bfa775a6b28e7b7faf8b3" }
MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "47f0bf397eb5ca43257bfa775a6b28e7b7faf8b3" }
AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "47f0bf397eb5ca43257bfa775a6b28e7b7faf8b3" }
AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "47f0bf397eb5ca43257bfa775a6b28e7b7faf8b3" }
Wormhole = { git = "https://github.com/ali-bahjati/wormhole.git", subdir = "aptos/wormhole", rev = "aptos/upgrade-4.5.0" }
Deployer = { git = "https://github.com/ali-bahjati/wormhole.git", subdir = "aptos/deployer", rev = "aptos/upgrade-4.5.0" }

[addresses]
pyth = "_"
Expand Down
6 changes: 4 additions & 2 deletions target_chains/aptos/contracts/sources/pyth.move
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ module pyth::pyth_test {
data_sources: vector<DataSource>,
update_fee: u64,
to_mint: u64): (BurnCapability<AptosCoin>, MintCapability<AptosCoin>, Coin<AptosCoin>) {
let (burn_capability, mint_capability) = aptos_coin::initialize_for_test(aptos_framework);

// Initialize wormhole with a large message collection fee
wormhole::wormhole_test::setup(100000);

Expand All @@ -563,7 +565,6 @@ module pyth::pyth_test {
let (_pyth, signer_capability) = account::create_resource_account(&deployer, b"pyth");
pyth::init_test(signer_capability, stale_price_threshold, governance_emitter_chain_id, governance_emitter_address, data_sources, update_fee);

let (burn_capability, mint_capability) = aptos_coin::initialize_for_test(aptos_framework);
let coins = coin::mint(to_mint, &mint_capability);
(burn_capability, mint_capability, coins)
}
Expand Down Expand Up @@ -753,6 +754,8 @@ module pyth::pyth_test {
to_mint: u64
): (BurnCapability<AptosCoin>, MintCapability<AptosCoin>, Coin<AptosCoin>) {
let aptos_framework_account = std::account::create_account_for_test(@aptos_framework);
let (burn_capability, mint_capability) = aptos_coin::initialize_for_test(aptos_framework);

std::timestamp::set_time_has_started_for_testing(&aptos_framework_account);
wormhole::init_test(
22,
Expand All @@ -777,7 +780,6 @@ module pyth::pyth_test {
data_sources,
50);

let (burn_capability, mint_capability) = aptos_coin::initialize_for_test(aptos_framework);
let coins = coin::mint(to_mint, &mint_capability);
(burn_capability, mint_capability, coins)
}
Expand Down
Loading