Closed aulneau closed 4 years ago
Fixed #89
Merging #87 into master will increase coverage by
0.15%
. The diff coverage is93.75%
.
@@ Coverage Diff @@
## master #87 +/- ##
==========================================
+ Coverage 84.09% 84.25% +0.15%
==========================================
Files 27 27
Lines 1748 1778 +30
Branches 385 387 +2
==========================================
+ Hits 1470 1498 +28
- Misses 276 278 +2
Partials 2 2
Impacted Files | Coverage Δ | |
---|---|---|
src/contract-abi.ts | 72.76% <77.77%> (+0.08%) |
:arrow_up: |
src/builders.ts | 74.31% <100.00%> (+1.23%) |
:arrow_up: |
src/network.ts | 100.00% <100.00%> (ø) |
|
src/utils.ts | 76.71% <100.00%> (+3.27%) |
:arrow_up: |
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 ab8f6d8...1203f92. Read the comment docs.
Description
Yay, my first contribution to this library! When implementing
makeContractCall
within the explorers sandbox, I ran into some examples of read only calls. I realized this method doesn't apply, took a look at how @hstove had implemented it, and worked on this new method calledcallReadOnlyFunction
.callReadOnlyFunction
,cvToHex
. I also fixed some typos and missing jsdoc declarations.4. Link to relevant issues and documentationconst parseReadOnlyResponse = ({ result }: ReadOnlyResponse) => { const hex = result.slice(2); const bufferCv = Buffer.from(hex, 'hex'); const clarityValue = deserializeCV(bufferCv); return cvToString(clarityValue); };
const result = parseReadOnlyResponse(value);
setResult(result);