Commit Graph
1892 Commits
Author SHA1 Message Date
Jaco Greeff a0d7a52a5c Add hash: IHash on Codec base (#1193)
* Convert RPC classes to primitive classes or /srml types

* Lint passes... lokking at tests next.

* Tests pass.

* Types with basic docs (lots of work here)

* Add hash: IHash on Codec base

* codec hash resturns U8a

* Fix imports
2019-07-26 11:20:34 +02:00
Jaco Greeff 700eb7e1f4 Remove injectDefinitions import, prefer injector (#1195)
* Convert RPC classes to primitive classes or /srml types

* Lint passes... lokking at tests next.

* Tests pass.

* Types with basic docs (lots of work here)

* Update StorageKey.spec.ts

* Add injector to metadata doc generation

* Fix import

* Remove injectDefinitions import, prefer injector
2019-07-26 11:12:17 +02:00
Jaco Greeff 478f54c703 Convert RPC classes to primitive classes or /srml types (#1192)
* Convert RPC classes to primitive classes or /srml types

* Lint passes... lokking at tests next.

* Tests pass.

* Types with basic docs (lots of work here)

* Update StorageKey.spec.ts

* Add injector to metadata doc generation

* Fix import
2019-07-26 10:23:37 +02:00
Amaury Martiny 83515fc0a2 ClassOf does not require <T> (#1190)
* Add InterfaceRegistry

* Update srml script

* Add compact

* Add correct imports

* Auto-generate InterfaceRegistry

* Regenerate

* Simplify code

* add comment

* Fix lint

* Rename var

* Compact encodable abtstactInt

* Fix abstract isChildClass
2019-07-25 20:18:35 +02:00
Jaco Greeff 39323a8896 Convert all type/* (and some primitives) to srml/* (#1189)
* Convert (almost-all) non-primitives (and some primitives) to srml/*

* Move Vote to primitives, remove type folder

* Move Balance :-o

* Fixup tests, override Balance.toRaw()
2019-07-25 16:34:47 +02:00
Jaco Greeff 6d65095ee0 Allow createType to create sets (#1191)
* Allow createType to create sets

* build:srmlTs generates types
2019-07-25 15:20:32 +02:00
Jaco Greeff ed6aad8265 Remove any from storage function param (#1186) 2019-07-25 13:43:11 +02:00
Stefanie Doll dc95d6d727 Description for ExtrinsicsV2 (#1188) 2019-07-25 13:18:57 +02:00
Jaco Greeff a25110b281 Move additional classes to definition-only (#1165)
* Move additional classes to definition-only

* Move some additional quick-hit types

* Last of the easier type/* conversions

* Remove rhd files

* Remove commented line

* Add injector to types loading

* typo

* Update comment

* Merge master

* Rework & organize CHANGELOG

* Some small helper cleanups
2019-07-25 10:32:26 +02:00
Jaco Greeff 9ef7ee4a67 Unskip additional tests (#1185) 2019-07-25 10:29:15 +02:00
Travis CI 65bc0a4a57 [CI Skip] 0.82.0-beta.96 2019-07-24 21:09:04 +00:00
Jaco Greeff 1525d64193 Add missing Babe types (#1184) 2019-07-24 22:57:06 +02:00
Travis CI 039d3337c8 [CI Skip] 0.82.0-beta.95 2019-07-24 19:46:43 +00:00
Jaco Greeff 79e5f7c9cc Metadata v7 (#1182)
* Make a start... static is in, code copied as a start.

* Get exports (more-or-less) right

* Well, the v7/* tests pass... now just to tweak storage generation

* Linting is happy, it doesn't mean it will work...

* It compiles... ship it.
2019-07-24 21:34:51 +02:00
Travis CI 2a3cc92e91 [CI Skip] 0.82.0-beta.94 2019-07-24 19:17:32 +00:00
Travis CI 3827353c35 [CI Skip] 0.82.0-beta.93 2019-07-24 18:59:23 +00:00
kwingram25 e1cf002a76 Improve voter derive calls (#1181)
* voterPositions

* cleanup

* rename var

* changes

* export VoterPosition
2019-07-24 19:46:05 +01:00
Travis CI 8bafdc7596 [CI Skip] 0.82.0-beta.92 2019-07-24 15:38:23 +00:00
Amaury Martiny 66ab3ac502 Cache getTypeClass (#1183)
* Put memoizee only in types

* Add some tests

* Add failing tests

* Make instanceof work

* Better tests
2019-07-24 17:22:49 +02:00
Travis CI b89e0d5522 [CI Skip] 0.82.0-beta.91 2019-07-24 14:43:45 +00:00
Jaco Greeff 657d241754 Swap &[u8] back to Bytes (#1180) 2019-07-24 16:31:24 +02:00
Jaco Greeff 48159cfb5a DoubleMap extended tests (#1179)
* DoubleMap extended tests

* TwoX64Concat test (aligned with Rust)

* Remove .only

* Update Type.ts

* And working

* Check the full JSON output for the keys (future-proof)

* Renames
2019-07-24 16:04:55 +02:00
Travis CI e15db8aed9 [CI Skip] 0.82.0-beta.90 2019-07-24 11:26:16 +00:00
Jaco Greeff 72af35dbcd Remove .only, re-run Option tests (#1176) 2019-07-24 13:11:09 +02:00
Travis CI 9e918bb228 [CI Skip] 0.82.0-beta.89 2019-07-24 10:59:39 +00:00
Jaco Greeff 37022d2e23 Small rpc-core storage cleanups (#1168) 2019-07-24 12:47:50 +02:00
Travis CI 3d0cf19fad [CI Skip] 0.82.0-beta.88 2019-07-24 09:58:14 +00:00
Jaco Greeff fcaa7a50e4 Alias &[u8] to Bytes (#1171)
* Alias &[u8] to Bytes

* Add metadata, fix RegEx for &[u8]
2019-07-24 11:46:38 +02:00
Travis CI 46796a7ce8 [CI Skip] 0.82.0-beta.87 2019-07-23 20:25:29 +00:00
Jaco Greeff d34eb153f9 Add readonly hash: Hash to Method/Proposal (#1169) 2019-07-23 22:13:28 +02:00
Travis CI e3a93abd21 [CI Skip] 0.82.0-beta.86 2019-07-23 14:22:09 +00:00
Amaury Martiny c3811ee6e9 feat: Implement twox64concat (#1166)
* feat: Implement twox64concat

* Import order

* use u8aToU8a
2019-07-23 16:10:36 +02:00
Travis CI 42d7256470 [CI Skip] 0.82.0-beta.85 2019-07-23 09:59:20 +00:00
Jaco Greeff ebc2fbe3ee Move (some) from session & elections to srml/types (#1158)
* Move (some) from session & elections to srml/types

* Just use createType instad of (new ClassOf(type))(value)

* Cleanup generation script (import file duplication)
2019-07-23 11:47:45 +02:00
Travis CI 8925a9a925 [CI Skip] 0.82.0-beta.84 2019-07-23 09:26:20 +00:00
Jaco Greeff f9f3956ab3 Metadata types (and metadata parsing) for babe (#1163)
* Metadata with types for babe

* srmlTs build script from other PR

* Don't update metadata yet, only allow parsing
2019-07-23 11:15:12 +02:00
Travis CI b4f5ae7911 [CI Skip] 0.82.0-beta.83 2019-07-23 09:08:25 +00:00
Jaco Greeff f9a3f3e53f Fix linked maps with defaults (#1162)
* isPedantic matches [] with isEmpty

* Fix undefined.undefined on  headKey

* Adjust fallback for linked maps

* Add tests for the linked map fallbacks (head and value)
2019-07-23 10:56:45 +02:00
Travis CI 6858cd0212 [CI Skip] 0.82.0-beta.82 2019-07-23 08:54:05 +00:00
Jaco Greeff 43ca02b2ca Display [Type; length] in length error (#1161)
* Display [Type; length] in length error

* Rework assert formatting
2019-07-23 10:42:22 +02:00
Travis CI be8e096c66 [CI Skip] 0.82.0-beta.81 2019-07-22 21:10:07 +00:00
Stefanie Doll 98cffea22d Add tests for latest polkadot metadata v6 encoding (#1159)
* Added tests for polkadot metadata v6 encoding

* added rpc access & ports to docker-compose
2019-07-22 22:58:21 +02:00
Travis CI 5280ca01fd [CI Skip] 0.82.0-beta.80 2019-07-22 15:19:06 +00:00
Jaco GreeffandAmaury Martiny 50a2314544 Extrinsic v2 (#1150)
* Extrinsic v2

* Save after last move of files

* Signature V2

* Rework signature decoding

* Simplify V1 and V2 underlying impl.

* Detect chain extrinsic version

* SignaturePayload

* remove Raw payload variant link (Payload is now raw)

* Remove v2 comments referring to v1 data

* Pass isSigned to Extrinsic{V1, V2}

* Cleanup era injection

* It flows :)

* Add SignerPayload and signPayload for Signer (#1152)

* Add SignerPayload and signPayload for Signer

* Submittables use signPayload

* Don't pass version on deprecated interface

* Update after all e2e tx tests passes

* Comment around payload generation

* Adjust blocktime to default (nice round 50 block eras)

* Fix calc

* Re-add test comment

* Update packages/api/src/types.ts

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>

* Update packages/types/src/primitive/BalanceCompact.ts

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>

* Backwards compatibility for current in-store signers

* Apply options suggestions

* Add missing Compact params (linting)
2019-07-22 17:08:06 +02:00
Travis CI ed0979a50c [CI Skip] 0.82.0-beta.79 2019-07-22 13:00:00 +00:00
Jaco Greeff dd7b138c02 Move contracts classes to srml/contracts (now as types-only) (#1153)
* Move contracts classes to srml/contracts (now as types-only)

* Exclude srml generated files from codeclimate

* Alos excluse types/src/scripts

* Replace Compact<T>.toBn() with unwrap()

* Fic compact type (#1156)

* Remove as unknown as T (T typing is working)

* Move interfaces back to the relevant types.ts
2019-07-22 14:49:08 +02:00
Travis CI 0c7794198a [CI Skip] 0.82.0-beta.78 2019-07-21 08:47:01 +00:00
Jaco Greeff 3d7a460cd2 Latest metadata for substrate 2.x (#1151)
* Latest metadata for substrate 2.x

* Save json...

* Latest types

* typo in name

* typo in name

* Export all types from the seperate modules
2019-07-21 10:35:27 +02:00
Travis CI 80305f5a34 [CI Skip] 0.82.0-beta.77 2019-07-20 09:00:07 +00:00
Jaco Greeff 5e0f62c793 Bump deps (#1148) 2019-07-20 10:49:01 +02:00