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
1525d64193
Add missing Babe types ( #1184 )
2019-07-24 22:57:06 +02: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
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
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
Jaco Greeff
72af35dbcd
Remove .only, re-run Option tests ( #1176 )
2019-07-24 13:11:09 +02: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
Jaco Greeff
d34eb153f9
Add readonly hash: Hash to Method/Proposal ( #1169 )
2019-07-23 22:13:28 +02: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
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
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
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
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
Jaco Greeff and Amaury 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
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
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
Jaco Greeff
ff69c4378d
Update to latest metadata for 2.x ( #1142 )
...
* Update to latest metadata for 2.x
* ... now with .json saved :)
* Common
2019-07-17 23:59:01 +02:00
Axel Chalon
0196829a48
Add metadata constants to scripts/MetadataMd ( #1131 )
...
* Add metadata constants to scripts/MetadataMd
* Use name instead of prefix for Extrinsics
Since the js api uses the name and not the prefix (api.tx.name.xx)
and finality_tracker doesn't have a prefix
* Lint
2019-07-16 22:55:03 +02:00
Jaco Greeff
ca53fbc2a6
Allow ExtrinsicEra to construct via instance ( #1136 )
2019-07-16 15:50:36 +02:00
Jaco Greeff
4bdbacbadd
Make era required on raw signature injection ( #1135 )
2019-07-16 14:47:26 +02:00
Jaco Greeff
ee27e31275
SessionId extraction for 2.x ( #1127 )
...
* SessionId extraction for 2.x
* Run through e2e & update
2019-07-15 15:01:36 +02:00
Jaco Greeff
71c5920b1f
eslint rules ( #1099 )
...
* Off to the races - 3760 problems (1794 errors, 1966 warnings)
* Convert Array<T> -> T[] (not all correct, eg. extends)
* () => { -> (): void => {
* get is/as -> public get is/as
* public for getters, constructors & base Codec
* Some cleanups from previous overzealous search & replace
* Under 2k, 1874 problems (649 errors, 1225 warnings)
* ^^^ check that commit for details ;)
* Minor.
* rm config header
* Minor cleanups
* Default to tslint, eslint as option
* Trigger
* Update jsonrpc
* 1494 problems (433 errors, 1061 warnings)
* 1103 problems (135 errors, 968 warnings)
* 899 problems (9 errors, 890 warnings)
* 483 problems (9 errors, 474 warnings) (ignore any... for now)
* 366 problems (9 errors, 357 warnings)
* 336 problems (9 errors, 327 warnings)
* 148 problems (9 errors, 139 warnings)
* 31 problems (8 errors, 23 warnings)
* 0, 0
2019-07-14 12:15:14 +02:00
Jaco Greeff
271691a52a
Switch mortal default to 5mins (defaults) ( #1112 )
...
* Switch mortal default to 5mins (defaults)
* Expose era on raw payload
2019-07-12 15:49:43 +02:00
Jaco Greeff
6e42db3544
Proper JSON serialize/de-serialize for MortalEra ( #1111 )
2019-07-12 13:02:53 +02:00
Jaco Greeff
7772caaa9d
Bump metadata ( #1108 )
...
* Bump metadata
* Add Phantom type (grrr... don't like this in meta, but it is what it is)
* yarn test:one Metadata passes
* Update with new section indexes
2019-07-12 11:50:05 +02:00
Jaco Greeff
edea20dad8
Export storage prefix on StorageEntry ( #1106 )
2019-07-12 11:22:14 +02:00
Jaco Greeff
50a3a40cfd
Auto-generate TS definitions from types ( #1077 )
...
* Basic ts generation from JSON (parachains)
* Basic enum jsdoc comments
* Add as<Type> enum getter
* Register types
* Expand with other Polkadot types
* Readability cleanups
* cc
* Remove extra Null check
* Combine Vector & VectorFixed
* cc
* Additional magic type comments
* Tuple has actual indexed types
* Tests for Enum asXyz and isXyz getters
* Dep-dupe imports setup
* Small textual adjustments
* DRY up with getTypeClassMap
2019-07-10 16:55:25 +02:00
Jaco Greeff
2f157cfb27
Extrinsics with version decoding handler ( #1090 )
2019-07-10 16:37:40 +02:00
Jaco Greeff
f5f5830bc5
Add ValidatorId ( #1098 )
...
* Add ValidatorId
* Bump metadata
2019-07-10 15:15:05 +02:00
Jaco Greeff
71011cfdcc
Cleanup SignaturePayload comment description ( #1095 )
2019-07-10 08:11:20 +02:00
Jaco Greeff and Amaury Martiny
2eee6cfea7
Swap to Mortal transactions by default ( #1081 )
...
* Start of mortal tx
* Swap to Mortal transcations by default
* Update SubmittableExtrinsic.ts
* WIP (pre master merge)
* Remove eraLength, allow era to specify
* Oops, linting.... it happens in the best of families
* WIP debugging immortals
* Re-surrect with working meta, and e2e tests
* Update docs/examples/promise/07_make_transfer_with_allowed_block_permissions_only/index.js
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com >
* Update docs/examples/promise/07_make_transfer_with_allowed_block_permissions_only/index.js
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com >
* Remove useless birth/death calls
2019-07-09 15:56:10 +02:00
Axel Chalon
9abbaab991
Pull parameter_types! from metadata ( #1066 )
...
* @polkadot/{extrinsics,storage} moved to @polkadot/metadata
* Fix previous commit
* Fix previous commit
* Expose parameter types using api.consts
* Grumbles; update v6 static metadata; add UncleEntryItem (fix #1067 )
* Update api.query.* to api.consts.* where changed
* Update tests and stray api.query.staking.sessionsPerEra
* Grumbles
* Grumbles
* Revert updates to api-derive (taken care of by #1068 )
* Grumbles; fix UncleEntryItem
* Rename "@polkadot/metadata" => "@polkadot/api-metadata"
* Skip derive test
* Grumbles
* Grumbles
* Grumbles
* Cleanup merge, ensure metadata is latest
* Move api-metadata to actual api-metadata folder
* README api-metadata description (& folder link)
* Remove stray type-extrinsics package.json
2019-07-09 08:54:28 +02:00
Jaco Greeff
e7eeeae5d3
Update with latest modules (all indexes are off) ( #1082 )
2019-07-09 06:59:58 +02:00
Jaco Greeff
9c48e40780
signAndSend with options & callback ( #1079 )
...
* signAndSend with options & callback
* Remove extra Partial wrapper
* Remove more extra Partials
* One more
2019-07-08 20:32:13 +02:00
kwingram25
5a1c79a471
initialize Votes with value ( #1074 )
2019-07-07 00:33:07 +01:00
YJ
8c4320c0f3
feat: Vote interface as U8a ( #1061 )
...
* feat: Vote interface as Bytes
* fix: decode v1 values
* fix: decode v2 vote
* duplicate decode struct
* use struct
* fix: encodes as Bytes
* as u8a
* fix: encode as u8a
* fix: encode as u8a
* fix paddig bug
* decode from bits
* fix lint
* fix grumbles
* fix lint
* fix grumbles, remove toNumber
* fix grumbles
* remov only
* Update CHANGELOG.md
* Update CHANGELOG.md
2019-07-04 15:46:36 +02:00
YJ
7229a5fdfb
feat: Metadata V6 with module constants ( #1059 )
...
* feat: metadata v6, minus static and test
* fix: update v5 to v6 everywhere
* fix: lint and testUtil
* fix typo
* fix: match final metadata. constants no longer optional, StorageFunctionMetadata renamed to StorageEntryMetadata.
* fix: constants constructor
* fix: unit tests pass
* fix: linting and renaming, make tests pass
* fix: skip e2e
remove console log
* fix: formatting test
* fix api e2e tests
* fix: put the skip back
* feat: yarn test:skip-e2e
* fix: grumbles, add fresh flipper wasm
* fix: grumbles, add fresh flipper wasm
* fix: changelog
* fix ci
2019-07-02 11:48:40 +02:00
Amaury Martiny
8f89b9d40c
Expose module name instead of prefix ( #1055 )
2019-06-25 13:24:44 +02:00
Jaco Greeff
b51761376b
Fix StorageData checks, fix Option toHex 00/01 ( #1052 )
...
* Option.toHex should not add 00/01 (implied)
* Option tests
* We have a failing test, finally
* Adapt createType to cater for storage with length
2019-06-22 22:05:36 +02:00
Jaco Greeff
ed19ba91e1
Latest polkadot metadata ( #1050 )
...
* Latest polkadot metadata
* The first bunch of Polkadot types... WinningData is an issue...
* VectorFixed, allowing for [<Type>; <length>]
* Add WinningData
2019-06-22 18:28:59 +02:00
Jaco Greeff
3b8db2ed3d
Rename SessionKeys fields ( #1046 )
...
* Rename SessionKeys fields
* Shorten
2019-06-21 16:49:20 +02:00
Amaury Martiny
7b461e7f21
toJSON returns the correct type ( #1038 )
...
* Introduce AnyJson
* Other small fixes
2019-06-19 21:11:32 +02:00
Stefanie Doll
c3216a524e
Add child_storage and getKeys methods ( #1012 )
...
* Add childStorageKeyPrefix to type-storage package
* WIP
* fix failing build
* wrap StorageKey
* no new line
* Added childStoragePrefix param
* Add childStorageKey param
* Tests for child methods
* Finalized tests
* linting
* Changed get_keys test to :code
* Alphabetical imports
* store hex values in consts
* follow substrate order & empty line fixes
* alphabetical export
* Correct hex value for :child_storage:
2019-06-18 17:58:50 +02:00
Stefanie Doll
33fa3c6237
Removed auth storage keys ( #1030 )
...
* removed auth storage keys
* removed changes on autogenerated files
* re-add deprecated storage methods
* linting
* linting
2019-06-18 16:59:14 +02:00
Jaco Greeff
6f3c8f7862
Update EventRecord tests ( #1028 )
...
* Update EventRecord tests
* Update metadata with system events exposed
* Align new EventRecord and fallback tests
2019-06-17 14:42:35 +02:00
Jaco Greeff
993bc05892
USize is now non-constructable ( #1022 )
...
* USize is now unconstructable
* usize CHANGELOG entry
2019-06-17 10:41:57 +02:00
Jaco Greeff
683ed396c2
Allow Text to construct from hex ( #1018 )
...
* Allow Text to construct from hex
* Simplify decodeText
2019-06-17 10:40:59 +02:00
Jaco Greeff
7e5b09a255
Seal updated to match master (s/Signature/Bytes/) ( #1024 )
...
* Seal updated to match master (s/Signature/Bytes/)
* FR*NK updates
2019-06-15 21:03:40 +02:00