From 166f6b4a6783e2a6246f688f499f78ce313b06b0 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Mon, 11 Mar 2024 15:20:27 +0100 Subject: [PATCH] ch --- .github/workflows/deposit.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deposit.yml b/.github/workflows/deposit.yml index 4a602e75..62e1f1b9 100644 --- a/.github/workflows/deposit.yml +++ b/.github/workflows/deposit.yml @@ -35,9 +35,9 @@ jobs: - name: Create random deposit id run: | - echo DEPOSIT_ID0=$(shuf -i 0-2000000000 -n 1) >> $GITHUB_ENV - echo DEPOSIT_ID1=$(shuf -i 0-2000000000 -n 1) >> $GITHUB_ENV - echo DEPOSIT_ID2=$(shuf -i 0-2000000000 -n 1) >> $GITHUB_ENV + echo DEPOSIT_NONCE0=$(shuf -i 0-2000000000 -n 1) >> $GITHUB_ENV + echo DEPOSIT_NONCE1=$(shuf -i 0-2000000000 -n 1) >> $GITHUB_ENV + echo DEPOSIT_NONCE2=$(shuf -i 0-2000000000 -n 1) >> $GITHUB_ENV - name: Show created addresses run: | @@ -69,15 +69,20 @@ jobs: - name: Create deposit run: | set -x - erc20_processor create-deposit --account-no 1 --amount 1 --fee-amount 0.1 --block-for 0 --spender $ETH_ADDRESS_2 --deposit-nonce $DEPOSIT_ID0 - erc20_processor create-deposit --account-no 1 --amount 1 --fee-amount 0.1 --block-for 1000 --spender $ETH_ADDRESS_2 --deposit-nonce $DEPOSIT_ID1 + erc20_processor create-deposit --account-no 1 --amount 1 --fee-amount 0.1 --block-for 0 --spender $ETH_ADDRESS_2 --deposit-nonce $DEPOSIT_NONCE0 + erc20_processor create-deposit --account-no 1 --amount 1 --fee-amount 0.1 --block-for 1000 --spender $ETH_ADDRESS_2 --deposit-nonce $DEPOSIT_NONCE1 erc20_processor run + - name: Get Deposit ID from funder and nonce id + run: | + echo DEPOSIT_ID0=$(erc20_processor check-deposit --deposit-nonce $DEPOSIT_NONCE0 --deposit-funder=$ETH_ADDRESS_2 | jq -r ".depositId") >> $GITHUB_ENV + echo DEPOSIT_ID1=$(erc20_processor check-deposit --deposit-nonce $DEPOSIT_NONCE1 --deposit-funder=$ETH_ADDRESS_2 | jq -r ".depositId") >> $GITHUB_ENV + - name: Check token balance zero run: | set -x - erc20_processor check-deposit --deposit-nonce $DEPOSIT_ID0 --deposit-funder $ETH_ADDRESS_1 - erc20_processor check-deposit --deposit-nonce $DEPOSIT_ID1 --deposit-funder $ETH_ADDRESS_1 + erc20_processor check-deposit --deposit-nonce $DEPOSIT_NONCE0 --deposit-funder $ETH_ADDRESS_1 + erc20_processor check-deposit --deposit-nonce $DEPOSIT_NONCE1 --deposit-funder $ETH_ADDRESS_1 - name: Make single transfer from deposit run: | @@ -118,7 +123,7 @@ jobs: erc20_processor run - name: Withdraw all tokens - run: | + run: | set -x erc20_processor withdraw --account-no 1 --all erc20_processor withdraw --account-no 2 --all