Not able to withdraw money from neofs contract back to a user wallet #1324

Closed
opened 2025-12-28 17:22:35 +00:00 by sami · 1 comment
Owner

Originally created by @evgeniiz321 on GitHub (Feb 6, 2025).

https://github.com/nspcc-dev/neofs-testcases/pull/947
pytest_tests/tests/payment/test_deposit_withdrawal.py:test_deposit_withdrawal
https://rest.fs.neo.org/HXSaMJXk2g8C14ht8HSi7BBaiYZ1HeWh2xnWPGQCg4H6/827-1738818546/index.html#suites/81c17107ccbab4b783c7cba2aa651151/818441a1a24eba3e/

  1. env with main chain
  2. create a wallet
  3. transfer money to the created wallet from a comittee
  4. deposit money to the neofs contract
  5. withdraw some money back to the created wallet:
Command: ./neo-go  contract invokefunction --wallet-config '/Users/evgeniiz/Projects/neofs-testcases-nspcc/neofs-testcases/test-run-2025-02-06-17-22-41-097292/env_files/neofs-env-2025-02-06-17-22-41/neo_go_config_jhfvorzraf.yml' --force --rpc-endpoint 'http://localhost:54202' --timeout '10s' 23ffa1685a3c527eec4143376b10d8b6b53ad15b withdraw NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu 50 -- NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu:Global
Success:
return code: 0 
Output: 1503a7f405641699d235384096d78b80ba4c61720eff809fd113c448346e5d3e

Balance in neofs is correct:

./neofs-cli --config /Users/evgeniiz/Projects/neofs-testcases-nspcc/neofs-testcases/test-run-2025-02-06-17-22-41-097292/env_files/neofs-env-2025-02-06-17-22-41/cli_config_heaicxuwmr.yml accounting balance --wallet '/Users/evgeniiz/Projects/neofs-testcases-nspcc/neofs-testcases/test-run-2025-02-06-17-22-41-097292/env_files/neofs-env-2025-02-06-17-22-41/deposit_withdrawal_test_wallet_zrhdczkcou' --rpc-endpoint 'localhost:54312' --address 'NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu'
Success:
return code: 0 
Output: 50

But the wallet balance has not been changed:

./neo-go  wallet nep17 balance --address 'NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu' --token 'GAS' --rpc-endpoint 'http://localhost:54202' --wallet-config '/Users/evgeniiz/Projects/neofs-testcases-nspcc/neofs-testcases/test-run-2025-02-06-17-22-41-097292/env_files/neofs-env-2025-02-06-17-22-41/neo_go_config_jhfvorzraf.yml' --timeout '10s'
Success:
return code: 0 
Output: Account NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu
GAS: GasToken (d2a4cff31913016155e38e474a2c06d08be276cf)
        Amount : 899.6626524
        Updated: 164

In IR logs:

error	balance/process_assets.go:18	can't send lock asset tx	{"error": "could not invoke cheque: chain/client: contract execution finished with state FAULT; exception: at instruction 3077 (THROW): unhandled exception: \"this method must be invoked by alphabet\""}

Full IR log

ir_stderr_ftjinpdfrz.txt

Originally created by @evgeniiz321 on GitHub (Feb 6, 2025). https://github.com/nspcc-dev/neofs-testcases/pull/947 `pytest_tests/tests/payment/test_deposit_withdrawal.py:test_deposit_withdrawal` https://rest.fs.neo.org/HXSaMJXk2g8C14ht8HSi7BBaiYZ1HeWh2xnWPGQCg4H6/827-1738818546/index.html#suites/81c17107ccbab4b783c7cba2aa651151/818441a1a24eba3e/ 1. env with main chain 2. create a wallet 3. transfer money to the created wallet from a comittee 4. deposit money to the neofs contract 5. withdraw some money back to the created wallet: ``` Command: ./neo-go contract invokefunction --wallet-config '/Users/evgeniiz/Projects/neofs-testcases-nspcc/neofs-testcases/test-run-2025-02-06-17-22-41-097292/env_files/neofs-env-2025-02-06-17-22-41/neo_go_config_jhfvorzraf.yml' --force --rpc-endpoint 'http://localhost:54202' --timeout '10s' 23ffa1685a3c527eec4143376b10d8b6b53ad15b withdraw NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu 50 -- NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu:Global Success: return code: 0 Output: 1503a7f405641699d235384096d78b80ba4c61720eff809fd113c448346e5d3e ``` Balance in neofs is correct: ``` ./neofs-cli --config /Users/evgeniiz/Projects/neofs-testcases-nspcc/neofs-testcases/test-run-2025-02-06-17-22-41-097292/env_files/neofs-env-2025-02-06-17-22-41/cli_config_heaicxuwmr.yml accounting balance --wallet '/Users/evgeniiz/Projects/neofs-testcases-nspcc/neofs-testcases/test-run-2025-02-06-17-22-41-097292/env_files/neofs-env-2025-02-06-17-22-41/deposit_withdrawal_test_wallet_zrhdczkcou' --rpc-endpoint 'localhost:54312' --address 'NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu' Success: return code: 0 Output: 50 ``` But the wallet balance has not been changed: ``` ./neo-go wallet nep17 balance --address 'NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu' --token 'GAS' --rpc-endpoint 'http://localhost:54202' --wallet-config '/Users/evgeniiz/Projects/neofs-testcases-nspcc/neofs-testcases/test-run-2025-02-06-17-22-41-097292/env_files/neofs-env-2025-02-06-17-22-41/neo_go_config_jhfvorzraf.yml' --timeout '10s' Success: return code: 0 Output: Account NP6F8uPSxCfrhCRvdhuXAb2kNgMjR3wpZu GAS: GasToken (d2a4cff31913016155e38e474a2c06d08be276cf) Amount : 899.6626524 Updated: 164 ``` In IR logs: ``` error balance/process_assets.go:18 can't send lock asset tx {"error": "could not invoke cheque: chain/client: contract execution finished with state FAULT; exception: at instruction 3077 (THROW): unhandled exception: \"this method must be invoked by alphabet\""} ``` Full IR log [ir_stderr_ftjinpdfrz.txt](https://github.com/user-attachments/files/18694356/ir_stderr_ftjinpdfrz.txt)
sami 2025-12-28 17:22:35 +00:00
Author
Owner

@evgeniiz321 commented on GitHub (Feb 12, 2025):

was caused by an incorrect pub key used for the neofs contract deployment

@evgeniiz321 commented on GitHub (Feb 12, 2025): was caused by an incorrect pub key used for the neofs contract deployment
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-node#1324
No description provided.