diff --git a/move/axelar_gateway/sources/gateway.move b/move/axelar_gateway/sources/gateway.move index 5f1ade98..cbb5d72b 100644 --- a/move/axelar_gateway/sources/gateway.move +++ b/move/axelar_gateway/sources/gateway.move @@ -1091,7 +1091,7 @@ fun test_allow_function() { let ctx = &mut sui::tx_context::dummy(); let mut self = dummy(ctx); let owner_cap = owner_cap::create(ctx); - let version = 0; + let version = VERSION; let function_name = b"function_name".to_ascii_string(); self.allow_function(&owner_cap, version, function_name); @@ -1105,7 +1105,7 @@ fun test_disallow_function() { let ctx = &mut sui::tx_context::dummy(); let mut self = dummy(ctx); let owner_cap = owner_cap::create(ctx); - let version = 0; + let version = VERSION; let function_name = b"approve_messages".to_ascii_string(); self.disallow_function(&owner_cap, version, function_name); diff --git a/move/axelar_gateway/sources/versioned/gateway_v1.move b/move/axelar_gateway/sources/versioned/gateway_v1.move index b922ae7d..ab18dc30 100644 --- a/move/axelar_gateway/sources/versioned/gateway_v1.move +++ b/move/axelar_gateway/sources/versioned/gateway_v1.move @@ -221,6 +221,22 @@ public(package) fun send_message( ); } +public(package) fun allow_function( + self: &mut Gateway_v1, + version: u64, + function_name: String, +) { + self.version_control.allow_function(version, function_name); +} + +public(package) fun disallow_function( + self: &mut Gateway_v1, + version: u64, + function_name: String, +) { + self.version_control.disallow_function(version, function_name); +} + // ----------------- // Private Functions // -----------------