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
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
Jaco Greeff
4cba24c134
Create api-contract (baseline for useful interactions) ( #1007 )
...
* Create api-contract (baseline for useful interactions)
* Add CHANGELOG entry (breaking)
2019-06-14 13:48:53 +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
7bdf0fbbe5
Revert "Move contracts into api-contract"
...
This reverts commit af0e8cf07a .
2019-06-14 09:06:57 +02:00
Jaco Greeff
af0e8cf07a
Move contracts into api-contract
2019-06-14 09:05:21 +02:00
Axel Chalon
b3f2a11e1e
KeyValue now extends Tuple instead of Struct ( #1001 )
2019-06-13 21:37:57 +02:00
Jaco Greeff
5ca32863d0
Allow for contract Vec, Option and Tuple arg/return ( #997 )
...
* Allow for contract Vec & Option arg/return
* Support nesting, fixed vecs and tuples
* Support Result
* Update CHANGELOG
* Add additional types added to CHANGELOG (& re-order)
* Add metadata entry (ready to go)
2019-06-13 15:46:47 +02:00
Stefanie Doll and Amaury Martiny
e4a97d4efd
Update to Metadata v5 ( #991 )
...
* add v5 folder
* Fixed typo in README
* Updated tests to v5
* added v5 methods to MetadataVersioned
* Added toV5 conversion file to v4 folder
* change from v4 to v5
* Bump up version
* Update imports in type-storage package
* Switch to v5 imports in type-extrinsics, rpc-core and rpc-provider
* 0.81.0 => 0.82.0
* Updating dependencies to 0.82.0
* update comments
* Undo version bump
* Remove release notes
* v4 to v5 conversion
* WIP tests
* Addresses Amaurys comments
* re-added conversion function
* removed unused imports
* Re-add string to HasherInput type
* addresses failing derive tests
* Fixed broken derive e2e tests
* v5 tests
* Update packages/types/src/Metadata/MetadataVersioned.ts
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com >
* v3->v4
* trigger hung up travis build
2019-06-13 14:42:44 +02:00
Axel Chalon
3ab581119d
Adapt to new @polkadot/keyring KeyPair interface ( #994 )
...
* Adapt to new @polkadot/keyring KeyPair interface
* Pull in common 0.93.0-beta.4
2019-06-13 10:44:47 +02:00
Stefanie Doll
6771f9948b
Added types for ApprovalFlag, SetIndex, VoterInfo ( #996 )
...
* Added types for ApprovalFlag, SetIndex, VoterInfo
* Delete VoterInfo
* Fixed typo ApprovalIndex => ApprovalFlag
* Added VoterInfo
* newline & whitespace
2019-06-12 19:43:40 +02:00
Jaco Greeff
6ee5799777
Remove extra error logs, bubble trace via Error ( #995 )
...
* Remove extra error logs, bubble trace via Error
* Add change to CHANGELOG
* Fix MagicNumber assertion check
2019-06-12 17:50:44 +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
kwingram25
8f088c38bb
Storage Size u32 ( #986 )
...
* lastWrite
* storage size u32
2019-06-11 15:59:10 +02:00
kwingram25
25af4b449e
lastWrite ( #985 )
2019-06-11 14:28:23 +02:00
Jaco Greeff
91ae98c9e6
createType allows for [u8; <length>] definitions ( #976 )
2019-06-07 12:13:53 +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
Jaco Greeff
c366ede99f
Expose {method,section}Name on Method class ( #975 )
...
* Expose {method,module}Name on Method class
* moduleName -> sectionName to align
2019-06-07 08:24:16 +02:00
Jaco Greeff and Amaury Martiny
3227ce20a2
Support for new inherent digests ( #973 )
...
* Support for new inherent digests
* Latest metadata
* Pull in new council & democracy types
* Update tests for new digest
* Digest logsWith/Without
* Round-up e2e tests
* Remove stray debugging log
* Update CHANGELOG.md
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com >
2019-06-06 13:47:52 +02:00
Jaco Greeff
35a59ec469
Basic IKeyringInterface (address encoding/decoding still used) ( #968 )
2019-06-04 12:26:53 +02:00
Jaco Greeff
447b7c447d
Construct toRawType using internal types ( #966 )
...
* Construct toRawType using internal types
* typo
* Struct test for with + toRawType
* Tuple tests for toRawType
* Remove extra empty check, already handled
* EnumType with sane toRawType
* Sane toRawType representation for Set
* Use JSON.stringify inside Struct toRawType
* Extrinsic toRawType yields Extrinsic (like a primitive)
* Block toRawType test
2019-06-04 11:45:56 +02:00
Jaco Greeff
b37eb31b60
Add SignaturePayloadRaw ( #967 )
2019-06-04 11:23:41 +02:00
Jaco Greeff
543fdc034f
Update for latest substrate master metadata ( #958 )
...
* Update for latest substrate master metadata
* Add ContractStorageKey type
* Update schedule
2019-05-29 17:23:06 +02:00
Alex Wang
a7f16064a9
update signature of doublemap storage function, add e2e test cases ( #957 )
...
* update signature of doublemap storage function
* add test cases
* update doublemap implementation
* update implementation
* remove duplicate test case
* update test cases
2019-05-29 16:14:42 +02:00
Stefanie Doll and Amaury Martiny
c01ade86a6
Convert tests to ts and fix existing ( #936 )
...
* Add jest watch option to package.json
* convert promise-alex-spec to ts & add types
* convert ./api tests from JS to TS
* convert ./api tests from JS to TS pt. 2
* More convert tests from JS to TS
* rpc-provider convert tests from js to ts
* rpc-provider tests js => ts
* rpc-provider tests js => ts
* linting issues
* tslint fixes
* 101 => 68 typescript errors
* WIP
* connect() e2e tests
* more fixes
* Fix linting errors of new ERA tests after merge
* test for listeners in connect
* formatting
* getting there...
* re-add skips
* test refactoring & codeclimate fixes
* more fixed tests
* mock.body workaround
* Fixed wrong test description
* ApiPromiseInterface => Api
* ws polyfill / send
* bring back isZero() test
* .then().catch() => .catch()
* Removed leftover body
* Type ProviderInterface => Http
* Fixed polyfill tests
* trailing whitespce
* (mock.body as any)['test_body'] and Balance
* Fix autoconnect in WsProvider
* Fixed part of linting errors in ERA tests
* call unused const unsubscribe
* added ts-ignores for testing private properties/ methods of Provider
* Archive node test
* Fixed linting for ERA tests
* Further changes
* Update packages/rpc-provider/src/ws/polyfill.spec.ts
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com >
* relative paths for imports inside module & reordering of imports pt. 1
* relative paths for imports inside module & reordering of imports pt. 2
* added skip back to e2e transactions
* Fix some more tests in TS (#952 )
* Fix some more tests in ts
* Add more constructor
* More typing in ./api
* .skip
* <SubmittableResult>'s
* .catch() -> return()
* Extrinsics tests
* Left TODO's for extrinsic e2e tests
* Workaround for failing Type Extrinsic tests
2019-05-27 17:08:06 +02:00
Jaco Greeff
acaca67385
derive.{balances, contracts, staking, session} returns Codec ( #953 )
...
* derive.{balances, contracts, staking, session} returns Codec
* Json -> StructAny (as per VectorAny)
* multi returns VectorAny
* VectorAny casts
* Bump common
2019-05-27 12:49:19 +02:00
Jaco Greeff
054cf1f51e
Fix ContractAbi assert name ( #951 )
2019-05-24 10:01:46 +02:00
KarishmaBothara
0f3a745ed8
ERA changes ( #927 )
2019-05-23 09:10:34 +02:00
Jaco Greeff
96133d22b8
Align IExtrinsic with Extrinsic impl. (signer/signature string) ( #946 )
2019-05-23 09:05:25 +02:00
Alex Wang
833b49d012
support double map storage function ( #934 )
...
* support double map storage function
* add twox_64_concat, clean comments
* change Twox128Concat to Twox64Concat
* update decodeStorageKey
* fix: update decodeStorageKey
* test: add e2e test
2019-05-21 10:25:58 +02:00
Jaco Greeff
767891dca0
ExtrinsicSignature init with address/signature strings ( #935 )
2019-05-20 14:09:29 +02:00
Jaco Greeff
9f258ff4c7
Allow Moment with BE/LE hex encoding ( #933 )
...
* Allow Moment with BE/LE hex encoding
* description clarification
2019-05-17 17:13:11 +02:00