Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

feat/support-for-batch-txn #280

Merged
merged 26 commits into from
Apr 26, 2021
Merged

feat/support-for-batch-txn #280

merged 26 commits into from
Apr 26, 2021

Conversation

teye
Copy link
Contributor

@teye teye commented Feb 17, 2021

Description

This pr features support for sending batch transactions. This is an update to the previous batch txn PR by refactoring the batch JSON RPC calls into a proper single JSON RPC calls.

The changes in packages/zilliqa-js-core/src/net.ts and packages/zilliqa-js-core/src/providers/http.ts allows other APIs to potentially use the batch JSON RPC call in the near future if required.

New Methods

signBatch(txList: Transaction[]): Promise<Transaction[]>
createBatchTransaction(txList : Transaction[], maxAttempts? : number, interval? : interval) : Promise<Transaction[]>
createBatchTransactionWithoutConfirm(signedTxList : Transaction[]) : Promise<Transaction[]>

Tests

node examples/node/createBatchTransaction.js
node examples/node/createBatchTransactionWithoutConfirm.js

@codecov-io
Copy link

codecov-io commented Feb 18, 2021

Codecov Report

Merging #280 (59bd6aa) into dev (e88d379) will increase coverage by 0.55%.
The diff coverage is 89.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #280      +/-   ##
==========================================
+ Coverage   78.04%   78.60%   +0.55%     
==========================================
  Files          45       45              
  Lines        1681     1767      +86     
  Branches      272      285      +13     
==========================================
+ Hits         1312     1389      +77     
- Misses        365      373       +8     
- Partials        4        5       +1     
Impacted Files Coverage Δ
packages/zilliqa-js-core/src/types.ts 100.00% <ø> (ø)
packages/zilliqa-js-core/src/net.ts 95.77% <71.42%> (-2.69%) ⬇️
packages/zilliqa-js-account/src/wallet.ts 81.10% <84.21%> (+0.54%) ⬆️
packages/zilliqa-js-blockchain/src/chain.ts 63.04% <90.00%> (+7.48%) ⬆️
packages/zilliqa-js-account/src/util.ts 94.44% <100.00%> (+1.58%) ⬆️
packages/zilliqa-js-core/src/providers/http.ts 93.54% <100.00%> (+4.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e88d379...59bd6aa. Read the comment docs.

@bb111189 bb111189 merged commit c72ad8e into dev Apr 26, 2021
@bb111189 bb111189 deleted the feat/batch-txn branch August 18, 2021 05:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants