Jaco Greeff
5ee2caf00e
More small readability enhancements ( #1296 )
...
* More small readability enhancements
* Pacify CC on manual checks
2019-08-11 22:44:02 +02:00
Jaco Greeff
07b89e759c
Some non-functionality readability cleanups ( #1295 )
...
* Some non-functionality readability cleanups
* Small Address cleanups
2019-08-11 21:45:16 +02:00
Jaco Greeff
e5cc6836eb
BlockNumber, Nonce -> u32 ( #1284 )
...
* BlockNumber -> u32
* Interface types extend, not re-use
* Merge master, rebuild
* Merge typo
* Lazy create struct types (extended definitions)
* Cleanup tests for Nonce u32
* Remove polkadot u64 BlockNumber (substrate default)
* Warn on type dup & still clear
* Allow type overrides to work at any point
2019-08-11 15:07:00 +02:00
Jaco Greeff
b595428372
Lazily create registry types (also solves resolution order) ( #1291 )
...
* Lazily create registry types (also solves resolution order)
* Typo in comment
* Alphabetical definitions (ordering detected)
* Make fallback & SessionKeys work as expected
* Cleanup registration, user-types takes priority
* typo
* Api constructors only take options
* Cleanup typos
* Don't create classes while validating metadata
* Adjust badges... well, waiting for CI, so...
* typo
2019-08-10 14:24:04 +02:00
Jaco Greeff
2e109ba2a5
Swap Keys to "Opaque" tuple definitions ( #1281 )
2019-08-09 09:19:47 +02:00
Jaco Greeff
fbd6bf1317
Update Keys, add rotateKeys RPC ( #1280 )
...
* author_rotateKeys
* Update Keys encoding
2019-08-08 12:58:36 +02:00
Jaco Greeff
2ddc87c70f
Extract abrs author ( #1278 )
...
* ABRS types
* Extrcat abrs author
2019-08-07 23:34:25 +02:00
Jaco Greeff
724c4b8263
Return sessionIds & nextSessionIds in staking.info ( #1272 )
...
* Return sessionIds & nextSessionIds in staking.info
* Simplify
2019-08-06 16:34:11 +02:00
kwingram25
09ee77d0bc
Pass online/offline status indicators with staking accounts ( #1265 )
...
* staking online status
* restrict onlineStatus.online to validators
* get onlineStatus for stash/validator only
* tests
* fixes
* Add offline
* Revert stash, change to stashId, linting
* Heartbeat signature
* Make CodeClimate (slightly) happier
* keep compatibility
* change status type
* rv null possible
* cleanup
2019-08-05 16:13:42 +00:00
Jaco Greeff
8da526132d
Retrieve nextKeys, only deal with stash ( #1266 )
...
* Retrieve nextKeys, only deal with stash
* Split long function
* Allow 1.x operation
* Make CodeClimate happier
* Define result type
* Cleanups
2019-08-04 07:33:31 +02:00
Jaco Greeff
82a1c25f17
Tests for approvalFlagToBool ( #1251 )
...
* Tests for approvalFlagToBool
* Merge master
2019-08-02 20:44:25 +02:00
Jake Naviasky
58993042c1
Fixing approvalFlagsToBools. ( #1250 )
2019-08-01 17:18:18 +02:00
Amaury Martiny
92044d471c
Make api.rpc.*.* typed ( #1237 )
...
* Generate correctly
* Fix rpc-core
* Flexible types
* Make types work!
* Lint
* Fix grumble
* Re generate
* Fix lint
* Fix small bugs
* Maybe really fix lint?
* Fix lint again
* Fix lint
* Small ordering & formatting changes while playing...
2019-08-01 10:46:28 +02:00
Jaco Greeff
14f018d57f
Fix session/era calculations for Babe ( #1235 )
2019-07-30 14:24:41 +02:00
Jaco Greeff
0d68f98c75
Extra block author for babe ( #1227 )
...
* Update examples for 0.90
* Fix number typo
* Adapth to use timestamp.now (blockPeriod now in all versions)
* Babe extract block author
* TODO for cleaner aura extraction
* Update Babe id
* Update & split tests
2019-07-29 21:23:34 +02:00
a45e313c84
Upgrade guide (to current) ( #1194 )
...
* Upgrade guide (to current)
* ClassOf
* JSON example
* s/srml/interfaces/
* Typos
* Update UPGRADING.md
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com >
* Add copy-to-apps script
* Properly extend exstended derive types
* Round out UPGRADING
* Version in CHANGELOG
* Typos
* Update UPGRADING.md
* Update CHANGELOG
* Bump common
* 0.90.0-beta.0
* Cleanups
* Split 0.82 & 0.90
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update UPGRADING.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update CHANGELOG.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Update CHANGELOG.md
Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com >
* Typo
* findFunction -> api.findCall
2019-07-29 09:48:06 +02:00
Jaco Greeff
02cd1331aa
Move Event, Address, AccountId, AccountIndex to generic ( #1202 )
...
* Move Event, Address, AccountId, AccountIndex to generic
* Move AccountId, AccountIndex, Address & Event to generic
* Move Vote
2019-07-26 16:39:28 +02:00
Jaco Greeff
70bc823d25
Make Block, Header & Digest generic ( #1196 )
...
* Make Block, Header & Digest generic
* It lints
* Linting passes, tests passes
2019-07-26 14:34:41 +02:00
Amaury Martiny
441148889d
CreateType is typed, add createTypeUnsafe just in case ( #1199 )
...
* Use unsafe internally
* Add comments
* Remove <> in createType
* Fix lint
* Fix classOf
* Remove createType from Text
* Fix lint
* Fix Fallback type
* Fix fallback in createType
2019-07-26 14:00:25 +02:00
Jaco Greeff
2a37b8746d
Rename srml to interfaces ( #1198 )
...
* Rename srml to interfaces
* newline, package.json
2019-07-26 12:08: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
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
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
kwingram25
e1cf002a76
Improve voter derive calls ( #1181 )
...
* voterPositions
* cleanup
* rename var
* changes
* export VoterPosition
2019-07-24 19:46:05 +01: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
kwingram25
2ff632b534
Derived elections member type ( #1147 )
...
* elections
* headers
* lint
* lint
* lint
* lint
* fixes
* lint
* voterSets
* derived elections member type
* lint
2019-07-19 23:11:39 +02:00
kwingram25
ab74db5126
Elections derive ( #1143 )
...
* elections
* headers
* lint
* lint
* lint
* lint
* fixes
* lint
* voterSets
2019-07-19 21:27:02 +02:00
Jaco Greeff
37af934be6
Bump deps, export elections ( #1146 )
2019-07-19 00:25:26 +02:00
Jake Naviasky
efb38dbdf8
Fixing array bug in approvalFlagToBool derive. ( #1144 )
...
* Fixing array bug in approvalFlagToBool derive.
* Replicating 'take until last approval' logic.
2019-07-18 23:43:30 +02:00
Jake Naviasky
28cf21dd4f
Adding derives for election sets and approval flags. ( #1141 )
...
* Adding derives for election sets and approval flags.
* Bugfixes to derived election functions.
* Attempting linter fix.
* Fixing typing error.
* Another eslint fix.
* Adding explicit types to api calls.
2019-07-17 22:15:43 +02:00
Jaco Greeff
3b339a2bae
Remove some as any as Observable from derives ( #1129 )
2019-07-15 15:01:54 +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
Stefanie Doll
8ca4b5aa3b
belated naming fix ( #1104 )
2019-07-10 19:09:03 +02:00
Stefanie Doll
1393c8c5cf
Include api.consts in api.derive methods ( #1084 )
...
* Bring back derive changes
* Fix fees tests
* contract fees for v1.0
* Contract fees v1.0 test
* Bring back console.logs
* Uase api.consts instead
* linter fixes
* more linter nits
* Fixed staking & session
* .skip()
* Formatting nits
2019-07-10 16:56:11 +02:00
Amaury Martiny
a3ce8672af
Fix staking.info ( #1091 )
...
* Frankenstein
* Remove console.log
* Fix lint
* Remove console
* Fix tests
* Put back old version
* Add comment
* Store changeset data (filling in the blanks) (#1094 )
* Store changeset data (filling in the blanks)
* Option(StorageData, null) when not available
* Make test pass
2019-07-10 13:08:32 +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
3b8db2ed3d
Rename SessionKeys fields ( #1046 )
...
* Rename SessionKeys fields
* Shorten
2019-06-21 16:49:20 +02:00
Jaco Greeff
7023214581
s/contract/contracts/ ( #1036 )
...
* s/contract/contracts/
* Derive rename
2019-06-19 21:12:16 +02:00
Amaury Martiny
7b461e7f21
toJSON returns the correct type ( #1038 )
...
* Introduce AnyJson
* Other small fixes
2019-06-19 21:11:32 +02:00
Jaco Greeff
22bf06e6e0
Remove derive {Struct,Vector}Any (new typing magic) ( #1019 )
...
* Remove derive {Struct,Vector}Any (new typing magic)
* Import ordering
* Small lint fix
2019-06-17 10:41:32 +02:00
Jaco Greeff
f9605cd710
Update nextKeyFor to cater for SessionKeys or SessionKey ( #1025 )
...
* Update nextKeyFor to cater for SessionKeys or SessionKey
* no StructAny (yes, done in other PR, but we are touching this...)
2019-06-15 23:37:24 +02:00
Jaco Greeff
ea991e4ccc
Additional types for latest substrate master ( #1016 )
...
* Additional types for latest substrate master
* Method tests updated for new structure
* Adjust extrinsic test indexes
* Adjust type-extrinsics tests
* Adapt for new session/era calc
* Small comment update
* Update with patch for system
* Adjust tests with system calls in metadata
2019-06-15 19:06:02 +02:00
Hyungsuk Kang
0d12b082b6
Update fees.ts ( #1014 )
2019-06-14 17:14:15 +02:00
Amaury Martiny
63846ac367
Remove onCall, use decorateMethod ( #987 )
...
* update signature of doublemap storage function
* add test cases
* update doublemap implementation
* update implementation
* remove duplicate test case
* update test cases
* Add hkt
* Fix derive types
* Make derive work
* Fix some bugs
* Fix some bugs
* More stuff
* Make some more stuff work
* Fix types in derive
* Fix all tests in derive
* Change back ApiType
* Remove vscode
* Fix Submittables
* Fix some errors
* Fix some bugs
* Change some stuff
* Fix merge conflict
* Fix types
* Add console.log
* Add console.log
* Re-add decorateMethod
* Fix tests
* Skip e2e
* Small fixes
* Fix signAndSend
* Fix typings in test
* Fix lint
* Add comments
* One line
* Remove useless
* URI->ApiType
* Indentation
2019-06-14 12:12:53 +02:00
Jaco Greeff
ea6ce4eb83
Bump deps ( #992 )
...
* Bump deps
* Uopdate CHANGELOG while waiting for CI...
* Bump with latest common
2019-06-12 16:18:26 +02:00
Thibaut Sardan
5f43da0623
Add rewardDestination to derive.staking.info ( #977 )
...
* rewardDestination in staking.info
* squash a couple lines together to please CodeClimate
2019-06-07 12:14:14 +02:00
Jaco Greeff
e295c4d5bf
Support more consensus engines with digest info ( #974 )
...
* Support more consensus engines with digest info
* Tested against both v1 & v2
* Skip e2e
* Apply map suggestion (more effective as well)
2019-06-07 12:13:30 +02:00