Commit Graph
74 Commits
Author SHA1 Message Date
Amaury Martiny 2699dcfc9c refactor: Metadata overhaul (#913)
* Replace part1

* Replace part2

* Replace part3

* Replace part5

* Replace part6

* Fix small bugs

* Fix double map toString

* Small fixes

* Update to v4

* Fix docs script

* Grumbles

* Alphabetical

* Reads better

* comment

* module to modul
2019-06-12 16:45:45 +12:00
Jaco Greeff 194077033a codec/Set extends JS Set (#917) 2019-06-12 16:45:45 +12:00
Jaco Greeff 0e5906473b Update api.derive to use api.queryMulti (#911)
* session api.queryMulti

* Make a single subscription to retrieve all session info

* Adjustments

* WIP

* Seems mostly comprehensive, need to full test e2e

* e2e tests for operations

* Allow "create from empty"

* skip

* Remove comment

* Remove ancient ?'s

* Update types.ts
2019-06-12 16:45:45 +12:00
Jaco Greeff f070b637f7 Remove struct map naming overrides (#918) 2019-06-12 16:45:45 +12:00
Jaco Greeff 7c8ec1f7f5 Move additional types to primitive & rpc (#916) 2019-06-12 16:45:45 +12:00
Jaco Greeff a0a741d886 Contract test data (shared_vec) for Option<T>, Result<T> (#906) 2019-06-12 16:45:45 +12:00
Jaco Greeff 9f1499f435 Update Extrinsic Signature description (#905)
* Update Extrinsic Signature description

* Update ExtrinsicSignature.ts
2019-06-12 16:45:45 +12:00
Jaco Greeff 4c925d9d4b Add node-template override (#912) 2019-06-12 16:45:45 +12:00
Stefanie Doll fca5fb7110 Added derive e2e tests and documentation (#898)
* export IExtrinsic

* Switch to localhos & enable tests in promise.spec

* Derive.accounts docs (copy from my other branch) + code examples

* Fixed existing accounts tests and added tests for all accounts.derive methods

* e2e tests and docs/ examples for balances.all and balances.fees

* Removed emty lines below jsdoc info

* tests & documentation dor derive.chain

* Addressed comments from former PR https://github.com/polkadot-js/api/pull/869

* Removed unused import

* obseralbe -> observable

* undo keith' commit

* use correct jsdocs syntax

* Re-enable skip
2019-06-12 16:45:45 +12:00
Jaco Greeff bbc474432e Expose queryMulti on api (#909)
* Expose queryMulti on api

* Convert contract fees to queryMulti
2019-06-12 16:45:45 +12:00
Jaco Greeff 2630f378a4 new EventRecord with topics (#902)
* new EventRecord with topics

* Add additional decoding checks (from #612)

* Slightly rework storage parsing (future checks)

* Split storage result formatting (set vs data)

* Allow v3 event parsing

* Max Vector length check

* assert during Event parsing

* Well, HACK-y fallback

* Revert "Well, HACK-y fallback"

This reverts commit edbf61b99da2753bec3a535126660e71bdcd9861.

* Node overrides...

* Add implVersion

* Register types

* Update with polkadot as well

* inject compatibility types

* EventRecord77 in testing

* Conversion with DoubleMap

* E2E tested against v3 & v4

* Filter with some

* Split archive/remove alex tests

* beforeAll -> beforeEach

* Remove .only

* EventRecordV0 -> 77
2019-06-12 16:45:45 +12:00
Stefanie Doll e0994f3c5a Fix for RPC bugs caused by uk spelling (#904)
* Replaced UK with US spelling

* -ised to -ized

* UK -> US spelling in chain rpc methods

* Tests for RPC chain methods on Alex
2019-06-12 16:45:45 +12:00
Jaco Greeff a0b1205258 Revert "Update extrinsics FromMetadata. Drop storages with doublemap type when converting v3 to v2 (#888)" (#903)
This reverts commit 97032e7e86.
2019-06-12 16:45:45 +12:00
satellitex fbbe7625b1 Add traits replace rules. for invalid cases ::<type> and <type>::. (#885)
* add replace rules

* fix replace grep
2019-06-12 16:45:45 +12:00
Jaco Greeff b573531ebf Metadata update for latest master (#901)
* Latest metadata, add EventIndex type

* Add parsed metadata

* Create empty DoubleMap type
2019-06-12 16:45:45 +12:00
Jaco Greeff 67de525077 Bump RxJS to 6.5.2 (#897)
* Bump RxJS to 6.5.2

* Re-create yarn.lock
2019-06-12 16:45:45 +12:00
Xiliang Chen f55732af51 Start supporting double map (#843)
* double map fix

* update metadata to prevent error using double map
2019-06-12 16:45:45 +12:00
Alex Wang 5b6a6d4431 Update extrinsics FromMetadata. Drop storages with doublemap type when converting v3 to v2 (#888)
* update extrinsics fromMetadata

* drop storages with doublemap when convert v3 to v2

* update Event.injectMetadata
2019-06-12 16:45:45 +12:00
Jaco Greeff 1857d8d521 Remove combineLatest where multi is used (#895)
* Remove combineLatest where multi is used

* Add e2e test for derive.controllers
2019-06-12 16:45:45 +12:00
kwingram25 afcc7fb701 Check array before running bnMax (#893)
* Updated with derive.balances.all

* add new keys to votingBalance

* remove multi test

* vestedBalance > 0

* bestNumber bug

* Check balances.all > 0

* Check balances.all > 0

* Check balances.all > 0

* check locks array

* check locks array
2019-06-12 16:45:45 +12:00
kwingram25 be617df21f Fix error causing balances.all = undefined (#891)
* Updated with derive.balances.all

* add new keys to votingBalance

* remove multi test

* vestedBalance > 0

* bestNumber bug

* Check balances.all > 0

* Check balances.all > 0

* Check balances.all > 0
2019-06-12 16:45:45 +12:00
kwingram25 abc11890f7 Replace votingBalance -> derive.balances.all (#883)
* Updated with derive.balances.all

* add new keys to votingBalance

* remove multi test

* vestedBalance > 0
2019-06-12 16:45:45 +12:00
Stefanie Doll 5728e45261 multi calls for democracy.votes and staking.controllers (#887)
* .multi for democracy.votes & stating.controllers

* Removed leftover comment from https://github.com/polkadot-js/api/pull/875

* no new line at the end
2019-06-12 16:45:45 +12:00
ian.he 4e6b533539 v0.78.103 v0.78.103 2019-06-06 14:02:54 +12:00
ian.he 224803f4c4 fix: derive generated is empty 2019-06-06 13:53:53 +12:00
ian.he 9fbf4bf478 v0.78.102 v0.78.102 2019-06-06 12:50:29 +12:00
ian.he 385150bd81 fix: lock typescript to 3.4.5 until merge upstream 2019-06-06 12:40:16 +12:00
ian.he 14216a42a3 0.78.101 2019-06-05 10:04:08 +12:00
Alex Wang 0055cb594f fix: clean code (#1) 2019-06-05 10:04:08 +12:00
Jaco Greeff 63e08d8357 Fix ContractAbi assert name (#951) 2019-06-04 17:01:39 +12:00
ian.he c9f9e2ec8a docs: include statement and link of upstream project 2019-05-27 15:55:12 +12:00
ian.he 019f1f761f rebase upstream and bump to 0.78.100 2019-05-27 15:46:59 +12:00
Jaco Greeff c91e72b60b 0.78.1 (#884)
* update CHANGELOG

* Bump common

* Bump to 0.78
2019-05-27 15:46:31 +12:00
Amaury Martiny e4cf97d71e Linked map in v0 (#886) 2019-05-27 15:46:31 +12:00
Jaco Greeff dcdbd2ca40 Fix bug in metadata conversion (return converted) (#880)
* Fix bug in metadata conversion (return converted)

* v2 -> v3
2019-05-27 15:46:31 +12:00
Jaco Greeff 13ae360c7a assert type on all asXxx getters (#879)
* assert type on all asXxx getters

* Convert via built-in asVx

* Implicit index

* Re-add V0 (not dropped here, but dropped somewhere)

* MetadataDeprectated -> MetadataDeprecated
2019-05-27 15:46:31 +12:00
Jaco Greeff 6c0d683235 Add contract fees (#875) 2019-05-27 15:46:31 +12:00
Amaury Martiny 6fc35d641a Fix linked maps (#878)
* Fix linked maps

* Line breaks
2019-05-27 15:46:31 +12:00
Jaco Greeff d79c0ea28d Update to latest metadata (with ContractInfo) (#874)
* Update to latest metadata (with ContractInfo)

* isAlive/isTomstone

* typo
2019-05-27 15:46:30 +12:00
Jaco Greeff 486412d051 Fix struct keys, log additional decoding error info (#872)
* Re-create test cases for failures

* Fix cloberring of keys

* Add logging to pinpoint decoding failures
2019-05-27 15:46:30 +12:00
Jaco Greeff f3f1807013 Bump dev (& fix indents) (#870)
* Bump dev (& fix indents)

* Bump common
2019-05-27 15:46:30 +12:00
Jaco Greeff d9e581fbdc Basic same-type multi queries (#866)
* Basic same-type multi queries

* Remove extra map, straight to switchMap
2019-05-27 15:46:30 +12:00
Xiliang Chen 89ebae9d78 Update WithdrawReasons to match substrate (#865)
* Update WithdrawReasons to match substrate

* Linting, comment alignment
2019-05-27 15:46:30 +12:00
Jaco Greeff 071d872adf USize -> U32 (#839)
- Possibly a fix for https://github.com/polkadot-js/api/issues/838
2019-05-27 15:46:30 +12:00
Jaco Greeff 1b6d6d970c rm -rf cc-test-reporter 2019-05-27 15:46:30 +12:00
Jaco Greeff 9f5be747e7 Bump deps (#861)
* Bump deps

* Align with published common

* Fix rxjs to 6.4.0 (false deprecations on 6.5.1)
2019-05-27 15:46:30 +12:00
Amaury Martiny 86cb0962bc Update Changelog (#859) 2019-05-27 15:46:29 +12:00
ian.he 75884d22a3 0.77.102 2019-05-27 15:46:29 +12:00
ian.he a4d09f799d fix: import for Api.spec.ts 2019-05-27 15:46:29 +12:00
Karishma Bothara 85a29de479 Api pre-bundled metadata (#850)
(cherry picked from commit 19eb484a29)

Approved-by: Ian He <ian-he@outlook.com>
2019-05-27 15:46:29 +12:00