Skip to content
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

fix: no op handlers #58

Merged
merged 27 commits into from
Jul 26, 2023
Merged

fix: no op handlers #58

merged 27 commits into from
Jul 26, 2023

Conversation

Unique-Divine
Copy link
Member

@Unique-Divine Unique-Divine commented Jul 25, 2023

jgimeno and others added 27 commits June 20, 2023 19:28
- Refactored `VestingSchedule::vested_amount` for better readability
- Added missing error handling for multiplication and division operations
- Updated variable names for clarity and consistency
- Removed unnecessary parentheses in arithmetic expressions
- Added missing test cases for the `VestingSchedule::LinearVestingWithCliff` variant
- Updated version number to `0.1.0` and edition to `2021` in `Cargo.toml`
- Removed `authors` field from `Cargo.toml`
- Added new dependencies `cw-utils` (`1.0.1`) and `thiserror` (`1.0.23`)
- Removed `dev-dependencies` section from `Cargo.toml`
- Updated import statements in `state.rs`
- Changed `cw20::Denom` to `cosmwasm_std::Denom` in `state.rs`
- Added `#[cw_serde]` attribute for `VestingAccount` struct in `state.rs`
- Added `test_denom_to_key` function in `state.rs`
- Modified `test_denom_to_key` function to use `Uint64` and `Uint128` from `cosmwasm_std`
- Modified `vesting_amount` value in `test_denom_to_key` function to `Uint128::zero()`
- Modified `claimed_amount` value in `vesting_account` to `Uint128::zero()`
- Remove the "license" field from the `Cargo.toml` file in `contracts/token-vesting`
- Omitted other large changes in the file diff summaries
- High level description: Updated `Cargo.toml` file in `contracts/token-vesting` by removing the "license" field
- Remove unused imports and unnecessary print statements in `msg.rs`
- Add additional properties and definitions to JSON schemas in `schema/`
- Add and update `.wasm` files in `artifacts/`
- Update the version of `cosmwasm-std` in `Cargo.toml`
- Change import statement in `state.rs`
- Modify `.wasm` files in `artifacts/`
- Add tests for registering cliff vesting account with native token in `contracts/token-vesting/src/testing.rs`
- Add tests for proper initialization in `contracts/token-vesting/src/testing.rs`
- Lower numeric tolerance for test files in `contracts/token-vesting/src/testing.rs`
- Add validation for `cliff_amount` in `VestingSchedule::LinearVestingWithCliff` in `contracts/token-vesting/src/contract.rs`
- Add validation for `vesting_amount` in `VestingSchedule::LinearVestingWithCliff` in `contracts/token-vesting/src/contract.rs`
- Add validation for `cliff_time` in `VestingSchedule::LinearVestingWithCliff` in `contracts/token-vesting/src/contract.rs`
- Remove `todo!("LinearVestingWithCliff")` in `register_vesting_account` function in `contracts/token-vesting/src/contract.rs`
- Refactor: Create `create_msg` helper function in `testing.rs` to generate `ExecuteMsg` object
- Fix assertion comparing cliff_time in `register_cliff_vesting_account_with_native_token` test in testing.rs
- Fix assertions in contract.rs related to cliff_time, end_time, start_time, and cliff_amount
- Improve code consistency and correctness in token-vesting module
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 91.32% and project coverage change: +4.54% 🎉

Comparison is base (20b2eba) 79.65% compared to head (4996883) 84.19%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
+ Coverage   79.65%   84.19%   +4.54%     
==========================================
  Files          41       39       -2     
  Lines        3161     4734    +1573     
==========================================
+ Hits         2518     3986    +1468     
- Misses        643      748     +105     
Files Changed Coverage Δ
contracts/shifter/src/msgs.rs 60.00% <ø> (ø)
packages/bindings/src/querier.rs 0.00% <0.00%> (ø)
packages/bindings/src/query.rs 100.00% <ø> (ø)
packages/bindings/src/state.rs 100.00% <ø> (ø)
contracts/bindings-perp/src/msg.rs 63.95% <66.66%> (-1.53%) ⬇️
contracts/token-vesting/src/contract.rs 73.88% <73.88%> (ø)
contracts/shifter/src/contract.rs 88.36% <83.09%> (+5.14%) ⬆️
contracts/token-vesting/src/msg.rs 93.88% <93.88%> (ø)
contracts/bindings-perp/src/contract.rs 90.30% <95.12%> (+1.41%) ⬆️
contracts/controller/src/contract.rs 78.76% <96.36%> (+7.29%) ⬆️
... and 5 more

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Unique-Divine Unique-Divine marked this pull request as ready for review July 25, 2023 21:41
@Unique-Divine Unique-Divine added the type: enhancement New feature or request label Jul 26, 2023
@Unique-Divine Unique-Divine merged commit 8ef3305 into main Jul 26, 2023
5 checks passed
@Unique-Divine Unique-Divine deleted the realu/no-op branch July 26, 2023 02:33
Unique-Divine added a commit that referenced this pull request Oct 10, 2023
* Include TokenVesting contract.

* update dependencies

* some refactor

* some refactor for block time

* dont need to clone

* add new vesting option

* remove periodic vesting option

* add linear vesting with cliff

* now works, starting point

* refactor times to Uint64, half baked

* refactor times to Uint64 done

* add linear vesting with cliff

* refactor: Refactor token vesting contract and dependencies

- Refactored `VestingSchedule::vested_amount` for better readability
- Added missing error handling for multiplication and division operations
- Updated variable names for clarity and consistency
- Removed unnecessary parentheses in arithmetic expressions
- Added missing test cases for the `VestingSchedule::LinearVestingWithCliff` variant
- Updated version number to `0.1.0` and edition to `2021` in `Cargo.toml`
- Removed `authors` field from `Cargo.toml`
- Added new dependencies `cw-utils` (`1.0.1`) and `thiserror` (`1.0.23`)
- Removed `dev-dependencies` section from `Cargo.toml`
- Updated import statements in `state.rs`
- Changed `cw20::Denom` to `cosmwasm_std::Denom` in `state.rs`
- Added `#[cw_serde]` attribute for `VestingAccount` struct in `state.rs`
- Added `test_denom_to_key` function in `state.rs`
- Modified `test_denom_to_key` function to use `Uint64` and `Uint128` from `cosmwasm_std`
- Modified `vesting_amount` value in `test_denom_to_key` function to `Uint128::zero()`
- Modified `claimed_amount` value in `vesting_account` to `Uint128::zero()`

* Refactor codebase for improved performance

* chore: Remove license field from Cargo.toml

- Remove the "license" field from the `Cargo.toml` file in `contracts/token-vesting`
- Omitted other large changes in the file diff summaries
- High level description: Updated `Cargo.toml` file in `contracts/token-vesting` by removing the "license" field

* refactor: Refactor and update code, schemas, and artifacts

- Remove unused imports and unnecessary print statements in `msg.rs`
- Add additional properties and definitions to JSON schemas in `schema/`
- Add and update `.wasm` files in `artifacts/`
- Update the version of `cosmwasm-std` in `Cargo.toml`
- Change import statement in `state.rs`
- Modify `.wasm` files in `artifacts/`

* feat: Refactor token vesting tests and validation

- Add tests for registering cliff vesting account with native token in `contracts/token-vesting/src/testing.rs`
- Add tests for proper initialization in `contracts/token-vesting/src/testing.rs`
- Lower numeric tolerance for test files in `contracts/token-vesting/src/testing.rs`
- Add validation for `cliff_amount` in `VestingSchedule::LinearVestingWithCliff` in `contracts/token-vesting/src/contract.rs`
- Add validation for `vesting_amount` in `VestingSchedule::LinearVestingWithCliff` in `contracts/token-vesting/src/contract.rs`
- Add validation for `cliff_time` in `VestingSchedule::LinearVestingWithCliff` in `contracts/token-vesting/src/contract.rs`
- Remove `todo!("LinearVestingWithCliff")` in `register_vesting_account` function in `contracts/token-vesting/src/contract.rs`

* feat: Improve validation checks for token vesting contracts

- Refactor: Create `create_msg` helper function in `testing.rs` to generate `ExecuteMsg` object

* fix: Fix assertion errors in token-vesting contract

- Fix assertion comparing cliff_time in `register_cliff_vesting_account_with_native_token` test in testing.rs
- Fix assertions in contract.rs related to cliff_time, end_time, start_time, and cliff_amount
- Improve code consistency and correctness in token-vesting module

* epic(contracts): token vesting first version

* (token-vesting): fn docs + move validation to type impl statements

* .editorconfig + DRY improvements + docs

* refactor: simply msg send construction

* feat(shifter)!: try no_op for the execute msg

* ci: no fail on upload error for coverage io

---------

Co-authored-by: Jonathan Gimeno <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants