@@ -81,3 +81,49 @@ def test_arkiv_accounts_are_funded(
8181 assert account_2_balance > 0 , "Fixture account 2 should be funded"
8282
8383 logger .info ("Arkiv fixture accounts are funded (balances > 0)" )
84+
85+
86+ def test_arkiv_transfer_eth_account (
87+ arkiv_client_http : Arkiv , account_1 : NamedAccount , account_2 : NamedAccount
88+ ) -> None :
89+ """Test that ETH (GLM) transfer works."""
90+ account_1_balance_before = arkiv_client_http .eth .get_balance (account_1 .address )
91+ account_2_balance_before = arkiv_client_http .eth .get_balance (account_2 .address )
92+ amount = 42
93+
94+ arkiv_client_http .arkiv .transfer_eth (account_2 , amount )
95+
96+ account_1_balance_after = arkiv_client_http .eth .get_balance (account_1 .address )
97+ account_2_balance_after = arkiv_client_http .eth .get_balance (account_2 .address )
98+
99+ assert account_2_balance_after == account_2_balance_before + amount , (
100+ "Account 2 balance should increase by transfer amount"
101+ )
102+ assert account_1_balance_after <= account_1_balance_before - amount , (
103+ "Account 1 balance should decrease by transfer amount"
104+ )
105+
106+ logger .info ("Arkiv ETH transfer between accounts succeeded (to: NamedAccount)" )
107+
108+
109+ def test_arkiv_transfer_eth_address (
110+ arkiv_client_http : Arkiv , account_1 : NamedAccount , account_2 : NamedAccount
111+ ) -> None :
112+ """Test that ETH (GLM) transfer works."""
113+ account_1_balance_before = arkiv_client_http .eth .get_balance (account_1 .address )
114+ account_2_balance_before = arkiv_client_http .eth .get_balance (account_2 .address )
115+ amount = 42
116+
117+ arkiv_client_http .arkiv .transfer_eth (account_2 .address , amount )
118+
119+ account_1_balance_after = arkiv_client_http .eth .get_balance (account_1 .address )
120+ account_2_balance_after = arkiv_client_http .eth .get_balance (account_2 .address )
121+
122+ assert account_2_balance_after == account_2_balance_before + amount , (
123+ "Account 2 balance should increase by transfer amount"
124+ )
125+ assert account_1_balance_after <= account_1_balance_before - amount , (
126+ "Account 1 balance should decrease by transfer amount"
127+ )
128+
129+ logger .info ("Arkiv ETH transfer between accounts succeeded (to: checksum address)" )
0 commit comments