Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/upgrade-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Foivos committed Nov 27, 2024
2 parents 65620d3 + 4e79ae2 commit 0b550c6
Show file tree
Hide file tree
Showing 66 changed files with 613 additions and 306 deletions.
5 changes: 0 additions & 5 deletions .changeset/dull-humans-fold.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/eight-candles-rest.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/eighty-eggs-cross.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fair-dots-explode.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/late-goats-smell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lucky-hounds-tickle.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rich-comics-laugh.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/short-bananas-promise.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ten-goats-kneel.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tough-buttons-obey.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wild-eagles-unite.md

This file was deleted.

25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# @axelar-network/axelar-cgp-sui

## 1.0.0

### Major Changes

- af17dcb: Change to sui testnet-v1.38.2

### Minor Changes

- e8a50a7: added randomness to all axelar gateway tests
- 7dd615b: Removed remote decimals tracking from ITS as it will be handled at the hub.
- 409d52f: Paying for gas now requires the message ticket instead of the call information.
- 952c2e7: Add events to register and remove transaction on relayer discovery
- c165a48: Add allow_function and disallow_function on gas_service
- 167786c: Add allow_function and disallow_function to relayer_discovery.
- ce71858: add allow and disallow functions in ITS
- 9f656e2: Added js e2e tests for squid, and fixed a few things with squid as well.
- ada6fd9: Add a query for version on version_control, change CreatorCap to OwnerCap and allow owner to set allowed functions in gateway
- d0bfec4: move all events of gas service to gas_service::events and all logic to the versioned contract.
- bc498d6: added allow_function and disallow_function to squid

### Patch Changes

- 7a498e9: added events to its trusted address adding and removing
- cd52fed: added access to set flow limit on its and a corresponding event

## 0.8.0

### Minor Changes
Expand Down
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
22 changes: 17 additions & 5 deletions move/axelar_gateway/sources/gateway.move
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,24 @@ entry fun migrate(self: &mut Gateway) {
self.inner.load_value_mut<Gateway_v0>().migrate(version_control());
}

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 @@ -1066,7 +1078,7 @@ fun test_send_message() {

let gateway = dummy(ctx);
gateway.send_message(message_ticket);

utils::assert_event<events::ContractCall>();

sui::test_utils::destroy(gateway);
Expand Down Expand Up @@ -1096,7 +1108,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"
Loading

0 comments on commit 0b550c6

Please sign in to comment.