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: change version to sui testnet 1.38.2 #217

Merged
merged 13 commits into from
Nov 27, 2024
Merged
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
5 changes: 5 additions & 0 deletions .changeset/curly-suns-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@axelar-network/axelar-cgp-sui': major
Foivos marked this conversation as resolved.
Show resolved Hide resolved
---

Change to sui testnet-v1.38.2
10 changes: 5 additions & 5 deletions move/abi/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

[move]
version = 3
manifest_digest = "08E67C09D06D1A67017ACC0FC428650D442948374ABD478D0094C61624BB33F2"
manifest_digest = "A231B175183FA2CD5B9C408C16D741D3FA902F681B81144792A483FF5FAD2D4D"
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082"
dependencies = [
{ id = "Sui", name = "Sui" },
]

[[move.package]]
id = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
id = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
]

[move.toolchain-version]
compiler-version = "1.35.2"
edition = "2024.beta"
compiler-version = "1.38.2"
edition = "2024"
flavor = "sui"
4 changes: 2 additions & 2 deletions move/abi/Move.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "Abi"
version = "0.1.0"
edition = "2024.beta"
edition = "2024"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.35.2" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.38.2" }

[addresses]
abi = "0xa0"
3 changes: 2 additions & 1 deletion move/abi/sources/abi.move
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// This module implements ABI encoding/decoding methods for interoperability with EVM message format.
/// This module implements ABI encoding/decoding methods for interoperability
/// with EVM message format.
///
/// ABI Specification: https://docs.soliditylang.org/en/v0.8.26/abi-spec.html
module abi::abi;
Expand Down
10 changes: 5 additions & 5 deletions move/axelar_gateway/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[move]
version = 3
manifest_digest = "E9A0CD1400D2AFF354F91244ACA6D96CD91319A47BFBF47CDCC0347338FD41D2"
manifest_digest = "D73C467DE21B1D00575486851AEC7086768E5D6D0E4DDCBECB0977101BE53CA3"
deps_digest = "F9B494B64F0615AED0E98FC12A85B85ECD2BC5185C22D30E7F67786BB52E507C"
dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
Expand All @@ -13,11 +13,11 @@ dependencies = [

[[move.package]]
id = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
id = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
Expand All @@ -40,6 +40,6 @@ dependencies = [
]

[move.toolchain-version]
compiler-version = "1.35.2"
edition = "2024.beta"
compiler-version = "1.38.2"
edition = "2024"
flavor = "sui"
6 changes: 3 additions & 3 deletions move/axelar_gateway/Move.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "AxelarGateway"
version = "0.1.0"
edition = "2024.beta"
edition = "2024"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.35.2" }
MoveStdlib = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/move-stdlib", rev = "mainnet-v1.35.2" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.38.2" }
MoveStdlib = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/move-stdlib", rev = "testnet-v1.38.2" }
VersionControl = { local = "../version_control" }
Utils = { local = "../utils" }

Expand Down
20 changes: 16 additions & 4 deletions move/axelar_gateway/sources/gateway.move
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,24 @@ entry fun rotate_signers(
)
}

entry fun allow_function(self: &mut Gateway, _: &OwnerCap, version: u64, function_name: String) {
entry fun allow_function(
self: &mut Gateway,
_: &OwnerCap,
version: u64,
function_name: String,
) {
self.value_mut!(b"allow_function").allow_function(version, function_name);
}

entry fun disallow_function(self: &mut Gateway, _: &OwnerCap, version: u64, function_name: String) {
self.value_mut!(b"disallow_function").disallow_function(version, function_name);
entry fun disallow_function(
self: &mut Gateway,
_: &OwnerCap,
version: u64,
function_name: String,
) {
self
.value_mut!(b"disallow_function")
.disallow_function(version, function_name);
}

// ----------------
Expand Down Expand Up @@ -1081,7 +1093,7 @@ fun test_disallow_function() {
let function_name = b"approve_messages".to_ascii_string();

self.disallow_function(&owner_cap, version, function_name);

sui::test_utils::destroy(self);
owner_cap.destroy_for_testing();
}
2 changes: 1 addition & 1 deletion move/axelar_gateway/sources/types/proof.move
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const ESignerNotFound: vector<u8> =
#[error]
const ERedundantSignaturesProvided: vector<u8> =
b"redundant signatures provided";

// -----------------
// Package Functions
// -----------------
Expand Down
11 changes: 6 additions & 5 deletions move/example/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[move]
version = 3
manifest_digest = "2BF8E393A6BC926689C2EF8893266EC21B1C76E0FE59A375A46CB3E88D4C2593"
manifest_digest = "9000A958E0D3E6CFF585787FB438BFFC534547BC22A28DB5816B23C2F29EC7DC"
deps_digest = "CAFAD8A7CF51067FB4358215BECB86BD100DD64E57C2AC8A7AE7D74B688F5965"
dependencies = [
{ id = "AxelarGateway", name = "AxelarGateway" },
Expand Down Expand Up @@ -38,6 +38,7 @@ id = "GasService"
source = { local = "../gas_service" }

dependencies = [
{ id = "AxelarGateway", name = "AxelarGateway" },
{ id = "Sui", name = "Sui" },
{ id = "VersionControl", name = "VersionControl" },
]
Expand All @@ -57,7 +58,7 @@ dependencies = [

[[move.package]]
id = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
id = "RelayerDiscovery"
Expand All @@ -71,7 +72,7 @@ dependencies = [

[[move.package]]
id = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
Expand All @@ -94,6 +95,6 @@ dependencies = [
]

[move.toolchain-version]
compiler-version = "1.35.2"
edition = "2024.beta"
compiler-version = "1.38.2"
edition = "2024"
flavor = "sui"
4 changes: 2 additions & 2 deletions move/example/Move.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "Example"
version = "0.1.0"
edition = "2024.beta"
edition = "2024"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.35.2" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.38.2" }
GasService = { local = "../gas_service" }
AxelarGateway = { local = "../axelar_gateway" }
Utils = { local = "../utils" }
Expand Down
16 changes: 8 additions & 8 deletions move/example/sources/gmp/gmp.move
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module example::gmp;

use axelar_gateway::channel::{Self, Channel, ApprovedMessage};
use axelar_gateway::gateway::{Self, Gateway};
use gas_service::gas_service::GasService;
use example::utils::concat;
use gas_service::gas_service::GasService;
use relayer_discovery::discovery::RelayerDiscovery;
use relayer_discovery::transaction;
use std::ascii::{Self, String};
Expand Down Expand Up @@ -36,10 +36,11 @@ public fun register_transaction(
discovery: &mut RelayerDiscovery,
singleton: &Singleton,
) {
let arguments = vector [
vector[2u8],
concat(vector[0u8], object::id_address(singleton).to_bytes())
];
let arguments =
vector[
vector[2u8],
concat(vector[0u8], object::id_address(singleton).to_bytes()),
];

let transaction = transaction::new_transaction(
true,
Expand Down Expand Up @@ -77,14 +78,13 @@ public fun send_call(
coin: Coin<SUI>,
params: vector<u8>,
) {

let message_ticket = gateway::prepare_message(
&singleton.channel,
destination_chain,
destination_address,
payload,
);
);

gas_service.pay_gas(
&message_ticket,
coin,
Expand Down
2 changes: 1 addition & 1 deletion move/example/sources/its/its.move
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use example::utils::concat;
use gas_service::gas_service::GasService;
use its::coin_info;
use its::coin_management;
use its::discovery as its_discovery;
use its::its::{Self, ITS};
use its::token_id::TokenId;
use its::discovery as its_discovery;
use relayer_discovery::discovery::RelayerDiscovery;
use relayer_discovery::transaction::{Self, Transaction};
use std::ascii::{Self, String};
Expand Down
10 changes: 5 additions & 5 deletions move/gas_service/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[move]
version = 3
manifest_digest = "C04CC08DC1212FBCB4F5A869F32A9607A3C3E3586BC3BEFC0C0F1DBD3CE563CE"
manifest_digest = "B42F61019F82CD818F2BA9772475684AF7EC56ED0D88B4441EE2A8552F9DC1F6"
deps_digest = "060AD7E57DFB13104F21BE5F5C3759D03F0553FC3229247D9A7A6B45F50D03A3"
dependencies = [
{ id = "AxelarGateway", name = "AxelarGateway" },
Expand All @@ -23,11 +23,11 @@ dependencies = [

[[move.package]]
id = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
id = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
Expand All @@ -50,6 +50,6 @@ dependencies = [
]

[move.toolchain-version]
compiler-version = "1.35.2"
edition = "2024.beta"
compiler-version = "1.38.2"
edition = "2024"
flavor = "sui"
4 changes: 2 additions & 2 deletions move/gas_service/Move.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "GasService"
version = "0.1.0"
edition = "2024.beta"
edition = "2024"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.35.2" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.38.2" }
VersionControl = { local = "../version_control" }
AxelarGateway = { local = "../axelar_gateway" }

Expand Down
10 changes: 5 additions & 5 deletions move/governance/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[move]
version = 3
manifest_digest = "B4EA324317AA32AD7EFF65A13D328A551EE7260B59DADB9285251131A0AC0230"
manifest_digest = "CB2A981ECA1F36FE40AF09B3D67DCBF7027A21D1253B06D5F232FA31DB0C6B30"
deps_digest = "397E6A9F7A624706DBDFEE056CE88391A15876868FD18A88504DA74EB458D697"
dependencies = [
{ id = "Abi", name = "Abi" },
Expand Down Expand Up @@ -33,11 +33,11 @@ dependencies = [

[[move.package]]
id = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
id = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.35.2", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.38.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
Expand All @@ -60,6 +60,6 @@ dependencies = [
]

[move.toolchain-version]
compiler-version = "1.35.2"
edition = "2024.beta"
compiler-version = "1.38.2"
edition = "2024"
flavor = "sui"
4 changes: 2 additions & 2 deletions move/governance/Move.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "Governance"
version = "0.1.0"
edition = "2024.beta"
edition = "2024"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.35.2" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.38.2" }
AxelarGateway = { local = "../axelar_gateway" }
Abi = { local = "../abi" }
Utils = { local = "../utils" }
Expand Down
6 changes: 4 additions & 2 deletions move/governance/sources/governance/governance.move
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public struct Governance has key, store {
caps: Table<ID, UpgradeCap>,
}

// This can only be called once since it needs its own upgrade cap which it deletes.
// This can only be called once since it needs its own upgrade cap which it
// deletes.
entry fun new(
trusted_source_chain: String,
trusted_source_address: String,
Expand Down Expand Up @@ -68,7 +69,8 @@ public fun is_governance(
&addr == &self.trusted_source_address
}

// TODO maybe check that the polcy for the upgrade cap has not been tampered with.
// TODO maybe check that the polcy for the upgrade cap has not been tampered
// with.
entry fun take_upgrade_cap(self: &mut Governance, upgrade_cap: UpgradeCap) {
is_cap_new(&upgrade_cap);

Expand Down
Loading