frostfs-testcases/robot/resources/lib/robot/payment_operations.robot
Elizaveta Chichindaeva 89a4c6daa7 [#424] neofs-cli: WIF replaced with wallets
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-04-27 17:38:15 +03:00

42 lines
1.8 KiB
Text

*** Settings ***
Variables common.py
Library wallet_keywords.py
Library rpc_call_keywords.py
Library payment_neogo.py
*** Keywords ***
Prepare Wallet And Deposit
[Arguments] ${DEPOSIT}=${30}
Log Deposit equals ${DEPOSIT}
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR}
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${DEPOSIT+1}
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
... Transaction accepted in block ${TX}
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT}
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
... Transaction accepted in block ${TX_DEPOSIT}
# Now we have TX in main chain, but deposit might not propagate into the side chain yet.
# For certainty, sleeping during one morph block.
Sleep ${MORPH_BLOCK_TIME}
[Return] ${WALLET} ${ADDR} ${WIF}
Prepare Wallet with WIF And Deposit
[Arguments] ${WIF} ${DEPOSIT}=${30}
${WALLET} ${ADDR} = Init Wallet from WIF ${ASSETS_DIR} ${WIF}
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${DEPOSIT+1}
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
... Transaction accepted in block ${TX}
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT}
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
... Transaction accepted in block ${TX_DEPOSIT}
Sleep ${MORPH_BLOCK_TIME}
[Return] ${WALLET} ${ADDR}