This project is mirrored from https://github.com/paritytech/ink.git. Pull mirroring updated .
  1. 04 Oct, 2019 3 commits
    • Denis_P's avatar
      CI is ready · 0613c044
      Denis_P authored
      0613c044
    • Denis_P's avatar
      Merge branch 'master' into create_ci · 7a655e55
      Denis_P authored
      7a655e55
    • Hero Bird's avatar
      Implementation of ink_env 2.0 (#195) · 4107f98d
      Hero Bird authored
      * [core] initial implementation of new env module
      
      * [core] add SRML implementations for some more Env trait methods
      
      * [core] replace SmallVec with Vec since it isn't ready yet
      
      * [core] add license header to ret_code.rs
      
      * [core] take generic buffer params &mut instead of by value
      
      * [core] add implementation of create_contract for SRML env
      
      * [core] remove unused SmallVec imports
      
      * [core] implement deposit_event for SRML contracts env
      
      * [core] implement invoke_runtime for SRML contract env
      
      * [core] adjust invoke_runtime at trait level
      
      * [core] implement restore_to for SRML contracts env
      
      * [core] fix minor warnings and formatting issues
      
      * [core] refactoring and clean ups
      
      Output is no longer a contract property since it was too hard to make it work properly and efficiently.
      
      * [core] add initial version of EnvAccess
      
      * [core] add runtime checks to EnvAccess for input and output
      
      * [core] GetProperty and SetProperty no longer return Result
      
      * [core] introduce macro to remove some duplicate code in EnvAccess
      
      * [core] make buffer always the first argument in Env
      
      * [core] some minor clean ups
      
      * [core] implement {get,set,clear}_contract_storage for EnvAccess
      
      * [core] make assert_not_yet_returned and set_has_interacted private fns
      
      * [core] implement EnvAccess::random
      
      * [core] implement EnvAccess::println
      
      * [core] implement EnvAccess::{invoke_contract, eval_contract, create_contract}
      
      * [core] refactor module imports and exports
      
      * [core] add DynEnv utility
      
      * [core] move EnvAccess{Mut} into their own sub-module
      
      * [core] improve docs and add docs where they were missing
      
      * [core] add Default impl for EnvAccess
      
      * [core] add DynEnv
      
      * [core] greatly improve module docs
      
      * [core] remove some warning-errors that were too strict
      
      * [core] introduce initial implementation of test env
      
      * [core] initial Storage implementation for TestEnv
      
      * [core] improve module documentation
      
      * [core] continue implementation of TestEnv
      
      * [core] improve byte_utils docs for negate_bytes
      
      * [core] add new DefaultSrmlTypes implementation
      
      * [core] continue initial TestEnv implementation
      
      * [core] add TypedEncoded utility that we might use in TestEnvInstance
      
      * [core] enhance TypedEncoded utility
      
      * [core] add Debug impl for Storage and Entry
      
      * [core] implement the TestEnvInstance part of TestEnv
      
      This is the part that actually holds the data in a generic fashion and is controlled later on by the TestEnv through thread_local storage.
      
      * [core] remove unnecessary imports
      
      * [core] remove unnecessary derive impls for some marker types
      
      * [core] greatly improve doc comment of TestEnvInstance
      
      * [core] implement Clone, PartialEq, Eq and Hash for any TypedEncoded<M>
      
      * [ci] update Travis CI rust version: nightly-2019-08-30 -> nightly-2019-09-25
      
      * [core] include TestEnv or SrmlEnv conditionally exclusively
      
      * [core] apply rust fmt
      
      * [core] use Input::remaining_len to optimize scale::Decode impl for CallData
      
      * [core] align usage of PhantomData
      
      * [core] resolve call/create TODOs
      
      * [core] fix minor doc issues
      
      * [core] add a note to Env::println to make users aware of it being a debug utility
      
      * [core] apply rust fmt
      
      * [core] add Debug impl to Storage and Entry
      
      * [core] add PartialOrd and Ord impl to TypedEncoded
      
      * [core] split TestEnv TypedEncoded types into their own module
      
      * [core] add an account database for the TestEnv
      
      * [core] move impl_get_property_for next to its macro definition
      
      * [core] enhance test::AccountsDb
      
      * [core] make fields in TestEnvInstance pub
      
      * [core] fix some mod re-exports
      
      * [core] improve AccountsDb get and get_mut interface
      
      * [core] add TypedEncoded::{assign, try_assign} methods
      
      * [core] add 'static to all EnvTypes associated types
      
      * [core] add initial implementation of accessor for TestEnvInstance
      
      * [core] rename some fields in instance.rs
      
      * [core] implement the rest of the properties getters and setters for TestEnv
      
      * [core] move Input property getter into macro
      
      * [core] add initial stubs for Env impl of TestEnv
      
      * [core] slightly improve property getters
      
      * [core] implement Env::get_contract_storage for TestEnv
      
      * [ci] update nightly-2019-09-25 -> nightly-2019-10-03
      
      * [core] improve Storage::write by using Entry API
      
      * [core] silence warning of unused buffer in Env impl for TestEnv
      
      * [core] implement Env::set_contract_storage for TestEnv
      
      * [core] impl Env::clear_contract_storage for TestEnv
      
      * [core] add dev-comments for implementations of many Env methods for TestEnv
      
      These need some explanation since they partly contradict the off-chain nature of the TestEnv.
      
      * [core] implement Env::random for TestEnv
      
      * [core] improve dev-comment for Env::create_contract
      
      * [core] implement Env::output for TestEnv
      
      * [core] add AccountIdGen to TestEnvInstance
      
      * [core] add records to test environment module
      
      Used for later use in recording implementations of Env for TestEnv.
      
      * [core] apply rustfmt
      
      * [core] fix some warnings
      
      * [core] add constructors for records
      
      * [core] make record constructors pub
      
      * [core] apply rustfmt
      
      * [core] implement Env::{invoke_contract, eval_contract} for TestEnv
      
      * [core] implement restoration and runtime invokation records
      
      * [core] implement Env::{emit_event, invoke_runtime, restore_to} for TestEnv
      
      * [core] implement AccountsDb::insert
      
      * [core] implement Env::create_contract for TestEnv
      
      * [core] add doc-comment for test environment module
      
      * [core] fix copy/paste error in accessor.rs
      
      * [core] add initialization routines to TestEnvInstance
      
      * [core] make use of TypedEncoded in record.rs
      
      * [core] re-export concrete Env impls as EnvImpl
      
      * [core] make most of the test environment definitions publicly visible
      
      * [core] apply rustfmt
      
      * [core] fix 2 compile errors in no_std mode
      
      * [core] add doc-comments to all test sub-modules
      
      * [core] add doc-comments to EnvImpl type alias
      
      * [core] add initial implementation of TestEnv::try_initialize
      
      * [core] add dev-notes to SrmlEnv
      
      * [ci] update travis nightly usage nightly-2019-10-03 -> nightly-2019-10-04
      4107f98d
  2. 03 Oct, 2019 2 commits
  3. 02 Oct, 2019 15 commits
  4. 01 Oct, 2019 1 commit
  5. 30 Sep, 2019 3 commits
    • Denis_P's avatar
      try wo kcov · 4255b766
      Denis_P authored
      4255b766
    • Denis_P's avatar
      create ci, test run · 45b9c2dc
      Denis_P authored
      45b9c2dc
    • Michael Müller's avatar
      Deprecate CellChunkAlloc for DynAlloc (#186) · d92462b3
      Michael Müller authored
      * Replace CellChunkAlloc with DynAlloc
      
      * Remove CellChunkAlloc
      
      * Satisfy linter
      
      * Replace CellChunkAlloc with DynAlloc
      
      * Remove CellChunkAlloc
      
      * Satisfy linter
      
      * Do not initialize env for each call
      
      * Fix typo
      
      * Remove tests which panick while panicking
      
      These tests test for panicks. The issue is that
      the `Drop` implementation for `BitVec` will be
      called during the unwinding, this `Drop`
      implementation will try to access uninitialized
      fields and panick as well.
      d92462b3
  6. 25 Sep, 2019 1 commit
    • Sergey Pepyakin's avatar
      Implement the build command (#192) · 53fa4d58
      Sergey Pepyakin authored
      * [cli] Implement the build command
      
      * [cli] Remove all build.sh scripts
      
      * [cli] Restore build-all.sh
      
      * Fix the test.
      
      * Strip custom sections
      
      * Add some testing.
      
      * Strip name and reloc sections as well
      53fa4d58
  7. 21 Sep, 2019 1 commit
  8. 19 Sep, 2019 1 commit
    • Hero Bird's avatar
      ink abi v0.2 (#190) · 0f249fa4
      Hero Bird authored
      * [abi] add some missing exports to ink_abi
      
      * [abi] add missing docs
      
      * [abi] replace vec![] with Vec::new()
      
      * [abi] add ConstructorSpec + glue code
      
      * [abi] add ConstructorSpecBuilder::done
      
      * [abi] remove old DeployHandlerSpec
      
      * [abi] bump derive_more version 0.14 -> 0.15
      
      * [abi] move Missing struct above state module
      
      * [abi] apply rust fmt
      
      * [abi] add TypeSpec as a new wrapper around type with optional display names
      
      * [abi] make EventParamSpec use new TypeSpec
      
      * [abi] finish integrating the new TypeSpec into specification structs
      
      * [abi] update abi_derive dependencies syn, quote and proc_macro to 1.0
      
      * fix minor spelling in docs
      Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * [abi] refactor ContractSpecBuilder
      
      * [abi] apply rust fmt
      
      * [lang] implement new ink_abi API for ink_lang
      
      * [lang] apply rust fmt
      
      * [lang] implement display name support
      
      * [lang] adjust compile time tests to new ink_abi codegen
      0f249fa4
  9. 16 Sep, 2019 1 commit
  10. 30 Aug, 2019 1 commit
    • Hero Bird's avatar
      Add call infrastructure to ink_lang (#175) · 9cf5a571
      Hero Bird authored
      * [core] add initial call builder implementation
      
      * [core] add setters to CallBuilder
      
      * [core] fix invalid mod import in no_std
      
      * [lang] initial remote call implementation for ink_lang
      
      * [examples] add ink-as-dependency crate feature to erc20 token contract
      
      * [core] move calls and call error definitions
      
      * [core] add ext_create support
      
      * [*] apply rustfmt
      
      * [core] expose ReturnType publicly
      
      * [core] add ext_create impl on the SRML interfacing side
      
      * [core] fix minor invalid module import
      
      * [lang] split CallEnhancer into mut and immutable versions
      
      * [lang] forward to call enhancers from short-version of remote calling
      
      * [core] improve create builder to return the contract directly
      
      * [lang] simplify env types code generation
      
      * [lang] add create call builder code generation
      
      * [lang] improve code gen by altering spans of the generated code
      
      * [examples] add ink-as-dependency to all lang examples
      
      * [cli] add ink-as-dependency to smart contract template
      
      * [lang] fix code gen bug with forwarding references
      
      * [lamg] move impls out of const item
      
      It seems that inherent impls shouldn't be put inside a const item.
      
      * [core] impl Default for Hash
      
      * [lang] add Flush, scale::{Encode, Decode} for contracts as dependencies
      
      * [examples] add example to call remote smart contracts
      
      * [examples] remove invalid test code from delegator contract
      
      * [abi] fix warning about suffixed tuple indices
      
      * [lang] fix bug in generate-abi codegen for deploy handler with multiple args
      
      * [lang] derive from type_metadata::Metadata for contract structs
      
      * [examples] ran cargo fmt
      
      * [examples] derive type_metadata::Metadata for Which
      
      * [examples] make code hashes deploy inputs for delegator contract
      
      * [core] rename gas_cost to gas_limit
      
      * [core] remove parts that got re-introduced accidentally upon merge
      
      * [examples] add a README to the delegator contract
      
      * [examples] restructure delegator project structure
      
      * [examples] fix Cargo.toml of delegator
      
      * [lang] fix bug that ink-as-dependency derives Metadata for the state struct
      
      * [lang] add getter for account_id of ink-as-dependency state structs
      
      * [examples] adjust Delegator contract to make it work with old ABI generator
      
      * [lang] import FromAccountId
      
      * [examples] provide a build.sh script to deploy delegator contract
      
      * [readme] add section about wabt and wasm-utils tools
      
      * [readme] add off-chain test for the example smart contract
      
      * [examples] add .value call to contract create calls of delegator
      
      * [*] use fix-serialization branch of type-metadata
      
      * [*] use type-metadata master branch again (PR was merged)
      
      * [lang] update the noop compile test
      
      * [lang] simplified the noop compile test doc comments
      
      * [lang] fix compiletest for Flipper contract
      
      * [lang] fix compile tests for incrementer contract
      
      * [lang] fix compile tests for Events contract
      
      * [scripts] do not check the Delegator for now (needs special treatment)
      
      * [ci] update rust version from nightly-2019-08-13 to nightly-2019-08-30
      
      * [examples] restructure delegator contract project structure
      
      * [scripts] make check-examples script simpler again after delegator refactoring
      
      * [examples] clean up Delegator contract
      
      * [examples] improve build guidance of Delegator contract
      9cf5a571
  11. 20 Aug, 2019 1 commit
  12. 19 Aug, 2019 2 commits
    • Hero Bird's avatar
      Add initial call builder implementation (#173) · 9c05d4c1
      Hero Bird authored
      * [core] add initial call builder implementation
      
      * [core] add setters to CallBuilder
      
      * [core] fix invalid mod import in no_std
      
      * [core] fix minor formatting issues
      9c05d4c1
    • Hero Bird's avatar
      Reintroduce old ABI format generation (#174) · 7b5486af
      Hero Bird authored
      * [lang] reintroduce the old ABI generation
      
      We keep this in ink! until the new ABI format support is stable enough.
      
      * [examples] update examples to be able to use the old ABI generation
      
      * [cli] update template for old ABI generation
      7b5486af
  13. 16 Aug, 2019 2 commits
    • Hero Bird's avatar
      [core] ext_call PR followup and refinements (#171) · ecd609d5
      Hero Bird authored
      * [core] ext_call PR followup and refinements
      
      * [core] add call_invoke and call_evaluate to api.rs
      
      * [core] extract call method (#172)
      ecd609d5
    • taskooh's avatar
      Implement ext_call in ink! (#133) · 1228905c
      taskooh authored
      * import ext_call to trait and add function to generate input_data of ext_call
      
      remove #[allow(unused)] from ext_call()
      
      implment call_invoke and call_evaluate
      
      fix format
      
      call_invoke and call_evaluate returns Return<_,CallError>
      
      fixed
      
      * fix format and change return type of test_env
      
      * [core] implement CallError as struct and add call_return field to text_env
      
      * fix trivial and remove lang/src/encode_input_data
      
      * [core] use map_err while handling Result<>
      1228905c
  14. 15 Aug, 2019 2 commits
  15. 14 Aug, 2019 2 commits
    • Hero Bird's avatar
      ink! abi followup (#168) · 5c5d17df
      Hero Bird authored
      * [examples] remove unneeded dependencies
      
      * [cli] template: remove unneeded dependencies
      
      * [*] make test-env a default feature
      
      * [core] no longer export impl_empty_flush_for macro
      
      * [scripts] add usage docs to check-workspace
      
      * [readme] add section about scripts
      
      * [core] add lib.rs docs
      
      * [core] simple Cargo.toml formatting
      
      * [ci] use latest nightly-2019-08-13
      
      * [ci] upload kcov results after workspace checks
      
      * [scripts] fix the banner not being printed
      
      * Update README.md
      Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * Update core/src/lib.rs
      Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      5c5d17df
    • Hero Bird's avatar
      ink! ABI (#104) · fa6b0065
      Hero Bird authored
      * [abi] Create ink_abi sub crate
      
      * [abi] Add initial types for abi generation
      
      * [abi] Add EventParamSpec to include indexed event params
      
      * [abi] Add documentation field to specs
      
      * [abi] Add license and readme links and clean up authors
      
      * [abi] Add missing license headers
      
      * [abi] Fix some compile errors
      
      * [abi] Make macros usable internally
      
      * [abi] Create type_spec_of_tuple constructor macro
      
      * [abi] Implement serialization for tuples
      
      * [abi] Implement serialize for array types
      
      * [abi] Remove module prefix of Vec<T>
      
      * [abi] Apply rustfmt
      
      * [abi] Improve minor formatting
      
      * [abi] Add trait to allow external crate to specify serialize of TypeSpec<T>
      
      * [abi] Make rustfmt happy
      
      * [abi] Handle missing Vec in no_std environment
      
      We really need a further abstraction to handle memory types.
      Right now they life in ink_core but we shouldn't depend on ink_core from within ink_abi.
      So we want to extract the memory sub module out of ink_core into its own crate that we can from then on depend on.
      
      * [abi] Use same array pre-impls as metadata prototype impl
      
      * [abi] Depend on cennznet/type-metadata + adjustments
      
      * [abi] add missing license headers
      
      * [abi] fixes for renamings in type-metadata crate
      
      * [abi] add IntoCompact impls for layout types
      
      * [abi] properly forward std feature
      
      * [abi] implement Serialize for Key
      
      * [abi] apply rustfmt and add some layout constructors
      
      This also removes the dependency from ink_abi to ink_core and adds derive feature to type-metadata dependency.
      
      * [core] implement ink_abi traits for ink_core abstractions
      
      * adjust ink_abi Cargo.toml to using std feature by default
      
      # Conflicts:
      #	abi/Cargo.toml
      
      * [core] Integrate ink_abi no_std compat into ink_core
      
      * [lang] initial skeleton of codegen for ink_abi
      
      * Enhance Flush (#136)
      
      * [core] Enhance Flush trait to make it work with SyncCell and SyncChunk
      
      * apply rustfmt
      
      * [core] implement ink_abi traits for ink_core abstractions
      
      * [core] Integrate ink_abi no_std compat into ink_core
      
      * [core] Apply cargo fmt
      
      * [cli] initial adjustments for ink_abi to ink! template
      
      * [abi] clean-up of Cargo.toml
      
      * [abi] remove invalid lib docs
      
      * [utils] Update utilities docs
      
      * [abi] improve JSON encoding of layout structs
      
      * [abi] improve JSON encoding and add builder pattern constructors
      
      * [abi] Add InkProject meta type
      
      * [abi] temporarily depend on improve-json-output type-metadata branch
      
      * [core] adjust type-metadata temporary branch to use the same as ink_abi
      
      * [ci] add travis CI nightly-2019-08-01 channel (experimental)
      
      * [abi] add MessageSpecBuilder::{args, docs} methods
      
      * [core] implement Metadata for AccountId and Hash of DefaultSrmlTypes
      
      * [abi] change type of selector from u64 to u32
      
      * [lang] add some helper routines
      
      * [lang] add code generation for new ABI format
      
      * [abi,core] use master branch for type-metadata again
      
      * [lang] implement initial code gen for ABI generation
      
      * [examples] adjust Flipper contract example to ink_abi generation
      
      * [lang] remove old generate-abi-description feature and associated code
      
      * [examples] remove traces of removed generate-api-description feature
      
      * [core] make cells_origin and chunks_origin only visible for test-env
      
      * [cli] adjust template for ink-abi update
      
      * [abi] implement ink_abi_derive for HasLayout derive macro
      
      * [lang] make use of new ink_abi_derive functionality
      
      * [examples] adjust Flipper for new ink_abi derive crate feature
      
      This is needed because we disable default features.
      
      * [abi] remove some commented-out code
      
      * [chores] update README and include ink_abi docs
      
      * [abi] apply rustfmt
      
      * [lang] apply rustfmt
      
      * [abi] apply rustfmt to non derive crate
      
      * [core] apply rustfmt
      
      * [lang] trim doc strings coming from syn::Attribute
      
      * [examples] rename .tools directory to .ink
      
      * [examples] fix bug with no_std and "std" crate feature
      
      * [lang] fix bug in abi generation for events
      
      * [examples] adjust events example to new ink_abi
      
      * [lang] fix some more edge cases with doc string trimming
      
      * [lang] fix a bug that path matching for function arguments was off
      
      * [examples] adjust Incrementer to new ink_abi
      
      * [cli] rename .tools to .ink in template
      
      * [cli] update template Cargo.toml
      
      * [examples] temporarily fix type-metadata hick-up
      
      * [examples] make ink_abi optional
      
      * [examples] adjust Erc20 token example to new ink_abi
      
      * [cli] fix template no_std support
      
      * [*] use master branch of type-metadata crate again
      
      * [examples] replace parity-codec/std with scale/std
      
      * [core] derive Metadata for some util types
      
      This unfortunately was lost upon the latest rebase.
      
      * [ci] update from nightly-2019-08-01/2019-07-19 to just nightly-2019-08-09
      
      * [abi] remove commented-out code
      
      * [abi] add some docs to specs items
      
      * Update abi/src/specs.rs
      Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * Update abi/src/specs.rs
      Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * Update core/src/storage/collections/stash/impls.rs
      Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * Update core/src/storage/collections/stash/impls.rs
      Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * [examples] remove some more commented-out code
      
      * [lang] remove outdated docs
      
      * [lang] extract fn docs impl into helper method
      
      * [lang] fix compile-error in `filter_doc_attributes`
      
      * [core] use derive feature from ink_abi
      
      * [examples] adjust shared_vec example for ink_abi
      
      * [lang] trim doc comments raw string escape sequence
      
      * [lang] adjust noop test for ink_abi
      
      * [lang] adjust flipper test for ink_abi
      
      * [lang] improve raw-string char sequence fix
      
      * [lang] adjust incrementer test for ink_abi
      
      * [lang] adjust events test for ink_abi
      
      * [lang] fix whitespace (tabs) issues in lang tests
      
      * [ci] add examples to CI
      
      * [ci] remove +nightly attribute for examples
      
      * [abi] remove instances of std usage
      
      * [core] remove instances of std usage
      
      * [examples] erc20: remove std usage in no_std environment
      
      * [core] factor out ink_abi and type-metadata and guard their use with ink-generate-abi feature
      
      * [examples] adjust examples to newest refactoring in ink_core
      
      * [cli] adjust template to ink_core refactorings
      
      * [scripts] add new script to quickly check all example smart contracts
      
      * [ci] make use of new check-examples script
      
      * [*] apply rustfmt
      
      * [scripts] adjust check-examples to no longer set test-env
      
      * [scripts] Add check-workspace script
      
      * [examples] make test-env a default feature
      
      * [cli] make test-env a default feature for the template
      
      * [ci] update CI to use the new check-workspace script
      fa6b0065
  16. 09 Aug, 2019 1 commit
    • Andrew Jones's avatar
      [*] parity-codec -> parity-scale-codec (#164) · 9525f2f5
      Andrew Jones authored
      * [*] parity-codec -> parity-scale-codec
      
      * [core, model] Decode impls Option -> Result
      
      * [core] typed_cell load expect successful Decode
      
      * [core] Option to Result, remove redundant combinator
      
      * [model] Option to Result
      
      * [*] abbreviate parity-scale-codec
      
      * [core] fix dummy Call Decode impl
      9525f2f5
  17. 31 Jul, 2019 1 commit