Skip to content

Commit

Permalink
Update commands
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 committed Mar 11, 2024
1 parent 290276d commit 39b4683
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deposit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ 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_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 deposit create --account-no 1 --amount 1 --fee-amount 0.1 --block-for 0 --spender $ETH_ADDRESS_2 --deposit-nonce $DEPOSIT_NONCE0
erc20_processor deposit create --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_1 | jq -r ".depositId") >> $GITHUB_ENV
echo DEPOSIT_ID1=$(erc20_processor check-deposit --deposit-nonce $DEPOSIT_NONCE1 --deposit-funder=$ETH_ADDRESS_1 | jq -r ".depositId") >> $GITHUB_ENV
echo DEPOSIT_ID0=$(erc20_processor deposit check --deposit-nonce $DEPOSIT_NONCE0 --deposit-funder=$ETH_ADDRESS_1 | jq -r ".depositId") >> $GITHUB_ENV
echo DEPOSIT_ID1=$(erc20_processor deposit check --deposit-nonce $DEPOSIT_NONCE1 --deposit-funder=$ETH_ADDRESS_1 | jq -r ".depositId") >> $GITHUB_ENV
- name: Make single transfer from deposit
run: |
Expand Down Expand Up @@ -111,8 +111,8 @@ jobs:
- name: Free deposit
run: |
set -x
erc20_processor close-deposit --deposit-id $DEPOSIT_ID0 --account-no 2
erc20_processor close-deposit --deposit-id $DEPOSIT_ID1 --account-no 2
erc20_processor deposit close --deposit-id $DEPOSIT_ID0 --account-no 2
erc20_processor deposit close --deposit-id $DEPOSIT_ID1 --account-no 2
erc20_processor run
- name: Transfer all left ETH tokens
Expand Down
2 changes: 1 addition & 1 deletion src/actions/deposit/close.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use structopt::StructOpt;
use web3::types::{Address, U256};

#[derive(StructOpt)]
#[structopt(about = "Allocate funds for use by payer")]
#[structopt(about = "Close deposit if you are spender")]
pub struct CloseDepositOptions {
#[structopt(short = "c", long = "chain-name", default_value = "holesky")]
pub chain_name: String,
Expand Down
2 changes: 1 addition & 1 deletion src/actions/deposit/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use structopt::StructOpt;
use web3::types::{Address, U256};

#[derive(StructOpt)]
#[structopt(about = "Allocate funds for use by payer")]
#[structopt(about = "Create deposit for use by spender")]
pub struct CreateDepositOptions {
#[structopt(short = "c", long = "chain-name", default_value = "holesky")]
pub chain_name: String,
Expand Down
2 changes: 1 addition & 1 deletion src/actions/deposit/details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use structopt::StructOpt;
use web3::types::{Address, U256};

#[derive(StructOpt)]
#[structopt(about = "Allocate funds for use by payer")]
#[structopt(about = "Show details of given deposit")]
pub struct CheckDepositOptions {
#[structopt(short = "c", long = "chain-name", default_value = "holesky")]
pub chain_name: String,
Expand Down
2 changes: 1 addition & 1 deletion src/actions/deposit/terminate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use structopt::StructOpt;
use web3::types::{Address, U256};

#[derive(StructOpt)]
#[structopt(about = "Allocate funds for use by payer")]
#[structopt(about = "Terminate deposit if you are funder")]
pub struct TerminateDepositOptions {
#[structopt(short = "c", long = "chain-name", default_value = "holesky")]
pub chain_name: String,
Expand Down
1 change: 1 addition & 0 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ pub struct CleanupOptions {
}

#[derive(StructOpt)]
#[structopt(about = "Commands for deposit management")]
pub enum DepositCommands {
Create {
#[structopt(flatten)]
Expand Down

0 comments on commit 39b4683

Please sign in to comment.