Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: add simpler Option style #471

Merged
merged 9 commits into from
Sep 1, 2022
Merged

feat!: add simpler Option style #471

merged 9 commits into from
Sep 1, 2022

Conversation

camsjams
Copy link
Contributor

@camsjams camsjams commented Aug 26, 2022

Closes #470

  • Adds Option support
  • Adds tests for Option
  • Updates Typechain types to use new Option style

@camsjams camsjams requested a review from a team August 26, 2022 07:31
@camsjams camsjams self-assigned this Aug 26, 2022
@github-actions
Copy link
Contributor

Total Coverage: 89.75%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
packages/abi-coder/src
   abi-coder.ts90.91%100%96%119, 120, 36, 45, 55, 56
   index.ts100%53.85%100%
   interface.ts73.08%90.91%90.32%113, 114, 132, 144, 144, 144, 146, 146, 147, 150, 42, 47, 92
   json-abi.ts85.71%100%96.67%125, 126, 75, 76
   utilities.ts100%100%100%
packages/abi-coder/src/coders
   abstract-coder.ts100%100%87.50%46
   array.ts50%100%93.75%23, 24
   b256.ts66.67%100%94.12%31, 32
   boolean.ts60%100%82.35%17, 19, 20, 31, 32
   byte.ts50%100%94.12%29, 30
   enum.ts66.67%100%97.14%59, 60
   number.ts100%100%100%
   option.ts100%100%100%
   string.ts100%100%100%
   struct.ts100%100%100%
   tuple.ts100%100%100%
packages/abi-coder/src/fragments
   fragment.ts100%100%100%
   function-fragment.ts100%100%100%
   param-type.ts83.33%100%97.37%105, 106, 71, 75
packages/address/src
   address.ts71.43%100%95.65%107, 25, 26
   index.ts100%100%100%
   utils.ts87.50%100%96.55%83, 84
packages/constants/src
   index.ts100%100%100%
packages/contract/src
   index.ts100%100%100%
   scripts.ts81.25%100%93.88%36, 37, 89, 90, 92, 93
   util.ts0%100%96%41, 42
packages/contract/src/__test__
   test-utils.ts0%100%100%13, 20
packages/contract/src/contracts
   contract-factory.ts57.14%80%78.38%33, 37, 38, 43, 46, 46, 46, 47, 48, 50, 51, 56, 60, 61
   contract.ts80%100%100%23
packages/contract/src/contracts/functions
   base-invocation-scope.ts93.75%100%100%143, 166
   invocation-results.ts66.67%100%100%14, 28
   invocation-scope.ts60%100%100%23, 40
   multicall-scope.ts100%100%100%
packages/contract/src/contracts/multicall/static-out
   multicall-bin.ts100%100%100%
packages/example-contract/src/example-contract-types
   index.ts100%100%100%
packages/example-contract/src/example-contract-types/factories
   ExampleContractAbi__factory.ts100%50%83.33%37
packages/fuels/src
   index.ts100%100%100%
packages/hasher/src
   hasher.ts87.50%100%97.44%39, 57
   index.ts100%100%100%
packages/hdwallet/src
   hdwallet-spec.ts100%100%100%
   hdwallet.ts80.39%100%95.96%127, 128, 190, 191, 22, 22, 229, 24, 26, 39, 42, 43, 96, 97
   index.ts100%100%100%
packages/interfaces/src
   index.ts100%100%100%
packages/keystore/src
   aes-ctr-node.ts100%100%100%
   aes-ctr-web.ts100%0%24%15, 16, 17, 18, 19, 24, 25, 27, 39, 40, 41, 42, 44, 49, 51, 52, 54, 55, 57
   aes-ctr.ts80%75%72.22%19, 19, 20, 23, 26, 38
   index.ts100%100%100%
   keystore.ts50%75%100%17, 27
   randomBytes.ts50%100%100%4
   universal-crypto.ts83.33%100%72.73%15, 18, 19, 29
packages/math/src
   convert.ts66.67%100%85.71%28, 29, 37, 38, 43, 49, 49, 50, 54, 55
   index.ts100%100%100%
   math.ts100%100%100%
packages/merkle-shared/src
   common.ts100%100%100%
   cryptography.ts100%100%100%
   index.ts100%100%100%
packages/merkle/src
   binaryMerkleTree.ts71.43%100%97.01%110, 113, 72, 73
   index.ts100%100%100%
packages/merkle/src/types
   node.ts100%100%100%
packages/merklesum/src
   sumMerkleTree.ts83.33%100%97.01%128, 132, 133
packages/merklesum/src/types
   node.ts100%100%100%
   proof.ts100%100%100%
packages/mnemonic/src
   index.ts100%100%100%
   mnemonic-specs.ts100%100%100%
   mnemonic.ts80.95%100%96.08%141, 142, 157, 40, 41, 83
   utils.ts56.25%100%79.17%17, 20, 20, 20, 21, 22, 24, 24, 24, 24, 25, 29, 30, 31, 32, 33, 35, 36, 37, 58, 62, 63
packages/predicate/src
   predicate.ts100%100%100%
packages/predicate/src/test-predicate-address
   index.ts100%100%100%
packages/predicate/src/test-predicate-false
   index.ts100%100%100%
packages/predicate/src/test-predicate-struct
   index.ts100%100%100%
packages/predicate/src/test-predicate-true
   index.ts100%100%100%
packages/predicate/src/test-predicate-u32
   index.ts100%100%100%
packages/providers/src
   coin-quantity.ts66.67%100%100%16, 19
   coin.ts100%0%100%
   index.ts100%100%100%
   provider.ts47.37%73.53%71.64%106, 114, 204, 214, 215, 253, 254, 257, 258, 349, 406, 406, 406, 407, 408, 408, 408, 409, 411, 414, 416, 416, 417, 420, 425, 437, 437, 437, 438, 439, 439, 439, 440, 442, 445, 447, 447, 448, 451, 456, 458, 467, 468, 468, 469, 471, 480, 481, 481, 482, 484, 531, 572, 573, 574, 604, 605, 610
   util.ts27.27%42.86%37.50%15, 16, 16, 16, 16, 18, 19, 22, 25, 29, 30, 30, 31, 41, 44, 45, 45, 45, 45, 45, 47, 54, 60, 68, 73, 77, 79, 81
packages/providers/src/__generated__
   operations.ts100%64%81.44%1457, 1459, 1486, 1488, 1500, 1502, 1515, 1517, 1529, 1531, 1544, 1546, 1558, 1560, 1600, 1602, 1698, 1700
packages/providers/src/transaction-request
   index.ts100%100%100%
   input.ts77.78%100%90%35, 49, 69
   output.ts71.43%100%83.33%106, 57, 57, 75
   storage-slot.ts50%100%83.33%25, 26, 27
   transaction-request.ts65.22%70.37%76.98%122, 132, 144, 145, 146, 195, 196, 202, 203, 208, 209, 236, 238, 238, 239, 242, 269, 270, 293, 320, 358, 359, 371, 378, 379, 404, 405, 414, 460, 460, 461, 463, 477, 485, 486, 488, 494, 495, 503, 504, 510, 512, 539, 539, 544, 547, 78, 79, 83, 84, 85, 86, 91, 92, 93, 94
   witness.ts100%100%100%
packages/providers/src/transaction-response
   index.ts100%100%100%
   transaction-response.ts33.33%100%75.76%100, 101, 110, 110, 110, 113, 116, 117, 118, 138, 147, 148, 63, 71
packages/script/src
   constants.ts100%100%100%
   errors.ts0%0%30%13, 13, 13, 16, 16, 16, 20, 21, 22, 24, 24, 24, 27, 31, 32, 32, 32, 34, 34, 34, 37, 40, 40, 46, 47, 51, 52, 52, 53, 53
   index.ts100%100%100%
   script.ts28.57%66.67%77.14%115, 42, 43, 45, 46, 49, 50, 52, 53, 57, 87, 95, 96
   scripts.ts100%0%50%18, 19
   utils.ts0%0%37.50%11, 11, 12, 13, 14, 14, 18, 6, 6, 6
packages/signer/src
   index.ts100%100%100%
   signer.ts75%100%97.37%33, 33, 35
packages/sparsemerkle/src
   deepSparseMerkleSubTree.ts66.67%60%75%13, 14, 20, 21, 37, 38
   index.ts100%100%100%
   proofs.ts63.64%100%85.11%25, 27, 27, 27, 28, 31, 32, 32, 34, 36, 37
   sparseMerkleTree.ts77.50%100%91.60%105, 106, 116, 118, 126, 128, 129, 131, 139, 139, 143, 144, 147, 161, 162, 277, 280, 98, 99
   treeHasher.ts100%100%100%
   utils.ts100%100%100%
packages/sparsemerkle/src/types
   sparseCompactMerkleProof.ts100%100%100%
   sparseMerkleProof.ts100%100%100%
packages/transactions/src
   consts.ts100%100%100%
   index.ts100%100%100%
packages/transactions/src/coders
   byte-array.ts100%100%100%
   input.ts75%100%97.53%174, 184, 197, 207
   output.ts87.50%100%98.48%316, 342, 355, 381
   receipt.ts87.50%97.06%97.27%627, 629, 630, 632, 676, 676, 714, 715, 718, 731, 773
   storage-slot.ts100%100%100%
   transaction.ts75%100%98.55%304, 314, 327, 337
   utxo-id.ts100%100%100%
   witness.ts100%100%100%
packages/typechain-target-fuels/src/codegen
   types.ts66.04%66.67%61.19%102, 104, 116, 117, 120, 120, 120, 120, 148, 149, 152, 152, 152, 152, 153, 155, 156, 159, 161, 163, 24, 25, 25, 25, 27, 27, 28, 31, 39, 41, 41, 44, 44, 45, 47, 50, 52, 52, 53, 56, 64, 64, 95, 96
packages/typechain-target-fuels/src/parser
   abiParser.ts44.44%86.96%65%148, 200, 201, 209, 210, 218, 219, 227, 228, 252, 253, 253, 263, 264, 266, 269, 269, 270, 273, 273, 274, 277, 277, 278, 280, 280, 280, 280, 281, 284, 291, 292, 294, 297, 297, 297, 297, 297, 299, 299, 299, 302, 302, 303, 304, 304, 305, 305, 305, 306, 307, 307, 310
   parseSvmTypes.ts50%100%88%127, 128, 165, 176, 187, 192, 196, 196, 196, 196, 196, 200, 206, 208, 212, 216
packages/wallet-manager/src
   wallet-manager-spec.ts100%100%100%
   wallet-manager.ts100%100%100%
packages/wallet-manager/src/storages
   memory-storage.ts100%100%100%
packages/wallet-manager/src/vaults
   mnemonic-vault.ts85.71%100%93.33%21, 71, 74
   privatekey-vault.ts60%100%95%24, 57, 58
packages/wallet/src
   index.ts100%100%100%
   test-utils.ts66.67%100%100%8
   wallet-spec.ts100%100%100%
   wallet.ts75%95.83%94.74%138, 147, 148, 149, 175, 199, 245, 334, 62, 63
packages/wordlists/src
   index.ts100%100%100%
packages/wordlists/src/words
   english.ts100%100%100%

Copy link
Member

@luizstacio luizstacio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment.

@github-actions
Copy link
Contributor

Total Coverage: 89.75%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
packages/abi-coder/src
   abi-coder.ts90.91%100%96%119, 120, 36, 45, 55, 56
   index.ts100%53.85%100%
   interface.ts73.08%90.91%90.32%113, 114, 132, 144, 144, 144, 146, 146, 147, 150, 42, 47, 92
   json-abi.ts85.71%100%96.67%125, 126, 75, 76
   utilities.ts100%100%100%
packages/abi-coder/src/coders
   abstract-coder.ts100%100%87.50%46
   array.ts50%100%93.75%23, 24
   b256.ts66.67%100%94.12%31, 32
   boolean.ts60%100%82.35%17, 19, 20, 31, 32
   byte.ts50%100%94.12%29, 30
   enum.ts66.67%100%97.14%59, 60
   number.ts100%100%100%
   option.ts100%100%100%
   string.ts100%100%100%
   struct.ts100%100%100%
   tuple.ts100%100%100%
packages/abi-coder/src/fragments
   fragment.ts100%100%100%
   function-fragment.ts100%100%100%
   param-type.ts83.33%100%97.37%105, 106, 71, 75
packages/address/src
   address.ts71.43%100%95.65%107, 25, 26
   index.ts100%100%100%
   utils.ts87.50%100%96.55%83, 84
packages/constants/src
   index.ts100%100%100%
packages/contract/src
   index.ts100%100%100%
   scripts.ts81.25%100%93.88%36, 37, 89, 90, 92, 93
   util.ts0%100%96%41, 42
packages/contract/src/__test__
   test-utils.ts0%100%100%13, 20
packages/contract/src/contracts
   contract-factory.ts57.14%80%78.38%33, 37, 38, 43, 46, 46, 46, 47, 48, 50, 51, 56, 60, 61
   contract.ts80%100%100%23
packages/contract/src/contracts/functions
   base-invocation-scope.ts93.75%100%100%143, 166
   invocation-results.ts66.67%100%100%14, 28
   invocation-scope.ts60%100%100%23, 40
   multicall-scope.ts100%100%100%
packages/contract/src/contracts/multicall/static-out
   multicall-bin.ts100%100%100%
packages/example-contract/src/example-contract-types
   index.ts100%100%100%
packages/example-contract/src/example-contract-types/factories
   ExampleContractAbi__factory.ts100%50%83.33%37
packages/fuels/src
   index.ts100%100%100%
packages/hasher/src
   hasher.ts87.50%100%97.44%39, 57
   index.ts100%100%100%
packages/hdwallet/src
   hdwallet-spec.ts100%100%100%
   hdwallet.ts80.39%100%95.96%127, 128, 190, 191, 22, 22, 229, 24, 26, 39, 42, 43, 96, 97
   index.ts100%100%100%
packages/interfaces/src
   index.ts100%100%100%
packages/keystore/src
   aes-ctr-node.ts100%100%100%
   aes-ctr-web.ts100%0%24%15, 16, 17, 18, 19, 24, 25, 27, 39, 40, 41, 42, 44, 49, 51, 52, 54, 55, 57
   aes-ctr.ts80%75%72.22%19, 19, 20, 23, 26, 38
   index.ts100%100%100%
   keystore.ts50%75%100%17, 27
   randomBytes.ts50%100%100%4
   universal-crypto.ts83.33%100%72.73%15, 18, 19, 29
packages/math/src
   convert.ts66.67%100%85.71%28, 29, 37, 38, 43, 49, 49, 50, 54, 55
   index.ts100%100%100%
   math.ts100%100%100%
packages/merkle-shared/src
   common.ts100%100%100%
   cryptography.ts100%100%100%
   index.ts100%100%100%
packages/merkle/src
   binaryMerkleTree.ts71.43%100%97.01%110, 113, 72, 73
   index.ts100%100%100%
packages/merkle/src/types
   node.ts100%100%100%
packages/merklesum/src
   sumMerkleTree.ts83.33%100%97.01%128, 132, 133
packages/merklesum/src/types
   node.ts100%100%100%
   proof.ts100%100%100%
packages/mnemonic/src
   index.ts100%100%100%
   mnemonic-specs.ts100%100%100%
   mnemonic.ts80.95%100%96.08%141, 142, 157, 40, 41, 83
   utils.ts56.25%100%79.17%17, 20, 20, 20, 21, 22, 24, 24, 24, 24, 25, 29, 30, 31, 32, 33, 35, 36, 37, 58, 62, 63
packages/predicate/src
   predicate.ts100%100%100%
packages/predicate/src/test-predicate-address
   index.ts100%100%100%
packages/predicate/src/test-predicate-false
   index.ts100%100%100%
packages/predicate/src/test-predicate-struct
   index.ts100%100%100%
packages/predicate/src/test-predicate-true
   index.ts100%100%100%
packages/predicate/src/test-predicate-u32
   index.ts100%100%100%
packages/providers/src
   coin-quantity.ts66.67%100%100%16, 19
   coin.ts100%0%100%
   index.ts100%100%100%
   provider.ts47.37%73.53%71.64%106, 114, 204, 214, 215, 253, 254, 257, 258, 349, 406, 406, 406, 407, 408, 408, 408, 409, 411, 414, 416, 416, 417, 420, 425, 437, 437, 437, 438, 439, 439, 439, 440, 442, 445, 447, 447, 448, 451, 456, 458, 467, 468, 468, 469, 471, 480, 481, 481, 482, 484, 531, 572, 573, 574, 604, 605, 610
   util.ts27.27%42.86%37.50%15, 16, 16, 16, 16, 18, 19, 22, 25, 29, 30, 30, 31, 41, 44, 45, 45, 45, 45, 45, 47, 54, 60, 68, 73, 77, 79, 81
packages/providers/src/__generated__
   operations.ts100%64%81.44%1457, 1459, 1486, 1488, 1500, 1502, 1515, 1517, 1529, 1531, 1544, 1546, 1558, 1560, 1600, 1602, 1698, 1700
packages/providers/src/transaction-request
   index.ts100%100%100%
   input.ts77.78%100%90%35, 49, 69
   output.ts71.43%100%83.33%106, 57, 57, 75
   storage-slot.ts50%100%83.33%25, 26, 27
   transaction-request.ts65.22%70.37%76.98%122, 132, 144, 145, 146, 195, 196, 202, 203, 208, 209, 236, 238, 238, 239, 242, 269, 270, 293, 320, 358, 359, 371, 378, 379, 404, 405, 414, 460, 460, 461, 463, 477, 485, 486, 488, 494, 495, 503, 504, 510, 512, 539, 539, 544, 547, 78, 79, 83, 84, 85, 86, 91, 92, 93, 94
   witness.ts100%100%100%
packages/providers/src/transaction-response
   index.ts100%100%100%
   transaction-response.ts33.33%100%75.76%100, 101, 110, 110, 110, 113, 116, 117, 118, 138, 147, 148, 63, 71
packages/script/src
   constants.ts100%100%100%
   errors.ts0%0%30%13, 13, 13, 16, 16, 16, 20, 21, 22, 24, 24, 24, 27, 31, 32, 32, 32, 34, 34, 34, 37, 40, 40, 46, 47, 51, 52, 52, 53, 53
   index.ts100%100%100%
   script.ts28.57%66.67%77.14%115, 42, 43, 45, 46, 49, 50, 52, 53, 57, 87, 95, 96
   scripts.ts100%0%50%18, 19
   utils.ts0%0%37.50%11, 11, 12, 13, 14, 14, 18, 6, 6, 6
packages/signer/src
   index.ts100%100%100%
   signer.ts75%100%97.37%33, 33, 35
packages/sparsemerkle/src
   deepSparseMerkleSubTree.ts66.67%60%75%13, 14, 20, 21, 37, 38
   index.ts100%100%100%
   proofs.ts63.64%100%85.11%25, 27, 27, 27, 28, 31, 32, 32, 34, 36, 37
   sparseMerkleTree.ts77.50%100%91.60%105, 106, 116, 118, 126, 128, 129, 131, 139, 139, 143, 144, 147, 161, 162, 277, 280, 98, 99
   treeHasher.ts100%100%100%
   utils.ts100%100%100%
packages/sparsemerkle/src/types
   sparseCompactMerkleProof.ts100%100%100%
   sparseMerkleProof.ts100%100%100%
packages/transactions/src
   consts.ts100%100%100%
   index.ts100%100%100%
packages/transactions/src/coders
   byte-array.ts100%100%100%
   input.ts75%100%97.53%174, 184, 197, 207
   output.ts87.50%100%98.48%316, 342, 355, 381
   receipt.ts87.50%97.06%97.27%627, 629, 630, 632, 676, 676, 714, 715, 718, 731, 773
   storage-slot.ts100%100%100%
   transaction.ts75%100%98.55%304, 314, 327, 337
   utxo-id.ts100%100%100%
   witness.ts100%100%100%
packages/typechain-target-fuels/src/codegen
   types.ts66.04%66.67%61.19%102, 104, 116, 117, 120, 120, 120, 120, 148, 149, 152, 152, 152, 152, 153, 155, 156, 159, 161, 163, 24, 25, 25, 25, 27, 27, 28, 31, 39, 41, 41, 44, 44, 45, 47, 50, 52, 52, 53, 56, 64, 64, 95, 96
packages/typechain-target-fuels/src/parser
   abiParser.ts44.44%86.96%65%148, 200, 201, 209, 210, 218, 219, 227, 228, 252, 253, 253, 263, 264, 266, 269, 269, 270, 273, 273, 274, 277, 277, 278, 280, 280, 280, 280, 281, 284, 291, 292, 294, 297, 297, 297, 297, 297, 299, 299, 299, 302, 302, 303, 304, 304, 305, 305, 305, 306, 307, 307, 310
   parseSvmTypes.ts50%100%88%127, 128, 165, 176, 187, 192, 196, 196, 196, 196, 196, 200, 206, 208, 212, 216
packages/wallet-manager/src
   wallet-manager-spec.ts100%100%100%
   wallet-manager.ts100%100%100%
packages/wallet-manager/src/storages
   memory-storage.ts100%100%100%
packages/wallet-manager/src/vaults
   mnemonic-vault.ts85.71%100%93.33%21, 71, 74
   privatekey-vault.ts60%100%95%24, 57, 58
packages/wallet/src
   index.ts100%100%100%
   test-utils.ts66.67%100%100%8
   wallet-spec.ts100%100%100%
   wallet.ts75%95.83%94.74%138, 147, 148, 149, 175, 199, 245, 334, 62, 63
packages/wordlists/src
   index.ts100%100%100%
packages/wordlists/src/words
   english.ts100%100%100%

@@ -82,7 +83,9 @@ export default class AbiCoder {
obj[component.name] = this.getCoder(component);
return obj;
}, {});
return new EnumCoder(enumMatch.name, coders);
return param.type === 'enum Option'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to think of a better way to de-nest this but couldn't. My gut tells me we should refactor getCoder but probably not a blocker for this pr

@github-actions
Copy link
Contributor

Total Coverage: 89.78%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
packages/abi-coder/src
   abi-coder.ts91.43%100%95.95%126, 127, 37, 46, 56, 57
   constants.ts100%100%100%
   index.ts100%53.85%100%
   interface.ts73.08%90.91%90.32%113, 114, 132, 144, 144, 144, 146, 146, 147, 150, 42, 47, 92
   json-abi.ts85.71%100%96.67%125, 126, 75, 76
   utilities.ts100%100%100%
packages/abi-coder/src/coders
   abstract-coder.ts100%100%87.50%46
   array.ts50%100%93.75%23, 24
   b256.ts66.67%100%94.12%31, 32
   boolean.ts60%100%82.35%17, 19, 20, 31, 32
   byte.ts50%100%94.12%29, 30
   enum.ts66.67%100%97.14%59, 60
   number.ts100%100%100%
   option.ts100%100%100%
   string.ts100%100%100%
   struct.ts100%100%100%
   tuple.ts100%100%100%
packages/abi-coder/src/fragments
   fragment.ts100%100%100%
   function-fragment.ts100%100%100%
   param-type.ts83.33%100%97.37%105, 106, 71, 75
packages/address/src
   address.ts71.43%100%95.65%107, 25, 26
   index.ts100%100%100%
   utils.ts87.50%100%96.55%83, 84
packages/constants/src
   index.ts100%100%100%
packages/contract/src
   index.ts100%100%100%
   scripts.ts81.25%100%93.88%36, 37, 89, 90, 92, 93
   util.ts0%100%96%41, 42
packages/contract/src/__test__
   test-utils.ts0%100%100%13, 20
packages/contract/src/contracts
   contract-factory.ts57.14%80%78.38%33, 37, 38, 43, 46, 46, 46, 47, 48, 50, 51, 56, 60, 61
   contract.ts80%100%100%23
packages/contract/src/contracts/functions
   base-invocation-scope.ts93.75%100%100%143, 166
   invocation-results.ts66.67%100%100%14, 28
   invocation-scope.ts60%100%100%23, 40
   multicall-scope.ts100%100%100%
packages/contract/src/contracts/multicall/static-out
   multicall-bin.ts100%100%100%
packages/example-contract/src/example-contract-types
   index.ts100%100%100%
packages/example-contract/src/example-contract-types/factories
   ExampleContractAbi__factory.ts100%50%83.33%37
packages/fuels/src
   index.ts100%100%100%
packages/hasher/src
   hasher.ts87.50%100%97.44%39, 57
   index.ts100%100%100%
packages/hdwallet/src
   hdwallet-spec.ts100%100%100%
   hdwallet.ts80.39%100%95.96%127, 128, 190, 191, 22, 22, 229, 24, 26, 39, 42, 43, 96, 97
   index.ts100%100%100%
packages/interfaces/src
   index.ts100%100%100%
packages/keystore/src
   aes-ctr-node.ts100%100%100%
   aes-ctr-web.ts100%0%24%15, 16, 17, 18, 19, 24, 25, 27, 39, 40, 41, 42, 44, 49, 51, 52, 54, 55, 57
   aes-ctr.ts80%75%72.22%19, 19, 20, 23, 26, 38
   index.ts100%100%100%
   keystore.ts50%75%100%17, 27
   randomBytes.ts50%100%100%4
   universal-crypto.ts83.33%100%72.73%15, 18, 19, 29
packages/math/src
   convert.ts66.67%100%85.71%28, 29, 37, 38, 43, 49, 49, 50, 54, 55
   index.ts100%100%100%
   math.ts100%100%100%
packages/merkle-shared/src
   common.ts100%100%100%
   cryptography.ts100%100%100%
   index.ts100%100%100%
packages/merkle/src
   binaryMerkleTree.ts71.43%100%97.01%110, 113, 72, 73
   index.ts100%100%100%
packages/merkle/src/types
   node.ts100%100%100%
packages/merklesum/src
   sumMerkleTree.ts83.33%100%97.01%128, 132, 133
packages/merklesum/src/types
   node.ts100%100%100%
   proof.ts100%100%100%
packages/mnemonic/src
   index.ts100%100%100%
   mnemonic-specs.ts100%100%100%
   mnemonic.ts80.95%100%96.08%141, 142, 157, 40, 41, 83
   utils.ts56.25%100%79.17%17, 20, 20, 20, 21, 22, 24, 24, 24, 24, 25, 29, 30, 31, 32, 33, 35, 36, 37, 58, 62, 63
packages/predicate/src
   predicate.ts100%100%100%
packages/predicate/src/test-predicate-address
   index.ts100%100%100%
packages/predicate/src/test-predicate-false
   index.ts100%100%100%
packages/predicate/src/test-predicate-struct
   index.ts100%100%100%
packages/predicate/src/test-predicate-true
   index.ts100%100%100%
packages/predicate/src/test-predicate-u32
   index.ts100%100%100%
packages/providers/src
   coin-quantity.ts66.67%100%100%16, 19
   coin.ts100%0%100%
   index.ts100%100%100%
   provider.ts47.37%73.53%71.64%106, 114, 204, 214, 215, 253, 254, 257, 258, 349, 406, 406, 406, 407, 408, 408, 408, 409, 411, 414, 416, 416, 417, 420, 425, 437, 437, 437, 438, 439, 439, 439, 440, 442, 445, 447, 447, 448, 451, 456, 458, 467, 468, 468, 469, 471, 480, 481, 481, 482, 484, 531, 572, 573, 574, 604, 605, 610
   util.ts27.27%42.86%37.50%15, 16, 16, 16, 16, 18, 19, 22, 25, 29, 30, 30, 31, 41, 44, 45, 45, 45, 45, 45, 47, 54, 60, 68, 73, 77, 79, 81
packages/providers/src/__generated__
   operations.ts100%64%81.44%1457, 1459, 1486, 1488, 1500, 1502, 1515, 1517, 1529, 1531, 1544, 1546, 1558, 1560, 1600, 1602, 1698, 1700
packages/providers/src/transaction-request
   index.ts100%100%100%
   input.ts77.78%100%90%35, 49, 69
   output.ts71.43%100%83.33%106, 57, 57, 75
   storage-slot.ts50%100%83.33%25, 26, 27
   transaction-request.ts65.22%70.37%76.98%122, 132, 144, 145, 146, 195, 196, 202, 203, 208, 209, 236, 238, 238, 239, 242, 269, 270, 293, 320, 358, 359, 371, 378, 379, 404, 405, 414, 460, 460, 461, 463, 477, 485, 486, 488, 494, 495, 503, 504, 510, 512, 539, 539, 544, 547, 78, 79, 83, 84, 85, 86, 91, 92, 93, 94
   witness.ts100%100%100%
packages/providers/src/transaction-response
   index.ts100%100%100%
   transaction-response.ts33.33%100%75.76%100, 101, 110, 110, 110, 113, 116, 117, 118, 138, 147, 148, 63, 71
packages/script/src
   constants.ts100%100%100%
   errors.ts0%0%30%13, 13, 13, 16, 16, 16, 20, 21, 22, 24, 24, 24, 27, 31, 32, 32, 32, 34, 34, 34, 37, 40, 40, 46, 47, 51, 52, 52, 53, 53
   index.ts100%100%100%
   script.ts28.57%66.67%77.14%115, 42, 43, 45, 46, 49, 50, 52, 53, 57, 87, 95, 96
   scripts.ts100%0%50%18, 19
   utils.ts0%0%37.50%11, 11, 12, 13, 14, 14, 18, 6, 6, 6
packages/signer/src
   index.ts100%100%100%
   signer.ts75%100%97.37%33, 33, 35
packages/sparsemerkle/src
   deepSparseMerkleSubTree.ts66.67%60%75%13, 14, 20, 21, 37, 38
   index.ts100%100%100%
   proofs.ts63.64%100%85.11%25, 27, 27, 27, 28, 31, 32, 32, 34, 36, 37
   sparseMerkleTree.ts77.50%100%91.60%105, 106, 116, 118, 126, 128, 129, 131, 139, 139, 143, 144, 147, 161, 162, 277, 280, 98, 99
   treeHasher.ts100%100%100%
   utils.ts100%100%100%
packages/sparsemerkle/src/types
   sparseCompactMerkleProof.ts100%100%100%
   sparseMerkleProof.ts100%100%100%
packages/transactions/src
   consts.ts100%100%100%
   index.ts100%100%100%
packages/transactions/src/coders
   byte-array.ts100%100%100%
   input.ts75%100%97.53%174, 184, 197, 207
   output.ts87.50%100%98.48%316, 342, 355, 381
   receipt.ts87.50%97.06%97.27%627, 629, 630, 632, 676, 676, 714, 715, 718, 731, 773
   storage-slot.ts100%100%100%
   transaction.ts75%100%98.55%304, 314, 327, 337
   utxo-id.ts100%100%100%
   witness.ts100%100%100%
packages/typechain-target-fuels/src/codegen
   types.ts66.04%66.67%61.19%102, 104, 116, 117, 120, 120, 120, 120, 148, 149, 152, 152, 152, 152, 153, 155, 156, 159, 161, 163, 24, 25, 25, 25, 27, 27, 28, 31, 39, 41, 41, 44, 44, 45, 47, 50, 52, 52, 53, 56, 64, 64, 95, 96
packages/typechain-target-fuels/src/parser
   abiParser.ts44.44%86.96%65%148, 200, 201, 209, 210, 218, 219, 227, 228, 252, 253, 253, 263, 264, 266, 269, 269, 270, 273, 273, 274, 277, 277, 278, 280, 280, 280, 280, 281, 284, 291, 292, 294, 297, 297, 297, 297, 297, 299, 299, 299, 302, 302, 303, 304, 304, 305, 305, 305, 306, 307, 307, 310
   parseSvmTypes.ts50%100%88%127, 128, 165, 176, 187, 192, 196, 196, 196, 196, 196, 200, 206, 208, 212, 216
packages/wallet-manager/src
   wallet-manager-spec.ts100%100%100%
   wallet-manager.ts100%100%100%
packages/wallet-manager/src/storages
   memory-storage.ts100%100%100%
packages/wallet-manager/src/vaults
   mnemonic-vault.ts85.71%100%93.33%21, 71, 74
   privatekey-vault.ts60%100%95%24, 57, 58
packages/wallet/src
   index.ts100%100%100%
   test-utils.ts66.67%100%100%8
   wallet-spec.ts100%100%100%
   wallet.ts75%95.83%94.74%138, 147, 148, 149, 175, 199, 245, 334, 62, 63
packages/wordlists/src
   index.ts100%100%100%
packages/wordlists/src/words
   english.ts100%100%100%

@camsjams camsjams changed the title feat: add simpler Option style feat!: add simpler Option style Aug 30, 2022
@github-actions
Copy link
Contributor

Total Coverage: 89.78%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
packages/abi-coder/src
   abi-coder.ts91.43%100%95.95%126, 127, 37, 46, 56, 57
   constants.ts100%100%100%
   index.ts100%53.85%100%
   interface.ts73.08%90.91%90.32%113, 114, 132, 144, 144, 144, 146, 146, 147, 150, 42, 47, 92
   json-abi.ts85.71%100%96.67%125, 126, 75, 76
   utilities.ts100%100%100%
packages/abi-coder/src/coders
   abstract-coder.ts100%100%87.50%46
   array.ts50%100%93.75%23, 24
   b256.ts66.67%100%94.12%31, 32
   boolean.ts60%100%82.35%17, 19, 20, 31, 32
   byte.ts50%100%94.12%29, 30
   enum.ts66.67%100%97.14%59, 60
   number.ts100%100%100%
   option.ts100%100%100%
   string.ts100%100%100%
   struct.ts100%100%100%
   tuple.ts100%100%100%
packages/abi-coder/src/fragments
   fragment.ts100%100%100%
   function-fragment.ts100%100%100%
   param-type.ts83.33%100%97.37%105, 106, 71, 75
packages/address/src
   address.ts71.43%100%95.65%107, 25, 26
   index.ts100%100%100%
   utils.ts87.50%100%96.55%83, 84
packages/constants/src
   index.ts100%100%100%
packages/contract/src
   index.ts100%100%100%
   scripts.ts81.25%100%93.88%36, 37, 89, 90, 92, 93
   util.ts0%100%96%41, 42
packages/contract/src/__test__
   test-utils.ts0%100%100%13, 20
packages/contract/src/contracts
   contract-factory.ts57.14%80%78.38%33, 37, 38, 43, 46, 46, 46, 47, 48, 50, 51, 56, 60, 61
   contract.ts80%100%100%23
packages/contract/src/contracts/functions
   base-invocation-scope.ts93.75%100%100%143, 166
   invocation-results.ts66.67%100%100%14, 28
   invocation-scope.ts60%100%100%23, 40
   multicall-scope.ts100%100%100%
packages/contract/src/contracts/multicall/static-out
   multicall-bin.ts100%100%100%
packages/example-contract/src/example-contract-types
   index.ts100%100%100%
packages/example-contract/src/example-contract-types/factories
   ExampleContractAbi__factory.ts100%50%83.33%37
packages/fuels/src
   index.ts100%100%100%
packages/hasher/src
   hasher.ts87.50%100%97.44%39, 57
   index.ts100%100%100%
packages/hdwallet/src
   hdwallet-spec.ts100%100%100%
   hdwallet.ts80.39%100%95.96%127, 128, 190, 191, 22, 22, 229, 24, 26, 39, 42, 43, 96, 97
   index.ts100%100%100%
packages/interfaces/src
   index.ts100%100%100%
packages/keystore/src
   aes-ctr-node.ts100%100%100%
   aes-ctr-web.ts100%0%24%15, 16, 17, 18, 19, 24, 25, 27, 39, 40, 41, 42, 44, 49, 51, 52, 54, 55, 57
   aes-ctr.ts80%75%72.22%19, 19, 20, 23, 26, 38
   index.ts100%100%100%
   keystore.ts50%75%100%17, 27
   randomBytes.ts50%100%100%4
   universal-crypto.ts83.33%100%72.73%15, 18, 19, 29
packages/math/src
   convert.ts66.67%100%85.71%28, 29, 37, 38, 43, 49, 49, 50, 54, 55
   index.ts100%100%100%
   math.ts100%100%100%
packages/merkle-shared/src
   common.ts100%100%100%
   cryptography.ts100%100%100%
   index.ts100%100%100%
packages/merkle/src
   binaryMerkleTree.ts71.43%100%97.01%110, 113, 72, 73
   index.ts100%100%100%
packages/merkle/src/types
   node.ts100%100%100%
packages/merklesum/src
   sumMerkleTree.ts83.33%100%97.01%128, 132, 133
packages/merklesum/src/types
   node.ts100%100%100%
   proof.ts100%100%100%
packages/mnemonic/src
   index.ts100%100%100%
   mnemonic-specs.ts100%100%100%
   mnemonic.ts80.95%100%96.08%141, 142, 157, 40, 41, 83
   utils.ts56.25%100%79.17%17, 20, 20, 20, 21, 22, 24, 24, 24, 24, 25, 29, 30, 31, 32, 33, 35, 36, 37, 58, 62, 63
packages/predicate/src
   predicate.ts100%100%100%
packages/predicate/src/test-predicate-address
   index.ts100%100%100%
packages/predicate/src/test-predicate-false
   index.ts100%100%100%
packages/predicate/src/test-predicate-struct
   index.ts100%100%100%
packages/predicate/src/test-predicate-true
   index.ts100%100%100%
packages/predicate/src/test-predicate-u32
   index.ts100%100%100%
packages/providers/src
   coin-quantity.ts66.67%100%100%16, 19
   coin.ts100%0%100%
   index.ts100%100%100%
   provider.ts47.37%73.53%71.64%106, 114, 204, 214, 215, 253, 254, 257, 258, 349, 406, 406, 406, 407, 408, 408, 408, 409, 411, 414, 416, 416, 417, 420, 425, 437, 437, 437, 438, 439, 439, 439, 440, 442, 445, 447, 447, 448, 451, 456, 458, 467, 468, 468, 469, 471, 480, 481, 481, 482, 484, 531, 572, 573, 574, 604, 605, 610
   util.ts27.27%42.86%37.50%15, 16, 16, 16, 16, 18, 19, 22, 25, 29, 30, 30, 31, 41, 44, 45, 45, 45, 45, 45, 47, 54, 60, 68, 73, 77, 79, 81
packages/providers/src/__generated__
   operations.ts100%64%81.44%1457, 1459, 1486, 1488, 1500, 1502, 1515, 1517, 1529, 1531, 1544, 1546, 1558, 1560, 1600, 1602, 1698, 1700
packages/providers/src/transaction-request
   index.ts100%100%100%
   input.ts77.78%100%90%35, 49, 69
   output.ts71.43%100%83.33%106, 57, 57, 75
   storage-slot.ts50%100%83.33%25, 26, 27
   transaction-request.ts65.22%70.37%76.98%122, 132, 144, 145, 146, 195, 196, 202, 203, 208, 209, 236, 238, 238, 239, 242, 269, 270, 293, 320, 358, 359, 371, 378, 379, 404, 405, 414, 460, 460, 461, 463, 477, 485, 486, 488, 494, 495, 503, 504, 510, 512, 539, 539, 544, 547, 78, 79, 83, 84, 85, 86, 91, 92, 93, 94
   witness.ts100%100%100%
packages/providers/src/transaction-response
   index.ts100%100%100%
   transaction-response.ts33.33%100%75.76%100, 101, 110, 110, 110, 113, 116, 117, 118, 138, 147, 148, 63, 71
packages/script/src
   constants.ts100%100%100%
   errors.ts0%0%30%13, 13, 13, 16, 16, 16, 20, 21, 22, 24, 24, 24, 27, 31, 32, 32, 32, 34, 34, 34, 37, 40, 40, 46, 47, 51, 52, 52, 53, 53
   index.ts100%100%100%
   script.ts28.57%66.67%77.14%115, 42, 43, 45, 46, 49, 50, 52, 53, 57, 87, 95, 96
   scripts.ts100%0%50%18, 19
   utils.ts0%0%37.50%11, 11, 12, 13, 14, 14, 18, 6, 6, 6
packages/signer/src
   index.ts100%100%100%
   signer.ts75%100%97.37%33, 33, 35
packages/sparsemerkle/src
   deepSparseMerkleSubTree.ts66.67%60%75%13, 14, 20, 21, 37, 38
   index.ts100%100%100%
   proofs.ts63.64%100%85.11%25, 27, 27, 27, 28, 31, 32, 32, 34, 36, 37
   sparseMerkleTree.ts77.50%100%91.60%105, 106, 116, 118, 126, 128, 129, 131, 139, 139, 143, 144, 147, 161, 162, 277, 280, 98, 99
   treeHasher.ts100%100%100%
   utils.ts100%100%100%
packages/sparsemerkle/src/types
   sparseCompactMerkleProof.ts100%100%100%
   sparseMerkleProof.ts100%100%100%
packages/transactions/src
   consts.ts100%100%100%
   index.ts100%100%100%
packages/transactions/src/coders
   byte-array.ts100%100%100%
   input.ts75%100%97.53%174, 184, 197, 207
   output.ts87.50%100%98.48%316, 342, 355, 381
   receipt.ts87.50%97.06%97.27%627, 629, 630, 632, 676, 676, 714, 715, 718, 731, 773
   storage-slot.ts100%100%100%
   transaction.ts75%100%98.55%304, 314, 327, 337
   utxo-id.ts100%100%100%
   witness.ts100%100%100%
packages/typechain-target-fuels/src/codegen
   types.ts65.45%66.67%61.19%102, 104, 116, 117, 120, 120, 120, 120, 148, 149, 152, 152, 152, 152, 153, 155, 156, 159, 161, 163, 184, 24, 25, 25, 25, 27, 27, 28, 31, 39, 41, 41, 44, 44, 45, 47, 50, 52, 52, 53, 56, 64, 64, 95, 96
packages/typechain-target-fuels/src/parser
   abiParser.ts44.44%86.96%65%148, 200, 201, 209, 210, 218, 219, 227, 228, 252, 253, 253, 263, 264, 266, 269, 269, 270, 273, 273, 274, 277, 277, 278, 280, 280, 280, 280, 281, 284, 291, 292, 294, 297, 297, 297, 297, 297, 299, 299, 299, 302, 302, 303, 304, 304, 305, 305, 305, 306, 307, 307, 310
   parseSvmTypes.ts50%100%88%127, 128, 165, 176, 187, 192, 196, 196, 196, 196, 196, 200, 206, 208, 212, 216
packages/wallet-manager/src
   wallet-manager-spec.ts100%100%100%
   wallet-manager.ts100%100%100%
packages/wallet-manager/src/storages
   memory-storage.ts100%100%100%
packages/wallet-manager/src/vaults
   mnemonic-vault.ts85.71%100%93.33%21, 71, 74
   privatekey-vault.ts60%100%95%24, 57, 58
packages/wallet/src
   index.ts100%100%100%
   test-utils.ts66.67%100%100%8
   wallet-spec.ts100%100%100%
   wallet.ts75%95.83%94.74%138, 147, 148, 149, 175, 199, 245, 334, 62, 63
packages/wordlists/src
   index.ts100%100%100%
packages/wordlists/src/words
   english.ts100%100%100%

packages/abi-coder/src/abi-coder.ts Outdated Show resolved Hide resolved
luizstacio
luizstacio previously approved these changes Aug 31, 2022
Copy link
Member

@luizstacio luizstacio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one code comment.

Co-authored-by: Luiz Estácio | stacio.eth <luizstacio@gmail.com>
@github-actions
Copy link
Contributor

Total Coverage: 89.79%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
packages/abi-coder/src
   abi-coder.ts91.18%100%96.10%129, 130, 37, 46, 56, 57
   constants.ts100%100%100%
   index.ts100%53.85%100%
   interface.ts73.08%90.91%90.32%113, 114, 132, 144, 144, 144, 146, 146, 147, 150, 42, 47, 92
   json-abi.ts85.71%100%96.67%125, 126, 75, 76
   utilities.ts100%100%100%
packages/abi-coder/src/coders
   abstract-coder.ts100%100%87.50%46
   array.ts50%100%93.75%23, 24
   b256.ts66.67%100%94.12%31, 32
   boolean.ts60%100%82.35%17, 19, 20, 31, 32
   byte.ts50%100%94.12%29, 30
   enum.ts66.67%100%97.14%59, 60
   number.ts100%100%100%
   option.ts100%100%100%
   string.ts100%100%100%
   struct.ts100%100%100%
   tuple.ts100%100%100%
packages/abi-coder/src/fragments
   fragment.ts100%100%100%
   function-fragment.ts100%100%100%
   param-type.ts83.33%100%97.37%105, 106, 71, 75
packages/address/src
   address.ts71.43%100%95.65%107, 25, 26
   index.ts100%100%100%
   utils.ts87.50%100%96.55%83, 84
packages/constants/src
   index.ts100%100%100%
packages/contract/src
   index.ts100%100%100%
   scripts.ts81.25%100%93.88%36, 37, 89, 90, 92, 93
   util.ts0%100%96%41, 42
packages/contract/src/__test__
   test-utils.ts0%100%100%13, 20
packages/contract/src/contracts
   contract-factory.ts57.14%80%78.38%33, 37, 38, 43, 46, 46, 46, 47, 48, 50, 51, 56, 60, 61
   contract.ts80%100%100%23
packages/contract/src/contracts/functions
   base-invocation-scope.ts93.75%100%100%143, 166
   invocation-results.ts66.67%100%100%14, 28
   invocation-scope.ts60%100%100%23, 40
   multicall-scope.ts100%100%100%
packages/contract/src/contracts/multicall/static-out
   multicall-bin.ts100%100%100%
packages/example-contract/src/example-contract-types
   index.ts100%100%100%
packages/example-contract/src/example-contract-types/factories
   ExampleContractAbi__factory.ts100%50%83.33%37
packages/fuels/src
   index.ts100%100%100%
packages/hasher/src
   hasher.ts87.50%100%97.44%39, 57
   index.ts100%100%100%
packages/hdwallet/src
   hdwallet-spec.ts100%100%100%
   hdwallet.ts80.39%100%95.96%127, 128, 190, 191, 22, 22, 229, 24, 26, 39, 42, 43, 96, 97
   index.ts100%100%100%
packages/interfaces/src
   index.ts100%100%100%
packages/keystore/src
   aes-ctr-node.ts100%100%100%
   aes-ctr-web.ts100%0%24%15, 16, 17, 18, 19, 24, 25, 27, 39, 40, 41, 42, 44, 49, 51, 52, 54, 55, 57
   aes-ctr.ts80%75%72.22%19, 19, 20, 23, 26, 38
   index.ts100%100%100%
   keystore.ts50%75%100%17, 27
   randomBytes.ts50%100%100%4
   universal-crypto.ts83.33%100%72.73%15, 18, 19, 29
packages/math/src
   convert.ts66.67%100%85.71%28, 29, 37, 38, 43, 49, 49, 50, 54, 55
   index.ts100%100%100%
   math.ts100%100%100%
packages/merkle-shared/src
   common.ts100%100%100%
   cryptography.ts100%100%100%
   index.ts100%100%100%
packages/merkle/src
   binaryMerkleTree.ts71.43%100%97.01%110, 113, 72, 73
   index.ts100%100%100%
packages/merkle/src/types
   node.ts100%100%100%
packages/merklesum/src
   sumMerkleTree.ts83.33%100%97.01%128, 132, 133
packages/merklesum/src/types
   node.ts100%100%100%
   proof.ts100%100%100%
packages/mnemonic/src
   index.ts100%100%100%
   mnemonic-specs.ts100%100%100%
   mnemonic.ts80.95%100%96.08%141, 142, 157, 40, 41, 83
   utils.ts56.25%100%79.17%17, 20, 20, 20, 21, 22, 24, 24, 24, 24, 25, 29, 30, 31, 32, 33, 35, 36, 37, 58, 62, 63
packages/predicate/src
   predicate.ts100%100%100%
packages/predicate/src/test-predicate-address
   index.ts100%100%100%
packages/predicate/src/test-predicate-false
   index.ts100%100%100%
packages/predicate/src/test-predicate-struct
   index.ts100%100%100%
packages/predicate/src/test-predicate-true
   index.ts100%100%100%
packages/predicate/src/test-predicate-u32
   index.ts100%100%100%
packages/providers/src
   coin-quantity.ts66.67%100%100%16, 19
   coin.ts100%0%100%
   index.ts100%100%100%
   provider.ts47.37%74.29%71.85%106, 114, 204, 214, 215, 253, 254, 257, 258, 349, 409, 409, 409, 410, 411, 411, 411, 412, 414, 417, 419, 419, 420, 423, 428, 440, 440, 440, 441, 442, 442, 442, 443, 445, 448, 450, 450, 451, 454, 459, 461, 470, 471, 471, 472, 474, 483, 484, 484, 485, 487, 534, 575, 576, 577, 607, 608, 613
   util.ts27.27%42.86%37.50%15, 16, 16, 16, 16, 18, 19, 22, 25, 29, 30, 30, 31, 41, 44, 45, 45, 45, 45, 45, 47, 54, 60, 68, 73, 77, 79, 81
packages/providers/src/__generated__
   operations.ts100%64%81.44%1464, 1466, 1493, 1495, 1507, 1509, 1522, 1524, 1536, 1538, 1551, 1553, 1565, 1567, 1607, 1609, 1705, 1707
packages/providers/src/transaction-request
   index.ts100%100%100%
   input.ts77.78%100%90%35, 49, 69
   output.ts71.43%100%83.33%106, 57, 57, 75
   storage-slot.ts50%100%83.33%25, 26, 27
   transaction-request.ts65.22%70.37%76.98%122, 132, 144, 145, 146, 195, 196, 202, 203, 208, 209, 236, 238, 238, 239, 242, 269, 270, 293, 320, 358, 359, 371, 378, 379, 404, 405, 414, 460, 460, 461, 463, 477, 485, 486, 488, 494, 495, 503, 504, 510, 512, 539, 539, 544, 547, 78, 79, 83, 84, 85, 86, 91, 92, 93, 94
   witness.ts100%100%100%
packages/providers/src/transaction-response
   index.ts100%100%100%
   transaction-response.ts33.33%100%75.76%100, 101, 110, 110, 110, 113, 116, 117, 118, 138, 147, 148, 63, 71
packages/script/src
   constants.ts100%100%100%
   errors.ts0%0%30%13, 13, 13, 16, 16, 16, 20, 21, 22, 24, 24, 24, 27, 31, 32, 32, 32, 34, 34, 34, 37, 40, 40, 46, 47, 51, 52, 52, 53, 53
   index.ts100%100%100%
   script.ts28.57%66.67%77.14%115, 42, 43, 45, 46, 49, 50, 52, 53, 57, 87, 95, 96
   scripts.ts100%0%50%18, 19
   utils.ts0%0%37.50%11, 11, 12, 13, 14, 14, 18, 6, 6, 6
packages/signer/src
   index.ts100%100%100%
   signer.ts75%100%97.37%33, 33, 35
packages/sparsemerkle/src
   deepSparseMerkleSubTree.ts66.67%60%75%13, 14, 20, 21, 37, 38
   index.ts100%100%100%
   proofs.ts63.64%100%85.11%25, 27, 27, 27, 28, 31, 32, 32, 34, 36, 37
   sparseMerkleTree.ts77.50%100%91.60%105, 106, 116, 118, 126, 128, 129, 131, 139, 139, 143, 144, 147, 161, 162, 277, 280, 98, 99
   treeHasher.ts100%100%100%
   utils.ts100%100%100%
packages/sparsemerkle/src/types
   sparseCompactMerkleProof.ts100%100%100%
   sparseMerkleProof.ts100%100%100%
packages/transactions/src
   consts.ts100%100%100%
   index.ts100%100%100%
packages/transactions/src/coders
   byte-array.ts100%100%100%
   input.ts75%100%97.53%174, 184, 197, 207
   output.ts87.50%100%98.48%316, 342, 355, 381
   receipt.ts87.50%97.06%97.27%627, 629, 630, 632, 676, 676, 714, 715, 718, 731, 773
   storage-slot.ts100%100%100%
   transaction.ts75%100%98.55%304, 314, 327, 337
   utxo-id.ts100%100%100%
   witness.ts100%100%100%
packages/typechain-target-fuels/src/codegen
   types.ts65.45%66.67%61.19%102, 104, 116, 117, 120, 120, 120, 120, 148, 149, 152, 152, 152, 152, 153, 155, 156, 159, 161, 163, 184, 24, 25, 25, 25, 27, 27, 28, 31, 39, 41, 41, 44, 44, 45, 47, 50, 52, 52, 53, 56, 64, 64, 95, 96
packages/typechain-target-fuels/src/parser
   abiParser.ts44.44%86.96%65%148, 200, 201, 209, 210, 218, 219, 227, 228, 252, 253, 253, 263, 264, 266, 269, 269, 270, 273, 273, 274, 277, 277, 278, 280, 280, 280, 280, 281, 284, 291, 292, 294, 297, 297, 297, 297, 297, 299, 299, 299, 302, 302, 303, 304, 304, 305, 305, 305, 306, 307, 307, 310
   parseSvmTypes.ts50%100%88%127, 128, 165, 176, 187, 192, 196, 196, 196, 196, 196, 200, 206, 208, 212, 216
packages/wallet-manager/src
   wallet-manager-spec.ts100%100%100%
   wallet-manager.ts100%100%100%
packages/wallet-manager/src/storages
   memory-storage.ts100%100%100%
packages/wallet-manager/src/vaults
   mnemonic-vault.ts85.71%100%93.33%21, 71, 74
   privatekey-vault.ts60%100%95%24, 57, 58
packages/wallet/src
   index.ts100%100%100%
   test-utils.ts66.67%100%100%8
   wallet-spec.ts100%100%100%
   wallet.ts75%95.83%94.74%144, 153, 154, 155, 181, 205, 251, 340, 62, 63
packages/wordlists/src
   index.ts100%100%100%
packages/wordlists/src/words
   english.ts100%100%100%

@github-actions
Copy link
Contributor

Total Coverage: 89.79%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
packages/abi-coder/src
   abi-coder.ts91.18%100%96.10%129, 130, 37, 46, 56, 57
   constants.ts100%100%100%
   index.ts100%53.85%100%
   interface.ts73.08%90.91%90.32%113, 114, 132, 144, 144, 144, 146, 146, 147, 150, 42, 47, 92
   json-abi.ts85.71%100%96.67%125, 126, 75, 76
   utilities.ts100%100%100%
packages/abi-coder/src/coders
   abstract-coder.ts100%100%87.50%46
   array.ts50%100%93.75%23, 24
   b256.ts66.67%100%94.12%31, 32
   boolean.ts60%100%82.35%17, 19, 20, 31, 32
   byte.ts50%100%94.12%29, 30
   enum.ts66.67%100%97.14%59, 60
   number.ts100%100%100%
   option.ts100%100%100%
   string.ts100%100%100%
   struct.ts100%100%100%
   tuple.ts100%100%100%
packages/abi-coder/src/fragments
   fragment.ts100%100%100%
   function-fragment.ts100%100%100%
   param-type.ts83.33%100%97.37%105, 106, 71, 75
packages/address/src
   address.ts71.43%100%95.65%107, 25, 26
   index.ts100%100%100%
   utils.ts87.50%100%96.55%83, 84
packages/constants/src
   index.ts100%100%100%
packages/contract/src
   index.ts100%100%100%
   scripts.ts81.25%100%93.88%36, 37, 89, 90, 92, 93
   util.ts0%100%96%41, 42
packages/contract/src/__test__
   test-utils.ts0%100%100%13, 20
packages/contract/src/contracts
   contract-factory.ts57.14%80%78.38%33, 37, 38, 43, 46, 46, 46, 47, 48, 50, 51, 56, 60, 61
   contract.ts80%100%100%23
packages/contract/src/contracts/functions
   base-invocation-scope.ts93.75%100%100%143, 166
   invocation-results.ts66.67%100%100%14, 28
   invocation-scope.ts60%100%100%23, 40
   multicall-scope.ts100%100%100%
packages/contract/src/contracts/multicall/static-out
   multicall-bin.ts100%100%100%
packages/example-contract/src/example-contract-types
   index.ts100%100%100%
packages/example-contract/src/example-contract-types/factories
   ExampleContractAbi__factory.ts100%50%83.33%37
packages/fuels/src
   index.ts100%100%100%
packages/hasher/src
   hasher.ts87.50%100%97.44%39, 57
   index.ts100%100%100%
packages/hdwallet/src
   hdwallet-spec.ts100%100%100%
   hdwallet.ts80.39%100%95.96%127, 128, 190, 191, 22, 22, 229, 24, 26, 39, 42, 43, 96, 97
   index.ts100%100%100%
packages/interfaces/src
   index.ts100%100%100%
packages/keystore/src
   aes-ctr-node.ts100%100%100%
   aes-ctr-web.ts100%0%24%15, 16, 17, 18, 19, 24, 25, 27, 39, 40, 41, 42, 44, 49, 51, 52, 54, 55, 57
   aes-ctr.ts80%75%72.22%19, 19, 20, 23, 26, 38
   index.ts100%100%100%
   keystore.ts50%75%100%17, 27
   randomBytes.ts50%100%100%4
   universal-crypto.ts83.33%100%72.73%15, 18, 19, 29
packages/math/src
   convert.ts66.67%100%85.71%28, 29, 37, 38, 43, 49, 49, 50, 54, 55
   index.ts100%100%100%
   math.ts100%100%100%
packages/merkle-shared/src
   common.ts100%100%100%
   cryptography.ts100%100%100%
   index.ts100%100%100%
packages/merkle/src
   binaryMerkleTree.ts71.43%100%97.01%110, 113, 72, 73
   index.ts100%100%100%
packages/merkle/src/types
   node.ts100%100%100%
packages/merklesum/src
   sumMerkleTree.ts83.33%100%97.01%128, 132, 133
packages/merklesum/src/types
   node.ts100%100%100%
   proof.ts100%100%100%
packages/mnemonic/src
   index.ts100%100%100%
   mnemonic-specs.ts100%100%100%
   mnemonic.ts80.95%100%96.08%141, 142, 157, 40, 41, 83
   utils.ts56.25%100%79.17%17, 20, 20, 20, 21, 22, 24, 24, 24, 24, 25, 29, 30, 31, 32, 33, 35, 36, 37, 58, 62, 63
packages/predicate/src
   predicate.ts100%100%100%
packages/predicate/src/test-predicate-address
   index.ts100%100%100%
packages/predicate/src/test-predicate-false
   index.ts100%100%100%
packages/predicate/src/test-predicate-struct
   index.ts100%100%100%
packages/predicate/src/test-predicate-true
   index.ts100%100%100%
packages/predicate/src/test-predicate-u32
   index.ts100%100%100%
packages/providers/src
   coin-quantity.ts66.67%100%100%16, 19
   coin.ts100%0%100%
   index.ts100%100%100%
   provider.ts47.37%74.29%71.85%106, 114, 204, 214, 215, 253, 254, 257, 258, 349, 409, 409, 409, 410, 411, 411, 411, 412, 414, 417, 419, 419, 420, 423, 428, 440, 440, 440, 441, 442, 442, 442, 443, 445, 448, 450, 450, 451, 454, 459, 461, 470, 471, 471, 472, 474, 483, 484, 484, 485, 487, 534, 575, 576, 577, 607, 608, 613
   util.ts27.27%42.86%37.50%15, 16, 16, 16, 16, 18, 19, 22, 25, 29, 30, 30, 31, 41, 44, 45, 45, 45, 45, 45, 47, 54, 60, 68, 73, 77, 79, 81
packages/providers/src/__generated__
   operations.ts100%64%81.44%1464, 1466, 1493, 1495, 1507, 1509, 1522, 1524, 1536, 1538, 1551, 1553, 1565, 1567, 1607, 1609, 1705, 1707
packages/providers/src/transaction-request
   index.ts100%100%100%
   input.ts77.78%100%90%35, 49, 69
   output.ts71.43%100%83.33%106, 57, 57, 75
   storage-slot.ts50%100%83.33%25, 26, 27
   transaction-request.ts65.22%70.37%76.98%122, 132, 144, 145, 146, 195, 196, 202, 203, 208, 209, 236, 238, 238, 239, 242, 269, 270, 293, 320, 358, 359, 371, 378, 379, 404, 405, 414, 460, 460, 461, 463, 477, 485, 486, 488, 494, 495, 503, 504, 510, 512, 539, 539, 544, 547, 78, 79, 83, 84, 85, 86, 91, 92, 93, 94
   witness.ts100%100%100%
packages/providers/src/transaction-response
   index.ts100%100%100%
   transaction-response.ts33.33%100%75.76%100, 101, 110, 110, 110, 113, 116, 117, 118, 138, 147, 148, 63, 71
packages/script/src
   constants.ts100%100%100%
   errors.ts0%0%30%13, 13, 13, 16, 16, 16, 20, 21, 22, 24, 24, 24, 27, 31, 32, 32, 32, 34, 34, 34, 37, 40, 40, 46, 47, 51, 52, 52, 53, 53
   index.ts100%100%100%
   script.ts28.57%66.67%77.14%115, 42, 43, 45, 46, 49, 50, 52, 53, 57, 87, 95, 96
   scripts.ts100%0%50%18, 19
   utils.ts0%0%37.50%11, 11, 12, 13, 14, 14, 18, 6, 6, 6
packages/signer/src
   index.ts100%100%100%
   signer.ts75%100%97.37%33, 33, 35
packages/sparsemerkle/src
   deepSparseMerkleSubTree.ts66.67%60%75%13, 14, 20, 21, 37, 38
   index.ts100%100%100%
   proofs.ts63.64%100%85.11%25, 27, 27, 27, 28, 31, 32, 32, 34, 36, 37
   sparseMerkleTree.ts77.50%100%91.60%105, 106, 116, 118, 126, 128, 129, 131, 139, 139, 143, 144, 147, 161, 162, 277, 280, 98, 99
   treeHasher.ts100%100%100%
   utils.ts100%100%100%
packages/sparsemerkle/src/types
   sparseCompactMerkleProof.ts100%100%100%
   sparseMerkleProof.ts100%100%100%
packages/transactions/src
   consts.ts100%100%100%
   index.ts100%100%100%
packages/transactions/src/coders
   byte-array.ts100%100%100%
   input.ts75%100%97.53%174, 184, 197, 207
   output.ts87.50%100%98.48%316, 342, 355, 381
   receipt.ts87.50%97.06%97.27%627, 629, 630, 632, 676, 676, 714, 715, 718, 731, 773
   storage-slot.ts100%100%100%
   transaction.ts75%100%98.55%304, 314, 327, 337
   utxo-id.ts100%100%100%
   witness.ts100%100%100%
packages/typechain-target-fuels/src/codegen
   types.ts65.45%66.67%61.19%102, 104, 116, 117, 120, 120, 120, 120, 148, 149, 152, 152, 152, 152, 153, 155, 156, 159, 161, 163, 184, 24, 25, 25, 25, 27, 27, 28, 31, 39, 41, 41, 44, 44, 45, 47, 50, 52, 52, 53, 56, 64, 64, 95, 96
packages/typechain-target-fuels/src/parser
   abiParser.ts44.44%86.96%65%148, 200, 201, 209, 210, 218, 219, 227, 228, 252, 253, 253, 263, 264, 266, 269, 269, 270, 273, 273, 274, 277, 277, 278, 280, 280, 280, 280, 281, 284, 291, 292, 294, 297, 297, 297, 297, 297, 299, 299, 299, 302, 302, 303, 304, 304, 305, 305, 305, 306, 307, 307, 310
   parseSvmTypes.ts50%100%88%127, 128, 165, 176, 187, 192, 196, 196, 196, 196, 196, 200, 206, 208, 212, 216
packages/wallet-manager/src
   wallet-manager-spec.ts100%100%100%
   wallet-manager.ts100%100%100%
packages/wallet-manager/src/storages
   memory-storage.ts100%100%100%
packages/wallet-manager/src/vaults
   mnemonic-vault.ts85.71%100%93.33%21, 71, 74
   privatekey-vault.ts60%100%95%24, 57, 58
packages/wallet/src
   index.ts100%100%100%
   test-utils.ts66.67%100%100%8
   wallet-spec.ts100%100%100%
   wallet.ts75%95.83%94.74%144, 153, 154, 155, 181, 205, 251, 340, 62, 63
packages/wordlists/src
   index.ts100%100%100%
packages/wordlists/src/words
   english.ts100%100%100%

@camsjams camsjams merged commit dfb2612 into master Sep 1, 2022
@camsjams camsjams deleted the cm/issue-470 branch September 1, 2022 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add support to Option<T>
3 participants