forked from Finschia/cosmwasm
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: add drive macro IntoEvent #1
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* feat: enable circleci * fix: apply review
…chia#7) * feat: Implement token wrapper library and complete token tester * fix: used enum for target param
* feat: add approve, burn_from, transfer_from * fix: config.yml * fix: update schema * fix: msg name * fix: update schema
* feat: add query approved function for collection module * fix: fix LinkQueryWrapper type * fix: rename query_approved to query_is_approved * fix: bug fix query_is_approved return value * refactor: unify NFT and FT types into one * refactor: change the arguments of modify function * refactor: rename GetNft to GetNftCount * chore: add snake_case * refactor: remove target param from query_supply and split it into query_total, query_mint and query_burn in token module * refactor: remove target param from query_supply and split it into query_mint and query_burn in collection module * fix: update schema json * fix: separate token into FT and NFT and implement deserialize * fix: swap the order of parameters * fix: rename query param * fix: fix lint error * fix: change return error with match statement * chore: add unit test for deserialize * fix: fix ci error
* Upgrade parity-wasm * Update contract lock files * Use the same contract version for borner as the rest of the contracts * Set version: 0.11.0-alpha3 * Implement From<Binary> for Vec<u8> * Implement From<CanonicalAddr> for Vec<u8> * Add missing newlines * Add Binary::into_vec and CanonicalAddr::into_vec * Remove #[inline] attributes * Add riffle_shuffle * Remove canonical_length parameter * Remove the ability to change canonical length in VM's MockApi * Use riffle_shuffle in std's MockApi * Add simulation script * Use riffle_shuffle in vm's MockApi * Add left rotate by digit sum * Add CHANGELOG/MIGRATING entries * Update testing contract * Move MessageInfo outside of Env * Update do_init/handle/... exports * Update entry_points macro * Update burner contract * Fix VM calls for extra arg, burner integration tests pass * Hackatom builds properly * Fix tests for hackatom * Fixed all tests in vm package * Updated queue contract * Fix various test failures from CI * Update hackatom contract * Fix hackatom singlepass * Update staking contract * Fixed last test * Update CHANGELOG and README * Cleanup from PR review * Rebuild test contract, update gas prices * Fixed up merge conflict * Set version: 0.11.0-alpha4 * Remove unnecessary 'static restriction from Storage and Querier * Remove obsolete Instance::from_wasmer * Add Querier helpers query_wasm_{smart,raw} * Add special raw query to reflect contract * Simplify RawResponse * Sort imports in traits.rs * Add Deref to some common types * Test to show from_slice and from_binary both work on Binary now * Use &canonical instead of canonical.as_slice() some places * Delegate is_empty, len, into_vec into Deref target * Sort imports * Implement PartialEq<str> for HumanAddr * Document and test impl Deref for HumanAddr * Document and test impl Deref for CanonicalAddr * Document and test impl Deref for Binary * Set version: 0.11.0 * Test Hash and HashSet for HumanAddr * Allow using Binary in HashSet and HashMap * Allow using CanonicalAddr in HashSet and HashMap * Add a Sum helper for Uint128 * Sort imports * Implement Add for Uint128 with reference right hand side * Implement AddAssign with reference rhs for Uint128 * Use checked_sub to implement Sub for Uint128 * Implement Sub for Uint128 with reference rhs * Implement sum with reference rhs using add * Cleanup error result test * Make source type in Sum explicit * Add CHANGELOG entries * Pull out fn deserialize * Test some properties of deserialized module * Fix module name: compatability -> compatibility * Set version: 0.11.1 * Add FfiError::IteratorDoesNotExist * Replace range with scan/next in Storage trait * Update MockStorage to new trait * Use with_storage_from_context in do_next * Remove with_iterator_from_context * Remove VmError::IteratorDoesNotExist * Remove iterators from ContextData * Implement AddAssign for GasInfo * Handle errors in self.next perperly * Adapt burner integration tests to new storage * Add note on iterator IDs * Remove StorageIterator and MockIterator * Add CHANGELOG entries * Remove outdated doc comment * Remove StdError::Unauthorized * Use thiserror instead of snafu in std * Roll out all features in CI testing, remove backtraces feature * Convert FfiError to thiserror * Convert CommunicationError from snafu to thiserror * Convert RegionValidationError from snafu to thiserror * Convert VmError from snafu to thiserror * Remove snafu dependency from storage * Remove the snafu dependency from cosmwasm-vm * Create new contract_0.12.wasm development contract * Upgrade to rust-optimizer:0.10.4 for all dev contracts * Implement From<std::str::Utf8Error> and From<std::string::FromUtf8Error> * Add a few more explicit result types * Rename `Extern` to `Deps` * Generalize denom argument in Coin constructors * Remove change_querier * Add ExternMut ExternRef types * Update hackatom with ExternRef ExternMut * Remove some generic type parameters * Simplify hackatom contract * Remove Q generic from ExternRef/Mut * Update entry points for hackatom, integration tests pass * Port burner contract * Port queue * Start updating storage-bucket * Bucket works with dyn trait object * Singleton and Sequence work with trait objects * Update reflect contract * Fixed iterator support in bucket * Update staking contract * Improve naming and docs for &dyn ReadonlyStorage cast * Format migrating.md * Rename Deps* types, add Copy to DepsRef * Update contracts for renaming * Rename Querier types, for cleaner public Api * Revert "Rename Querier types, for cleaner public Api" This reverts commit a7efaa3. * Deps/DepsRef -> DepsMut/Deps * Implement PartialEq between Binary and Vec<u8>/&[u8] * Add missing PartialEq implementations between HumanAddr and str/&str * Compare Binary and Vec<u8> in hackatom * Rename module encoding -> binary * Sort imports * Add Binary::to_array * Document length limit of Binary::to_array * Ensure Binary::to_array cannot be used with Vec<u8> * Update vm test contract, fix typo * Let Binary::to_array compile with Rust lower than 1.47 * Remove TypedStorage and PrefixedStorage from the cosmwasm-storage * Remove ReadonlyStorage from cosmwasm-std and -storage * Remove ReadonlyStorage from sample contracts * Update CHANGELOG and MIGRATING * Set version: 0.11.2 * Bring back PrefixedStorage/ReadonlyPrefixedStorageage * Set publish = false consistently * Add Debug support for MemoryStorage * Pull out InstanceOptions * Make `FileSystemCache` crate internal * Convert modules from file to folder * Remove obsolete load_with_backend * Remove backend function in favour of BACKEND_NAME constant * Fix FileSystemCache::load return type * Use fresh temp dir for each run in test_file_system_cache_run * Rename to fs_cache and hits_fs_cache * Replace wabt with wat, which is written in pure Rust * Add Size type * Create InMemoryCache * Let FileSystemCache::store take a module reference only * Integrate memory cache * Ensure save_wasm does not write to memory cache * Rename CosmCache to Cache * Extract CacheOptions and make memory limit configurable * Rename `Extern` to `Backend` * Rename mock_dependencies -> mock_backend * Rename FfiError -> BackendError * Merge ffi and traits module into backend * Add panic when setting an empty value * Re-compile testing contract * Set version: 0.12.0-alpha1 * Allow constructing CacheOptions crate external * Set version: 0.12.0-alpha2 * Replace {Deps,DepsRef} with {Deps,DepsMut} * Add helper so handler can call other handler * Address concerns from PR review * Show users how to properly set dependencies in migration guide * Remove StorageTransaction and friends * Add LimitedDisplay and implement for HashSet * Implement LimitedDisplay for BTreeSet * Use to_string_limited for features * Cleanup error matching * Show all required imports in error message * Make imports test independent of iterator feature * Add compatibility table * Pull out collection_to_string_limited and implement for vector * Explain why sorting is needed * Test BTreeSet::to_string_limited * Set version: 0.12.0-alpha3 * Upgarde rust-optimizer to 0.10.5 * Set version: 0.12.0 * fix: fix package/ext for upstream v0.12.0 * fix: replace log with attributes in collection-tester It is to follow v0.12.0 * fix: replace Extern<...> with Deps[Mut] in collection_tester It is to follow v0.12.0. * fix: Insert arg MessageInfo in handle functions in collection_tester It is to follow v0.12.0. * fix: Remove unused imports * fix: fix the type of functions in collection_tester/src/state.rs It is to follow v0.12.0 * fix: fix collection-tester/lib.rs to use macro * fix: delete unneeded & for querier Now, querier is QuerierWrapper, so the & is unneeded * fix: insert a arg Env to query function It is to follow v0.12.0. * fix: replace env as an arg of init with _env * fix: version up and update Cargo.* for collection-tester * fix: replace log with attr in token-tester It is to follow v0.12.0. * fix: replace Extern<...> with Deps[Mut] in token_tester It is to follow v0.12.0. * fix: fix the type of functions in collection_tester/src/state.rs It is to follow v0.12.0 * fix: remove unused imports * fix: delete unneeded & for querier Now, querier is QuerierWrapper, so the & is unneeded * fix: change the arg of config and config_read to follow the change of state.rs It is to follow v0.12.0 * fix: fix init of token-tester to use MessageInfo It is to follow v0.12.0. * fix: add env to args of query functions in token-tester It is to follow v0.12.0. * fix: fix token-tester/lib.rs to use macro It is to follow v0.12.0. * fix: fix test in token-tester to follow v0.12.0 * fix: versionup token-tester contract * fix: execute cargo fmt * fix: suppress clippy error in contracts by too_many_arguments * fix: execute cargo fmt Co-authored-by: Simon Warta <simon@warta.it> Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
* docs: Add CHANGELOG-ours.md for v0.12.0-0.1.0 * docs: rename and add a note in CHANGELOG-LINK
Version bump to 0.12.0-0.1.0
build: version bump to 0.12.0-0.1.0
…integration tests (Finschia#87) * feat: add vm::testing::Contract Add vm::testing::Contract which represents a contract in integration tests. It enables integration tests instantiate a new instance every time before execute init/handle/query/migrate. See Finschia#85 for detail. * feat: improve the errors with Contract and add tests * refactor: rename some functions rename as following. get_instance -> generate_instance recycle -> recycle_instance * refactor: cargo fmt
Implement MockApi::new_with_gas_cost(canonicalize_cost, humanize_cost) and tests of them. This is for measuring how much gas is costed in integration tests with specified gas cost.
build: Version Bump to 0.12.0-0.2.0
This commit is for the changed the Migration PR merge policy. * tag 'v0.12.0': (270 commits) Set version: 0.12.0 Upgarde rust-optimizer to 0.10.5 Set version: 0.12.0-alpha3 Test BTreeSet::to_string_limited Explain why sorting is needed Pull out collection_to_string_limited and implement for vector Add compatibility table Make imports test independent of iterator feature Show all required imports in error message Cleanup error matching Use to_string_limited for features Implement LimitedDisplay for BTreeSet Add LimitedDisplay and implement for HashSet Remove StorageTransaction and friends Show users how to properly set dependencies in migration guide Address concerns from PR review Add helper so handler can call other handler Replace {Deps,DepsRef} with {Deps,DepsMut} Set version: 0.12.0-alpha2 Allow constructing CacheOptions crate external ... # Conflicts: # .circleci/config.yml # Cargo.lock # contracts/README.md # contracts/burner/Cargo.lock # contracts/burner/Cargo.toml # contracts/hackatom/Cargo.lock # contracts/hackatom/Cargo.toml # contracts/queue/Cargo.lock # contracts/queue/Cargo.toml # contracts/reflect/Cargo.lock # contracts/reflect/Cargo.toml # contracts/staking/Cargo.lock # contracts/staking/Cargo.toml # packages/schema/Cargo.toml # packages/std/Cargo.toml # packages/storage/Cargo.toml # packages/vm/Cargo.toml # packages/vm/src/testing/mock.rs # packages/vm/src/testing/mod.rs
chore: create merge commit 0.12.0
* tag 'v0.14.0-beta1+contracts1': (904 commits) Add reference to the other InitCallback Fix reflect incompatiblity Format shell script Remove hopelessly outdated building instructions Revert "Add dev branch for testing" Simplify path Use check_contract.sh helper in CI Add `check_contract.sh` helper Run `check_contract` in its own container Revert "Change CI build and release image" Revert "Add ghr (and go) to build and deploy stage" Add dev branch for testing Add ghr (and go) to build and deploy stage Change CI build and release image Format clean scripts Rename workspace clean Add clean_contracts script Make check_contracts work with clean repo Set version: 0.14.0-beta1 Fix benchmarking ...
remove results during 0.14.0-beta1 merge process
remove results during 0.14.0-beta1 merge process
testing code used in line/cosmwasm-simulator
LGTM |
|
* feat: support Uuid type * feat: port voting contract using Uuid type for example * build: bump uuid from 1.0.0-alpha.1 0.8.2 does not support wasm32 target. * feat: add voting-with-uuid contract W/A msgs for measure Uuid gas * feat: add sha1_calculate to cosmwasm-crypto * feat: add sha1 Native API * feat: port the uuid_v5 to use native sha1 via deps.api * chore: fix typo * chore: cargo fmt * build: cargo update * chore: regenerate schemar The version of schemars dependency has been updated by uuid. Changes of regeneration following schemars update. * refactor: use the wrapping_add * test: add longest name case test * fix: change uuid name format and increase sha1 input limit tested the longest name and it requires a larger input. Optimize the format and re-edit to the limit. * test: add same output test case * chore: adjsut generated uuid test case * chore: cargo fmt * chore: remove unused variables in voing-with-uuid * chore: cargo fmt for voting-with-uuid contract * chore: fix typo * chore: fix typo
* fix: export vm::testing::contract::Contract * fix: export vm::testing::result::{TestingError, TestingResult}
7432227
to
9a3ec74
Compare
9a3ec74
to
a89c574
Compare
This commit includes solving conflicts.
uint version 0.9.2 or lator uses the feature of edition2021. This cannot be used from wasmvm now.
* typo * Typo in IBC.md Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Make mock_ibc_{channel, packet} private * Change new release version to 0.16 * Add custom events to IBC response types * Add the cosmwasm-* version changes to MIGRATING.md * Update IBC contracts * Test the new events field in IBC response types * attr construction should panic for reserved names * type in packages/std/src/results/attribute.rs Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Collect Attribute and Event in events.rs * cargo update * Update to latest k256 v0.9.4 * Update Cargo.lock * Fix deprecation warning in benches * Update contract lock files * Move counterparty_version to IbcChannelOpenMsg * Diff between the 6 different IBC entry points * Update contracts * Fix clippy +1.53.0 warnings * Add changelog entry for to_hex() change * style * Update vm test contracts * Update docs re IBC channel entrypoint changes * Update docs * Set version: 0.16.0-rc1 * Update NOTICE file * Export GovMsg * Make IBC Msg types serialize as snake case * CHANGELOG update * Set version: 0.15.1 * Set version: 0.16.0-rc2 * Export VoteOption * Run format on std * Builder-esque pattern for Response * Revert "Builder-esque pattern for Response" (oops) This reverts commit 8202901. * CHANGELOG update * Set version: 0.15.2 * CHANGELOG update - 0.15.2 * Fix CHANGELOG * Set version: 0.16.0-rc3 * Use _contract_address rather than contract_address * Rebuild vm test contracts * Update event attributes for test (_contract_address) * Fix compiler errors * Add mock_wasmd_attr helper * cosmwasm-std: Rename IbcAcknowledgementWithPacket -> IbcPacketAckMsg * Update ibc-reflect-send contract * Update test contract for vm * Update CHANGELOG and MIGRATING * Fixed integration tests * Set version: 0.16.0-rc4 * Response: builder pattern instead of literals * Handy traits for Attribute * Make Response::add_attribute more flexible * cargo fmt * Add bulk setters for Response * Update contracts * Docs update * Switch back to `add_attribute` accepting 2 params * Improve docs * style * Apply the new "builder" pattern to IBC responses * Make `Event` non_exhaustive * CHANGELOG update * Make IBC Msgs non_exhaustive * Mark IbcAcknowledgement non_exhaustive * Mark IbcChannel and IbcPacket as non_exhaustive * Make `mock_ibc_channel` public again * CHANGELOG update * Update MIGRATING * Add constructors for IbcChannel and IbcPacket * Refactor event construction test * Set version: 0.16.0-rc5 * fix a typo * execute cargo schema in some contracts * Make sure all features are enabled for docs.rs * Improve events documentation * Fix broken docs link * Disable `backtraces` feature in docs builds * update schemas * Fully removed all generic implementations of Into<String>, and some others * Resolve merge conflict * Remove merge conflict Finschia#2 im rlly stupid * Got all of them (I think) * Fixed links to other CosmWasm projects * Improved the "Creating a Smart Contract" section * Update Wasm entry points * Update Rust entry points * Added `into_string` function to `Addr` * Removed the final ones * Removed all of them!!!! * Fixed formatting * Fixed the return type things... idk why they aren't working * Format * Thanks for the tip, forgot abt cargo fmt :) * Document Minimum Supported Rust Version (MSRV) * Turn bullet points into real sentences * Implement exported_function_names for both Wasmer and parity * Use exported_function_names in required_features_from_module * Inline required_features_from_wasmer_instance * Change Instance::required_features * Add required_features field to AnalysisReport * Pull out check_interface_version check * Remove too old test contract * Update compatibility table for CosmWasm 0.16 * Pull out INTERFACE_VERSION_PREFIX and SUPPORTED_INTERFACE_VERSION * Remove misleading hint from error message * Switch to loupe to estimate the module size in bytes * Add loupe to module_size reporting * Add clarifying comment * Fix clippy warning * Move module_size out of fs_cache * Add test check_interface_version_works * Avoid unnecessary vector when working with iterator * Set version: 0.16.0-rc6 * Set version: 0.16.0 * Add `From` conversions for `Cow<Addr>` * Parse contract address from instantiate event, not message event * Fix linting error * Rebuild ibc-reflect test contract * fix a test for std with backtraces * execute cargo fmt * Run multiple clippy jobs in CI * Use config version 2.1 * Fix needless borrow warnings * Don't pass too long input to VM in addr_validate/addr_canonicalize * Implement Isqrt for Uint128 * Implement Isqrt for Uint64 * Implement Uint256 * Expose Uint128::full_mul with a Uint256 result * Add a big number test for Uint256::isqrt() * Fix Uint256::try_from(&str) to expect dec values * More idiomatic names for Uint256 constructors * Simplify Uint256::Shr implementations * Test endianness of Uint256 * Fix uint256 shr tests * Export ConversionOverflowError * Docs and CHANGELOG * Implement Uint256::checked_shr * Format .md files * Expose Uint64::full_mul * Implement Uint512 * Implement Uint256::full_mul * Set version: 0.16.1 * CHANGELOG update * Test Uint{128,256,64}::multiply_ratio with large inputs * Implement `Decimal::from_ratio` using full multiplication * Make Decimal hold a Uint128 internally * Fix clippy * style (suggestions from code review) Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Code comments * Update CHANGELOG * CHANGELOG update * style fixes for Uint* * Update CHANGELOG * Update dependency k256 to ^0.9.6 * Use rust-optimizer 0.12.1 * Add a test for Uint* Display padding * Fix the padding bug for Uint256 and Uint512 * Add CHANGELOG entry for OverflowOperation::Shr * Remove extra ` from CHANGELOG * Add Shl implementation * Make Uint256::from_le_bytes const * Make Uint256::from_be_bytes const * Make Uint256::new const * Improve Uint256::new docs * Make FunctionDeterministic private * Implement FunctionDeterministic::default() * Replace Deterministic::new with ::default * Add configurations to FunctionDeterministic * Pull out MIDDLEWARE_NAME * Make error message specific to floats * Rename Deterministic -> Gatekeeper * Add note on Gatekeeper * Pull out GatekeeperConfig * Rename allow_float -> allow_floats * Implement Decimal256 * Fix some Decimal256 bugs * Fix Decimal256 tests * Update Decimal256 comments * clippy * CHANGELOG update * Add a comment about Decimal*::sqrt algorithm * Define DECIMAL_PLACES as a const in Decimal* * Decimal256: 18 decimal places + const fns * Decimal256: DECIMAL_FRACTIONAL* are now constants * Update CHANGELOG * Apply suggestions from code review Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Fix CHANGELOG * Set version: 0.16.2 * CHANGELOG - new release * fix: update voting-with-uuid * fix: update rust version for git workflow * chore: update reflect contract schema * chore: formating * chore: cargo clippy * fix: fix crypt bench * fix: update github workflow's rust optimizer * feat: pin dependent uint version 0.9.1 uint version 0.9.2 or lator uses the feature of edition2021. This cannot be used from wasmvm now. Co-authored-by: Tomasz Kurcz <uint@lavabit.com> Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> Co-authored-by: Simon Warta <simon@warta.it> Co-authored-by: Mauro Lacy <mauro@lacy.com.es> Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com> Co-authored-by: Giancarlos Salas <giansalex@gmail.com> Co-authored-by: lukerhoads <pumpkineater661@gmail.com> Co-authored-by: Bartłomiej Kuras <bart.k@confio.gmbh>
…inschia#159) This reverts commit 203d683.
feat: merging upstream's 0.16.3
8 tasks
c277dad
to
332d6e5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based 0.16.2