Jaco Greeff
8d8d5bd7d7
Expose ABI messages on Contract/Blueprint ( #2715 )
...
* Expose ABI messages on Contract/Blueprint
* Rename actual files & exports
* Adjust .query signature (origin)
* Assert contracts.call
2020-10-12 18:27:47 +02:00
Jaco Greeff
1643ec7ddf
Provide chain properties for contract registry ( #2714 )
2020-10-12 15:53:45 +02:00
Jaco Greeff
8a8b6f7ac8
s/contract/contracts/ on applyOnEvent ( #2712 )
...
* s/contract/contracts/ on applyOnEvent
* Expose result classes
2020-10-12 14:36:47 +02:00
Jaco Greeff
1101826a05
Rename contract helpers ( #2708 )
...
* Rename contract helpers
* Allow Buffer input for code
* Parse json strings
* Revert #typeDefs
* Allow lookup on name
* constsitent string ids
* Read only via address
* Move .json
* Extract findMessage
* Naming
2020-10-12 13:21:52 +02:00
Jaco Greeff
2b1438030b
Add withResultTransform to Submittables (use in api-contracts) ( #2707 )
...
* Allow SubmittableResult transforms (use in contracts)
* withResultTransform
2020-10-12 10:07:45 +02:00
Jaco Greeff
af0b4362c9
Expose instantiate on contract Blueprint ( #2706 )
...
* Expose instantiate on contract Blueprint
* Allow BigInt & string types
* CodecArg
* Selector
* Cleanup selectors
* Remove Bytes override
2020-10-11 18:51:21 +02:00
Jaco Greeff
c098036ca5
ContractRegistry always has own registry instance ( #2705 )
...
* ContractRegistry always has own registry instance
* Hacky Bytes notation
* Revert Bytes (for now, keep it simple)
* Apply suggestions from code review
* Expand on found error
2020-10-11 13:49:41 +02:00
Jaco Greeff
4b8634b88e
Remove non-API specific contract call results ( #2704 )
2020-10-11 11:26:23 +02:00
503286f7aa
Update ink type spec for 3.0-rc1 ( #2702 )
...
* Updated ABI definitions & parsing
* Run type generation
* Definitions (should be ok-ish)
* Cleanup names
* Allow aliasses on structs (JSON parsing)
* Cleanup json mapping passing
* s/types/lookup/
* Parsing as per current output
* InkSelector
* MtRegistryIndex
* String lookup tests
* Remove serd ovverride comments (it works as-is)
* inkRegistry tests
* Extract primitive types
* s/ty/id/
* Start of parsing into types (actually to be TypeDef)
* Parsing
* stringify struct fields
* Small cleanups
* Add type index to project lookup
* Prefix with index
* Fix interface generation
* Latest contract metadata (#2118 )
* Add new (provisional) incrementer contract metadata
* Update and regenerate type definitions
* WIP: generate new format scale-info types
* WIP: implementing variants
* Implement variants
* Fix up type resolution
* Fix registry spec tests
* Fix lints and some tests
* Fix inkTypes tests
* Fix some lints
* Make imports same line like original
* Comment out (temporarily) sanitize import to make CI pass
* Sanitize
* Remove indices
* Remove index
* api-contract rewrite
* lint
* cleanup
* latest
* latest
* fix definition
* fiz definitions
* rv ink storage
* Update packages/api-contract/src/base/Contract.ts
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
* fixes
* rv scripts
* restore api-contract
* reorder definitions, fix ink storage
* fixes
* def order
* fixes
* encodeTypeDef asRaw
* update ink typ spec
* latest built contracts
* compare files
* Apply suggestions from code review
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
Co-authored-by: Andrew Jones <ascjones@gmail.com >
2020-10-11 09:37:39 +02:00
Jaco Greeff
43791bcc71
Fix c-like enums type encoding ( #2703 )
...
* Fix c-like enums type encoding
* Update packages/api-contract/src/ContractRegistry.ts
* Update packages/types/src/codec/utils/encodeTypes.ts
2020-10-11 09:25:44 +02:00
Jaco Greeff
b65b2d7720
Adjust exec with SubmittableExtrinsic ( #2701 )
...
* Adjust exec with SubmittableExtrinsic
* inputData
2020-10-10 14:25:31 +02:00
Jaco Greeff and Andrew Jones
453dd9e49a
Updated ABI definitions & parsing ( #1662 )
...
* Updated ABI definitions & parsing
* Run type generation
* Definitions (should be ok-ish)
* Cleanup names
* Allow aliasses on structs (JSON parsing)
* Cleanup json mapping passing
* s/types/lookup/
* Parsing as per current output
* InkSelector
* MtRegistryIndex
* String lookup tests
* Remove serd ovverride comments (it works as-is)
* inkRegistry tests
* Extract primitive types
* s/ty/id/
* Start of parsing into types (actually to be TypeDef)
* Parsing
* stringify struct fields
* Small cleanups
* Add type index to project lookup
* Prefix with index
* Fix interface generation
* Latest contract metadata (#2118 )
* Add new (provisional) incrementer contract metadata
* Update and regenerate type definitions
* WIP: generate new format scale-info types
* WIP: implementing variants
* Implement variants
* Fix up type resolution
* Fix registry spec tests
* Fix lints and some tests
* Fix inkTypes tests
* Fix some lints
* Make imports same line like original
* Comment out (temporarily) sanitize import to make CI pass
* Sanitize
* Remove indices
* Remove index
* Adjust ContractAbi interface (empty rpc)
* linting
* Pull in Andrew's changes
* Cleanups
* Some more cleanups
* Update with v3 contracts
* Adjust with actual types
* Regenerate
* Update ABI parsing (#2695 )
* Adjust ABI code
* Cleanup
* Merge non-code
* Type naming
* Simplify Base
* Rename 1
* rename 2
* Rename 3
* Simplify
* Add index to AbiMessage
* Pass actual message or index for call
* Rename param
* Simplify
* Expose call & exec
* s/call/read/
* Cleanup asserts
* AccountId as per spec
* displayName is path
* Update definitions
* Flatten ABIType into TypeDef
* Rewrite
* Fix tests
* Updates
Co-authored-by: Andrew Jones <ascjones@gmail.com >
2020-10-09 18:33:31 +02:00
Jaco Greeff
6a0063addd
Flatten displayType & encodeType into encodeTypeDef ( #2698 )
...
* Flatten displayType & encodeType into encodeTypeDef
* Remove to-be-replaced MetaRegistry tests (hardcoded results)
2020-10-09 15:13:52 +02:00
Jaco Greeff
cdd6544e20
SPDX ( #2619 )
2020-09-17 16:31:06 +02:00
Jaco Greeff
6ae75ba92e
Bump dev ( #2576 )
...
* Bump dev
* type linting
* linting
* linting
* missed
2020-09-03 15:47:29 +02:00
Keith Ingram
e1cb62d2d2
Type for contract call params ( #2452 )
2020-07-27 12:43:54 +02:00
Jaco Greeff
47fc4a2b3c
Bump deps w/ eslint ( #2302 )
...
* Bump deps w/ eslint
* Additional cleanups
* Additional
* @polkadot/types done
* Additional
* @polkadot/typegen done
* Additional
* @polkadot/rpc-core done
* Additional
* Additional
* Additional
* docs
* @polkadot/api-derive done
* @polkadot/api done
* @polkadot/api-contracts done
* Update tests
2020-05-24 09:24:45 +02:00
Jaco Greeff
a833dccdaf
All private prefixed with _ ( #2157 )
...
* All private prefixed with _
* Fix test
2020-04-11 22:21:55 +02:00
Jaco Greeff
5ab24390c5
Indicate all protected members and variables ( #2154 )
...
* Indicate all protected members and variables
* Added dropped protected
2020-04-10 14:29:58 +02:00
Jaco Greeff
58de0b8b9c
Rewrite yarn.lock ( #2127 )
2020-04-01 23:49:56 +02:00
Jaco Greeff
0dc46445bc
Bump dev (incl. lint fixes) ( #2126 )
...
* Bump dev (incl. lint fixes)
* Fix call encoding (stepped into that one)
* Event struct order
* Update with missing tuple type (getTypeDef type)
2020-04-01 22:44:34 +02:00
Jaco Greeff
b3a6b3dcb5
Bump dev, arrow functions ( #2077 )
2020-03-22 07:31:55 +01:00
Jaco Greeff
9d67d711d4
Bump deps, type import on generated ( #2075 )
...
* Bump deps, type import on generated
* type imports in types/types
* Re-export defs
* Split imports/exports
* Additional type import
* Remove import type
* Remove dupes
2020-03-21 09:40:59 +01:00
Jaco Greeff
4e756704ea
Some minor cleanups ( #1966 )
...
* Some minor cleanups
* Small additions
* Cleanup ExtrinsicEra decoding
* Minor adjustments
* Remove support for metadata v0 parsing
* Adjust refCountDelay
* refCountDelay comments
* Adjust Metadata tests
* Metadata default creation
* Funky lines
* Cleanup as AccountIdAndIndex
* Some derive returns
* Try and cleanup info extraction
2020-02-27 15:01:20 +01:00
Jaco Greeff
8598002801
Swap to registry.createType ( #1947 )
2020-02-26 11:17:11 +01:00
Jaco Greeff
8672a2e30e
Move length to TypeDef (regularly used), IdentityFields to interface ( #1913 )
...
* Move length to TypeDef (regularly used), IdentityFields to interface
* Update api-contracts tests
2020-02-21 12:12:18 +01:00
Jaco Greeff
921e55a82e
Move types/codec/create -> types/create ( #1871 )
...
* Move types/codec/create -> types/create
* Update imports after move
* Cleanups
* Cleanup code circular deps
* Re-add dropped interfaces
* Drop duplicated code
* Fix imports
* Remove whacky comment
2020-02-16 13:51:37 +01:00
Jaco Greeff
6e535b0502
Don't make types depend on api (dev deps) ( #1869 )
...
* Don't make types depend on api (dev deps)
* Naming cleanups
* Remove skipped tests
* Splt types/types into chunks
* Re-add setChainProperties (properties?: ChainProperties): void;
2020-02-16 13:13:56 +01:00
Jaco Greeff
8e5b43bf62
Add isInBlock, isRetracted (...) to status enum ( #1852 )
2020-02-14 15:40:56 +01:00
Jaco Greeff
5e0c0ba91a
Align jsonrpc augmentation with others ( #1796 )
2020-02-02 20:16:41 +01:00
Jaco Greeff
b7eeb992cd
Bump deps ( #1699 )
2020-01-06 14:12:49 +01:00
satellitex
53959d482d
Add BTreeSet<V> Codec ( #1639 )
...
* add BTreeSet Codec
* Add following BTreeMap
* fix linting
* fix linting
* add validate Types and encode Types
* type def info is incremented.
* fix compareSet
2019-12-18 16:22:54 +01:00
Keith Ingram
47f1350652
Additional rpcContractCall guard ( #1677 )
...
* additional rpc guard
* isFunction
* isFunction
2019-12-17 17:21:19 +01:00
Jaco Greeff
0d2896630d
Replace Data/U8a with un-aliassed Raw ( #1656 )
...
* Replace Data with un-aliassed U8a
* Export U8a
* Explicitly add U8a to the registry
* U8a -> Raw
2019-12-09 15:38:07 +01:00
Jaco Greeff
01a4d6b4a9
Remove RPC data toU8a ( #1643 )
2019-12-05 19:49:50 +01:00
Jaco Greeff
4cb8462d50
Cleanup ABI encodeType, fix test compare ( #1616 )
2019-11-28 12:42:49 +01:00
Jaco Greeff and Amaury Martiny
011e24bd49
Pass registry to all codec types ( #1592 )
...
* Pass registry to all codec types
* Pass through registry inside API (where the rubber meets the road)
* Small additions
* Derive w/ registry
* Types are more-or-less covered
* Some test adjustments (guided by linting)
* Rid the world of some ../injector
* Additional cleanups, merge injector into registry
* Cleanup extrinsics (always passing registry)
* Remove injector imports (not all replaced)
* Typ spec cleanups
* Phase 1 - types seem lint-free
* rpc-{core,provider} lint free
* Start working through metadata
* Small metadata additions
* Some e2e tests (out-of-order)
* Down to a handful
* Fixup tests for packages/types/src/codec/*.spec.ts
* packages/types/src/codec passes all tests
* packages/types ok (Convert storage with registry fn)
* progress (sort out injection, dreaded find-before msg)
* Down to 1 lint issue...
* Linting done... along with on-demand import
* Exposed ordering
* Remove global injects
* Cleanup comments
* Add CHANGELOG & UPGRADING
* Apply suggestions from code review
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com >
* Update Metadata description
2019-11-21 16:32:39 +01:00
Keith Ingram
479c742471
Error in ABI message assertion ( #1552 )
...
* combine values
* undefined name
2019-11-07 10:47:56 +01:00
Jaco Greeff
c077d0f2e7
Bump deps ( #1550 )
...
* Bump deps
* Updates
2019-11-06 22:56:52 +01:00
Keith Ingram
6075a21efb
Handle AccountId contract params ( #1547 )
...
* combine values
* handle accountids
* cleanup
* cleanup
* force ci
2019-11-05 19:58:30 +01:00
Keith Ingram
cba5710fec
Return Codec from contracts.call ( #1545 )
...
* combine values
* Contracts with Data return
* Data toU8a()
* return data from contracts.call
* create Data
* cleanup
2019-11-05 12:56:49 +01:00
Jaco Greeff
287ceb2ded
Contracts with Data return ( #1540 )
...
* Contracts with Data return
* Data toU8a()
2019-11-03 17:15:21 +01:00
Keith Ingram
cf01c41b33
Contract API for Rx/promises ( #1520 )
...
* wip with rxjs/promise
* add outcome process
* contract call decoding solved
* restore messages as dict, cleanup
* linting
* linting
* type fixes
2019-10-31 19:47:14 +02:00
Jaco Greeff
6e96fd6a55
ABI selector updates ( #1517 )
2019-10-26 13:17:36 +03:00
Jaco Greeff
aed4b3ee6a
Cleanup contracts type registry ( #1497 )
...
* Cleanup contracts type registry
* Remove some ! compiler overrides
* More mappy lookups
* Empty check
2019-10-21 16:18:41 +02:00
kwingram25
b911bdbd2d
Add dynamic Vec ABI support ( #1499 )
2019-10-20 11:57:19 +02:00
Jaco Greeff
21ac0ac2fb
Add TypeDefInfo handling for BTreeMap ( #1481 )
...
* Add TypeDefInfo handling for BTreeMap
* Update getTypeClass.ts
* Fixup BTreeMap result (will be active once class support is merged)
* Merge master, update with BTreeMap classes
2019-10-14 11:42:31 +02:00
Travis CI
2e9192ca02
[CI Skip] 0.95.0-beta.2
2019-10-08 14:51:58 +00:00
kwingram25
05ec4964fe
Generate types from new contract ABI JSON ( #1320 )
...
* generate types from registry
* cleanup
* merge, rearrange
* lint
* built out
* abi v2 creation
* throw on unions
* linting
* version handling
* split functions
* cleanup
* drop v1 support
* special types
* changes
* requested changes
* formatTYpe
* rv outdated test
* rv union test
* codeclimate
* codeclimate
* codeclimate
* codeclimate
* codeclimate
* review
* cleanup encodeTypes
* fix option sub
* TypeDefInfo.Result
2019-10-08 16:31:48 +02:00
Jaco Greeff
d905b4fef3
Split Submittable into actual classes ( #1350 )
...
* Split Submittable into actual classes
* *sigh* Fix VSCode's "helpful" imports
* Rename option creation functions
* Extrinsic already has version embedded
* V3
2019-08-29 22:33:57 +02:00