From 794e71fc891ca8e9b1c5e583fcc8a226a1062305 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Tue, 29 Oct 2024 12:31:51 +0000 Subject: [PATCH 1/2] fix: remove transfer_from on moveth --- .../bridge/move-modules/sources/MOVETH.move | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/protocol-units/bridge/move-modules/sources/MOVETH.move b/protocol-units/bridge/move-modules/sources/MOVETH.move index 2c8e11b25..d4521c8ba 100644 --- a/protocol-units/bridge/move-modules/sources/MOVETH.move +++ b/protocol-units/bridge/move-modules/sources/MOVETH.move @@ -174,35 +174,7 @@ module atomic_bridge::moveth { ); } - /// Allow a spender to transfer tokens from the owner's account given their signed approval. - /// Caller needs to provide the from account's scheme and public key which can be gotten via the Aptos SDK. - public fun transfer_from( - spender: &signer, - proof: vector, - from: address, - from_account_scheme: u8, - from_public_key: vector, - to: address, - amount: u64, - ) acquires Management, State, MovethAddress { - assert_not_paused(); - assert_not_denylisted(from); - assert_not_denylisted(to); - - let expected_message = Approval { - owner: from, - to: to, - nonce: account::get_sequence_number(from), - chain_id: chain_id::get(), - spender: signer::address_of(spender), - amount, - }; - account::verify_signed_message(from, from_account_scheme, from_public_key, proof, expected_message); - - let transfer_ref = &borrow_global(moveth_address()).transfer_ref; - // Only use with_ref API for primary_fungible_store (PFS) transfers in this module. - primary_fungible_store::transfer_with_ref(transfer_ref, from, to, amount); - } + /// Deposit function override to ensure that the account is not denylisted and the moveth is not paused. public fun deposit( @@ -351,4 +323,4 @@ module atomic_bridge::moveth { public fun init_for_test(moveth_signer: &signer) { init_module(moveth_signer); } -} \ No newline at end of file +} From d7f99dc800d03ffcdfaacb73a23a70cf8990fae2 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Tue, 29 Oct 2024 12:37:13 +0000 Subject: [PATCH 2/2] remove transferfrom --- protocol-units/bridge/move-modules/sources/MOVETH.move | 2 -- 1 file changed, 2 deletions(-) diff --git a/protocol-units/bridge/move-modules/sources/MOVETH.move b/protocol-units/bridge/move-modules/sources/MOVETH.move index d4521c8ba..042e6fd6f 100644 --- a/protocol-units/bridge/move-modules/sources/MOVETH.move +++ b/protocol-units/bridge/move-modules/sources/MOVETH.move @@ -174,8 +174,6 @@ module atomic_bridge::moveth { ); } - - /// Deposit function override to ensure that the account is not denylisted and the moveth is not paused. public fun deposit( store: Object,