Skip to content

Commit

Permalink
Merge pull request #11 from MinaFoundation/PM-1156-Enable-custom-fee-…
Browse files Browse the repository at this point in the history
…and-amount-on-transactions-generator-helm-chart

PM-1156: Allow txns amount and fee be set from ENV
  • Loading branch information
simisimis authored Feb 6, 2024
2 parents f1498ca + 771b190 commit 7df1335
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Make sure you have `node` installed on your system. Git clone [mina-transactions
| `TRANSACTION_TYPE` | A type of transaction: `regular` or `zkApp`. | `regular` |
| `TRANSACTION_COUNT` | How many transactions to send(`-1` for unlimited). | `5` |
| `TRANSACTION_INTERVAL` | How often execute the transactions(in miliseconds). | `5000` |
| `TRANSACTION_AMOUNT` | Amount(per transaction) to send. | `2` |
| `TRANSACTION_FEE` | Transaction fee. | `0.1` |

1. Create a `txt` file with a list of public keys or receiving accounts.
```bash
Expand Down
6 changes: 6 additions & 0 deletions src/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ program
if (process.env.TRANSACTION_TYPE) {
transactionType = process.env.TRANSACTION_TYPE
}
if (process.env.TRANSACTION_AMOUNT) {
transactionAmount = process.env.TRANSACTION_AMOUNT
}
if (process.env.TRANSACTION_FEE) {
transactionFee = process.env.TRANSACTION_FEE
}
let receivers = fs.readFileSync(walletList).toString().split("\n");
let transactionTypes = ['regular', 'zkApp', 'mixed']
if (transactionTypes.includes(transactionType)) {
Expand Down

0 comments on commit 7df1335

Please sign in to comment.