thiolliere
a36a170c15
remove ambiguous into_iter ( #4794 )
2020-01-31 18:49:02 +01:00
thiolliere
556c80e792
LinkedMap doesn't implement StoragePrefixedMap ( #4760 )
...
* LinkedMap doesn't implement StoragePrefixedMap
* fix test
2020-01-29 13:36:52 +01:00
thiolliere
f4fa59470a
doc ( #4761 )
2020-01-29 13:26:09 +01:00
thiolliere
76acc96f3a
Remove default hasher ( #4739 )
...
* remove default hasher from decl_storage!
* fix decl_storage declarations
2020-01-27 18:23:10 +01:00
thiolliere and Bastian Köcher
e4f3e85585
Improve decl storage parsing ( #4731 )
...
* improve decl storage parsing
* remove hidding detail macro
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-24 20:04:11 +01:00
thiolliere
164dec95e5
Pallet session new API ( #4609 )
...
* Initial work
* Fix most things
* fix test
* fix old comment
* migration
* fix
* remove useless stuff
* fix
* less spaghetti implementation
* fix initial session
* fix
2020-01-20 17:26:53 +01:00
thiolliere
28fada7daf
remove old test ( #4637 )
2020-01-16 08:00:01 +01:00
thiolliere
4de8d5cef9
Add translate function for storage prefixed map. ( #4555 )
...
* translace values for prefixed storages
* improve doc
* new impl
* update test
2020-01-13 12:14:44 +01:00
thiolliere
2d0c382daf
fix society ( #4594 )
2020-01-10 15:10:16 +01:00
thiolliere and Bastian Köcher
b74c88b3cc
Modify doublemap syntax ( #4576 )
...
* modify doublemap syntax
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-10 11:52:56 +01:00
thiolliere
583b0e3c69
impl iter_prefix on doublemap ( #4388 )
2019-12-17 13:41:25 +08:00
thiolliere
e5b6935c2a
Introduce prefixed storage with enumeration ( #4185 )
...
* Introduce storage_next allowing iteration. (without childtries)
* Implement prefixed storage
* impl cache in client_storage_cache (needs test)
* switch overlay change to btreemap
* Revert "impl cache in client_storage_cache"
This reverts commit c91a4848916eba87184b3dc4722cea81aec9339d.
the storage cache cannot be used this way
* Revert "Implement prefixed storage"
This reverts commit 4931088126a427082d7310ed7e83b8eea966bc20.
* Impl StoragePrefixedMap for all map storages
* remove comment
* Move all overlays to BTreeMap
* btreemap iteration improvment
* impl for child tries
* impl tests for childs
* fix
* remove cache comment
* Fix grumble
2019-12-09 20:55:11 +01:00
thiolliere
b8ac094649
allow storage value build to put no value ( #4319 )
2019-12-07 15:30:57 +01:00
thiolliere
22c00ff424
Add swap and decode_len to DoubleMap finishing #3749 ( #4264 )
...
* Add `swap` and `decode_len` to `DoubleMap`
* Add tests to `swap` and `decode_len` for `DoubleMap` (WIP)
* Address review comments
* Remove function that is not in scope
* fix test
* better naming
2019-12-02 13:01:29 +01:00
thiolliere
b87b008775
remove unused file ( #4251 )
2019-11-29 20:25:30 +01:00
thiolliere
2f35d7f003
improve doc ( #4239 )
2019-11-28 11:06:06 +01:00
thiolliere
f4035cd5ac
Implement all storage after prefix ( #4227 )
...
* Implement all storage after prefix
* fix test, bump version and fix doc
* bump metadata version
* Update frame/support/procedural/src/storage/storage_struct.rs
2019-11-27 18:23:20 +00:00
thiolliere
f000392cc0
fix storage decode error ( #3997 )
2019-11-22 16:29:26 +01:00
thiolliere
77407e1694
fix inmemory ( #4049 )
2019-11-08 14:07:51 +01:00
thiolliere
5503c483b1
doc ( #3995 )
2019-11-02 16:09:10 +00:00
thiolliere
984163e86e
Improve doc for storages in srml-support ( #3982 )
...
* improve doc
* Apply suggestions from code review
2019-10-31 19:04:53 +01:00
thiolliere
d49c36428d
Fix treasury kept and spend when emptied ( #3880 )
...
* Now construct_runtime must include treasury config so account is created at genesis.
* if it doesn't though it is ok, account will be created when the amount put is more than existential deposit.
2019-10-24 17:26:26 +02:00
thiolliere
f4e36f0d74
Refactor decl storage ( #3765 )
...
* split implementation in multiple files:
* transformation -> genesis_config/ getters.rs instance_trait.rs metadata.rs mod.rs store_trait.rs
* mod.rs -> parser.rs
* impl.rs -> storage_struct.rs
* parser is isolated into parse module, it could be improved as well but this can be done in another PR
* modules contains a defintion of decl_storage input which must be ok to work with.
* implementation change:
* T: Trait might be more often bound to 'static (anyway we only use static one and it is needed for metadata current implementation).
* GenesisConfig no longer requires its fields to be Clone (possible since to EncodeLike feature)
* builder for map storages must return precise type Vec<(key, value)>
2019-10-16 15:47:46 +02:00
thiolliere
3bfcdeb250
Fix quantization from OnDilution in treasury ( #3736 )
...
* fix
* bump version
* remove println
2019-10-02 12:36:50 +02:00
thiolliere and Bastian Köcher
53e0ddee4e
Use EncodeLike for storages traits ( #3676 )
...
* impl
* patch
* lock
* some refactor
* some avoided copy
* new api without ref for doublemap
* fix
* version bump
* fix
* point to incoming release
* use codec latest
* bumpd impl version
* fix unused
* fix
* Update srml/support/src/storage/mod.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
2019-10-01 19:45:24 +02:00
thiolliere
75ed6cc04e
Refactor srml-support/storage ( #3702 )
...
* refactor
* fix
* remove unused vec storages
* address comment
2019-09-27 14:39:14 +02:00
thiolliere and Kian Paimani
55e5b21478
Improve storage doc ( #3691 )
...
* doc
* fix
* Apply suggestions from code review
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* complete suggestion
2019-09-26 11:44:52 +02:00
thiolliere
66b0e00651
Fix linkedmap instance head of ( #3690 )
2019-09-25 22:38:29 +02:00
thiolliere
1835c3f9a1
Fix head not hashed ( #3680 )
...
* fix head not hashed
* bump version
2019-09-24 17:46:41 +02:00
thiolliere
e6d4a76521
Refactor reward curve ( #3668 )
...
* move test in tests dir
* comment
* refactor
2019-09-23 14:11:24 +02:00
thiolliere and Kian Paimani
c25d7386cf
Make staking inflation curve configurable. ( #3644 )
...
* Draft for new design of NPoS rewards
* finish code
* fix test
* add tests
* improve log test
* version bump
* Update srml/staking/reward-curve/Cargo.toml
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* u128 -> u64
* make conversion to smaller type safe
* Update core/sr-primitives/src/curve.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2019-09-21 12:47:10 +08:00
thiolliere
26202c66f7
rename ( #3516 )
2019-08-29 17:43:04 +02:00
thiolliere and Bastian Köcher
9900562389
srml_support storage reorganize (#3344 )
...
* impl
* file split
* old comment
* better error message
* WIP
* basti test works
* comment
* remove old files
* impl swap for storage map
* fix
* fix and comment
* code refactor
* code refactor
* code format
* code refactor
* fix
* fix
* fix
* document generators
* license
* doc
* doc
* fmt
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* some comment addressed
* storage_items small refactor
* fix storage_items
* more precise returned type
* fix
* code fmt suggestion
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* remove box allocation
* bump version
* rename function as behavior has changed
* fix doc
2019-08-29 17:04:46 +02:00
thiolliere
b07fd450e2
Simplify deposit_event declaration in decl_module ( #3506 )
...
* simplify module deposit_event declaration
* fix
* bump version
* fix
* fix test
* fix doc
2019-08-29 14:34:02 +02:00
thiolliere
a528b7dc56
improve error msg on wrong closure signature ( #3467 )
2019-08-24 17:41:45 +02:00
thiolliere
a3e2a710c8
Fix linkemap swap ( #3468 )
...
* fix linkedmap swap
* version bump
2019-08-24 06:51:40 +02:00
thiolliere
716e6fa7f4
avoid silent ignore ( #3450 )
2019-08-22 11:49:22 +02:00
thiolliere
2f3e7cbe80
decl_module doc ( #3451 )
2019-08-21 17:38:41 +02:00
thiolliere
591e27e4ab
typo ( #3455 )
2019-08-21 17:35:08 +02:00
thiolliere
71cee78d85
Fix srml-balance burn implementation ( #3443 )
...
* tests
* fix
* bump version
2019-08-20 20:32:00 +02:00
thiolliere
556a9416ae
Staking optimisation ( #3300 )
...
* staking code api
* doc + test
* version bump
* index fn
* rename function
* doc
* adress comments
* add complexity comment
2019-08-07 22:11:12 +02:00
thiolliere and Bastian Köcher
87e72d9327
Fix decl_storage map and linked_map for insert_ref ( #3316 )
...
* test
* fix
* bumpd version
* Update srml/support/procedural/src/storage/impls.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
2019-08-07 11:52:06 +02:00
4ed67e03a4
Update to parity-scale-codec ( #3232 )
...
* WIP: update codec
* WIP
* compiling
* WIP
* rename parity-scale-codec to codec
* WIP
* fix
* remove old comments
* use published crates
* fix expected error msg
* bump version
* fmt and fix
* remove old comment
* fix wrong decoding impl
* implement encode like for structures
* undo removal of old pending changes
* trailingzeroinput
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com >
* update codec
* fmt
* version is 1.0.0
* show more error
* fmt
2019-08-06 19:36:23 +02:00
a0d442333f
Improve internal doc of inflation module ( #3288 )
...
* improve internal doc
* Apply suggestions from code review
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com >
* correct spelling
* Apply suggestions from code review
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* improve not confusing expression
* improve general doc
2019-08-06 10:12:53 +02:00
thiolliere
b504f5a7bb
Make staking add_reward_points_to_validator public ( #3273 )
...
* make staking add_reward_points_to_validator public
* make storage private
* bump version
2019-08-01 09:55:27 +02:00
thiolliere
852ed92861
staking need to get events ( #3217 )
2019-07-29 10:40:02 +02:00
thiolliere and Bastian Köcher
2b6f664caf
Staking rate targeting and specific rewards. ( #2882 )
...
* PNPoS implementation
* wip: change staking api
* code readibility
* fix overflow
* comment
* license
* doc
* reorganize a bit
* rename to proper english + doc
* address comments
* refactor unused mock
* fix add_point
* update tests
* add not equalize to ci
* Revert "add not equalize to ci"
This reverts commit 1c61c25874b04b1cdfadd7d353b75a189a59ad35.
* bring test back
* update locks
* fix genesis config
* add authorship event handler + test
* uncouple timestamp from staking
* use on finalize instead
* remove todo
* simplify mock
* address comment
* doc
* merge test
* fmt
* remove todo todo
* move add_reward_point to regular function
* doc
* doc
* increase version
* doc and fmt
* Update srml/staking/src/inflation.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Fix some doc typos
2019-07-25 01:25:43 +08:00
thiolliere
08d1933105
fix doc ( #3162 )
2019-07-22 14:01:13 +02:00
thiolliere
62f62c6c48
fix and test default instance for collective ( #3135 )
2019-07-17 19:00:20 +02:00
thiolliere
d00a2b28ac
Make use of child storage for testExternalities and basicExternalities ( #3009 )
...
* impl test using both storage and child_storage
* few fixes
* remove unused code
* impl PartialEq with children keys
* fmt
* implementation of basic with children + rename new
* assert and test
* no panic in runtime
* address comments
* fix
2019-07-09 21:07:58 +02:00
thiolliere
e4f324a452
Fix test of staking without equalize feature ( #2997 )
2019-07-02 16:57:17 +02:00
thiolliere
8b89c7ae62
Update parity-scale codec minor version ( #2951 )
...
* update parity-scale codec minor version
* update to 3.5.3
* update locks
* increase impl version
* Update to 3.5.4
* Update WASM lockfiles
2019-06-26 08:48:12 +02:00
thiolliere and Niklas Adolfsson
cf7dbe8151
Staking module: approximate fraction into perbill to avoid overflow ( #2889 )
...
* approximate fraction into perbill
* test
* fix comment
* line width
* bump impl version
* rename test for better naming
* test overflow
* Apply suggestions from code review
Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2019-06-24 13:23:54 +02:00
thiolliere
72278748ab
fix construct_runtime ( #2898 )
2019-06-18 17:06:37 +02:00
thiolliere
693ea3cb42
Fix construct_runtime multiple log issue ( #2816 )
...
* Fix comma issue
* multiple log test
2019-06-07 15:27:55 +02:00
thiolliere
91a241ad5b
derive codec for inherent data ( #2714 )
...
* derive codec for inherent data
* increase spec version
2019-05-29 14:16:37 +02:00
ffce18b994
Contract restoration ( #2502 )
...
* partial impl
* more checks
* improve TestExternalities + tests
* make tombstone raw to derive Eq
* remove before merge
* add test
* fmt
* update test
* doc
* bump version
* fix testing
* update runtime
* Fix TrieIdGenerator
* fix dummy trie id generator
* update test
* bump version
* format
* Update core/state-machine/src/testing.rs
Co-Authored-By: cheme <emericchevalier.pro@gmail.com >
* document test
* Apply suggestions from code review
Co-Authored-By: DemiMarie-temp <50585338+DemiMarie-temp@users.noreply.github.com >
* refactor
* fix
* fmt
* address review
* impl last_write
* Fix storage size, test, remove size in tombstone
* fix
* Update srml/contract/src/lib.rs
Co-Authored-By: Sergei Pepyakin <s.pepyakin@gmail.com >
* comment
* child_storage_root as &[u8]
2019-05-23 15:09:16 +02:00
thiolliere
1e35552c14
get rid of refcell, use &mut storage ( #2659 )
2019-05-23 10:08:19 +01:00
thiolliere
57f306a3c1
Reserve function name ( #2609 )
...
* reserve function name
* bumpd impl version
* Revert "bumpd impl version"
This reverts commit 03a23e308312d857bdfd3c90ff564b4b11347530.
* add test
* update test
* update lock
* Fix test on stable
2019-05-21 17:07:30 +02:00
thiolliere
aa2c496a65
Make perthings operate in type operator ( #2501 )
...
* perthings operate in type operator
* implementation with rem
* fmt
* doc
* better fmt
* bump version
* Tests for pet-things
* demonstrate output as type of operation
* Remove redundant assertions.
* rename test
* update lock
* bump impl version
2019-05-15 18:48:58 +02:00
thiolliere
2893a613c2
increase block gas limit ( #2597 )
2019-05-15 18:11:05 +02:00
thiolliere
3a58c7ebcb
make construct_service_factory compile ( #2581 )
2019-05-14 17:50:38 +02:00
thiolliere
2b694b5898
contruct_runtime doc ( #2552 )
2019-05-13 14:15:26 +02:00
thiolliere
ac195a0060
add brief doc to some macro ( #2523 )
...
* add doc
* Update lib.rs
2019-05-10 14:21:03 +02:00
thiolliere
dfbaedd535
Allow modules to validate transaction, second attempt ( #2463 )
...
* first impl
* rename origin::inherent to none
* fix
* fix
* Apply suggestions from code review
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* comment
* better error
* doc
* (add unsigned module 🤦 )
* doc
* fix
* implement for node-template as well
* add validated unsigned to executor
* fix
* fix
* bump version
* testing xt
* remove extraneous logic
* licence
* impl test
2019-05-10 14:13:04 +02:00
thiolliere
d380db706b
actually update deduct_block when paying rent ( #2490 )
...
* actually update deduct_block when paying rent
* add test
* remove println
* same block call test
* bump version
2019-05-07 14:13:56 +02:00
thiolliere
b0c21da94f
optimize double map first key hash ( #2451 )
...
* fix double map encoding it is now encoded as specified in the doc
2019-05-06 08:44:36 +02:00
thiolliere and pepyakin
c7d9ca379d
Contract accounting removal ( #2230 )
...
* first partial implementation
* update rent allowance
* fmt
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* remove comments
* reward surcharge claims
* remove rent allowance in param + code_hash changed
* Fix bug
* fix tests
* fmt
* impl getter setter rent allowance
* fmt
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* comments
* doc + be->le
* doc
* doc
* fix improve fast return
* renamings
* rename + COMPLEXITY
* COMPLEXITY
* add test
* etrinsic claim surcharge delay configurable
* comment addressed
* move and rewrite of pay_rent
* remove child trie
* fmt
* use derive
* arithmetic operation
* fix
* fix storage root + checked_mul + test
* WIP: test
* WIP
* add tests and fix
* fmt
* typo and doc suggestions
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* WIP
* address some comments
divide tests + some docs
* use br_table
* remove unused function
* Bump the runtime version
* insert_with
* Add some comments.
* Refactor
* Shuffle and fix comments
* More comment fixes.
* dues limited
* Add comment
* Handicap
* Docs.
* Apply suggestions from code review
Co-Authored-By: pepyakin <s.pepyakin@gmail.com >
* Coalesce block_passed in a block
* Fix build
* Paid → Ok
* match → if
* Imrpove handicap description
2019-04-30 09:41:33 +02:00
thiolliere
bb9746c798
store contract keys with blake2_256 ( #2414 )
...
* store contract keys with blake2_256
* bump version
2019-04-29 16:13:45 +02:00
thiolliere
2b10d8e080
decl_storage document hasher choice ( #2387 )
...
* doc
* fix
* grammar and line wrapping
* small changes to end
* Update lib.rs
* update after demi's review
2019-04-27 16:33:21 +02:00
thiolliere
07d495d905
remove use of hidden api in support procedural ( #2383 )
2019-04-25 15:48:18 +02:00
thiolliere
116e99b6f3
decl_storage doc ( #2341 )
...
* doc
* other doc cleanup and fixing links
* one more typo
2019-04-23 18:50:22 +01:00
thiolliere
450c03d03e
Fix contract child usage ( #2299 )
...
* Fix contract child usage
* bump implementation version
2019-04-16 18:09:34 +02:00
thiolliere
f7fc02fdf2
Use correct prefix needed by child trie in contract ( #2292 )
...
* resolve child trie usage
* update locks
* increase version
* fix test
* Revert "update locks"
This reverts commit 6f537458b39df4a3bf05a311253986f29289f391.
2019-04-16 15:38:12 +02:00
thiolliere
c98db99d80
implement contract events ( #2161 )
...
* implement contract events
* update runtime
* renaming
* update test code hash
* improve complexity details
* add deposit event base cost
* add test
* Revert "add deposit event base cost"
This reverts commit 58ec010c0f4f4f0e16935ad41da32aedd17a8c57.
* update test
* Revert "update test"
This reverts commit 6fe61a593ccf0d41f09a0b97472b28ed8751a999.
* Revert "Revert "add deposit event base cost""
This reverts commit 145e8a9bac15313a4c380aa66b94fd4d36fa3f6d.
* Fix format a bit
2019-04-03 08:20:01 +02:00
thiolliere
7e3b2d464a
skip phantom for decl_event ( #2158 )
...
* use parity-codec-derive from parity-codec everywhere
* codec v3.2 -> v3.3
* skip phantom when deriving event
* fix decl_module call
* update impl version of node + builds
2019-04-02 12:04:23 +02:00
thiolliere
a0e6d96de0
keep track storage bytes ( #2154 )
...
* refactor
* fix accountinfo creation + impl mem_stored
* add comment
* improve syntax
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* rename current_mem_stored -> storage_size
* more explaination + more readable code
* bump impl version of node + builds
* delete builds
2019-04-01 19:14:55 +02:00
thiolliere
f9d0da0a18
storage doublemap in decl_storage ( #1918 )
...
* factorization
* introduce GenericUnhashedStorage
* implement generator and storage
* impl double map in storage macro
* improve StorageDoubleMapXX methods
* remove storage from example and impl test
* remove old comments
* wasm compatible
* improve imports
* rename storages
* update runtime impl version
* make code less verbose
* impl hash config for second key in double map
hash available are all of Hashable trait
* use double map in decl_storage for contract
* fix double map config issue
* add hasher into metadata
* update impl version and build wasm
* doc
* add attrs
* update metadata version
* update runtime version
* fix unused storage
2019-03-28 17:40:50 +01:00
thiolliere
29001cb469
Decouple contract from balances ( #2081 )
...
* decouple contract from balance
* update impls and builds
* set fees in contract module
* builds
2019-03-28 13:46:30 +01:00
thiolliere
a2222279ca
improve decl storage doc ( #2059 )
...
* improve decl storage doc
* nocompile doc
* fix doc
* typo
* Update srml/support/procedural/src/lib.rs
2019-03-26 15:01:46 +01:00
thiolliere
571d094313
improve docs ( #2068 )
...
* improve decl_storage instance doc
* use decl_event doc accordignly
* automate doc and while allow to extend it on event
* some missed ones
* Update srml/example/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* Update srml/support/procedural/src/storage/transformation.rs
2019-03-26 14:35:57 +01:00
thiolliere
e6a4bb1be6
fix macro internal use with $crate ( #2060 )
2019-03-26 10:44:01 +01:00
thiolliere
620e8dc8b9
impl MakePayment for balances instances ( #2055 )
2019-03-25 15:19:15 +01:00
thiolliere
3501746fa9
Fix lazy initialisation bug for parametizability ( #2046 )
...
remove lazy and compute prefix at compile time
2019-03-19 18:05:07 +01:00
thiolliere
96d1f841cb
fix indexing event breakage ( #2030 )
...
* fix instance event indexing breakage
* fix infinite loop
* update runtime impl version, and builds
* Revert "Remove unnecessary restrictions in executive module (#2024 )"
This reverts commit e9f17771b0 .
2019-03-18 14:18:24 +01:00
thiolliere
d743a8b71f
Implement parameterisable modules ( #1800 )
...
* first implementation
* remove done comment
* origin done
* impl log for instance
* impl inherent for instance
* Fix wasm build + full example build
this requires parity codec implements codec for core::marker::PhantomData
* patch parity-codec link to github branch
* improve internal names and fix instance prefix
* Fix in macros
* add test modules for support
this allow to test for construct_runtime as well.
The reason to have put that in another crate is:
* if we put test in `tests/` dir of srml/support then decl_storage fails to get
srml-support access because it believes it is inside srml-support
crate and so derive access to `quote!{ crate }` but this is wrong
(and I don't see any way to prevent that, and it only bother us so I
don't think that matters that much)
* if we put test inside lib.rs then contruct_runtime cannot be used
because it call some macros that are defined with macros
(decl_outer_event and decl_outer_origin) and thus rustc complains.
* defaultinstance to its own struct to avoid errors
* enforce <T, I> for Event and Config, impl test
* add origin, log, inherent to test
* test more code generation
* basic storage test
* fix typo
* rename a few imports and field
* delete wip test in example and runtime
* change default prefix to make it backward compatible with test
* rename Instance to I and Instantiable to Instance
note: the name of generic parameter I is only enforce by decl_module!
and this could be rewritten
* doc
* clean old TODOs
* update parity-codec to 3.2
* update node impl version + builds
* fix warning
* fix unrelated grandpa test
* refactor code
2019-03-15 19:25:18 +01:00
thiolliere
b92b2cc29b
improve modules doc generation by support macros ( #1975 )
2019-03-14 16:35:52 +01:00
thiolliere
e89d6e66fc
fix grandpa test ( #1996 )
2019-03-14 13:50:38 +01:00
thiolliere
ffd803c3d8
remove unecessary 2015 imports ( #1961 )
2019-03-11 12:02:06 +01:00
thiolliere
b599556e21
remove unused code ( #1920 )
2019-03-04 17:10:31 +01:00
thiolliere
66bc864f29
improve storage build type checking ( #1914 )
...
* force build closure in decl_storage! to return explicit type
* fix when type was different
Note: it breaks API but it is easy to upgrade: just do the conversion from encode type to the final type yourself in the build closure:
```rust
Encode::using_encoded(&value, |mut value| Decode::decode(&mut v)).unwrap();
```
2019-03-04 10:49:56 +01:00
thiolliere
b332c64e38
improve storage macro static checks ( #1907 )
2019-03-01 12:19:24 +01:00
thiolliere
04fed82940
fix construct_runtime! macro error when no event ( #1887 )
...
* fix macro error when no event
* update impl version
2019-02-28 12:01:05 +01:00
thiolliere
72a8927ea3
replace some encode by using_encoded ( #1863 )
...
* replace some encode by using_encoded
* update runtime
* improve readibility
2019-02-26 09:26:11 +01:00
thiolliere
dab5ad913f
fix construct runtime module position bug ( #1849 )
...
* fix construct runtime module position
* Update srml/support/src/runtime.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* Update srml/support/src/runtime.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* Update srml/support/src/runtime.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* Update srml/support/src/runtime.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* Update srml/support/src/runtime.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
2019-02-25 11:41:40 +01:00
thiolliere
19ac5e1e95
fix construct runtime macro ( #1838 )
...
if system wasn't the first module then it crashed
2019-02-21 10:04:40 +01:00
thiolliere
8065116ba5
Improve fees module ( #1821 )
...
* remove amount associated
* make a new trait to bound some arithmetics to balances or assets:
It also remove arithmetic bounds of srml-support::traits::Currency.
To update your code then use srml_support::traits::ArithmeticType like:
`type Currency: ArithmeticType + Currency<Self::AccountId, Balance=BalanceOf<Self>>; `
with `type BalanceOf<T> = <<T as Trait>::Currency as ArithmeticType>::Type; `
* improve decl_storage when it explicit serde bound: basically don't try to be smarter than rust and just use where clause.
2019-02-19 17:13:59 +01:00
thiolliere
e5dbcf6890
decouple balances from some modules ( #1641 )
...
* decouple balances from some module by creating a new traits in support/traits
* improve decl_event
2019-02-08 17:43:12 +01:00
thiolliere
4792a3806c
use custom ext::Opt for default_value in DeclStorageLine ( #1722 )
...
instead of ext::Seq
2019-02-07 16:35:29 +01:00
thiolliere
9de35fa7d5
update rhododendron trie-bench for parity-codec 3.0 ( #1613 )
...
* update rhd and tri
* .lock and wasm build
2019-01-31 11:04:41 +01:00